/* ═══════════════════════════════════════════════════════════
   Books by Robert W. Jansen
   Shared stylesheet. Loaded on every page.
   Aesthetic: editorial / independent publisher
   ═══════════════════════════════════════════════════════════ */

:root {
    --color-paper:     #f4ede0;   /* page background — warm cream */
    --color-cream:     #f9f4e8;   /* card and surface background — slightly lighter */
    --color-warm:      #fdfaf2;   /* highest surface, used sparingly */
    --color-ink:       #2a2419;   /* primary text — deep ink */
    --color-stone:     #6b5d4d;   /* secondary text */
    --color-quill:     #8a7a64;   /* tertiary text */
    --color-rule:      rgba(42, 36, 25, 0.12);

    /* Accents — used one-per-section, not piled together */
    --color-ocean:     #2c4a6e;
    --color-amber:     #b48a3e;
    --color-rust:      #9d5535;
    --color-moss:      #4d5e3f;
    --color-clay:      #6b2a0f;

    --font-display:    'Crimson Pro', 'EB Garamond', Georgia, serif;
    --font-body:       'EB Garamond', Georgia, serif;
    --font-meta:       'Outfit', system-ui, sans-serif;
}

/* ── Base ─────────────────────────────────────────────────── */
html { scroll-behavior: smooth; }

body {
    font-family: var(--font-body);
    background-color: var(--color-paper);
    color: var(--color-ink);
    font-size: 1.125rem;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

p { margin-bottom: 1rem; }

a { color: var(--color-ocean); text-decoration: none; }
a:hover { color: var(--color-rust); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }

/* ── Navbar ───────────────────────────────────────────────── */
.site-navbar {
    background: var(--color-warm);
    border-bottom: 1px solid var(--color-rule);
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
}

.site-navbar .navbar-brand {
    font-family: var(--font-display);
    font-size: 1.35rem;
    font-style: italic;
    color: var(--color-ink) !important;
    letter-spacing: 0.01em;
}

.site-navbar .navbar-brand .brand-author {
    font-family: var(--font-meta);
    font-style: normal;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--color-quill);
    display: block;
    line-height: 1;
    margin-bottom: 0.2rem;
}

.site-navbar .nav-link {
    font-family: var(--font-meta);
    font-size: 0.78rem;
    font-weight: 500;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--color-ink) !important;
    padding: 0.6rem 1rem !important;
    position: relative;
    transition: color 0.2s ease;
}

.site-navbar .nav-link:hover {
    color: var(--color-ocean) !important;
}

.site-navbar .nav-link.active {
    color: var(--color-ocean) !important;
}

.site-navbar .nav-link.active::after {
    content: "";
    position: absolute;
    left: 1rem;
    right: 1rem;
    bottom: 0.3rem;
    height: 1px;
    background: var(--color-ocean);
}

.site-navbar .navbar-toggler {
    border: 1px solid var(--color-rule);
    padding: 0.3rem 0.55rem;
}

.site-navbar .navbar-toggler:focus {
    box-shadow: none;
}

/* ── Page Title Strip ─────────────────────────────────────── */
.page-title-strip {
    text-align: center;
    padding: 3.5rem 1rem 2.5rem;
    background: var(--color-paper);
}

.page-title-strip .eyebrow {
    font-family: var(--font-meta);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: var(--color-quill);
    margin-bottom: 0.75rem;
}

.page-title-strip h1 {
    font-family: var(--font-display);
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 400;
    font-style: italic;
    color: var(--color-ink);
    margin: 0;
    line-height: 1.15;
}

.page-title-strip .page-subtitle {
    font-size: 1.1rem;
    color: var(--color-stone);
    margin-top: 1rem;
    max-width: 640px;
    margin-left: auto;
    margin-right: auto;
}

/* ── Series Hero (within category pages) ──────────────────── */
.series-hero {
    color: var(--color-cream);
    padding: 4rem 1rem;
    text-align: center;
    background: var(--color-ocean); /* default; overridable per series */
}

.series-hero.is-rapa-nui  { background: linear-gradient(135deg, #1f3a5c, #2c4a6e); }
.series-hero.is-tenoch    { background: linear-gradient(135deg, #3a1a0a, #6b2a0f); }
.series-hero.is-science   { background: linear-gradient(135deg, #1a2f1e, #3a5a3f); }
.series-hero.is-other     { background: linear-gradient(135deg, #4d3a1f, #6b5230); }
.series-hero.is-adult     { background: linear-gradient(135deg, #2a1a2a, #4a2a4a); }

.series-hero .eyebrow {
    font-family: var(--font-meta);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    color: rgba(249, 244, 232, 0.6);
    margin-bottom: 0.75rem;
}

.series-hero h2 {
    font-family: var(--font-display);
    font-size: clamp(2rem, 4vw, 2.8rem);
    font-weight: 400;
    font-style: italic;
    color: var(--color-cream);
    margin: 0 0 1.25rem;
    line-height: 1.2;
}

.series-hero .tagline {
    font-size: 1.05rem;
    color: rgba(249, 244, 232, 0.85);
    max-width: 640px;
    margin: 0 auto 2.25rem;
    line-height: 1.65;
}

.series-covers {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1.25rem;
    margin-top: 1rem;
}

.series-cover {
    text-align: center;
}

.series-cover img {
    width: auto;
    height: 160px;
    border-radius: 3px;
    box-shadow: 4px 6px 24px rgba(0, 0, 0, 0.5);
    transition: transform 0.3s ease;
}

.series-cover img:hover {
    transform: translateY(-6px);
}

.series-cover .label {
    font-family: var(--font-meta);
    font-size: 0.68rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: rgba(249, 244, 232, 0.55);
    margin-top: 0.5rem;
}

/* ── Books grid container ────────────────────────────────── */
.books-section {
    padding: 3.5rem 0;
}

.books-section + .books-section {
    padding-top: 0; /* tighten consecutive sections */
}

.section-rule {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2.5rem;
}

.section-rule h3 {
    font-family: var(--font-meta);
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--color-stone);
    margin: 0;
    white-space: nowrap;
}

.section-rule .rule-line {
    flex: 1;
    height: 1px;
    background: var(--color-rule);
}

.section-rule .rule-meta {
    font-family: var(--font-meta);
    font-size: 0.75rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--color-quill);
    white-space: nowrap;
}

/* ── Book Card ───────────────────────────────────────────── */
.book-card {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 2.5rem;
    background: var(--color-cream);
    border-radius: 4px;
    padding: 2.25rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 1px 2px rgba(42, 36, 25, 0.04),
                0 4px 24px rgba(42, 36, 25, 0.06);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.book-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 2px 4px rgba(42, 36, 25, 0.06),
                0 12px 36px rgba(42, 36, 25, 0.1);
}

.book-card .cover {
    width: 100%;
    height: auto;
    border-radius: 3px;
    box-shadow: 4px 6px 20px rgba(42, 36, 25, 0.22);
}

.book-card .info {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.book-card .series-tag {
    font-family: var(--font-meta);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--color-ocean);
    margin-bottom: 0.4rem;
}

.book-card .title {
    font-family: var(--font-display);
    font-size: 1.9rem;
    font-weight: 600;
    color: var(--color-ink);
    margin: 0 0 0.2rem;
    line-height: 1.2;
    letter-spacing: -0.005em;
}

.book-card .subtitle {
    font-family: var(--font-meta);
    font-size: 0.78rem;
    font-weight: 500;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--color-stone);
    margin: 0 0 1.25rem;
}

.book-card .description {
    color: var(--color-stone);
    font-size: 1.02rem;
    line-height: 1.65;
    margin-bottom: 1.25rem;
    max-width: 60ch;
}

.book-card .meta {
    font-family: var(--font-meta);
    font-size: 0.82rem;
    color: var(--color-quill);
    margin-bottom: 0.9rem;
}

.book-card .meta span + span::before {
    content: "·";
    margin: 0 0.6rem;
    color: var(--color-rule);
}

.book-card .price {
    font-family: var(--font-meta);
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--color-moss);
    margin-bottom: 1rem;
}

.buy-buttons {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.btn-buy {
    display: inline-block;
    font-family: var(--font-meta);
    font-size: 0.78rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    text-decoration: none;
    background: var(--color-ink);
    color: var(--color-paper);
    padding: 0.65rem 1.25rem;
    border-radius: 3px;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.btn-buy:hover {
    background: var(--color-moss);
    color: var(--color-paper);
    text-decoration: none;
    transform: translateY(-1px);
}

.btn-buy.amazon {
    background: var(--color-amber);
    color: var(--color-ink);
}

.btn-buy.amazon:hover {
    background: #9d7634;
    color: var(--color-ink);
}

.btn-buy.audiobook {
    background: var(--color-ocean);
    color: var(--color-paper);
}
.btn-buy.audiobook:hover {
    background: #1d3350;
    color: var(--color-paper);
}

/* ── Home page hero ──────────────────────────────────────── */
.home-hero {
    padding: 3rem 1rem 3rem;
    background: var(--color-paper);
    position: relative;
    overflow: hidden;
}

.home-hero::before {
    content: "";
    position: absolute;
    top: -20%;
    right: -10%;
    width: 60%;
    height: 140%;
    background: radial-gradient(circle, rgba(180, 138, 62, 0.06) 0%, transparent 60%);
    pointer-events: none;
}

.home-hero-inner {
    max-width: 760px;
    margin: 0 auto;
    text-align: center;
    position: relative;
}

.home-hero .eyebrow {
    font-family: var(--font-meta);
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--color-quill);
    margin-bottom: 1rem;
}

.home-hero h1 {
    font-family: var(--font-display);
    font-size: clamp(2.2rem, 4.5vw, 3.4rem);
    font-weight: 400;
    font-style: italic;
    color: var(--color-ink);
    line-height: 1.1;
    margin: 0 0 1.25rem;
    letter-spacing: -0.01em;
}

.home-hero .tagline {
    font-size: 1.1rem;
    color: var(--color-stone);
    max-width: 540px;
    margin: 0 auto;
    line-height: 1.55;
}

.home-cta {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn-explore {
    font-family: var(--font-meta);
    font-size: 0.82rem;
    font-weight: 500;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    padding: 0.85rem 1.75rem;
    border-radius: 3px;
    text-decoration: none;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.btn-explore-primary {
    background: var(--color-ink);
    color: var(--color-paper);
}

.btn-explore-primary:hover {
    background: var(--color-ocean);
    color: var(--color-paper);
    text-decoration: none;
}

.btn-explore-secondary {
    background: transparent;
    color: var(--color-ink);
    border-color: var(--color-ink);
}

.btn-explore-secondary:hover {
    background: var(--color-ink);
    color: var(--color-paper);
    text-decoration: none;
}

/* ── Category strip on home ──────────────────────────────── */
.category-strip {
    padding: 2.5rem 0 3rem;
    background: var(--color-warm);
    border-top: 1px solid var(--color-rule);
}

.category-card {
    display: block;
    padding: 2.25rem;
    background: var(--color-paper);
    border: 1px solid var(--color-rule);
    border-radius: 4px;
    text-decoration: none;
    color: var(--color-ink);
    height: 100%;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.category-card:hover {
    color: var(--color-ink);
    text-decoration: none;
    transform: translateY(-3px);
    box-shadow: 0 12px 32px rgba(42, 36, 25, 0.09);
    border-color: var(--color-quill);
}

.category-card .cat-eyebrow {
    font-family: var(--font-meta);
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--color-quill);
    margin-bottom: 0.6rem;
}

.category-card h3 {
    font-family: var(--font-display);
    font-size: 1.6rem;
    font-style: italic;
    font-weight: 400;
    color: var(--color-ink);
    margin: 0 0 0.75rem;
}

.category-card p {
    color: var(--color-stone);
    font-size: 0.98rem;
    line-height: 1.55;
    margin: 0;
}

.category-card .arrow {
    display: inline-block;
    margin-top: 1rem;
    font-family: var(--font-meta);
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--color-ocean);
}

.category-card:hover .arrow {
    color: var(--color-rust);
}

/* ── About page ──────────────────────────────────────────── */
.about-page {
    padding: 4rem 0 5rem;
}

.about-page .about-body {
    max-width: 640px;
    margin: 0 auto;
    font-size: 1.1rem;
    line-height: 1.75;
    color: var(--color-ink);
}

.about-page .about-body p {
    margin-bottom: 1.25rem;
}

.about-page .pull-quote {
    font-family: var(--font-display);
    font-size: 1.6rem;
    font-style: italic;
    color: var(--color-quill);
    border-left: 2px solid var(--color-amber);
    padding: 0.5rem 0 0.5rem 1.5rem;
    margin: 2.5rem 0;
    line-height: 1.4;
}

/* ── Footer ──────────────────────────────────────────────── */
.site-footer {
    background: var(--color-warm);
    border-top: 1px solid var(--color-rule);
    padding: 2.5rem 1rem;
    text-align: center;
    font-family: var(--font-meta);
    font-size: 0.78rem;
    letter-spacing: 0.1em;
    color: var(--color-quill);
    margin-top: 4rem;
}

.site-footer a {
    color: var(--color-stone);
    text-decoration: none;
    margin: 0 0.5rem;
}

.site-footer a:hover {
    color: var(--color-ocean);
}

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 767px) {
    .site-navbar .navbar-collapse {
        background: var(--color-warm);
        margin-top: 0.5rem;
        padding: 0.75rem 0;
        border-top: 1px solid var(--color-rule);
    }

    .book-card {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        padding: 1.75rem;
        text-align: center;
    }

    .book-card .cover {
        max-width: 180px;
        margin: 0 auto;
    }

    .book-card .description {
        margin-left: auto;
        margin-right: auto;
    }

    .buy-buttons {
        justify-content: center;
    }

    .series-cover img {
        width: 90px;
    }

    .series-covers {
        gap: 0.9rem;
    }
}
