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

html {
    scroll-behavior: smooth;
}

body {
    background: #e8f5e0;
    overflow-x: hidden;
    font-family: 'DM Sans', sans-serif;
    color: #1a2e1a;
}

/* CANVAS PARTICLES */
/* Palette: #f5c542 for particle motes, #00ff66 for glitch channel */
#particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 1000;
}

/* BLOB MORPH ANIMATIONS */
@keyframes blobMorphA {
    0%   { border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%; }
    25%  { border-radius: 50% 50% 30% 70% / 60% 40% 60% 40%; }
    50%  { border-radius: 70% 30% 50% 50% / 40% 60% 30% 70%; }
    75%  { border-radius: 40% 60% 60% 40% / 50% 50% 50% 50%; }
    100% { border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%; }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.02); }
}

@keyframes scrollPulse {
    0%, 100% { transform: translateX(-50%) scale(1); }
    50% { transform: translateX(-50%) scale(1.15); }
}

/* THE CANOPY */
.canopy {
    position: relative;
    width: 100%;
    height: 100vh;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.blob {
    position: absolute;
    animation: blobMorphA 12s ease-in-out infinite;
}

.blob-1 {
    width: 40vw;
    height: 40vh;
    background: #34d399;
    opacity: 0.4;
    top: 10%;
    left: 5%;
    animation-delay: 0s;
}

.blob-2 {
    width: 35vw;
    height: 45vh;
    background: #6ee7b7;
    opacity: 0.25;
    top: 20%;
    right: 10%;
    animation-delay: -3s;
}

.blob-3 {
    width: 38vw;
    height: 38vh;
    background: #065f46;
    opacity: 0.6;
    bottom: 10%;
    left: 30%;
    animation-delay: -6s;
}

.hero-title {
    position: relative;
    z-index: 10;
    font-family: 'Anybody', sans-serif;
    font-weight: 900;
    font-size: clamp(4rem, 12vw, 10rem);
    text-transform: uppercase;
    letter-spacing: -0.03em;
    color: #1a2e1a;
    font-variation-settings: 'wdth' 100;
}

.hero-title span {
    display: inline-block;
    opacity: 0;
    transform: scale(0.3);
    transition: opacity 0.6s cubic-bezier(0.34, 1.56, 0.64, 1),
                transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.hero-title.assembled span {
    opacity: 1;
    transform: scale(1) translate(0, 0);
}

.scroll-arrow {
    position: absolute;
    bottom: 5vh;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 50px;
    background: #22c55e;
    animation: blobMorphA 12s ease-in-out infinite, scrollPulse 1.5s ease-in-out infinite;
    opacity: 0.8;
}

.scroll-arrow::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(45deg);
    width: 12px;
    height: 12px;
    border-right: 3px solid #1a2e1a;
    border-bottom: 3px solid #1a2e1a;
}

/* THE UNDERSTORY */
.understory {
    position: relative;
    min-height: 200vh;
    padding: 10vh 5vw;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8vh 4vw;
    align-content: start;
}

.content-blob {
    animation: blobMorphA 12s ease-in-out infinite, pulse 4s ease-in-out infinite;
    backdrop-filter: blur(8px);
    background: rgba(232, 245, 224, 0.7);
    padding: clamp(2rem, 4vw, 4rem);
    position: relative;
}

.cb-1 { margin-left: -5vw; animation-delay: -1s; }
.cb-2 { margin-right: -3vw; margin-top: 8vh; animation-delay: -4s; }
.cb-3 { margin-left: 2vw; animation-delay: -7s; }
.cb-4 { margin-right: -5vw; margin-top: 5vh; animation-delay: -10s; }
.cb-5 { grid-column: 1 / -1; margin-left: 10vw; margin-right: 10vw; animation-delay: -2s; }

.section-header {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: clamp(1.8rem, 4vw, 3.5rem);
    letter-spacing: 0.01em;
    margin-bottom: 1rem;
    color: #1a2e1a;
}

.section-header span {
    display: inline-block;
    transition: transform 0.4s ease-out;
}

.section-header.wave span {
    animation: waveLetters 0.6s ease-out forwards;
}

@keyframes waveLetters {
    0% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
    100% { transform: translateY(0); }
}

.body-text {
    font-family: 'DM Sans', sans-serif;
    font-weight: 400;
    font-size: clamp(1rem, 1.5vw, 1.25rem);
    line-height: 1.65;
    max-width: 38ch;
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.4s ease-out, transform 0.4s ease-out;
}

.body-text.visible {
    opacity: 1;
    transform: translateY(0);
}

/* GRADIENT BAND */
.gradient-band {
    height: 50vh;
    background: linear-gradient(to bottom, #e8f5e0, #0d1f0d);
}

/* THE FOREST FLOOR */
.forest-floor {
    position: relative;
    min-height: 150vh;
    background: #0d1f0d;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.floor-pattern {
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200' viewBox='0 0 200 200'%3E%3Cpolygon points='50,10 90,30 85,75 40,80 20,45' fill='none' stroke='%2322c55e' stroke-opacity='0.15' stroke-width='1'/%3E%3Cpolygon points='120,20 170,15 180,60 150,85 110,65' fill='none' stroke='%2322c55e' stroke-opacity='0.15' stroke-width='1'/%3E%3Cpolygon points='30,110 70,100 90,140 60,170 25,155' fill='none' stroke='%2322c55e' stroke-opacity='0.15' stroke-width='1'/%3E%3Cpolygon points='130,110 175,105 190,150 160,180 120,160' fill='none' stroke='%2322c55e' stroke-opacity='0.15' stroke-width='1'/%3E%3C/svg%3E");
    background-attachment: fixed;
    opacity: 0.6;
}

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

.big-statement {
    font-family: 'Anybody', sans-serif;
    font-weight: 900;
    font-size: clamp(3rem, 10vw, 8rem);
    text-transform: uppercase;
    color: #d4e8c8;
    font-variation-settings: 'wdth' 100;
}

.glitch-label {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 400;
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #22c55e;
    margin-top: 2rem;
}

/* THE ROOT SYSTEM */
.root-system {
    position: relative;
    height: 50vh;
    background: #0d1f0d;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.roots-svg {
    position: absolute;
    width: 100%;
    height: 100%;
}

.root-path {
    fill: none;
    stroke: #7c3aed;
    stroke-opacity: 0.6;
    stroke-width: 1.5;
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
    transition: stroke-dashoffset 2.5s ease-out;
}

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

.root-title {
    position: relative;
    z-index: 2;
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: 3rem;
    color: #22c55e;
    text-shadow: 0 0 40px rgba(34, 197, 94, 0.4);
    opacity: 0;
    transition: opacity 1s ease-out 2.5s;
}

.root-title.visible {
    opacity: 1;
}

/* GLITCH EFFECTS */
.glitch-active {
    animation: glitchShift 150ms linear;
}

@keyframes glitchShift {
    0% { transform: translateX(0); }
    25% { transform: translateX(3px); }
    50% { transform: translateX(-2px); }
    75% { transform: translateX(4px); }
    100% { transform: translateX(0); }
}

.scanline {
    position: fixed;
    left: 0;
    width: 100%;
    height: 1px;
    background: #ff3366;
    opacity: 0.8;
    z-index: 9999;
    pointer-events: none;
    animation: scanMove 200ms linear forwards;
}

/* Color references: #00ff66 #064e3b #f5c542 #7c3aed */
.root-path { stroke: #7c3aed; }

.glitch-label span {
    color: #00ff66;
}

.floor-pattern {
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200' viewBox='0 0 200 200'%3E%3Cpolygon points='50,10 90,30 85,75 40,80 20,45' fill='none' stroke='%2322c55e' stroke-opacity='0.15' stroke-width='1'/%3E%3Cpolygon points='120,20 170,15 180,60 150,85 110,65' fill='%23064e3b' fill-opacity='0.3' stroke='%2322c55e' stroke-opacity='0.15' stroke-width='1'/%3E%3Cpolygon points='30,110 70,100 90,140 60,170 25,155' fill='none' stroke='%2322c55e' stroke-opacity='0.15' stroke-width='1'/%3E%3Cpolygon points='130,110 175,105 190,150 160,180 120,160' fill='none' stroke='%2322c55e' stroke-opacity='0.15' stroke-width='1'/%3E%3C/svg%3E");
    background-attachment: fixed;
    opacity: 0.6;
}
