/* ============================================
   GOOGLE FONTS IMPORT
   ============================================ */
@import url('https://fonts.googleapis.com/css2?family=Crimson+Text:ital,wght@0,400;0,600;0,700;1,400&family=Inter:wght@400;500;600&display=swap');

/* ============================================
   COLOR PALETTE (from cover)
   ============================================ */
:root {
    --slate-blue: #485A6C;
    --cream: #EBE8E0;
    --charcoal: #2B2D2F;
    --text-gray: #4A4A4A;
    --light-gray: #C8C5BD;
    --white: #FFFFFF;
}

/* ============================================
   RESET & BASE
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Crimson Text', 'Georgia', serif;
    font-size: 18px;
    line-height: 1.7;
    color: var(--text-gray);
    background-color: var(--cream);
    -webkit-font-smoothing: antialiased;
}

/* ============================================
   TYPOGRAPHY
   ============================================ */
h1, h2, h3, h4 {
    font-weight: 700;
    color: var(--charcoal);
    line-height: 1.2;
}

h1 {
    font-size: 3.5rem;
    letter-spacing: -0.02em;
}

h2 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
}

h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

p {
    margin-bottom: 1.25rem;
}

.subtitle {
    font-size: 2rem;
    font-weight: 400;
    font-style: italic;
    color: var(--slate-blue);
    margin-top: 0.5rem;
    margin-bottom: 2rem;
}

/* ============================================
   LAYOUT CONTAINER
   ============================================ */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.section {
    padding: 5rem 0;
}

/* ============================================
   NAVIGATION
   ============================================ */
nav {
    background: var(--slate-blue);
    border-bottom: 1px solid var(--slate-blue);
    padding: 0.75rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    overflow: visible;
}

nav .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

nav .logo {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--white);
    text-decoration: none;
    letter-spacing: 0.02em;
}

nav ul {
    display: flex;
    list-style: none;
    gap: 2.5rem;
}

nav a {
    color: var(--text-gray);
    text-decoration: none;
    font-size: 1rem;
    font-family: 'Inter', sans-serif;
    transition: color 0.3s ease;
}

nav a:hover {
    color: var(--slate-blue);
}

.shema {
    text-align: left;
    font-style: normal;
    color: var(--white);
    margin: 0;
    font-size: 1.5rem;
    flex: 1;
}

.shema .reference {
    font-size: 1rem;
}

.home-link {
    font-family: 'Inter', sans-serif;
    font-size: 0.875rem;
    color: var(--white);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.home-link:hover {
    color: rgba(255, 255, 255, 0.8);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.nav-separator {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.875rem;
}

.hamburger {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 24px;
    position: relative;
}

.hamburger span {
    display: block;
    width: 100%;
    height: 3px;
    background: var(--white);
    position: absolute;
    transition: all 0.3s ease;
}

.hamburger span:nth-child(1) {
    top: 0;
}

.hamburger span:nth-child(2) {
    top: 50%;
    transform: translateY(-50%);
}

.hamburger span:nth-child(3) {
    bottom: 0;
}

.hamburger.active span:nth-child(1) {
    top: 50%;
    transform: translateY(-50%) rotate(45deg);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    bottom: 50%;
    transform: translateY(50%) rotate(-45deg);
}


/* ============================================
   HERO SECTION
   ============================================ */
.hero {
    padding: 3rem 0 2rem;
    background: var(--cream);
}

.book-cover-container {
    position: relative;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.book-cover {
    width: 100%;
    height: auto;
    display: block;
}

.hero-content {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 4rem;
    align-items: center;
}

.book-cover {
    width: 100%;
    height: auto;
}

.hero-text h1 {
    margin-bottom: 0.5rem;
}

.hero-description {
    font-size: 1.25rem;
    line-height: 1.8;
    margin: 2rem 0;
    color: var(--text-gray);
}

.publication-date {
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    color: var(--slate-blue);
    margin-top: 1.5rem;
    margin-bottom: 0;
    font-weight: 500;
}

/* ============================================
   CHAPTER PREVIEW
   ============================================ */
.chapters {
    background: var(--cream);
    scroll-margin-top: 3rem;
}

.chapters h2 {
    text-align: center;
    margin-bottom: 3rem;
}

.chapter-list {
    max-width: 900px;
    margin: 0 auto;
}

.chapter-item {
    margin-bottom: 4rem;
    border-left: 4px solid var(--light-gray);
    padding-left: 2rem;
    scroll-margin-top: 6rem;
}

.chapter-item:last-child {
    margin-bottom: 0;
}

.chapter-item h3 {
    color: var(--charcoal);
    margin-bottom: 0.5rem;
    font-size: 1.5rem;
}

.chapter-number {
    font-family: 'Inter', sans-serif;
    font-size: 0.875rem;
    color: var(--slate-blue);
    font-weight: 600;
    letter-spacing: 0.05em;
    display: block;
    margin-bottom: 0.3rem;
}

.chapter-description {
    font-size: 1.05rem;
    line-height: 1.7;
    color: var(--text-gray);
    margin-bottom: 0.5rem;
}

.read-more {
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
    color: var(--slate-blue);
    text-decoration: underline;
    font-weight: 500;
    letter-spacing: 0.02em;
    transition: color 0.3s ease;
}

.read-more::after {
    content: " →";
}

.read-more:hover {
    color: var(--charcoal);
}

/* ============================================
   BOOK DESCRIPTION
   ============================================ */
.book-description-section {
    background: var(--white);
    padding: 3rem 0;
}

.book-description-text {
    max-width: 800px;
    margin: 0 auto;
    font-size: 1.25rem;
    line-height: 1.8;
    color: var(--text-gray);
    text-align: left;
}

/* ============================================
   READERSHIP
   ============================================ */
.readership {
    background: var(--white);
    padding: 3rem 0;
}

.readership h2 {
    text-align: center;
    margin-bottom: 2rem;
}

.readership-description {
    max-width: 800px;
    margin: 0 auto;
    font-size: 1.125rem;
    line-height: 1.8;
    color: var(--text-gray);
    text-align: left;
    margin-bottom: 2rem;
}

.readership-description:last-child {
    margin-bottom: 0;
}

/* ============================================
   EMAIL SIGNUP
   ============================================ */
.email-signup {
    background: var(--slate-blue);
    color: var(--white);
    padding: 3rem 0;
}

.email-signup h2 {
    color: var(--white);
    text-align: center;
    margin-bottom: 1rem;
}

.email-form {
    max-width: 500px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.email-row {
    display: flex;
    gap: 0.75rem;
}

.checkbox-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--white);
    font-size: 0.9rem;
}

.newsletter-checkbox {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.checkbox-container label {
    cursor: pointer;
    margin: 0;
}

.email-input {
    flex: 1;
    padding: 1rem 1.5rem;
    font-size: 1rem;
    border: none;
    background: var(--white);
    color: var(--charcoal);
}

.email-input::placeholder {
    color: #999;
}

.email-submit {
    padding: 0.75rem 1.5rem;
    background: var(--white);
    color: var(--slate-blue);
    border: none;
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.email-submit:hover {
    background: var(--charcoal);
    color: var(--white);
}

.privacy-note {
    text-align: center;
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.8);
    margin-top: 1rem;
}

/* ============================================
   FOOTER
   ============================================ */
footer {
    background: var(--charcoal);
    color: rgba(255, 255, 255, 0.7);
    padding: 1.5rem 0;
    font-family: 'Inter', sans-serif;
    font-size: 0.875rem;
}

footer p {
    margin: 0;
}

footer .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

footer a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: color 0.3s ease;
}

footer a:hover {
    color: var(--white);
}

footer .links {
    display: flex;
    gap: 2rem;
}

/* ============================================
   MODAL
   ============================================ */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    justify-content: center;
    align-items: center;
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #f1f1f1;
    font-size: 50px;
    font-weight: 300;
    cursor: pointer;
    z-index: 1001;
    transition: color 0.3s ease;
}

.modal-close:hover,
.modal-close:focus {
    color: #bbb;
}

.modal-content {
    max-width: 95%;
    max-height: 95vh;
    box-shadow: 0 0 60px rgba(0, 0, 0, 0.5);
    cursor: default;
}

.modal-hint {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, 0.6);
    font-family: 'Inter', sans-serif;
    font-size: 0.875rem;
    text-align: center;
    z-index: 1001;
}

/* ============================================
   CHAPTERS PAGE
   ============================================ */
.chapters-page {
    background: var(--cream);
    padding-bottom: 0;
}

.chapters-page h1 {
    color: var(--charcoal);
}

.chapter-preview {
    max-width: 800px;
    margin: 0 auto 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--light-gray);
    scroll-margin-top: 8rem;
}

.chapter-preview:last-of-type {
    border-bottom: none;
}

.chapter-preview .chapter-number {
    font-family: 'Inter', sans-serif;
    font-size: 0.875rem;
    color: var(--slate-blue);
    font-weight: 600;
    letter-spacing: 0.05em;
    display: block;
    margin-bottom: 0.5rem;
}

.chapter-preview h2 {
    color: var(--charcoal);
    margin-bottom: 1.5rem;
    font-size: 2rem;
}

.chapter-preview p {
    font-size: 1.125rem;
    line-height: 1.8;
    color: var(--text-gray);
    margin-bottom: 1.25rem;
}

.back-link {
    margin-top: 0.25rem;
    margin-bottom: 0;
}

.back-link a {
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
    color: var(--slate-blue);
    text-decoration: underline;
    font-weight: 500;
    letter-spacing: 0.02em;
    transition: color 0.3s ease;
}

.back-link a:hover {
    color: var(--charcoal);
}


/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
    h1 {
        font-size: 2.5rem;
    }

    h2 {
        font-size: 2rem;
    }

    .hero-content {
        grid-template-columns: 1fr;
        gap: 3rem;
        text-align: center;
    }

    .book-cover-container {
        max-width: 220px;
        margin: 0 auto;
    }

    nav ul {
        flex-direction: column;
        gap: 1rem;
    }

    .hamburger {
        display: block;
    }

    nav .container {
        gap: 1.5rem;
    }

    .nav-links {
        display: none !important;
        position: absolute;
        top: 100%;
        right: 0;
        background: var(--slate-blue);
        padding: 1rem;
        border-radius: 0 0 0 8px;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
        flex-direction: column;
        gap: 0.75rem;
        align-items: flex-start;
        min-width: 150px;
        z-index: 200;
    }

    .nav-links.active {
        display: flex !important;
    }

    .nav-separator {
        display: none;
    }

    .email-form {
        flex-direction: column;
    }

    footer .container {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .email-row {
        flex-direction: column;
    }

    footer .links {
        flex-direction: column;
        gap: 0.5rem;
    }

    .modal-close {
        top: 10px;
        right: 15px;
        font-size: 40px;
    }

    .modal-content {
        max-width: 98%;
        max-height: 98vh;
    }

    .modal-hint {
        bottom: 10px;
        font-size: 0.75rem;
    }
}

.book-cover {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.book-cover:hover {
    transform: scale(1.06);
    box-shadow: 0 25px 70px rgba(0, 0, 0, 0.2);
}
