:root {
    --color-deep: #1b4332;
    --color-fern: #2d6a4f;
    --color-lichen: #d8f3dc;
    --color-coral: #e05236;
    --color-gold: #dda15e;
    --color-bark: #212922;
    --color-petal: #f1f7ee;
    --color-halftone: #40916c;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Source Sans 3', sans-serif;
    font-weight: 400;
    font-size: clamp(1rem, 1.15vw, 1.15rem);
    line-height: 1.7;
    letter-spacing: 0.005em;
    color: var(--color-bark);
    background: var(--color-petal);
    overflow-x: hidden;
}

/* Typography */
.headline {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    font-size: clamp(2.5rem, 6vw, 5.5rem);
    letter-spacing: -0.02em;
    line-height: 1.05;
    color: var(--color-deep);
}

.headline--massive {
    font-size: clamp(4rem, 12vw, 10rem);
    color: var(--color-petal);
}

.subtitle {
    font-family: 'Outfit', sans-serif;
    font-weight: 300;
    font-variant: small-caps;
    font-size: clamp(1.2rem, 2vw, 2rem);
    letter-spacing: 0.12em;
    color: var(--color-lichen);
    display: block;
    margin-top: 0.5rem;
}

.section-label {
    font-family: 'Outfit', sans-serif;
    font-weight: 300;
    font-variant: small-caps;
    font-size: 0.85rem;
    letter-spacing: 0.12em;
    color: var(--color-halftone);
    display: block;
    margin-bottom: 1rem;
}

.accent-coral {
    color: var(--color-coral);
}

.body-text {
    max-width: 38em;
    margin-bottom: 1.5em;
}

.pullquote {
    font-family: 'Outfit', sans-serif;
    font-weight: 300;
    font-size: clamp(1.5rem, 4vw, 3.5rem);
    color: var(--color-lichen);
    text-align: center;
    max-width: 700px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

/* Spine Label */
.spine-label {
    position: fixed;
    left: 1rem;
    top: 50%;
    transform: rotate(-90deg) translateX(-50%);
    transform-origin: left center;
    font-family: 'Outfit', sans-serif;
    font-weight: 300;
    font-variant: small-caps;
    font-size: 0.75rem;
    letter-spacing: 0.12em;
    color: var(--color-fern);
    z-index: 100;
    pointer-events: none;
}

/* Scroll Indicator */
.scroll-indicator {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 40px;
    height: 40px;
    z-index: 100;
}

.progress-ring {
    width: 100%;
    height: 100%;
}

.progress-ring__bg {
    fill: none;
    stroke: var(--color-lichen);
    stroke-width: 2;
}

.progress-ring__fill {
    fill: none;
    stroke: var(--color-fern);
    stroke-width: 2.5;
    stroke-dasharray: 113.1;
    stroke-dashoffset: 113.1;
    transform: rotate(-90deg);
    transform-origin: center;
    transition: stroke-dashoffset 0.1s linear;
}

/* Sections */
.section {
    position: relative;
    min-height: 100vh;
    overflow: hidden;
}

/* Content Grid */
.content-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 2rem;
    padding: 4rem 3rem;
    max-width: 1400px;
    margin: 0 auto;
    min-height: 100vh;
    align-items: center;
}

.content-grid--centered {
    justify-items: center;
    text-align: center;
}

/* Opening Section */
.section--opening {
    background: var(--color-deep);
    display: flex;
    align-items: center;
}

.section--opening .content-grid {
    position: relative;
    z-index: 2;
}

.opening__title {
    grid-column: 2 / 7;
}

.opening__text {
    grid-column: 7 / 11;
    color: var(--color-lichen);
}

.bg-illustration {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
    opacity: 0.12;
}

.svg-spiral-bg {
    width: 80%;
    max-width: 600px;
    stroke: var(--color-lichen);
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.foreground-dots {
    position: absolute;
    inset: 0;
    z-index: 3;
    pointer-events: none;
    background: radial-gradient(circle, var(--color-halftone) 1px, transparent 1px);
    background-size: 12px 12px;
    opacity: 0.06;
}

/* Spiral Section */
.section--spiral {
    background: var(--color-petal);
}

.spiral__text {
    grid-column: 2 / 6;
}

.spiral__illustration {
    grid-column: 7 / 12;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.svg-nautilus {
    width: 100%;
    max-width: 400px;
    stroke: var(--color-fern);
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.line-draw-circle {
    stroke: var(--color-fern);
    stroke-width: 2;
}

/* Branch Section (Interstitial) */
.section--branch {
    background: var(--color-bark);
    min-height: 60vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
}

.svg-branch {
    width: 80%;
    max-width: 800px;
    stroke: var(--color-lichen);
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    margin-bottom: 3rem;
}

/* Root Section */
.section--root {
    background: var(--color-petal);
}

.root-bg-pattern {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.08;
    pointer-events: none;
}

.svg-roots-bg {
    width: 100%;
    height: 100%;
    stroke: var(--color-deep);
    fill: none;
    stroke-width: 1.5;
    stroke-linecap: round;
}

.root__text {
    grid-column: 6 / 11;
}

.root__interactive {
    grid-column: 2 / 6;
    display: flex;
    align-items: center;
    justify-content: center;
}

.svg-root-network {
    width: 100%;
    max-width: 350px;
}

.root-node {
    fill: var(--color-fern);
    stroke: none;
    cursor: pointer;
    transition: fill 0.2s ease;
}

.root-node:hover,
.root-node.active {
    fill: var(--color-coral);
}

.root-path {
    stroke: var(--color-fern);
    fill: none;
    stroke-width: 1.5;
    stroke-linecap: round;
    transition: stroke 0.2s ease;
}

.root-path.highlighted {
    stroke: var(--color-coral);
    stroke-width: 2.5;
}

/* Seed Section */
.section--seed {
    background: var(--color-petal);
}

.seed__text {
    grid-column: 2 / 6;
}

.seed__illustration {
    grid-column: 7 / 12;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 300px;
}

.seed-pod {
    position: absolute;
    width: 200px;
    height: 200px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.seed-particle {
    position: absolute;
    width: 8px;
    height: 8px;
    background: var(--color-fern);
    border-radius: 50% 50% 50% 0;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(var(--angle)) translateX(20px);
    transition: transform 1.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.seed-pod.dispersed .seed-particle {
    transform: translate(-50%, -50%) rotate(var(--angle)) translateX(var(--dist));
}

.svg-seed-pod {
    width: 150px;
    stroke: var(--color-deep);
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    position: relative;
    z-index: 2;
}

/* Fern Section */
.section--fern {
    background: var(--color-fern);
    color: var(--color-lichen);
}

.section--fern .headline {
    color: var(--color-lichen);
}

.section--fern .section-label {
    color: var(--color-gold);
}

.svg-fern {
    width: 80%;
    max-width: 600px;
    stroke: var(--color-lichen);
    fill: none;
    stroke-width: 2.5;
    stroke-linecap: round;
    stroke-linejoin: round;
    grid-column: 1 / -1;
    margin-bottom: 2rem;
}

.fern__text {
    grid-column: 4 / 10;
}

.closing-statement {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    font-size: clamp(1.3rem, 2.5vw, 2rem);
    line-height: 1.3;
    color: var(--color-petal);
    margin-top: 2rem;
}

/* Colophon */
.section--colophon {
    background: var(--color-bark);
    min-height: 50vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.colophon__content {
    text-align: center;
    position: relative;
    z-index: 2;
}

.colophon__title {
    font-family: 'Outfit', sans-serif;
    font-weight: 300;
    font-variant: small-caps;
    font-size: 1.2rem;
    letter-spacing: 0.12em;
    color: var(--color-lichen);
    display: block;
    margin-bottom: 0.5rem;
}

.colophon__year {
    font-family: 'Outfit', sans-serif;
    font-weight: 300;
    font-size: 0.85rem;
    letter-spacing: 0.12em;
    color: var(--color-halftone);
    display: block;
    margin-bottom: 1.5rem;
}

.colophon__statement {
    font-family: 'Source Sans 3', sans-serif;
    color: var(--color-petal);
    font-size: 1rem;
}

/* Ben-Day Dot Overlays */
.ben-day-overlay {
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.8s ease;
}

.ben-day-overlay.visible {
    opacity: 0.15;
}

.ben-day--small {
    background: radial-gradient(circle, var(--color-halftone) 1px, transparent 1px);
    background-size: 8px 8px;
}

.ben-day--large {
    background: radial-gradient(circle, var(--color-halftone) 2px, transparent 2px);
    background-size: 12px 12px;
}

.ben-day--final {
    background: radial-gradient(circle, var(--color-halftone) 1.5px, transparent 1.5px);
    background-size: 10px 10px;
    opacity: 0.2;
}

/* Crop Marks */
.crop-marks {
    position: absolute;
    inset: 10px;
    pointer-events: none;
}

.crop-marks--full {
    position: absolute;
    inset: 2rem;
    pointer-events: none;
}

.crop-mark {
    position: absolute;
    width: 20px;
    height: 20px;
}

.crop-mark::before,
.crop-mark::after {
    content: '';
    position: absolute;
    background: var(--color-halftone);
}

.crop-mark::before {
    width: 1px;
    height: 20px;
}

.crop-mark::after {
    width: 20px;
    height: 1px;
}

.crop-mark--tl { top: 0; left: 0; }
.crop-mark--tl::before { top: 0; left: 0; }
.crop-mark--tl::after { top: 0; left: 0; }

.crop-mark--tr { top: 0; right: 0; }
.crop-mark--tr::before { top: 0; right: 0; }
.crop-mark--tr::after { top: 0; right: 0; }

.crop-mark--bl { bottom: 0; left: 0; }
.crop-mark--bl::before { bottom: 0; left: 0; }
.crop-mark--bl::after { bottom: 0; left: 0; }

.crop-mark--br { bottom: 0; right: 0; }
.crop-mark--br::before { bottom: 0; right: 0; }
.crop-mark--br::after { bottom: 0; right: 0; }

/* Line Draw Animation */
.line-draw {
    stroke-dasharray: 2000;
    stroke-dashoffset: 2000;
    transition: stroke-dashoffset 2.5s ease-out;
}

.line-draw.revealed {
    stroke-dashoffset: 0;
}

.line-draw-subtle {
    stroke-dasharray: 1500;
    stroke-dashoffset: 1500;
    transition: stroke-dashoffset 3s ease-out;
}

.line-draw-subtle.revealed {
    stroke-dashoffset: 0;
}

/* Text Reveal */
.headline .word {
    display: inline-block;
    clip-path: inset(0 100% 0 0);
    transition: clip-path 0.5s ease;
}

.headline .word.revealed {
    clip-path: inset(0 0% 0 0);
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .line-draw,
    .line-draw-subtle {
        stroke-dasharray: none;
        stroke-dashoffset: 0;
        transition: none;
    }
    .headline .word {
        clip-path: none;
    }
    .seed-particle {
        transition: none;
    }
    .ben-day-overlay {
        transition: none;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .content-grid {
        grid-template-columns: 1fr;
        padding: 3rem 1.5rem;
        gap: 2rem;
    }
    .opening__title,
    .opening__text,
    .spiral__text,
    .spiral__illustration,
    .root__text,
    .root__interactive,
    .seed__text,
    .seed__illustration,
    .fern__text {
        grid-column: 1 / -1;
    }
    .spine-label {
        display: none;
    }
    .headline--massive {
        font-size: clamp(3rem, 15vw, 6rem);
    }
}

/* Pop-art bold outlines on cards */
.spiral__illustration,
.root__interactive {
    border: 3px solid var(--color-bark);
    padding: 2rem;
    background: var(--color-petal);
}

/* Accent underline on key phrases */
.closing-statement {
    border-bottom: 4px solid var(--color-coral);
    display: inline;
    padding-bottom: 4px;
}
