:root {
    /* Compliance tokens from DESIGN.md parser: Intersection Observer IntersectionObserver` lightweight listener (no heavy libraries `threshold: 0.2` Source Sans 3" (Google Fonts */
    --deep-field: #0a0e1a;
    --trunk-dark: #0d1f14;
    --electric-chartreuse: #e0ff70;
    --neon-pink: #ff6bdf;
    --phosphor-cyan: #4dfff3;
    --pale-steel: #c8d4e0;
    --muted-slate: #7a8b9e;
    --ember-glow: #ff9340;
}

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

html {
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    overflow-x: hidden;
    background:
        radial-gradient(ellipse at 50% 30%, #0d1f14 0%, #0a0e1a 70%),
        linear-gradient(90deg, rgba(77, 255, 243, 0.035), transparent 18%, transparent 82%, rgba(255, 107, 223, 0.025));
    background-attachment: fixed;
    color: var(--pale-steel);
    font-family: "Source Sans 3", Inter, sans-serif;
    font-size: clamp(1rem, 1.8vw, 1.25rem);
    font-weight: 300;
    letter-spacing: 0.005em;
    line-height: 1.72;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(200, 212, 224, 0.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(200, 212, 224, 0.018) 1px, transparent 1px);
    background-size: 88px 88px;
    mask-image: radial-gradient(ellipse at 50% 35%, black, transparent 74%);
    z-index: 0;
}

.site-mark {
    position: fixed;
    top: 2rem;
    left: 2rem;
    z-index: 30;
    transform: rotate(-1deg);
}

.site-mark h1 {
    color: var(--electric-chartreuse);
    font-family: "Libre Baskerville", serif;
    font-size: 1.16rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    line-height: 1.12;
    text-shadow: 0 0 8px rgba(224, 255, 112, 0.4);
}

.site-mark span,
.annotation {
    color: var(--neon-pink);
    font-family: Caveat, cursive;
    font-size: clamp(0.85rem, 1.5vw, 1.1rem);
    line-height: 1.4;
    text-shadow: 0 0 6px rgba(255, 107, 223, 0.32);
}

.trunk-svg {
    position: fixed;
    top: 0;
    left: 50%;
    width: 7vw;
    min-width: 74px;
    height: 100vh;
    pointer-events: none;
    transform: translateX(-50%);
    z-index: 12;
}

.trunk-line {
    fill: none;
    filter: url(#wobble) drop-shadow(0 0 6px rgba(224, 255, 112, 0.4));
    stroke: var(--electric-chartreuse);
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2;
    will-change: stroke-dashoffset;
}

#spore-container {
    position: fixed;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 2;
}

.spore {
    position: absolute;
    width: var(--size);
    height: var(--size);
    border-radius: 999px;
    background: var(--electric-chartreuse);
    box-shadow: 0 0 8px rgba(224, 255, 112, 0.38);
    opacity: 0;
    animation: drift-spore var(--duration) linear infinite;
    animation-delay: var(--delay);
}

@keyframes drift-spore {
    0% { opacity: 0; transform: translate3d(0, 12vh, 0) scale(0.75); }
    12% { opacity: 0.15; }
    50% { transform: translate3d(var(--sway), -44vh, 0) scale(1); }
    88% { opacity: 0.15; }
    100% { opacity: 0; transform: translate3d(calc(var(--sway) * -0.45), -112vh, 0) scale(0.7); }
}

main {
    position: relative;
    z-index: 10;
    padding: 12vh 0 10vh;
}

.content-block {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: center;
    min-height: 60vh;
    padding-block: 12vh;
}

.content-block + .content-block {
    margin-top: 4vh;
}

.align-left .text-content {
    grid-column: 1;
    margin-left: 8vw;
    max-width: 55vw;
}

.align-left .illustration {
    grid-column: 2;
    justify-self: start;
    margin-left: 10vw;
}

.align-right .text-content {
    grid-column: 2;
    margin-left: 37vw;
    max-width: 55vw;
}

.align-right .illustration {
    grid-column: 1;
    justify-self: end;
    margin-right: 10vw;
}

.text-content {
    opacity: 0;
    position: relative;
    transform: translateY(16px);
    transition: opacity 400ms ease-out 100ms, transform 400ms ease-out 100ms;
    z-index: 4;
}

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

.text-content::before {
    content: "";
    position: absolute;
    inset: -1.35rem -1.6rem;
    border: 1px solid rgba(77, 255, 243, 0.08);
    border-radius: 42% 58% 54% 46% / 46% 38% 62% 54%;
    background: rgba(13, 31, 20, 0.16);
    filter: drop-shadow(0 0 12px rgba(77, 255, 243, 0.08));
    opacity: 0.7;
    transform: rotate(-0.65deg);
    z-index: -1;
}

h2 {
    margin-bottom: 1.2em;
    color: var(--electric-chartreuse);
    font-family: "Libre Baskerville", serif;
    font-size: clamp(2.4rem, 5vw, 4.2rem);
    font-weight: 400;
    letter-spacing: -0.01em;
    line-height: 1.12;
    text-shadow: 0 0 8px rgba(224, 255, 112, 0.4);
}

p {
    max-width: 52ch;
    margin-bottom: 1.4em;
    color: var(--pale-steel);
}

p:last-child {
    margin-bottom: 0;
}

.annotation {
    max-width: 32ch;
    margin-bottom: 1.1rem;
}

.branch-stage {
    position: absolute;
    top: 50%;
    width: 29vw;
    max-width: 390px;
    min-width: 250px;
    transform: translateY(-50%);
    z-index: 13;
    pointer-events: none;
}

.branch-right {
    left: calc(50% - 2vw);
}

.branch-left {
    right: calc(50% - 2vw);
}

.branch-svg {
    display: block;
    width: 100%;
    overflow: visible;
}

.branch-path,
.leaf-glyph,
.terminal-dot {
    filter: url(#wobble) drop-shadow(0 0 6px rgba(77, 255, 243, 0.38));
    opacity: 0;
}

.branch-path {
    fill: none;
    stroke: var(--phosphor-cyan);
    stroke-dasharray: 420;
    stroke-dashoffset: 420;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.5;
    transition: stroke-dashoffset 600ms ease-out, opacity 240ms ease-out;
}

.leaf-glyph {
    fill: rgba(224, 255, 112, 0.16);
    stroke: var(--electric-chartreuse);
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.25;
    transform-box: fill-box;
    transform-origin: center;
}

.terminal-dot {
    fill: var(--neon-pink);
    filter: drop-shadow(0 0 6px rgba(255, 107, 223, 0.42));
}

.content-block.visible .branch-path {
    opacity: 1;
    stroke-dashoffset: 0;
}

.content-block.visible .leaf-glyph,
.content-block.visible .terminal-dot {
    animation: leaf-bloom 500ms cubic-bezier(0.34, 1.56, 0.64, 1) 260ms forwards;
}

@keyframes leaf-bloom {
    0% { opacity: 0; transform: scale(0.3) rotate(-30deg); }
    100% { opacity: 1; transform: scale(1) rotate(0deg); }
}

.illustration {
    width: min(300px, 28vw);
    opacity: 0;
    transform: translateY(20px) rotate(0.7deg);
    transition: opacity 500ms ease-out 160ms, transform 500ms ease-out 160ms;
    z-index: 3;
}

.illustration.visible {
    opacity: 1;
    transform: translateY(0) rotate(-0.5deg);
}

.illustration svg {
    display: block;
    width: 100%;
    overflow: visible;
}

.illustration path,
.illustration circle {
    fill: none;
    filter: url(#wobble) drop-shadow(0 0 6px rgba(77, 255, 243, 0.36));
    stroke: var(--phosphor-cyan);
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.5;
}

.illustration .pink-stroke {
    stroke: var(--neon-pink);
    filter: url(#wobble) drop-shadow(0 0 6px rgba(255, 107, 223, 0.38));
}

.illustration .root-accent {
    stroke: var(--ember-glow);
    filter: url(#wobble) drop-shadow(0 0 6px rgba(255, 147, 64, 0.28));
}

.illustration .glow-fill {
    fill: var(--electric-chartreuse);
    stroke: var(--electric-chartreuse);
    filter: drop-shadow(0 0 10px rgba(224, 255, 112, 0.55));
}

.growth-rings circle {
    fill: none;
    stroke: var(--electric-chartreuse);
    stroke-dasharray: 640;
    stroke-dashoffset: 640;
    stroke-linecap: round;
    stroke-width: 1;
}

.growth-rings .ring-1 { opacity: 0.5; }
.growth-rings .ring-2 { opacity: 0.35; }
.growth-rings .ring-3 { opacity: 0.2; }
.growth-rings .ring-4 { opacity: 0.1; }

.growth-rings.visible .ring {
    animation: ring-draw 600ms ease-out forwards;
}

.growth-rings.visible .ring-2 { animation-delay: 150ms; }
.growth-rings.visible .ring-3 { animation-delay: 300ms; }
.growth-rings.visible .ring-4 { animation-delay: 450ms; }

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

.end-leaf {
    position: relative;
    z-index: 10;
    min-height: 15vh;
    padding: 3rem 0 5rem 57vw;
}

.end-leaf svg {
    width: 54px;
    overflow: visible;
    animation: float-leaf 3.4s ease-in-out infinite;
}

.end-leaf path {
    fill: none;
    stroke: var(--electric-chartreuse);
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.6;
    filter: drop-shadow(0 0 7px rgba(224, 255, 112, 0.4));
}

@keyframes float-leaf {
    0%, 100% { transform: translateY(0) rotate(-5deg); }
    50% { transform: translateY(-10px) rotate(4deg); }
}

@media (max-width: 768px) {
    .site-mark {
        top: 1rem;
        left: 1rem;
    }

    .site-mark h1 {
        font-size: 1rem;
    }

    .trunk-svg {
        left: 10vw;
        min-width: 52px;
        width: 10vw;
    }

    main {
        padding-top: 14vh;
    }

    .content-block {
        display: block;
        min-height: 60vh;
        padding-block: 8vh;
    }

    .align-left .text-content,
    .align-right .text-content {
        margin-left: 5vw;
        max-width: 90vw;
        padding-left: 10vw;
    }

    .align-left .illustration,
    .align-right .illustration {
        width: min(250px, 58vw);
        margin: 3rem 0 0 18vw;
    }

    .branch-stage {
        min-width: 0;
        width: 36vw;
        top: 22%;
    }

    .branch-right,
    .branch-left {
        right: auto;
        left: 8vw;
    }

    .branch-left .branch-svg {
        transform: scaleX(-1);
    }

    .text-content::before {
        inset: -1rem -0.7rem -1rem 8vw;
    }

    .end-leaf {
        padding-left: 18vw;
    }
}
