/* ==========================================================================
   OREGON OLD-GROWTH — Scrollytelling v3
   More Than Just Parks
   ========================================================================== */

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

:root {
    /* The palette tells the story: old-growth greens → ember/ash destruction */
    --bg: #060806;
    --bg-card: rgba(6, 8, 6, 0.9);
    --ink: #e8e4db;
    --ink2: #a8a295;
    --ink3: #6b665c;
    --rule: rgba(255, 255, 255, 0.06);

    /* Forest — life, what we're losing */
    --forest: #3d7a4a;
    --forest-deep: #1a3d22;
    --forest-glow: rgba(61, 122, 74, 0.15);
    --canopy: #5a9c5f;

    /* Ember — threat, destruction, urgency */
    --ember: #c4401a;
    --ember-bright: #e85d26;
    --ember-glow: rgba(196, 64, 26, 0.2);
    --ash: #8b4513;

    /* Blood — the deadline, the damage */
    --blood: #b91c1c;
    --blood-bright: #dc2626;
    --blood-glow: rgba(185, 28, 28, 0.15);

    --sans: 'Inter', system-ui, -apple-system, sans-serif;
    --serif: 'Playfair Display', Georgia, 'Times New Roman', serif;
    --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

html {
    scroll-behavior: smooth;
    scroll-snap-type: y proximity;
}

body {
    font-family: var(--sans);
    color: var(--ink);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a { color: var(--ember-bright); text-decoration: none; }
a:hover { text-decoration: underline; }
button { font-family: inherit; border: none; background: none; cursor: pointer; color: inherit; }

/* ==========================================================================
   LOADER
   ========================================================================== */

.loader {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #030503;
    transition: opacity 1.2s ease, visibility 1.2s ease;
}

.loader--done { opacity: 0; visibility: hidden; pointer-events: none; }

.loader__inner { text-align: center; }

.loader__logo { height: 28px; opacity: 0.4; margin-bottom: 32px; }

.loader__bar {
    width: 180px;
    height: 2px;
    background: rgba(255,255,255,0.06);
    border-radius: 2px;
    overflow: hidden;
    margin: 0 auto 14px;
}

.loader__fill {
    height: 100%;
    width: 30%;
    background: var(--forest);
    border-radius: 2px;
    animation: loader-slide 1.5s ease-in-out infinite;
}

@keyframes loader-slide {
    0% { transform: translateX(-100%); width: 30%; }
    50% { width: 60%; }
    100% { transform: translateX(400%); width: 30%; }
}

.loader__text { font-size: 11px; color: var(--ink3); letter-spacing: 0.06em; }

/* ==========================================================================
   FIXED NAV
   ========================================================================== */

.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 500;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 24px;
    background: linear-gradient(180deg, rgba(0,0,0,0.75) 0%, rgba(0,0,0,0.25) 70%, transparent 100%);
    pointer-events: none;
}

.nav > * { pointer-events: auto; }
.nav__logo img { height: 38px; opacity: 0.85; transition: opacity 0.2s ease; }
.nav__logo:hover img { opacity: 1; }
.nav__right { display: flex; align-items: center; gap: 12px; }

.nav__link {
    font-size: 12px;
    font-weight: 500;
    color: rgba(255,255,255,0.45);
    transition: color 0.2s ease;
}

.nav__link:hover { color: #fff; text-decoration: none; }

.nav__share-btn {
    font-size: 12px;
    font-weight: 600;
    padding: 7px 18px;
    border-radius: 100px;
    background: rgba(255,255,255,0.07);
    border: 1px solid rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.7);
    transition: all 0.2s ease;
}

.nav__share-btn:hover { background: rgba(255,255,255,0.14); }

/* ==========================================================================
   MAP
   ========================================================================== */

#map { position: fixed; inset: 0; z-index: 1; }

#map-overlay {
    position: fixed;
    inset: 0;
    z-index: 2;
    pointer-events: none;
    transition: background 1.5s ease;
}

/* Persistent cinematic vignette around edges */
#map-overlay::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        linear-gradient(to right, rgba(0,0,0,0.4) 0%, transparent 15%, transparent 85%, rgba(0,0,0,0.4) 100%),
        linear-gradient(to bottom, rgba(0,0,0,0.3) 0%, transparent 12%, transparent 88%, rgba(0,0,0,0.5) 100%);
    pointer-events: none;
}

.maplibregl-ctrl-bottom-left,
.maplibregl-ctrl-bottom-right { display: none !important; }

/* Force-hide all markers until body gets .markers-ready class */
.maplibregl-marker {
    transition: opacity 0.6s ease;
    visibility: hidden !important;
    opacity: 0 !important;
}
body.markers-ready .maplibregl-marker {
    visibility: visible !important;
    opacity: 1 !important;
}
.maplibregl-ctrl-attrib { font-size: 9px !important; opacity: 0.15; }

/* ==========================================================================
   STORY THREAD (vertical progress spine on the left)
   ========================================================================== */

.story-thread {
    position: fixed;
    left: 32px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 400;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
    opacity: 0;
    transition: opacity 0.6s ease;
}

.story-thread.is-visible { opacity: 1; }

/* The vertical line */
.story-thread__line {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 2px;
    transform: translateX(-50%);
    background: rgba(255,255,255,0.06);
}

.story-thread__progress {
    position: absolute;
    top: 0;
    left: 50%;
    width: 2px;
    height: 0%;
    transform: translateX(-50%);
    background: linear-gradient(180deg, var(--forest), var(--ember), var(--blood));
    transition: height 0.8s var(--ease);
    border-radius: 1px;
}

/* Individual nodes */
.story-thread__node {
    position: relative;
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background: var(--bg);
    border: 2px solid rgba(255,255,255,0.12);
    cursor: pointer;
    transition: all 0.4s ease;
    z-index: 2;
    margin: 10px 0;
}

.story-thread__node:first-child { margin-top: 0; }
.story-thread__node:last-child { margin-bottom: 0; }

.story-thread__node::after {
    content: attr(data-label);
    position: absolute;
    left: 24px;
    top: 50%;
    transform: translateY(-50%);
    white-space: nowrap;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: rgba(255,255,255,0);
    transition: color 0.3s ease;
    pointer-events: none;
}

.story-thread__node:hover::after,
.story-thread__node.is-active::after {
    color: rgba(255,255,255,0.5);
}

.story-thread__node.is-active {
    border-color: var(--ember-bright);
    background: var(--ember-bright);
    box-shadow: 0 0 12px var(--ember-glow);
    transform: scale(1.2);
}

.story-thread__node.is-passed {
    border-color: var(--forest);
    background: var(--forest);
}

/* Forest-phase nodes glow green */
.story-thread__node[data-phase="forest"].is-active {
    border-color: var(--canopy);
    background: var(--canopy);
    box-shadow: 0 0 12px var(--forest-glow);
}

.story-thread__node[data-phase="forest"].is-passed {
    border-color: var(--forest);
    background: var(--forest);
}

/* Threat-phase nodes glow ember */
.story-thread__node[data-phase="threat"].is-active {
    border-color: var(--ember-bright);
    background: var(--ember-bright);
    box-shadow: 0 0 12px var(--ember-glow);
}

/* Urgency-phase nodes glow blood */
.story-thread__node[data-phase="urgency"].is-active {
    border-color: var(--blood-bright);
    background: var(--blood-bright);
    box-shadow: 0 0 14px var(--blood-glow);
    animation: urgency-pulse 2s ease-in-out infinite;
}

@keyframes urgency-pulse {
    0%, 100% { box-shadow: 0 0 8px var(--blood-glow); }
    50% { box-shadow: 0 0 20px rgba(185,28,28,0.4); }
}

/* ==========================================================================
   PROGRESS BAR (top)
   ========================================================================== */

.progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    width: 0%;
    background: linear-gradient(90deg, var(--forest), var(--ember), var(--blood));
    z-index: 1000;
    transition: width 0.15s ease;
}

/* ==========================================================================
   SCROLL CONTAINER
   ========================================================================== */

.scroll-container { position: relative; z-index: 10; }

/* No snap on final sections so footer is reachable */
.chapter--comment-gen,
.chapter--cta,
.chapter--assets,
.chapter--subscribe,
.footer { scroll-snap-align: none !important; }

/* ==========================================================================
   CHAPTERS
   ========================================================================== */

.chapter {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 10vh 5vw 10vh 90px; /* left padding for story thread */
    position: relative;
    scroll-snap-align: start;
}

.chapter--hero {
    height: 100vh;
    min-height: 0;
    max-height: 100vh;
    overflow: hidden;
    justify-content: center;
    text-align: center;
    padding-left: 5vw;
    position: relative;
    scroll-snap-align: start;
}

/* Near-black scrim — satellite is texture, not distraction. Text wins. */
.hero-scrim {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 50% 40%,
            rgba(3, 5, 3, 0.88) 0%,
            rgba(3, 5, 3, 0.93) 50%,
            rgba(3, 5, 3, 0.97) 100%
        );
    pointer-events: none;
    z-index: 1;
    animation: hero-breathe 8s ease-in-out infinite;
}

.chapter--cta {
    min-height: 100vh;
    justify-content: center;
    text-align: center;
    padding-left: 5vw;
    position: relative;
}

.chapter--cta::before,
.chapter--assets::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(3, 5, 3, 0.85);
    pointer-events: none;
    z-index: -1;
}

/* Hero */
.chapter__inner {
    max-width: 740px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.chapter__eyebrow {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.35em;
    text-transform: uppercase;
    color: var(--forest);
    margin-bottom: 28px;
    opacity: 0;
    transform: translateY(16px);
    animation: fadeUp 0.8s 0.2s ease forwards;
}

.chapter__eyebrow::after {
    content: '';
    display: block;
    width: 48px;
    height: 1px;
    background: var(--forest);
    margin: 14px auto 0;
    opacity: 0.4;
}

.chapter__headline {
    font-family: var(--serif);
    font-weight: 900;
    font-size: clamp(2.4rem, 6.5vw, 4.8rem);
    line-height: 1.08;
    color: #fff;
    margin-bottom: 32px;
    opacity: 0;
    transform: translateY(24px);
    animation: fadeUp 1s 0.4s ease forwards;
    text-shadow: 0 2px 20px rgba(0,0,0,0.5), 0 6px 40px rgba(0,0,0,0.3);
}

.chapter__headline em {
    font-style: italic;
    color: var(--ember-bright);
    text-shadow: 0 0 50px rgba(232, 93, 38, 0.35);
}

.chapter__preview {
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--forest);
    margin-top: 18px;
    opacity: 0;
    transform: translateY(12px);
    animation: fadeUp 0.6s 1s ease forwards;
}

/* Hero subtitle — one hard-hitting line */
.chapter__dek {
    font-family: var(--serif);
    font-weight: 500;
    font-size: clamp(1.1rem, 2.2vw, 1.45rem);
    line-height: 1.5;
    letter-spacing: 0.01em;
    color: rgba(232, 228, 219, 0.7);
    max-width: 560px;
    margin: 0 auto 0;
    opacity: 0;
    transform: translateY(16px);
    animation: fadeUp 0.8s 0.8s ease forwards;
}

.chapter__scroll-cue {
    position: absolute;
    bottom: 36px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: var(--ink3);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    opacity: 0;
    animation: fadeUp 0.6s 1.2s ease forwards, bob 3s 2s ease-in-out infinite;
    z-index: 3;
}

@keyframes fadeUp { to { opacity: 1; transform: translateY(0); } }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(8px); } }

/* Cinematic breathing effects */
@keyframes card-breathe {
    0%, 100% { box-shadow: 0 20px 70px rgba(0, 0, 0, 0.6), 0 0 0 0 transparent; }
    50% { box-shadow: 0 24px 80px rgba(0, 0, 0, 0.7), 0 0 30px rgba(61,122,74,0.04); }
}
@keyframes card-breathe-ember {
    0%, 100% { box-shadow: 0 20px 70px rgba(0, 0, 0, 0.6); border-left-color: var(--ember); }
    50% { box-shadow: 0 24px 80px rgba(0, 0, 0, 0.7), 0 0 40px rgba(196,64,26,0.08); border-left-color: var(--ember-bright); }
}
@keyframes card-breathe-blood {
    0%, 100% { box-shadow: 0 20px 70px rgba(0, 0, 0, 0.6); }
    50% { box-shadow: 0 24px 80px rgba(0, 0, 0, 0.7), 0 0 40px rgba(185,28,28,0.1); }
}
@keyframes hero-breathe {
    0%, 100% { opacity: 0.88; }
    50% { opacity: 0.92; }
}
@keyframes kicker-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* ==========================================================================
   CHAPTER CARDS
   ========================================================================== */

.chapter__card {
    max-width: 460px;
    padding: 36px 32px;
    background: var(--bg-card);
    backdrop-filter: blur(28px) saturate(1.4);
    -webkit-backdrop-filter: blur(28px) saturate(1.4);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-left: 3px solid var(--forest);
    border-radius: 4px 16px 16px 4px;
    box-shadow: 0 20px 70px rgba(0, 0, 0, 0.6);
    opacity: 0;
    transform: translateY(40px) scale(0.97);
    transition: opacity 0.8s ease, transform 0.8s var(--ease), border-color 0.6s ease;
    will-change: opacity, transform;
}

.chapter__card.is-active {
    opacity: 1;
    transform: translateY(0) scale(1);
    animation: card-breathe 6s ease-in-out infinite;
}

.chapter__card.is-active:hover {
    transform: translateY(-2px) scale(1.005);
    box-shadow: 0 28px 90px rgba(0, 0, 0, 0.7);
    animation-play-state: paused;
}

/* Threat-phase cards shift border to ember */
.chapter__card--threat {
    border-left-color: var(--ember);
}
.chapter__card--threat.is-active {
    animation: card-breathe-ember 5s ease-in-out infinite;
}

/* Danger-phase cards shift border to blood */
.chapter__card--danger {
    background: rgba(15, 6, 4, 0.92);
    border-left-color: var(--blood);
}
.chapter__card--danger.is-active {
    animation: card-breathe-blood 4s ease-in-out infinite;
}

.chapter__kicker {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--forest);
    margin-bottom: 14px;
}

.chapter__kicker--ember { color: var(--ember-bright); }
.chapter__kicker--blood { color: var(--blood-bright); }

.is-active .chapter__kicker--ember { animation: kicker-pulse 3s ease-in-out infinite; }
.is-active .chapter__kicker--blood { animation: kicker-pulse 2s ease-in-out infinite; }

.chapter__card h2 {
    font-family: var(--serif);
    font-weight: 800;
    font-size: clamp(1.4rem, 2.8vw, 1.85rem);
    line-height: 1.18;
    color: #fff;
    margin-bottom: 16px;
}

.chapter__card p {
    font-size: 14.5px;
    line-height: 1.8;
    color: var(--ink2);
    margin-bottom: 16px;
}

.chapter__card p:last-child { margin-bottom: 0; }
.chapter__card p strong { color: #fff; font-weight: 600; }

.chapter__card blockquote {
    font-family: var(--serif);
    font-style: italic;
    font-size: 15.5px;
    line-height: 1.7;
    color: var(--ink);
    border-left: 3px solid var(--ember);
    padding-left: 18px;
    margin: 18px 0 0;
}

.context-note {
    font-size: 11px !important;
    color: var(--ink3) !important;
    line-height: 1.55 !important;
    margin-top: 14px !important;
    padding-top: 10px;
    border-top: 1px solid var(--rule);
}

/* ==========================================================================
   STAT BLOCKS
   ========================================================================== */

.stat-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 20px 0;
}

.stat-row--wide { gap: 8px; }

.stat-block {
    flex: 1;
    text-align: center;
    padding: 14px 8px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--rule);
    border-radius: 10px;
}

.stat-block--vs {
    flex: 0 0 auto;
    background: none;
    border: none;
    padding: 0;
    font-size: 12px;
    font-weight: 800;
    color: var(--ink3);
    letter-spacing: 0.1em;
}

.stat-block--danger {
    background: var(--blood-glow);
    border-color: rgba(185, 28, 28, 0.2);
}

.stat-block--green {
    background: var(--forest-glow);
    border-color: rgba(61, 122, 74, 0.2);
}

.stat-block__number {
    font-family: var(--serif);
    font-weight: 800;
    font-size: clamp(1.2rem, 2.2vw, 1.55rem);
    color: #fff;
    line-height: 1.2;
}

.stat-block--danger .stat-block__number { color: var(--blood-bright); }
.stat-block--green .stat-block__number { color: var(--canopy); }

.stat-block__label {
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--ink3);
    margin-top: 5px;
    line-height: 1.4;
}

/* ==========================================================================
   ANIMATED CHART
   ========================================================================== */

.chart-wrap {
    margin-top: 22px;
    padding: 14px 0 6px;
    border-top: 1px solid var(--rule);
}

.harvest-chart { width: 100%; height: auto; }

.chart-caption {
    font-size: 10px !important;
    color: var(--ink3) !important;
    text-align: center;
    margin-top: 6px !important;
    margin-bottom: 0 !important;
}

/* ==========================================================================
   CARBON BARS
   ========================================================================== */

.carbon-compare {
    margin-top: 22px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.carbon-bar {
    position: relative;
    height: 34px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 6px;
    overflow: hidden;
    display: flex;
    align-items: center;
    padding: 0 12px;
}

.carbon-bar__fill {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    border-radius: 6px;
}

.carbon-bar__fill--pnw { background: linear-gradient(90deg, rgba(61,122,74,0.3), rgba(61,122,74,0.06)); }
.carbon-bar__fill--amazon { background: linear-gradient(90deg, rgba(180,140,50,0.2), rgba(180,140,50,0.04)); }
.carbon-bar__fill--plantation { background: linear-gradient(90deg, rgba(185,28,28,0.2), rgba(185,28,28,0.04)); }

.carbon-bar__label {
    position: relative;
    z-index: 2;
    font-size: 11px;
    font-weight: 600;
    color: var(--ink);
}

.carbon-bar__val {
    position: relative;
    z-index: 2;
    font-size: 10px;
    color: var(--ink3);
    margin-left: auto;
}

.carbon-bar__val sub { font-size: 8px; }

/* ==========================================================================
   FIRE COMPARISON
   ========================================================================== */

.fire-compare {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 20px 0;
}

.fire-compare__item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 10px;
    border: 1px solid var(--rule);
}

.fire-compare__icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    flex-shrink: 0;
}

.fire-compare__icon--good { background: var(--forest-glow); color: var(--canopy); }
.fire-compare__icon--bad { background: var(--ember-glow); color: var(--ember-bright); }

.fire-compare__item strong {
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 2px;
}

.fire-compare__item span {
    font-size: 12px;
    color: var(--ink3);
    line-height: 1.5;
}

/* ==========================================================================
   SPECIES
   ========================================================================== */

.species-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: 18px;
}

.species-card {
    padding: 14px 12px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--rule);
    border-radius: 10px;
}

.species-card__name { font-weight: 700; font-size: 12px; color: #fff; margin-bottom: 2px; }
.species-card__status { font-size: 9px; font-weight: 700; letter-spacing: 0.04em; color: var(--blood-bright); margin-bottom: 6px; }
.species-card__detail { font-size: 11px; line-height: 1.5; color: var(--ink3); }

/* ==========================================================================
   CTA
   ========================================================================== */

.cta-urgent { max-width: 620px; margin: 0 auto; }

.cta-urgent__badge {
    display: inline-block;
    padding: 8px 22px;
    background: var(--blood);
    color: #fff;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.2em;
    border-radius: 100px;
    margin-bottom: 24px;
    animation: pulse-badge 2s ease-in-out infinite;
}

@keyframes pulse-badge {
    0%, 100% { box-shadow: 0 0 0 0 rgba(185,28,28,0.45); }
    50% { box-shadow: 0 0 0 16px rgba(185,28,28,0); }
}

.countdown {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    margin-bottom: 32px;
}

.countdown__block {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 60px;
    padding: 10px 12px;
    background: var(--blood-glow);
    border: 1px solid rgba(185,28,28,0.15);
    border-radius: 10px;
}

.countdown__num {
    font-family: var(--serif);
    font-weight: 800;
    font-size: 1.8rem;
    color: var(--blood-bright);
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.countdown__unit {
    font-size: 8px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--ink3);
    margin-top: 4px;
}

.countdown__sep {
    font-family: var(--serif);
    font-size: 1.3rem;
    font-weight: 700;
    color: rgba(185,28,28,0.3);
    padding: 0 1px;
}

.cta-urgent h2 {
    font-family: var(--serif);
    font-weight: 900;
    font-size: clamp(1.7rem, 4.5vw, 2.8rem);
    line-height: 1.1;
    color: #fff;
    margin-bottom: 16px;
}

.cta-urgent > p {
    font-size: 15px;
    line-height: 1.7;
    color: var(--ink2);
    margin-bottom: 34px;
}

.cta-urgent > p strong { color: var(--blood-bright); font-weight: 700; }

.cta-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 38px;
}

.cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 15px 34px;
    border-radius: 100px;
    font-size: 15px;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.3s ease;
}

.cta-btn--primary {
    background: var(--blood);
    color: #fff;
    box-shadow: 0 4px 28px rgba(185,28,28,0.35);
}

.cta-btn--primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 48px rgba(185,28,28,0.55);
    text-decoration: none;
}

.cta-btn--secondary {
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.cta-btn--secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-3px);
    text-decoration: none;
}

.cta-share { padding-top: 30px; border-top: 1px solid var(--rule); }
.cta-share__label { font-size: 13px; font-weight: 600; color: var(--ink3); margin-bottom: 14px; }

.cta-share__buttons {
    display: flex;
    gap: 8px;
    justify-content: center;
    flex-wrap: wrap;
}

.cta-share__btn {
    padding: 9px 22px;
    border-radius: 100px;
    font-size: 13px;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.07);
    color: var(--ink2);
    transition: all 0.2s ease;
}

.cta-share__btn:hover { background: rgba(255,255,255,0.1); color: #fff; }

.cta-subscribe { margin-top: 26px; }
.cta-subscribe__link { font-size: 13px; color: var(--ember-bright); font-weight: 500; }

/* ==========================================================================
   FOOTER
   ========================================================================== */

.footer {
    padding: 50px 5vw 36px;
    border-top: 1px solid var(--rule);
    background: rgba(0, 0, 0, 0.7);
}

.footer__inner { max-width: 560px; }
.footer__credit { font-size: 13px; color: var(--ink2); margin-bottom: 10px; }
.footer__note { font-size: 10px; color: var(--ink3); line-height: 1.6; margin-bottom: 10px; }
.footer__read-more { font-size: 12px; color: var(--ink2); }

/* ==========================================================================
   MAP LEGEND
   ========================================================================== */

.map-legend {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 100;
    background: rgba(6, 8, 6, 0.88);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--rule);
    border-radius: 10px;
    padding: 12px 16px;
    opacity: 0;
    transition: opacity 0.6s ease;
}

.map-legend.is-visible { opacity: 1; }
.map-legend__title { font-size: 8px; font-weight: 800; letter-spacing: 0.2em; text-transform: uppercase; color: var(--ink3); margin-bottom: 8px; }
.map-legend__item { display: flex; align-items: center; gap: 8px; font-size: 10px; color: var(--ink2); margin-bottom: 4px; }
.map-legend__item:last-child { margin-bottom: 0; }
.map-legend__swatch { width: 12px; height: 12px; border-radius: 3px; flex-shrink: 0; }

/* ==========================================================================
   FULL-VIEWPORT BREATHER — big stat moments, no card
   ========================================================================== */

.chapter--breather {
    justify-content: center;
    text-align: center;
    padding-left: 5vw;
}

.breather__inner {
    max-width: 700px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.breather__stat {
    font-family: var(--serif);
    font-weight: 900;
    font-size: clamp(3rem, 8vw, 6rem);
    line-height: 1.05;
    color: #fff;
    margin-bottom: 20px;
    text-shadow: 0 4px 40px rgba(0,0,0,0.5);
}

.breather__stat em {
    font-style: italic;
    color: var(--ember-bright);
    text-shadow: 0 0 60px rgba(232, 93, 38, 0.3);
}

.breather__sub {
    font-size: clamp(1rem, 2vw, 1.25rem);
    line-height: 1.7;
    color: rgba(232, 228, 219, 0.65);
    max-width: 480px;
    margin: 0 auto;
}

/* ==========================================================================
   FULL-BLEED IMAGE BREAK — atmospheric moment
   ========================================================================== */

.chapter--image-break {
    min-height: 70vh;
    justify-content: flex-end;
    padding-bottom: 8vh;
    position: relative;
}

.image-break__bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.image-break__bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.35) saturate(0.6);
}

.image-break__scrim {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(6,8,6,0.95) 0%, rgba(6,8,6,0.3) 40%, transparent 70%);
    z-index: 1;
}

.image-break__text {
    position: relative;
    z-index: 2;
    max-width: 560px;
    padding-left: 90px;
}

.image-break__caption {
    font-family: var(--serif);
    font-style: italic;
    font-size: clamp(1.1rem, 2.2vw, 1.5rem);
    line-height: 1.6;
    color: rgba(255,255,255,0.85);
    margin-bottom: 8px;
}

.image-break__credit {
    font-size: 10px;
    color: var(--ink3);
    letter-spacing: 0.06em;
}

/* ==========================================================================
   FILM GRAIN — documentary texture
   ========================================================================== */

.grain-overlay {
    position: fixed;
    inset: 0;
    z-index: 3;
    pointer-events: none;
    opacity: 0.035;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
    background-repeat: repeat;
    background-size: 256px;
}

/* ==========================================================================
   STAGGERED TEXT ENTRANCE
   ========================================================================== */

.chapter__card .chapter__kicker,
.chapter__card h2,
.chapter__card p,
.chapter__card .stat-row,
.chapter__card .card-explore,
.chapter__card .carbon-compare,
.chapter__card .fire-compare,
.chapter__card .species-grid,
.chapter__card .chart-wrap {
    opacity: 0;
    transform: translateY(14px);
    transition: opacity 0.6s ease, transform 0.6s var(--ease);
}

.chapter__card.is-active .chapter__kicker { opacity: 1; transform: none; transition-delay: 0s; }
.chapter__card.is-active h2 { opacity: 1; transform: none; transition-delay: 0.08s; }
.chapter__card.is-active p { opacity: 1; transform: none; transition-delay: 0.15s; }
.chapter__card.is-active p:nth-of-type(2) { transition-delay: 0.22s; }
.chapter__card.is-active p:nth-of-type(3) { transition-delay: 0.28s; }
.chapter__card.is-active .stat-row { opacity: 1; transform: none; transition-delay: 0.3s; }
.chapter__card.is-active .card-explore { opacity: 1; transform: none; transition-delay: 0.35s; }
.chapter__card.is-active .carbon-compare { opacity: 1; transform: none; transition-delay: 0.3s; }
.chapter__card.is-active .fire-compare { opacity: 1; transform: none; transition-delay: 0.3s; }
.chapter__card.is-active .species-grid { opacity: 1; transform: none; transition-delay: 0.25s; }
.chapter__card.is-active .chart-wrap { opacity: 1; transform: none; transition-delay: 0.3s; }
.chapter__card.is-active .context-note { opacity: 1; transform: none; transition-delay: 0.4s; }

/* Card with image header */
.card-image-wrap {
    margin: -36px -32px 20px;
    overflow: hidden;
    border-radius: 0 14px 0 0;
}
.card-image-wrap img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    display: block;
    filter: brightness(0.75) saturate(1.1);
    transition: transform 8s ease;
}
.is-active .card-image-wrap img {
    transform: scale(1.06);
}

/* Card with location link */
.card-explore {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 14px;
    padding: 8px 16px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 100px;
    font-size: 12px;
    font-weight: 600;
    color: var(--ink2);
    text-decoration: none;
    transition: all 0.2s ease;
}
.card-explore:hover {
    background: rgba(255,255,255,0.08);
    color: #fff;
    text-decoration: none;
}
.card-explore svg { flex-shrink: 0; }

/* ==========================================================================
   FOOTNOTES
   ========================================================================== */

.fn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    font-size: 9px;
    font-weight: 700;
    font-style: normal;
    color: var(--ember-bright);
    background: rgba(232, 93, 38, 0.1);
    border-radius: 50%;
    cursor: pointer;
    vertical-align: super;
    margin: 0 2px;
    transition: all 0.2s ease;
    position: relative;
}
.fn:hover { background: rgba(232, 93, 38, 0.25); }
.fn--light { color: var(--ink3); background: rgba(255,255,255,0.06); }

.fn-tooltip {
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    width: 280px;
    padding: 12px 14px;
    background: rgba(15, 15, 15, 0.96);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 10px;
    font-size: 11px;
    font-weight: 400;
    line-height: 1.6;
    color: var(--ink2);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s ease;
    z-index: 500;
    box-shadow: 0 12px 40px rgba(0,0,0,0.6);
}
.fn:hover .fn-tooltip { opacity: 1; pointer-events: auto; }

/* ==========================================================================
   BOARD FEET VISUALIZATION
   ========================================================================== */

.board-feet-viz {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin-top: 20px;
}

.bf-row {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 0;
    border-bottom: 1px solid var(--rule);
}
.bf-row:last-child { border-bottom: none; }

.bf-icon {
    font-size: 28px;
    width: 48px;
    text-align: center;
    flex-shrink: 0;
}

.bf-number {
    font-family: var(--serif);
    font-weight: 800;
    font-size: 1.6rem;
    color: var(--ember-bright);
    line-height: 1.2;
}

.bf-label {
    font-size: 13px;
    color: var(--ink2);
    line-height: 1.5;
    margin-top: 2px;
}

/* ==========================================================================
   BEFORE/AFTER SLIDER
   ========================================================================== */

.ba-slider {
    position: relative;
    width: 100%;
    aspect-ratio: 1;
    border-radius: 12px;
    overflow: hidden;
    margin-top: 18px;
    cursor: ew-resize;
    border: 1px solid rgba(255,255,255,0.1);
}

.ba-slider__img {
    position: absolute;
    inset: 0;
    overflow: hidden;
}
.ba-slider__img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.ba-slider__img--before { z-index: 2; clip-path: inset(0 50% 0 0); }
.ba-slider__img--after { z-index: 1; }

.ba-slider__label {
    position: absolute;
    bottom: 12px;
    padding: 5px 12px;
    background: rgba(0,0,0,0.7);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    border-radius: 100px;
    z-index: 5;
}
.ba-slider__label--before { left: 12px; }
.ba-slider__label--after { right: 12px; }

.ba-slider__handle {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 3px;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    transform: translateX(-50%);
}

.ba-slider__handle-line {
    flex: 1;
    width: 3px;
    background: #fff;
    box-shadow: 0 0 8px rgba(0,0,0,0.5);
}

.ba-slider__handle-grip {
    width: 40px;
    height: 40px;
    background: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: #333;
    box-shadow: 0 2px 12px rgba(0,0,0,0.4);
    flex-shrink: 0;
}

/* ==========================================================================
   MID-SCROLL SUBSCRIBE
   ========================================================================== */

.chapter--subscribe {
    min-height: auto;
    padding: 8vh 5vw;
    position: relative;
}

.chapter--subscribe::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(3, 5, 3, 0.88);
    pointer-events: none;
    z-index: -1;
}

.subscribe-inline {
    max-width: 480px;
    margin: 0 auto;
    text-align: center;
}

.subscribe-inline__rule {
    width: 48px;
    height: 1px;
    background: var(--forest);
    margin: 0 auto 28px;
    opacity: 0.4;
}

.subscribe-inline__lede {
    font-size: 13px;
    color: var(--ink3);
    margin-bottom: 8px;
}

.subscribe-inline__headline {
    font-family: var(--serif);
    font-weight: 800;
    font-size: clamp(1.3rem, 3vw, 1.8rem);
    color: #fff;
    margin-bottom: 8px;
}

.subscribe-inline__sub {
    font-size: 13px;
    color: var(--ink3);
    margin-bottom: 20px;
}

.subscribe-inline__form {
    display: flex;
    gap: 8px;
    max-width: 400px;
    margin: 0 auto;
}

.subscribe-inline__input {
    flex: 1;
    padding: 12px 16px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 100px;
    color: #fff;
    font-family: var(--sans);
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s ease;
}
.subscribe-inline__input:focus { border-color: var(--forest); }
.subscribe-inline__input::placeholder { color: var(--ink3); }

.subscribe-inline__btn {
    padding: 12px 24px;
    background: var(--forest);
    color: #fff;
    font-weight: 700;
    font-size: 14px;
    border-radius: 100px;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}
.subscribe-inline__btn:hover {
    background: var(--canopy);
    transform: translateY(-1px);
}

.subscribe-inline__count {
    font-size: 11px;
    color: var(--ink3);
    margin-top: 12px;
}

/* ==========================================================================
   COMMENT GENERATOR
   ========================================================================== */

.chapter--comment-gen {
    min-height: 100vh;
    justify-content: center;
    text-align: left;
    position: relative;
}

.comment-gen__title {
    font-family: var(--serif);
    font-weight: 900;
    font-size: clamp(1.5rem, 3.5vw, 2.2rem);
    color: #fff;
    margin-bottom: 10px;
}

.comment-gen__intro {
    font-size: 14px;
    color: var(--ink2);
    line-height: 1.7;
    margin-bottom: 24px;
}

.comment-gen__concerns {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
}

.concern-btn {
    padding: 9px 18px;
    border-radius: 100px;
    font-size: 13px;
    font-weight: 600;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.1);
    color: var(--ink2);
    cursor: pointer;
    transition: all 0.2s ease;
}
.concern-btn:hover { background: rgba(255,255,255,0.08); color: #fff; }
.concern-btn.is-active {
    background: var(--ember-glow);
    border-color: var(--ember);
    color: var(--ember-bright);
}

.comment-gen__output {
    width: 100%;
    padding: 18px 20px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 12px;
    color: var(--ink);
    font-family: var(--sans);
    font-size: 13.5px;
    line-height: 1.75;
    resize: vertical;
    outline: none;
    transition: border-color 0.2s ease;
    margin-bottom: 16px;
}
.comment-gen__output:focus { border-color: var(--ember); }

.comment-gen__actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}

.comment-gen__tip {
    font-size: 11px;
    color: var(--ink3);
    line-height: 1.6;
    font-style: italic;
}

/* ==========================================================================
   STICKY CTA BAR
   ========================================================================== */

.sticky-cta {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 900;
    background: rgba(6, 8, 6, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid rgba(255,255,255,0.06);
    padding: 10px 20px;
    transform: translateY(100%);
    transition: transform 0.4s var(--ease);
}
.sticky-cta.is-visible { transform: translateY(0); }

.sticky-cta__inner {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
}

.sticky-cta__countdown {
    font-family: var(--serif);
    font-weight: 700;
    font-size: 13px;
    color: var(--blood-bright);
}

.sticky-cta__btn {
    padding: 8px 20px;
    border-radius: 100px;
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.2s ease;
}
.sticky-cta__btn--primary {
    background: var(--blood);
    color: #fff;
}
.sticky-cta__btn--primary:hover {
    background: var(--blood-bright);
    text-decoration: none;
}
.sticky-cta__btn--sub {
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.1);
    color: var(--ink2);
}
.sticky-cta__btn--sub:hover {
    background: rgba(255,255,255,0.1);
    color: #fff;
    text-decoration: none;
}

/* ==========================================================================
   SHAREABLE CARDS
   ========================================================================== */

.chapter--assets {
    min-height: auto;
    padding: 8vh 5vw;
    justify-content: center;
}

.share-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.share-card {
    aspect-ratio: 9/16;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.08);
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.share-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 48px rgba(0,0,0,0.5);
}

.share-card__inner {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
    text-align: center;
    background: linear-gradient(145deg, rgba(29, 61, 34, 0.95), rgba(6, 8, 6, 0.98));
}
.share-card__inner--ember {
    background: linear-gradient(145deg, rgba(80, 30, 10, 0.95), rgba(6, 8, 6, 0.98));
}
.share-card__inner--blood {
    background: linear-gradient(145deg, rgba(80, 15, 15, 0.95), rgba(6, 8, 6, 0.98));
}

.share-card__badge {
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.25em;
    color: var(--ember-bright);
    margin-bottom: 16px;
}

.share-card__stat {
    font-family: var(--serif);
    font-weight: 900;
    font-size: clamp(1.1rem, 2.5vw, 1.5rem);
    color: #fff;
    line-height: 1.2;
    margin-bottom: 10px;
}

.share-card__text {
    font-size: 12px;
    color: var(--ink2);
    line-height: 1.6;
    margin-bottom: auto;
}

.share-card__cta {
    font-size: 11px;
    font-weight: 700;
    color: var(--blood-bright);
    margin-top: 12px;
}

.share-card__brand {
    font-size: 9px;
    color: var(--ink3);
    letter-spacing: 0.08em;
    margin-top: 8px;
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */

@media (max-width: 768px) {
    .chapter { padding: 15vh 16px 15vh 16px; }
    .chapter__card { max-width: 100%; padding: 26px 20px; border-radius: 4px 14px 14px 4px; }
    .stat-row { flex-wrap: wrap; }
    .species-grid { grid-template-columns: 1fr; gap: 6px; }
    .cta-buttons { flex-direction: column; align-items: stretch; }
    .cta-btn { justify-content: center; }
    .cta-share__buttons { flex-direction: column; align-items: stretch; }
    .map-legend { bottom: 12px; right: 12px; }
    .nav__link { display: none; }

    .story-thread { left: 12px; }
    .story-thread__node { width: 10px; height: 10px; margin: 10px 0; }
    .story-thread__node::after { display: none; }
    .share-cards { grid-template-columns: repeat(3, 1fr); gap: 10px; }
    .subscribe-inline__form { flex-direction: column; }
    .comment-gen__concerns { gap: 6px; }
    .comment-gen__actions { flex-direction: column; }
    .sticky-cta__inner { gap: 10px; font-size: 11px; }
    .ba-slider { aspect-ratio: 4/3; }
    .image-break__text { padding-left: 16px; }
    .breather__stat { font-size: clamp(2rem, 7vw, 3.5rem); }
    .card-image-wrap { margin: -26px -20px 16px; border-radius: 0 12px 0 0; }
}

@media (max-width: 480px) {
    .chapter__headline { font-size: 2rem; }
    .chapter__card h2 { font-size: 1.3rem; }
    .stat-block__number { font-size: 1.1rem; }
    .countdown__block { min-width: 48px; padding: 8px 6px; }
    .countdown__num { font-size: 1.4rem; }
    .story-thread { display: none; }
}

@media (min-width: 1200px) {
    .chapter { padding-right: 8vw; }
}
