/* === Reset & Base === */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --color-bg: #1a1a2e;
    --color-bg-alt: #16213e;
    --color-bg-card: #1e2a45;
    --color-text: #e0d8cc;
    --color-text-muted: #a89f91;
    --color-gold: #c9a84c;
    --color-gold-light: #e2c97e;
    --color-accent: #8b7355;
    --color-border: #2a3550;
    --color-available: #4a8c5c;
    --color-soon: #c9a84c;
    --color-future: #6b7b8d;
    --font-serif: 'Cormorant Garamond', 'Georgia', 'Times New Roman', serif;
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --max-width: 960px;
}

html {
    font-size: 18px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    background-color: var(--color-bg);
    color: var(--color-text);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 1.5rem;
}

a {
    color: var(--color-gold);
    text-decoration: none;
    transition: color 0.2s;
}

a:hover {
    color: var(--color-gold-light);
}

/* === Hero === */
.hero {
    text-align: center;
    padding: 6rem 1.5rem 4rem;
    background: linear-gradient(180deg, #0f0f23 0%, var(--color-bg) 100%);
}

.hero-greek {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    color: var(--color-gold);
    letter-spacing: 0.3em;
    margin-bottom: 1rem;
}

.hero-title {
    font-family: var(--font-serif);
    font-size: 4rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    color: var(--color-text);
    margin-bottom: 1.5rem;
}

.hero-tagline {
    font-family: var(--font-serif);
    font-size: 1.35rem;
    font-style: italic;
    color: var(--color-text-muted);
    max-width: 600px;
    margin: 0 auto 1rem;
    line-height: 1.6;
}

.hero-author {
    font-size: 0.95rem;
    color: var(--color-text-muted);
    letter-spacing: 0.05em;
}

/* === About === */
.about {
    padding: 3rem 1.5rem;
    text-align: center;
    border-bottom: 1px solid var(--color-border);
}

.about p {
    font-family: var(--font-serif);
    font-size: 1.25rem;
    font-style: italic;
    color: var(--color-text-muted);
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.8;
}

/* === Library Sections === */
.library {
    padding: 4rem 1.5rem;
    border-bottom: 1px solid var(--color-border);
}

.library-title {
    font-family: var(--font-serif);
    font-size: 2.2rem;
    font-weight: 600;
    color: var(--color-text);
    text-align: center;
    margin-bottom: 0.5rem;
}

.library-greek {
    font-family: var(--font-serif);
    font-size: 1.1rem;
    color: var(--color-gold);
    text-align: center;
    margin-bottom: 0.5rem;
}

.library-desc {
    text-align: center;
    color: var(--color-text-muted);
    margin-bottom: 3rem;
    font-size: 0.95rem;
}

/* === Book Grid === */
.book-grid {
    display: grid;
    gap: 2rem;
}

/* === Book Cards === */
.book-card {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: 6px;
    padding: 2rem;
    position: relative;
}

.badge {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 0.25rem 0.75rem;
    border-radius: 3px;
    margin-bottom: 1rem;
}

.badge-available {
    background: var(--color-available);
    color: #fff;
}

.badge-soon {
    background: var(--color-soon);
    color: #1a1a2e;
}

.badge-future {
    background: var(--color-future);
    color: #e0d8cc;
}

.book-title {
    font-family: var(--font-serif);
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: 0.25rem;
}

.book-subtitle {
    font-family: var(--font-serif);
    font-size: 1.05rem;
    font-style: italic;
    color: var(--color-gold);
    margin-bottom: 1rem;
}

.book-blurb {
    margin-bottom: 0.75rem;
    color: var(--color-text-muted);
    font-size: 0.95rem;
    line-height: 1.7;
}

.book-quote {
    font-family: var(--font-serif);
    font-style: italic;
    font-size: 1rem;
    color: var(--color-gold-light);
    border-left: 3px solid var(--color-gold);
    padding: 0.75rem 1.25rem;
    margin: 1rem 0;
    line-height: 1.6;
}

.book-meta {
    margin-top: 1.25rem;
    padding-top: 1rem;
    border-top: 1px solid var(--color-border);
    font-size: 0.85rem;
    color: var(--color-text-muted);
}

.book-meta p {
    margin-bottom: 0.25rem;
}

.word-list {
    line-height: 1.8;
}

/* ==========================================================================
   Book Detail Page
   One reading spine (--measure) shared by prose, contents and CTA, so the
   page has a single vertical axis instead of three competing widths.
   ========================================================================== */

.book-doc {
    --measure: 36rem;
}

.reading {
    max-width: var(--measure);
    margin-inline: auto;
}

/* --- Site chrome ------------------------------------------------------- */
.site-nav {
    border-bottom: 1px solid var(--color-border);
    background: rgba(15, 15, 35, 0.9);
    backdrop-filter: saturate(140%) blur(8px);
    position: sticky;
    top: 0;
    z-index: 10;
}

.nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding-block: 0.9rem;
}

.nav-brand {
    font-family: var(--font-serif);
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: 0.22em;
    color: var(--color-text);
}

.nav-brand:hover { color: var(--color-gold-light); }

.nav-back {
    font-size: 0.82rem;
    letter-spacing: 0.04em;
    color: var(--color-text-muted);
    white-space: nowrap;
}

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

/* --- Book hero --------------------------------------------------------- */
.book-hero {
    text-align: center;
    padding: clamp(3rem, 2rem + 5vw, 5.5rem) 1.5rem clamp(2.5rem, 2rem + 3vw, 4rem);
    background: linear-gradient(180deg, #0f0f23 0%, var(--color-bg) 100%);
    border-bottom: 1px solid var(--color-border);
}

.book-hero-imprint {
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--color-gold);
    margin-bottom: 1.5rem;
}

.book-hero-title {
    font-family: var(--font-serif);
    font-size: clamp(2.4rem, 1.6rem + 3.6vw, 4rem);
    font-weight: 700;
    line-height: 1.08;
    color: var(--color-text);
    margin-bottom: 0.6rem;
    text-wrap: balance;
}

.book-hero-subtitle {
    font-family: var(--font-serif);
    font-size: clamp(1.15rem, 1rem + 0.8vw, 1.5rem);
    font-style: italic;
    color: var(--color-gold);
    margin-bottom: 1.75rem;
    text-wrap: balance;
}

/* Meta strip: badge + facts on one baseline, dot-separated */
.book-hero-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.6rem 0.9rem;
    font-size: 0.82rem;
    color: var(--color-text-muted);
}

.book-hero-meta .badge { margin-bottom: 0; }

.book-hero-meta .dot::before {
    content: "·";
    margin-right: 0.9rem;
    color: var(--color-accent);
}

/* --- The pitch: why this book exists, before the prose starts ---------- */
.book-pitch {
    padding: clamp(2.5rem, 2rem + 2vw, 3.5rem) 1.5rem;
    border-bottom: 1px solid var(--color-border);
}

.book-pitch p {
    font-family: var(--font-serif);
    font-size: clamp(1.15rem, 1.05rem + 0.5vw, 1.4rem);
    font-style: italic;
    line-height: 1.75;
    color: var(--color-text-muted);
    text-align: center;
    text-wrap: pretty;
}

/* --- Section label ----------------------------------------------------- */
.section-label {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 0 auto clamp(2rem, 1.5rem + 1.5vw, 3rem);
    max-width: var(--measure);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--color-text-muted);
}

.section-label::before,
.section-label::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--color-border);
}

/* --- Long-form prose --------------------------------------------------- */
.book-prose {
    padding: clamp(2.5rem, 2rem + 2vw, 4rem) 1.5rem;
    font-size: 1.06rem;
    line-height: 1.8;
    text-wrap: pretty;
}

.book-prose p {
    margin-bottom: 1.35rem;
    color: var(--color-text);
    hyphens: auto;
}

/* Opening paragraph, with a small-caps lead-in instead of a drop cap
   (the chapters open on "I" and "The", which drop caps handle badly). */
.book-lede {
    font-family: var(--font-serif);
    font-size: 1.3rem;
    line-height: 1.7;
    color: var(--color-text);
}

.lead-in {
    font-variant-caps: small-caps;
    letter-spacing: 0.06em;
    color: var(--color-gold-light);
}

/* Hairline above each section gives the page its rhythm */
.book-prose h2 {
    font-family: var(--font-serif);
    font-size: clamp(1.45rem, 1.25rem + 1vw, 1.85rem);
    font-weight: 600;
    line-height: 1.25;
    color: var(--color-gold-light);
    margin: 3.25rem 0 1.4rem;
    padding-top: 1.75rem;
    border-top: 1px solid var(--color-border);
    text-wrap: balance;
}

.book-prose h2:first-child { margin-top: 0; }

/* Verse: the prayer, and other set-piece quotations */
.verse {
    font-family: var(--font-serif);
    font-size: 1.12rem;
    font-style: italic;
    line-height: 2;
    text-align: center;
    color: var(--color-gold-light);
    padding: 1.9rem 0;
    margin: 2.5rem 0;
    border-top: 1px solid rgba(201, 168, 76, 0.28);
    border-bottom: 1px solid rgba(201, 168, 76, 0.28);
}

.verse p { color: inherit; margin-bottom: 0; }

.verse cite {
    display: block;
    margin-top: 1rem;
    font-size: 0.78rem;
    font-style: normal;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--color-text-muted);
}

/* Pull-quote: a line lifted out of the argument */
.pullquote {
    font-family: var(--font-serif);
    font-size: clamp(1.3rem, 1.1rem + 1vw, 1.65rem);
    font-style: italic;
    line-height: 1.55;
    color: var(--color-gold-light);
    margin: 2.75rem 0;
    padding-left: 1.5rem;
    border-left: 2px solid var(--color-gold);
    text-wrap: pretty;
}

.book-prose hr {
    border: 0;
    border-top: 1px solid var(--color-border);
    width: 30%;
    margin: 2.75rem auto;
}

/* Greek / Hebrew terms keep the serif face at a readable size */
.term {
    font-family: var(--font-serif);
    font-size: 1.08em;
}

/* --- Contents ---------------------------------------------------------- */
.book-contents {
    padding: clamp(2.5rem, 2rem + 2vw, 4rem) 1.5rem;
    border-top: 1px solid var(--color-border);
}

.toc-list { list-style: none; }

.toc-item {
    display: grid;
    grid-template-columns: 2.25rem 1fr;
    column-gap: 1rem;
    padding: 0.85rem 0;
    border-bottom: 1px solid var(--color-border);
}

.toc-item:last-child { border-bottom: 0; }

.toc-num {
    font-family: var(--font-serif);
    font-size: 1rem;
    color: var(--color-gold);
    text-align: right;
    padding-top: 0.1rem;
}

.toc-title {
    font-family: var(--font-serif);
    font-size: 1.12rem;
    color: var(--color-text);
    line-height: 1.4;
}

.toc-desc {
    grid-column: 2;
    font-size: 0.85rem;
    line-height: 1.6;
    color: var(--color-text-muted);
    margin-top: 0.2rem;
}

/* Front/back matter rows have no number */
.toc-item.is-matter .toc-title {
    font-style: italic;
    color: var(--color-text-muted);
}

/* --- Call to action ---------------------------------------------------- */
.book-cta {
    padding: clamp(2.5rem, 2rem + 2vw, 4rem) 1.5rem clamp(3rem, 2.5rem + 2vw, 4.5rem);
    text-align: center;
    border-top: 1px solid var(--color-border);
}

.book-cta h2 {
    font-family: var(--font-serif);
    font-size: clamp(1.5rem, 1.3rem + 1vw, 1.9rem);
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: 0.75rem;
}

.book-cta p {
    color: var(--color-text-muted);
    font-size: 0.95rem;
    line-height: 1.7;
    margin: 0 auto 1.75rem;
    max-width: 30rem;
}

.btn-gold {
    display: inline-block;
    background: var(--color-gold);
    color: #1a1a2e;
    font-weight: 600;
    font-size: 0.88rem;
    letter-spacing: 0.04em;
    padding: 0.8rem 2rem;
    border-radius: 3px;
    transition: background 0.2s, transform 0.15s;
}

.btn-gold:hover {
    background: var(--color-gold-light);
    color: #1a1a2e;
    transform: translateY(-1px);
}

/* Card link into the detail page (homepage) */
.book-link {
    display: inline-block;
    margin-top: 1.25rem;
    font-size: 0.9rem;
    font-weight: 500;
}

/* === Conviction === */
.conviction {
    padding: 4rem 1.5rem;
    text-align: center;
    border-bottom: 1px solid var(--color-border);
}

.conviction h2 {
    font-family: var(--font-serif);
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.conviction-thesis {
    font-family: var(--font-serif);
    font-size: 1.3rem;
    color: var(--color-gold);
    margin-bottom: 1.5rem;
}

.conviction p {
    max-width: 700px;
    margin: 0 auto 1rem;
    color: var(--color-text-muted);
    line-height: 1.8;
}

/* === Footer === */
.site-footer {
    padding: 3rem 1.5rem;
    text-align: center;
    color: var(--color-text-muted);
    font-size: 0.9rem;
}

.site-footer p {
    margin-bottom: 0.5rem;
}

.copyright {
    font-size: 0.8rem;
    margin-top: 1rem;
}

/* === Responsive === */
@media (max-width: 600px) {
    html {
        font-size: 16px;
    }

    .hero {
        padding: 4rem 1rem 3rem;
    }

    .hero-title {
        font-size: 2.5rem;
        letter-spacing: 0.1em;
    }

    .hero-greek {
        font-size: 1.2rem;
    }

    .hero-tagline {
        font-size: 1.1rem;
    }

    .library {
        padding: 3rem 1rem;
    }

    .library-title {
        font-size: 1.8rem;
    }

    .book-card {
        padding: 1.5rem;
    }

    .book-title {
        font-size: 1.35rem;
    }

    .conviction {
        padding: 3rem 1rem;
    }

    .book-prose,
    .book-contents,
    .book-cta,
    .book-pitch {
        padding-inline: 1rem;
    }

    .book-hero {
        padding-inline: 1rem;
    }

    .book-prose {
        font-size: 1rem;
        line-height: 1.75;
    }

    .book-lede {
        font-size: 1.15rem;
    }

    .verse {
        font-size: 1rem;
        line-height: 1.85;
    }

    .toc-item {
        grid-template-columns: 1.75rem 1fr;
        column-gap: 0.75rem;
    }

    .nav-brand {
        font-size: 0.95rem;
        letter-spacing: 0.16em;
    }
}
