:root {
    --forge-orange: #c4521a;
    --amber-spore: #e8873a;
    --foxfire: #ff6b2b;
    --root-black: #0d0806;
    --loam: #1a1008;
    --bark: #2a1a0e;
    --parchment: #e8d5c0;
    --lichen: #8a7560;
    --granite: #3d2814;
    --deep-mountain: #1a0e06;
    --brown-earth: #4d3520;
    --burnt-sienna: #d4764e;
    --foxfire-haze: #ff6b2b33;
}

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

html {
    scroll-behavior: smooth;
}

body {
    background: var(--root-black);
    color: var(--parchment);
    font-family: 'Crimson Pro', serif;
    font-size: clamp(1rem, 1.8vw, 1.25rem);
    line-height: 1.75;
    letter-spacing: 0.01em;
    overflow-x: hidden;
}

.section {
    position: relative;
    overflow: hidden;
    padding: clamp(4rem, 8vh, 8rem) 0;
}

.section-label {
    display: block;
    font-family: 'Azeret Mono', monospace;
    font-size: clamp(0.7rem, 1.2vw, 0.9rem);
    font-weight: 500;
    color: var(--burnt-sienna);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    max-width: min(90vw, 720px);
    margin: 0 auto 4rem;
    padding: 0 1.5rem;
}

/* Section 1: Canopy */
.section-canopy {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    background: linear-gradient(180deg, #1a1008 0%, #0d0806 100%);
}

.canopy-content {
    text-align: center;
}

.hero-title {
    width: min(90vw, 800px);
    height: auto;
}

.hero-text-path {
    font-family: 'Dela Gothic One', sans-serif;
    font-size: 62px;
    fill: none;
    stroke: var(--foxfire);
    stroke-width: 1.5;
    stroke-dasharray: 2000;
    stroke-dashoffset: 2000;
    animation: draw-title 2.5s ease forwards;
}

@keyframes draw-title {
    to { stroke-dashoffset: 0; }
}

.hero-text-path {
    animation: draw-title 2.5s ease forwards, fill-title 1s ease-in 2.5s forwards;
}

@keyframes fill-title {
    to {
        fill: url(#text-grad);
        fill: var(--foxfire);
        stroke-width: 0;
    }
}

.canopy-subtitle {
    font-family: 'Azeret Mono', monospace;
    font-size: clamp(0.7rem, 1.2vw, 0.9rem);
    font-weight: 500;
    color: var(--lichen);
    letter-spacing: 0.15em;
    text-transform: uppercase;
    margin-top: 2rem;
    opacity: 0;
    animation: fade-in 1s ease forwards 3s;
}

@keyframes fade-in {
    to { opacity: 1; }
}

.scroll-indicator {
    position: absolute;
    bottom: 3rem;
    left: 50%;
    transform: translateX(-50%);
    animation: bounce 2s ease-in-out infinite;
    opacity: 0.6;
}

@keyframes bounce {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(10px); }
}

/* Section 2: Understory */
.section-understory {
    min-height: 100vh;
    background: linear-gradient(180deg, #0d0806 0%, #1a1008 20%);
    padding-top: clamp(4rem, 8vh, 8rem);
}

.understory-content {
    max-width: min(90vw, 720px);
    margin: 0 auto;
    padding: 0 1.5rem;
}

.text-block {
    border: 1px solid var(--forge-orange);
    padding: 2rem;
    background: rgba(42, 26, 14, 0.8);
    backdrop-filter: blur(4px);
    margin-bottom: 3rem;
    box-shadow: 0 0 20px #ff6b2b00;
    transition: box-shadow 0.8s ease;
}

.text-block.glow {
    box-shadow: 0 0 20px #ff6b2b22, 0 0 60px #ff6b2b11;
}

.block-left {
    max-width: 60%;
    margin-right: auto;
}

.block-right {
    max-width: 55%;
    margin-left: auto;
}

/* Section 3: Mycelium */
.section-mycelium {
    min-height: 120vh;
    background: var(--loam);
}

.mycelium-network {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.6;
}

.mycelium-path {
    stroke-dasharray: 500;
    stroke-dashoffset: 500;
    transition: stroke-dashoffset 3s ease;
}

.mycelium-path.drawn {
    stroke-dashoffset: 0;
}

.mycelium-content {
    position: relative;
    max-width: min(90vw, 720px);
    margin: 0 auto;
    padding: 0 1.5rem;
}

.mycelium-content .text-block {
    margin-bottom: 15vh;
}

/* Section 4: Substrate */
.section-substrate {
    min-height: 100vh;
    background: var(--loam);
    display: flex;
    flex-direction: column;
}

.substrate-content {
    position: relative;
    z-index: 2;
    max-width: min(90vw, 720px);
    margin: 0 auto;
    padding: 0 1.5rem;
    flex: 1;
}

.aurora {
    position: absolute;
    top: 10%;
    left: 0;
    width: 100%;
    height: 30%;
    z-index: 1;
    pointer-events: none;
}

.aurora-band {
    position: absolute;
    width: 200%;
    height: 40px;
    filter: blur(40px);
    opacity: 0.5;
}

.aurora-band-1 {
    top: 0;
    background: linear-gradient(90deg, transparent, #ff6b2b22, #e8873a11, transparent);
    animation: aurora-drift 20s linear infinite;
}

.aurora-band-2 {
    top: 50px;
    background: linear-gradient(90deg, transparent, #e8873a11, #ff6b2b22, transparent);
    animation: aurora-drift 25s linear infinite reverse;
}

.aurora-band-3 {
    top: 100px;
    background: linear-gradient(90deg, transparent, #ff6b2b11, transparent, #e8873a11, transparent);
    animation: aurora-drift 30s linear infinite;
}

@keyframes aurora-drift {
    0% { transform: translateX(-50%); }
    100% { transform: translateX(0%); }
}

.mountains {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 60%;
    pointer-events: none;
}

.mountain-layer {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.mountain-layer-2 { bottom: 0; }
.mountain-layer-3 { bottom: 0; }
.mountain-layer-4 { bottom: 0; }

/* Section 5: Roots */
.section-roots {
    min-height: 80vh;
    background: var(--root-black);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.root-svg {
    width: min(80vw, 400px);
    height: auto;
    max-height: 60vh;
}

.root-path {
    stroke-dasharray: 600;
    stroke-dashoffset: 600;
    transition: stroke-dashoffset 0.1s linear;
}

.roots-footer {
    font-family: 'Crimson Pro', serif;
    font-style: italic;
    font-size: 1rem;
    color: var(--lichen);
    text-align: center;
    margin-top: 3rem;
}

/* Spore particles */
.spores {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 100;
}

.spore {
    position: absolute;
    border-radius: 50%;
    background: var(--foxfire);
    animation: float-up var(--duration) ease-in-out infinite;
    animation-delay: var(--delay);
    left: var(--x);
    width: var(--size);
    height: var(--size);
    opacity: 0;
}

@keyframes float-up {
    0% { transform: translateY(100vh); opacity: 0; }
    10% { opacity: var(--opacity); }
    90% { opacity: var(--opacity); }
    100% { transform: translateY(-10vh); opacity: 0; }
}

/* Breathe animation for neon elements */
@keyframes breathe {
    0%, 100% { opacity: 0.7; }
    50% { opacity: 1; }
}

/* Mobile */
@media (max-width: 768px) {
    .block-left, .block-right {
        max-width: 100%;
    }

    .mountain-layer-3,
    .mountain-layer-4 {
        display: none;
    }
}
