﻿:root {
    --ink: #0a0d14;
    --ink-2: #11151f;
    --ink-3: #171c28;
    --paper: #f1e9da;
    --paper-dim: #cfc6b5;
    --paper-mute: #8c8575;
    --gold: #c9a24a;
    --gold-soft: #b8924a;
    --line: rgba(241, 233, 218, 0.12);
    --line-strong: rgba(241, 233, 218, 0.24);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    background: var(--ink);
    color: var(--paper);
    font-family: 'EB Garamond', 'Iowan Old Style', Georgia, serif;
    font-size: 19px;
    line-height: 1.65;
    font-weight: 400;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.flag {
    display: inline-block;
    vertical-align: -0.1em;
    margin-inline-end: 0.4em;
    border-radius: 1px;
    box-shadow: 0 0 0 1px rgb(0 0 0 / 0.12); /* keeps the white band visible on light backgrounds */
}

.smallcaps {
    text-transform: none;
    font-variant-caps: small-caps;
    font-feature-settings: "smcp" 1;
}

/* ========= STARFIELD (very subtle, top-heavy) ========= */
.starfield {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    background: radial-gradient(1200px 700px at 80% -10%, rgba(201, 162, 74, 0.08), transparent 60%), radial-gradient(900px 600px at 10% 20%, rgba(60, 90, 140, 0.12), transparent 60%);
}

.stars {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    opacity: 0.7;
}

    .stars::before, .stars::after {
        content: "";
        position: absolute;
        inset: 0;
        background-image: radial-gradient(1px 1px at 23% 11%, rgba(241,233,218,0.9), transparent 60%), radial-gradient(1px 1px at 71% 4%, rgba(241,233,218,0.7), transparent 60%), radial-gradient(1px 1px at 87% 18%, rgba(241,233,218,0.85),transparent 60%), radial-gradient(1px 1px at 48% 22%, rgba(241,233,218,0.5), transparent 60%), radial-gradient(1.5px 1.5px at 12% 33%, rgba(241,233,218,0.95), transparent 60%), radial-gradient(1px 1px at 62% 28%, rgba(241,233,218,0.6), transparent 60%), radial-gradient(1px 1px at 35% 44%, rgba(241,233,218,0.5), transparent 60%), radial-gradient(1px 1px at 90% 39%, rgba(241,233,218,0.7), transparent 60%), radial-gradient(1px 1px at 5% 58%, rgba(241,233,218,0.55),transparent 60%), radial-gradient(1.2px 1.2px at 78% 55%, rgba(241,233,218,0.8), transparent 60%), radial-gradient(1px 1px at 55% 66%, rgba(241,233,218,0.45),transparent 60%), radial-gradient(1px 1px at 28% 76%, rgba(241,233,218,0.5), transparent 60%), radial-gradient(1px 1px at 68% 81%, rgba(241,233,218,0.55),transparent 60%), radial-gradient(1.3px 1.3px at 14% 90%, rgba(241,233,218,0.7), transparent 60%), radial-gradient(1px 1px at 83% 94%, rgba(241,233,218,0.45),transparent 60%);
        background-size: 100% 100%;
        mask-image: linear-gradient(to bottom, black 0%, black 40%, transparent 85%);
        -webkit-mask-image: linear-gradient(to bottom, black 0%, black 40%, transparent 85%);
    }

/* a single streaking meteor */
.meteor {
    position: fixed;
    top: 15%;
    right: 10%;
    width: 180px;
    height: 1px;
    background: linear-gradient(to left, rgba(201,162,74,0.9), rgba(201,162,74,0.2), transparent);
    transform: rotate(-18deg);
    z-index: 0;
    opacity: 0.7;
    pointer-events: none;
}

    .meteor::before {
        content: "";
        position: absolute;
        right: 0;
        top: -2px;
        width: 5px;
        height: 5px;
        background: #f1e9da;
        border-radius: 50%;
        box-shadow: 0 0 10px 2px rgba(241,233,218,0.8), 0 0 20px 4px rgba(201,162,74,0.5);
    }

/* ========= LAYOUT ========= */
.container {
    position: relative;
    z-index: 1;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 32px;
}

.narrow {
    max-width: 680px;
    margin: 0 auto;
}

/* ========= NAV ========= */
.nav {
    position: relative;
    z-index: 2;
    padding: 32px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--line);
}

.nav-mark {
    font-family: 'Fraunces', Georgia, serif;
    font-weight: 400;
    font-size: 15px;
    letter-spacing: 0.38em;
    text-transform: uppercase;
    color: var(--paper);
}

    .nav-mark span {
        color: var(--gold);
    }

.nav-links {
    display: flex;
    gap: 36px;
    list-style: none;
}

    .nav-links a {
        color: var(--paper-dim);
        text-decoration: none;
        font-size: 13px;
        letter-spacing: 0.22em;
        text-transform: uppercase;
        font-family: 'Fraunces', Georgia, serif;
        font-weight: 400;
        transition: color 0.3s;
    }

        .nav-links a:hover {
            color: var(--gold);
        }

/* ========= HERO ========= */
.hero {
    padding: 120px 0 140px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
}

.hero-text .kicker {
    font-family: 'Fraunces', Georgia, serif;
    font-size: 12px;
    letter-spacing: 0.4em;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: 32px;
    display: inline-block;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--gold-soft);
}

.hero h1 {
    font-family: 'Fraunces', Georgia, serif;
    font-size: clamp(64px, 10vw, 140px);
    font-weight: 300;
    line-height: 0.95;
    letter-spacing: -0.03em;
    color: var(--paper);
    margin-bottom: 24px;
    font-variation-settings: "opsz" 144;
}

.hero .tagline {
    font-family: 'Fraunces', Georgia, serif;
    font-style: italic;
    font-weight: 300;
    font-size: clamp(20px, 2.2vw, 26px);
    line-height: 1.45;
    color: var(--paper-dim);
    max-width: 440px;
    margin-bottom: 48px;
}

.buy-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 340px;
}

.buy-label {
    font-family: 'Fraunces', Georgia, serif;
    font-size: 11px;
    letter-spacing: 0.36em;
    text-transform: uppercase;
    color: var(--paper-mute);
    margin-bottom: 4px;
}

.buy-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 24px;
    text-decoration: none;
    font-family: 'Fraunces', Georgia, serif;
    font-size: 14px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    font-weight: 400;
    transition: all 0.35s ease;
    border: 1px solid var(--line-strong);
    color: var(--paper);
    background: transparent;
}

    .buy-btn:hover {
        border-color: var(--gold);
        color: var(--gold);
        transform: translateY(-2px);
    }

    .buy-btn .arrow {
        font-family: 'Fraunces', Georgia, serif;
        font-size: 20px;
        font-weight: 300;
        transition: transform 0.35s ease;
    }

    .buy-btn:hover .arrow {
        transform: translateX(6px);
    }

/* ========= BOOK COVER PLACEHOLDER ========= */
.cover-wrap {
    display: flex;
    justify-content: center;
    perspective: 1200px;
}

.cover-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 2px;
}

/* ========= SECTION COMMON ========= */
section {
    position: relative;
    z-index: 1;
    padding: 120px 0;
}

.section-label {
    font-family: 'Fraunces', Georgia, serif;
    font-size: 12px;
    letter-spacing: 0.4em;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: 40px;
    display: flex;
    align-items: center;
    gap: 16px;
}

    .section-label::before {
        content: "";
        width: 40px;
        height: 1px;
        background: var(--gold-soft);
    }

h2 {
    font-family: 'Fraunces', Georgia, serif;
    font-size: clamp(40px, 5vw, 64px);
    font-weight: 300;
    letter-spacing: -0.02em;
    line-height: 1.05;
    color: var(--paper);
    margin-bottom: 60px;
    font-variation-settings: "opsz" 144;
}

    h2 em {
        font-style: italic;
        color: var(--gold);
        font-weight: 300;
    }

/* ========= DEDICATION ========= */
.dedication {
    text-align: center;
    padding: 160px 0;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.dedication-mark {
    font-family: 'Fraunces', Georgia, serif;
    font-size: 11px;
    letter-spacing: 0.4em;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: 48px;
}

.dedication p {
    font-family: 'Fraunces', Georgia, serif;
    font-style: italic;
    font-weight: 300;
    font-size: clamp(24px, 3vw, 34px);
    line-height: 1.5;
    color: var(--paper);
    max-width: 620px;
    margin: 0 auto;
    font-variation-settings: "opsz" 144;
}

.dedication .ornament {
    display: block;
    margin: 40px auto 0;
    font-family: 'Fraunces', serif;
    font-size: 14px;
    color: var(--gold);
    letter-spacing: 2em;
    padding-left: 2em;
}

/* ========= ABSTRACT ========= */
.abstract .prose {
    font-size: 20px;
    line-height: 1.75;
    color: var(--paper-dim);
    margin-bottom: 60px;
}

    .abstract .prose p + p {
        margin-top: 24px;
    }

    .abstract .prose .lead::first-letter {
        font-family: 'Fraunces', Georgia, serif;
        font-size: 5.2em;
        float: left;
        line-height: 0.85;
        margin: 8px 12px 0 0;
        color: var(--gold);
        font-weight: 300;
    }

.pullquote {
    position: relative;
    padding: 40px 0 40px 48px;
    margin: 60px 0;
    border-left: 1px solid var(--gold-soft);
}

    .pullquote::before {
        content: "";
        position: absolute;
        left: -4px;
        top: 0;
        width: 7px;
        height: 7px;
        border-radius: 50%;
        background: var(--gold);
        box-shadow: 0 0 10px var(--gold-soft);
    }

    .pullquote blockquote {
        font-family: 'Fraunces', Georgia, serif;
        font-style: italic;
        font-weight: 300;
        font-size: clamp(22px, 2.6vw, 30px);
        line-height: 1.45;
        color: var(--paper);
        font-variation-settings: "opsz" 144;
    }

/* ========= CHAPTERS ========= */
.chapters-intro {
    max-width: 620px;
    margin-bottom: 80px;
    font-size: 19px;
    line-height: 1.7;
    color: var(--paper-dim);
}

.act {
    margin-bottom: 80px;
}

.act-header {
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 40px;
    align-items: baseline;
    padding-bottom: 28px;
    margin-bottom: 40px;
    border-bottom: 1px solid var(--line-strong);
}

.act-number {
    font-family: 'Fraunces', Georgia, serif;
    font-size: 13px;
    letter-spacing: 0.4em;
    text-transform: uppercase;
    color: var(--gold);
}

.act-title {
    font-family: 'Fraunces', Georgia, serif;
    font-style: italic;
    font-weight: 300;
    font-size: clamp(26px, 3.2vw, 38px);
    line-height: 1.2;
    color: var(--paper);
    font-variation-settings: "opsz" 144;
}

    .act-title em {
        color: var(--gold);
        font-style: italic;
    }

.chapter {
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 40px;
    padding: 32px 0;
    border-bottom: 1px solid var(--line);
    transition: background 0.4s ease;
}

    .chapter:last-child {
        border-bottom: none;
    }

    .chapter:hover {
        background: linear-gradient(to right, rgba(201,162,74,0.03), transparent 60%);
    }

.chapter-num {
    font-family: 'Fraunces', Georgia, serif;
    font-size: 13px;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--paper-mute);
    padding-top: 4px;
}

    .chapter-num .roman {
        display: block;
        color: var(--gold);
        font-size: 28px;
        letter-spacing: 0.05em;
        font-weight: 300;
        margin-top: 8px;
        text-transform: none;
        font-variation-settings: "opsz" 144;
    }

.chapter-title {
    font-family: 'Fraunces', Georgia, serif;
    font-size: clamp(22px, 2.4vw, 28px);
    font-weight: 400;
    line-height: 1.25;
    color: var(--paper);
    margin-bottom: 8px;
    font-variation-settings: "opsz" 144;
}

.chapter-tagline {
    font-family: 'Fraunces', Georgia, serif;
    font-style: italic;
    font-weight: 400;
    font-size: 15px;
    color: var(--gold-soft);
    letter-spacing: 0.04em;
    margin-bottom: 16px;
}

.chapter-desc {
    font-size: 17px;
    line-height: 1.7;
    color: var(--paper-dim);
    max-width: 640px;
}

/* ========= CLOSING CTA ========= */
.buy-closing {
    text-align: center;
    padding: 100px 0 40px;
}

    .buy-closing .buy-label {
        display: block;
        margin-bottom: 20px;
    }

.buy-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px;
}

    .buy-row .buy-btn {
        flex: 0 1 260px;
    }

/* ========= FOOTER ========= */
footer {
    position: relative;
    z-index: 1;
    padding: 80px 0 60px;
    border-top: 1px solid var(--line);
    text-align: center;
}

.footer-mark {
    font-family: 'Fraunces', Georgia, serif;
    font-size: 28px;
    font-weight: 300;
    font-style: italic;
    color: var(--paper);
    margin-bottom: 12px;
    font-variation-settings: "opsz" 144;
}

.footer-meta {
    font-family: 'Fraunces', Georgia, serif;
    font-size: 11px;
    letter-spacing: 0.4em;
    text-transform: uppercase;
    color: var(--paper-mute);
}

    .footer-meta span {
        color: var(--gold);
    }

/* ========= RESPONSIVE ========= */
@media (max-width: 900px) {
    body {
        font-size: 17px;
    }

    .container {
        padding: 0 24px;
    }

    .nav-links {
        gap: 20px;
    }

        .nav-links a {
            font-size: 11px;
            letter-spacing: 0.18em;
        }

    .hero {
        grid-template-columns: 1fr;
        gap: 64px;
        padding: 64px 0 80px;
    }

    .hero-text {
        order: 2;
    }

    .cover-wrap {
        order: 1;
    }

    .cover {
        width: 260px;
        height: 390px;
    }

    .cover-inner {
        inset: 28px 24px;
    }

    .cover-title {
        font-size: 40px;
    }

    section {
        padding: 80px 0;
    }

    .dedication {
        padding: 100px 0;
    }

    .act-header, .chapter {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .chapter-num {
        padding-top: 0;
    }

        .chapter-num .roman {
            display: inline;
            font-size: 18px;
            margin-left: 8px;
            margin-top: 0;
        }

    .meteor {
        display: none;
    }
}

@media (max-width: 520px) {
    .nav {
        flex-direction: column;
        gap: 16px;
    }

    .nav-mark {
        font-size: 13px;
    }

    .hero h1 {
        font-size: 64px;
    }

    .pullquote {
        padding-left: 28px;
    }
}

/* ========= MOTION ========= */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-text > * {
    animation: fadeUp 0.9s ease-out both;
}

.hero-text .kicker {
    animation-delay: 0.05s;
}

.hero-text h1 {
    animation-delay: 0.15s;
}

.hero-text .tagline {
    animation-delay: 0.3s;
}

.hero-text .buy-group {
    animation-delay: 0.45s;
}

.cover-wrap {
    animation: fadeUp 1.1s ease-out 0.25s both;
}

@media (prefers-reduced-motion: reduce) {
    * {
        animation: none !important;
        transition: none !important;
    }
}
