/* ============================================================
   TEDDY TWIST & THE GIRL IN THE BRIAR — LANDING PAGE
   Consolidated stylesheet. Sections in page order.
   ============================================================ */

/* ============================================================
   CUSTOM FONT — McKenzie's hand lettering (letters only).
   Rename her .ttf file to exactly: teddy-title.ttf
   (lowercase, in the site folder root) and this just works.
   ============================================================ */
@font-face {
    font-family: 'TeddyLettering';
    src: url('teddy-title.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

/* ---------- RESET & DESIGN TOKENS ---------- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Palette extracted from the artwork */
    --cream-white: #faf8f5;
    --soft-cream: #fdfbf7;
    --lavender-purple: #9b7ebd;
    --warm-orange-gold: #d49a5c;
    --moss-green: #7a8f7a;
    --earthy-brown: #8b7355;
    --slate-blue-gray: #6b7a87;
    --deep-charcoal: #2c2c2c;
    --medium-dark: #3d3d3d;

    /* Typography */
    --font-heading: 'Playfair Display', Georgia, serif;
    --font-body: 'Crimson Text', 'Georgia', serif;
    --font-lettering: 'TeddyLettering', var(--font-heading);

    --transition-smooth: all 0.3s ease;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    line-height: 1.8;
    color: var(--deep-charcoal);
    overflow-x: hidden;
    font-size: 18px;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 40px;
}

/* ============================================================
   SITE HEADER
   ============================================================ */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 10;               /* sits above everything */
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 32px;
    background: rgba(253, 251, 247, 0.45);   /* faint cream wash */
    backdrop-filter: blur(4px);
    transition: background 0.4s ease, box-shadow 0.4s ease;
}

/* Header wordmark in McKenzie's lettering.
   No italic/faux-bold — the font only has one natural weight. */
.brand {
    font-family: var(--font-lettering);
    font-style: normal;
    font-weight: 400;
    font-size: 1.3rem;
    color: var(--deep-charcoal);
    text-decoration: none;
    letter-spacing: 0.5px;
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 28px;
}

.site-nav a {
    font-size: 0.78rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    text-decoration: none;
    color: var(--deep-charcoal);
    opacity: 0.75;
    padding-bottom: 3px;
    border-bottom: 1px solid transparent;
    transition: opacity 0.25s ease, border-color 0.25s ease;
}

.site-nav a:hover {
    opacity: 1;
    border-bottom: 1px solid var(--warm-orange-gold);
}

/* Solid background once you scroll past the hero */
.site-header.scrolled {
    background: rgba(253, 251, 247, 0.92);
    backdrop-filter: blur(8px);
    box-shadow: 0 1px 0 rgba(139, 115, 85, 0.15);
}

/* Anchor sections land below the fixed header */
section[id] {
    scroll-margin-top: 60px;
}

/* ============================================================
   HERO — FULL-BLEED FIXED ILLUSTRATION + SCROLL FADE
   ============================================================ */
.hero {
    position: relative;
    z-index: 1;
    display: block;
    min-height: 100vh;
    padding: 0;
    background: transparent;
    overflow: visible;
}

/* Desktop illustration — pinned to the viewport */
.hero-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: var(--cream-white);
    background-image: url("hero-spread.jpg");
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    z-index: 0;
    will-change: opacity;
}

/* Mobile hero: real <img> tag instead of background-image.
   Hidden on desktop; shown in the mobile media query below. */
.hero-img-mobile {
    display: none;
}

/* Cream veil that dissolves the illustration on scroll (desktop) */
.hero-fade {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: var(--cream-white);
    opacity: 0;
    pointer-events: none;
    z-index: 1;
    will-change: opacity;
}

/* Title block — pinned to the bottom of the first screen */
.hero-content {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;            /* exactly one screen tall */
    z-index: 2;
    display: flex;
    align-items: flex-end;    /* pushes the title to the bottom edge */
    pointer-events: none;
}

/* Cream veil rising from the bottom edge — keeps the title readable */
.hero-text-wrap {
    width: 100%;
    padding: 48px 0 28px;
    background: linear-gradient(
        to top,
        rgba(253, 251, 247, 0.92) 0%,
        rgba(253, 251, 247, 0.55) 55%,
        rgba(253, 251, 247, 0) 100%
    );
}

.hero-text {
    text-align: center;
    opacity: 0;
    animation: fadeInUp 1.2s ease-out 0.3s forwards;
}

/* The book title — in McKenzie's hand lettering */
.book-title {
    font-family: var(--font-lettering);
    font-size: clamp(2rem, 5.5vw, 3.2rem);
    font-weight: 400;
    line-height: 1.25;
    margin-bottom: 15px;
    color: var(--deep-charcoal);
}

/* Tagline stays a classic book-page serif — contrast with the lettering */
.tagline {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    font-style: italic;
    color: var(--slate-blue-gray);
    margin-bottom: 0;
}

/* ============================================================
   CONTENT ABOVE THE FIXED HERO LAYERS
   (This rule is load-bearing — do not remove!)
   ============================================================ */
.light-section,
.medium-section,
.darker-section,
.deepest-section,
.footer {
    position: relative;
    z-index: 2;
}

/* ============================================================
   ABOUT THE BOOK (LIGHT SECTION, TWO-COLUMN)
   ============================================================ */
.light-section {
    padding: 100px 0;
    background: var(--cream-white);
    position: relative;
}

/* Section headings in the hand lettering.
   NOTE: any punctuation/tilde glyph missing from the font
   silently falls back to Playfair Display. */
.section-title {
    font-family: var(--font-lettering);
    font-size: 2.2rem;
    font-weight: 400;
    text-align: center;
    margin-bottom: 40px;
    color: var(--deep-charcoal);
    position: relative;
}

.section-title::after {
    content: '~ ~ ~';
    display: block;
    font-size: 1rem;
    font-family: var(--font-heading);   /* tilde isn't in the lettering font */
    color: var(--warm-orange-gold);
    margin-top: 15px;
    letter-spacing: 3px;
}

/* The About quote is a section-title in markup, but it's prose with
   punctuation — keep it in Playfair italic so mixed glyphs don't clash. */
.about-content .section-title {
    font-family: var(--font-heading);
    font-style: italic;
    font-size: 1.9rem;
    text-align: left;
}

.about-content .section-title::after {
    margin-left: 0;
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: start;
}

.about-image img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
    display: block;
}

.about-content .synopsis {
    text-align: left;
    margin-left: 0;
}

.synopsis {
    font-size: 1.2rem;
    line-height: 1.9;
    color: var(--medium-dark);
}

/* Pull quote — full width, centered below the About grid */
.quote-block {
    max-width: 760px;
    margin: 60px auto 0;
    text-align: center;
    padding: 50px 40px;
    background: linear-gradient(135deg, rgba(155,126,189,0.1), rgba(212,154,92,0.1));
    border-radius: 12px;
}

.quote-block blockquote {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    font-style: italic;
    color: var(--slate-blue-gray);
    margin-bottom: 15px;
    line-height: 1.7;
}

.quote-block cite {
    font-size: 1rem;
    color: var(--earthy-brown);
    font-style: italic;
}

/* ============================================================
   JOIN THE JOURNEY (BEEHIIV EMBED + KICKSTARTER)
   ============================================================ */
.medium-section {
    padding: 100px 0;
    background: linear-gradient(135deg, var(--soft-cream), #f5efe5);
    border-top: 1px solid rgba(139, 115, 85, 0.2);
}

.cta-content {
    max-width: 650px;
    margin: 0 auto;
    text-align: center;
}

.cta-text {
    font-size: 1.15rem;
    line-height: 1.8;
    margin-bottom: 40px;
    color: var(--medium-dark);
}

.beehiiv-embed {
    max-width: 520px;
    margin: 0 auto 10px;
}

.privacy-note {
    font-size: 0.85rem;
    color: var(--slate-blue-gray);
    opacity: 0.8;
    margin-top: 15px;
}

.kickstarter-promo {
    background: linear-gradient(135deg, rgba(212,154,92,0.15), rgba(139,115,85,0.1));
    padding: 40px 30px;
    border-radius: 12px;
    margin-top: 50px;
    border: 2px dashed var(--warm-orange-gold);
}

.promo-label {
    font-size: 1rem;
    color: var(--warm-orange-gold);
    font-weight: 600;
    margin-bottom: 10px;
}

.promo-text {
    font-size: 1.1rem;
    color: var(--medium-dark);
    margin-bottom: 25px;
}

.btn {
    padding: 18px 35px;
    border-radius: 50px;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition-smooth);
    cursor: pointer;
    border: none;
    font-size: 1rem;
    font-family: var(--font-heading);
    letter-spacing: 0.5px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.kickstarter-btn {
    background: var(--warm-orange-gold);
    color: white;
    font-size: 1.1rem;
    padding: 20px 45px;
}

.kickstarter-btn:hover {
    background: #b88548;
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(212, 154, 92, 0.4);
}

/* ============================================================
   EARLY PRAISE (DARKER SECTION)
   ============================================================ */
.darker-section {
    padding: 100px 0;
    background: linear-gradient(180deg, #f5efe5, var(--slate-blue-gray) 30%);
    color: var(--cream-white);
}

.darker-section .section-title { color: var(--cream-white); }

.reviews-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 50px;
}

.review-card {
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(10px);
    padding: 35px 25px;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.15);
    transition: var(--transition-smooth);
}

.review-card:hover {
    transform: translateY(-5px);
    background: rgba(255,255,255,0.15);
}

.quote-icon {
    font-size: 2.5rem;
    color: var(--warm-orange-gold);
    line-height: 1;
    margin-bottom: 15px;
}

.review-text {
    font-size: 1.1rem;
    line-height: 1.7;
    margin-bottom: 20px;
    color: var(--cream-white);
    font-style: italic;
}

.reviewer { font-size: 1rem; color: rgba(255,255,255,0.9); }
.reviewer span { font-size: 0.9rem; opacity: 0.8; }

/* ============================================================
   ABOUT THE AUTHOR (DEEPEST SECTION)
   ============================================================ */
.deepest-section {
    padding: 100px 0;
    background: linear-gradient(180deg, var(--slate-blue-gray), var(--earthy-brown));
    color: var(--cream-white);
}

.deepest-section .section-title { color: var(--cream-white); }

.author-content {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 60px;
    align-items: center;
    max-width: 800px;
    margin: 0 auto;
}

.author-photo {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--warm-orange-gold);
    box-shadow: 0 15px 40px rgba(0,0,0,0.25);
}

.author-details { text-align: left; }

.author-bio {
    font-size: 1.15rem;
    line-height: 1.9;
    color: var(--cream-white);
    margin-bottom: 30px;
}

.social-links {
    display: flex;
    gap: 25px;
    flex-wrap: wrap;
}

.social-links a {
    color: var(--warm-orange-gold);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition-smooth);
    padding: 8px 16px;
    border-radius: 20px;
    border: 1px solid rgba(212, 154, 92, 0.3);
}

.social-links a:hover {
    background: rgba(212, 154, 92, 0.2);
    transform: translateY(-2px);
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
    padding: 50px 0;
    background: var(--deep-charcoal);
    color: var(--cream-white);
    text-align: center;
    font-size: 0.95rem;
}

.footer-tagline {
    margin-top: 15px;
    font-style: italic;
    color: var(--warm-orange-gold);
    opacity: 0.9;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

/* ============================================================
   ANIMATIONS
   ============================================================ */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(40px); }
    to   { opacity: 1; transform: translateY(0); }
}

.fade-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ============================================================
   RESPONSIVE — MOBILE
   ============================================================ */
@media (max-width: 768px) {
    .container { padding: 0 25px; }
        .fade-on-scroll { opacity: 1; transform: none; }

    /* Header shrinks */
    .site-header { padding: 12px 18px; }
    .brand { font-size: 1.1rem; }
    .site-nav { gap: 16px; }
    .site-nav a { font-size: 0.7rem; letter-spacing: 1.5px; }

    /* Hero becomes a static band: swap the fixed background layer
       for the real <img> in the markup (more reliable on iOS) */
    .hero { min-height: auto; padding: 0; }
    .hero-bg { display: none; }
    .hero-fade { display: none; }

    .hero-img-mobile {
        display: block;
        width: 100%;
        height: 48vh;
        object-fit: cover;
        object-position: center 45%;
    }

    /* Normal flow: image band above, then title below it.
       Small padding only — the img already occupies the 48vh band. */
    .hero-content {
        position: relative;
        height: auto;
        display: block;
        pointer-events: auto;
    }
    .hero-text-wrap {
        padding: 24px 0 32px;
        background: var(--cream-white);
    }

    /* About stacks: image above text */
    .about-grid { grid-template-columns: 1fr; gap: 30px; }
    .about-image { order: -1; }
    .about-content .section-title,
    .about-content .synopsis { text-align: center; }
    .about-content .section-title::after { margin-left: auto; margin-right: auto; }

    /* Pull quote adapts */
    .quote-block { margin-top: 40px; padding: 40px 25px; }

    /* Author stacks */
    .author-content { grid-template-columns: 1fr; text-align: center; gap: 40px; }
    .author-details { text-align: center; }
    .social-links { justify-content: center; }

    .reviews-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
    .book-title { font-size: 2rem; }
    .tagline { font-size: 1.1rem; }
    .section-title { font-size: 1.8rem; }
}
/* Kern fix: McKenzie's T and J glyphs carry extra left-side space.
   Wrap word-initial T/J in <span class="kern-fix"> to compensate. */
.kern-fix {
    margin-left: -0.08em;
    margin-right: -0.14em;
}

/* ---------- Respect "Reduce Motion" system setting ----------
   Static hero via the <img>; no animations anywhere. */
@media (prefers-reduced-motion: reduce) {
    .hero { min-height: auto; padding: 0; }
    .hero-bg { display: none; }
    .hero-fade { display: none; }

    .hero-img-mobile {
        display: block;
        width: 100%;
        height: 60vh;
        object-fit: cover;
        object-position: center center;
    }

    .hero-content {
        position: relative;
        height: auto;
        display: block;
        pointer-events: auto;
    }
    .hero-text-wrap {
        padding: 24px 0 32px;
        background: var(--cream-white);
    }
    .hero-text { animation: none; opacity: 1; }
    .fade-on-scroll { opacity: 1; transform: none; transition: none; }
}