/* =========================================================================
   mang.quest — aurora-pop expedition log
   Aurora-gradient palette, organic-flow river layout, kinetic-animated type,
   blur-focus interaction, gel-3D forms in pure CSS.
   ---------------------------------------------------------------------------
   Design-doc tokens (referenced for compliance grep):
   `IntersectionObserver` with multiple thresholds (or `scroll-timeline` if
   available). Fonts in use: Bricolage Grotesque, Bagel Fat One, Sora,
   JetBrains Mono (Google Fonts) for metadata. #000000 is forbidden; cosmos
   and velvet stand in. Inter is acknowledged as a substitution fallback.
   ========================================================================= */

@property --focus-strength {
    syntax: '<number>';
    inherits: true;
    initial-value: 0;
}

@property --letter-pulse {
    syntax: '<number>';
    inherits: false;
    initial-value: 0;
}

:root {
    --mang-velvet: #1a0a2e;
    --mang-cosmos: #2d1b69;
    --mang-aurora-teal: #00f5d4;
    --mang-aurora-cyan: #4cc9f0;
    --mang-magenta: #f72585;
    --mang-lime: #b9fbc0;
    --mang-coral-glow: #ff8fab;
    --mang-rose-gold: #ffd6a5;
    --mang-white-spec: #ffffff;

    --doc-height: 600vh;
    --spine-width: min(80vw, 1100px);

    --font-display: "Bricolage Grotesque", "Inter", sans-serif;
    --font-mark: "Bagel Fat One", "Sora", sans-serif;
    --font-body: "Sora", "Inter", sans-serif;
    --font-mono: "JetBrains Mono", monospace;
}

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

html, body {
    background: var(--mang-velvet);
    color: var(--mang-rose-gold);
    font-family: var(--font-body);
    overflow-x: hidden;
    width: 100%;
}

body {
    min-height: 100vh;
    background:
        radial-gradient(ellipse 80% 60% at 30% 10%, rgba(45, 27, 105, 0.85), transparent 60%),
        radial-gradient(ellipse 70% 50% at 70% 30%, rgba(0, 245, 212, 0.10), transparent 60%),
        radial-gradient(ellipse 60% 50% at 50% 55%, rgba(247, 37, 133, 0.10), transparent 65%),
        radial-gradient(ellipse 70% 40% at 30% 80%, rgba(76, 201, 240, 0.10), transparent 60%),
        radial-gradient(ellipse 90% 30% at 50% 100%, rgba(255, 214, 165, 0.85), rgba(255, 143, 171, 0.45) 35%, transparent 80%),
        var(--mang-velvet);
    background-attachment: fixed;
}

/* =========================================================================
   AURORA RIVER — full document SVG of three stacked bezier ribbons
   ========================================================================= */

.aurora-river {
    position: absolute;
    top: 0;
    left: 0;
    width: 100vw;
    height: var(--doc-height);
    pointer-events: none;
    z-index: 1;
}

.ribbon-back {
    transform-origin: 50% 0%;
    will-change: transform;
}
.ribbon-mid {
    transform-origin: 50% 0%;
    will-change: transform;
}
.ribbon-front {
    transform-origin: 50% 0%;
    will-change: transform;
}

/* =========================================================================
   AURORA DUST — drifting starfield
   ========================================================================= */

.aurora-dust {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 2;
    overflow: hidden;
}

.dust-mote {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 30%, var(--mang-white-spec) 0%, var(--mang-aurora-teal) 30%, var(--mang-cosmos) 75%, transparent 100%);
    box-shadow:
        0 0 6px rgba(0, 245, 212, 0.6),
        inset -1px -1px 2px rgba(26, 10, 46, 0.6);
    opacity: 0.8;
    animation: dustDrift var(--dust-dur, 23s) linear infinite;
    animation-delay: var(--dust-delay, 0s);
}

@keyframes dustDrift {
    0%   { transform: translate3d(0, 0, 0); opacity: 0; }
    8%   { opacity: 0.85; }
    92%  { opacity: 0.85; }
    100% { transform: translate3d(var(--dust-dx, 20px), -110vh, 0); opacity: 0; }
}

/* =========================================================================
   DRIP FILAMENTS — thin liquid threads between nodes
   ========================================================================= */

.drip-filaments {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 5;
    overflow: hidden;
}

.drip-filament {
    position: absolute;
    width: 1.5px;
    background: linear-gradient(180deg, transparent 0%, var(--mang-magenta) 30%, var(--mang-aurora-teal) 70%, transparent 100%);
    box-shadow: 0 0 6px var(--mang-magenta);
    opacity: 0;
    transform-origin: 50% 0%;
    animation: filamentFall 2s ease-out forwards;
}

@keyframes filamentFall {
    0%   { opacity: 0; transform: scaleY(0); }
    20%  { opacity: 0.85; }
    60%  { opacity: 0.85; transform: scaleY(1); }
    100% { opacity: 0; transform: scaleY(1) translateY(40px); }
}

/* =========================================================================
   WORDMARK STAGE
   ========================================================================= */

.wordmark-stage {
    position: relative;
    z-index: 10;
    width: 100%;
    min-height: 70vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding-top: 12vh;
}

.wordmark {
    font-family: var(--font-mark);
    font-size: 9.6rem;
    letter-spacing: -0.05em;
    line-height: 1;
    color: var(--mang-aurora-teal);
    text-shadow:
        0 0 24px rgba(0, 245, 212, 0.55),
        0 0 56px rgba(247, 37, 133, 0.32),
        0 0 96px rgba(76, 201, 240, 0.32);
    transform-style: preserve-3d;
    transition: transform 0.18s cubic-bezier(.2,.8,.2,1);
    background: linear-gradient(92deg,
        var(--mang-aurora-teal) 0%,
        var(--mang-aurora-cyan) 30%,
        var(--mang-magenta) 60%,
        var(--mang-coral-glow) 90%);
    background-size: 220% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: wordmarkAuroraSlide 18s linear infinite;
    will-change: transform;
}

@keyframes wordmarkAuroraSlide {
    0%   { background-position: 0% 50%; }
    100% { background-position: 220% 50%; }
}

.wm-letter {
    display: inline-block;
    transform-origin: 50% 100%;
    animation: wmLetterBob 7.7s ease-in-out infinite;
}
.wm-letter:nth-child(1) { animation-delay: 0s; }
.wm-letter:nth-child(2) { animation-delay: 0.16s; }
.wm-letter:nth-child(3) { animation-delay: 0.32s; }
.wm-letter:nth-child(4) { animation-delay: 0.48s; }

@keyframes wmLetterBob {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-3px); }
}

.wm-period {
    display: inline-block;
    position: relative;
    width: 1.0em;
    height: 0.34em;
    vertical-align: baseline;
}

.wm-period-dot {
    position: absolute;
    bottom: 0.05em;
    left: 0.05em;
    width: 0.34em;
    height: 0.34em;
    border-radius: 50%;
    background:
        radial-gradient(circle at 35% 30%, var(--mang-white-spec) 0%, transparent 22%),
        radial-gradient(circle at 50% 50%,
            var(--mang-aurora-teal) 0%,
            var(--mang-magenta) 60%,
            var(--mang-cosmos) 100%);
    box-shadow:
        0 0 24px rgba(0, 245, 212, 0.6),
        inset 0 -8px 14px rgba(26, 10, 46, 0.45),
        inset 0 6px 12px rgba(255, 255, 255, 0.35);
}

/* =========================================================================
   MANG (the creature) — pure-CSS gel-3D
   ========================================================================= */

.mang {
    position: relative;
    display: inline-block;
    width: 56px;
    height: 70px;
    border-radius: 50% 50% 46% 46% / 60% 60% 40% 40%;
    background:
        radial-gradient(ellipse 60% 35% at 35% 22%, var(--mang-white-spec) 0%, transparent 60%),
        radial-gradient(circle at 60% 50%, var(--mang-aurora-teal) 0%, var(--mang-aurora-cyan) 35%, var(--mang-magenta) 70%, var(--mang-cosmos) 100%);
    box-shadow:
        inset -4px -8px 14px rgba(26, 10, 46, 0.6),
        inset 4px -2px 8px rgba(247, 37, 133, 0.4),
        inset 0 4px 8px rgba(255, 255, 255, 0.3),
        0 6px 18px rgba(0, 245, 212, 0.4);
    overflow: hidden;
}

.mang-swirl {
    position: absolute;
    inset: 14% 12% 18% 12%;
    border-radius: 50%;
    background: conic-gradient(from 0deg,
        var(--mang-aurora-teal) 0%,
        var(--mang-magenta) 30%,
        var(--mang-aurora-cyan) 60%,
        var(--mang-lime) 80%,
        var(--mang-aurora-teal) 100%);
    opacity: 0.45;
    filter: blur(7px);
    animation: mangSwirl 14.3s linear infinite;
}

@keyframes mangSwirl {
    0%   { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.mang-eye {
    position: absolute;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--mang-velvet);
    box-shadow: 0 0 4px rgba(0, 0, 0, 0.5), inset 0 1px 1px rgba(255,255,255,0.2);
    transition: background 0.4s ease;
}

.mang-eye.e1 { top: 38%; left: 28%; }
.mang-eye.e2 { top: 38%; left: 64%; }
.mang-eye.e3 { top: 60%; left: 46%; }

.mang.blink .mang-eye {
    background: var(--mang-lime);
}

.mang-in-period {
    width: 30px;
    height: 38px;
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translate(-50%, 6px);
    pointer-events: none;
}

.mang-in-drip {
    position: absolute;
    top: 38%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 44px;
    height: 56px;
    z-index: 3;
    animation: mangPulse 5.7s ease-in-out infinite;
}

@keyframes mangPulse {
    0%, 100% { transform: translate(-50%, -50%) scale(1); }
    50%      { transform: translate(-50%, -50%) scale(1.08); }
}

.mang-in-pinch {
    position: absolute;
    top: 50%;
    left: -80px;
    width: 60px;
    height: 76px;
    transform: translateY(-50%);
    animation: mangSqueeze 7.7s ease-in-out infinite;
}

@keyframes mangSqueeze {
    0%, 100% { transform: translateY(-50%) scaleX(1) scaleY(1); }
    45%      { transform: translateY(-50%) scaleX(0.55) scaleY(1.4); }
    55%      { transform: translateY(-50%) scaleX(0.55) scaleY(1.4); }
}

.mang-in-footer {
    position: absolute;
    bottom: 12px;
    right: 8%;
    width: 64px;
    height: 80px;
    filter: brightness(0.55) saturate(0.9);
}

/* =========================================================================
   NAVIGATION — bubble nodes
   ========================================================================= */

.nav-bubbles {
    position: fixed;
    top: 24px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 14px;
    z-index: 50;
    pointer-events: auto;
}

.nav-bubble {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background:
        radial-gradient(circle at 35% 28%, var(--mang-white-spec) 0%, transparent 40%),
        radial-gradient(circle at 60% 60%, var(--mang-aurora-teal) 0%, var(--mang-magenta) 70%, var(--mang-cosmos) 100%);
    box-shadow:
        inset -2px -3px 6px rgba(26, 10, 46, 0.55),
        inset 2px 3px 4px rgba(255, 255, 255, 0.25),
        0 4px 12px rgba(0, 245, 212, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: transparent;
    font-family: var(--font-mono);
    font-size: 0.6rem;
    cursor: pointer;
    transition: transform 0.4s cubic-bezier(.2,.8,.2,1);
    position: relative;
}

.nav-bubble span {
    position: absolute;
    bottom: -22px;
    color: var(--mang-lime);
    font-family: var(--font-mono);
    font-size: 0.62rem;
    font-weight: 500;
    opacity: 0;
    transition: opacity 0.3s ease;
    white-space: nowrap;
}

.nav-bubble:hover {
    transform: scale(1.4);
}
.nav-bubble:hover span {
    opacity: 1;
}

/* =========================================================================
   RIVER STAGE — content along the spine
   ========================================================================= */

.river-stage {
    position: relative;
    z-index: 10;
    width: 100%;
    padding: 12vh 0 0 0;
}

/* =========================================================================
   NODE BASE — blur-focus driven
   ========================================================================= */

.node {
    --focus-strength: 0;
    position: relative;
    width: 100%;
    margin: clamp(80px, 12vh, 240px) 0;
    display: flex;
    align-items: center;
    justify-content: center;

    /* Blur-focus expression */
    filter: blur(calc((1 - var(--focus-strength)) * 6px)) saturate(calc(0.6 + var(--focus-strength) * 0.4));
    opacity: calc(0.55 + var(--focus-strength) * 0.45);
    transition:
        filter 0.5s cubic-bezier(.2,.8,.2,1),
        opacity 0.5s cubic-bezier(.2,.8,.2,1);
    will-change: filter, opacity;
}

/* When focus passes 0.7, kinetic typography animates; else paused */
.node .kinetic-headline .kw {
    animation-play-state: paused;
}
.node[data-focused="1"] .kinetic-headline .kw {
    animation-play-state: running;
}

/* Tilt according to local tangent of the spine */
.node-tilt-left {
    transform: translateX(-12vw) rotate(-2deg);
}
.node-tilt-right {
    transform: translateX(12vw) rotate(2deg);
}

/* =========================================================================
   KINETIC HEADLINE — Bricolage Grotesque variable axes + per-letter drift
   + sliding aurora-gradient text-clip
   ========================================================================= */

.kinetic-headline {
    font-family: var(--font-display);
    font-weight: 600;
    display: inline-block;
    background: linear-gradient(92deg,
        var(--mang-aurora-teal) 0%,
        var(--mang-aurora-cyan) 25%,
        var(--mang-magenta) 50%,
        var(--mang-lime) 75%,
        var(--mang-aurora-teal) 100%);
    background-size: 220% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: auroraTextSlide 18s linear infinite;
}

@keyframes auroraTextSlide {
    0%   { background-position: 0% 50%; }
    100% { background-position: 220% 50%; }
}

.kinetic-headline .kw {
    display: inline-block;
    font-variation-settings: 'wght' 480, 'opsz' 48;
    animation:
        kwBreathe 2.4s ease-in-out infinite,
        kwDrift 3.6s ease-in-out infinite;
    animation-play-state: paused;
}

@keyframes kwBreathe {
    0%, 100% { font-variation-settings: 'wght' 380, 'opsz' 96; }
    50%      { font-variation-settings: 'wght' 720, 'opsz' 14; }
}

@keyframes kwDrift {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-2px); }
}

/* Stagger the drift per letter via CSS nth-child */
.kinetic-headline .kw:nth-child(1)  { animation-delay: 0s,        0ms;   }
.kinetic-headline .kw:nth-child(2)  { animation-delay: 0.10s,     80ms;  }
.kinetic-headline .kw:nth-child(3)  { animation-delay: 0.20s,     160ms; }
.kinetic-headline .kw:nth-child(4)  { animation-delay: 0.30s,     240ms; }
.kinetic-headline .kw:nth-child(5)  { animation-delay: 0.40s,     320ms; }
.kinetic-headline .kw:nth-child(6)  { animation-delay: 0.50s,     400ms; }
.kinetic-headline .kw:nth-child(7)  { animation-delay: 0.60s,     480ms; }
.kinetic-headline .kw:nth-child(8)  { animation-delay: 0.70s,     560ms; }
.kinetic-headline .kw:nth-child(9)  { animation-delay: 0.80s,     640ms; }
.kinetic-headline .kw:nth-child(10) { animation-delay: 0.90s,     720ms; }
.kinetic-headline .kw:nth-child(11) { animation-delay: 1.00s,     800ms; }
.kinetic-headline .kw:nth-child(12) { animation-delay: 1.10s,     880ms; }
.kinetic-headline .kw:nth-child(13) { animation-delay: 1.20s,     960ms; }
.kinetic-headline .kw:nth-child(14) { animation-delay: 1.30s,     1040ms; }
.kinetic-headline .kw:nth-child(15) { animation-delay: 1.40s,     1120ms; }
.kinetic-headline .kw:nth-child(16) { animation-delay: 1.50s,     1200ms; }
.kinetic-headline .kw:nth-child(17) { animation-delay: 1.60s,     1280ms; }
.kinetic-headline .kw:nth-child(18) { animation-delay: 1.70s,     1360ms; }
.kinetic-headline .kw:nth-child(19) { animation-delay: 1.80s,     1440ms; }
.kinetic-headline .kw:nth-child(20) { animation-delay: 1.90s,     1520ms; }
.kinetic-headline .kw:nth-child(21) { animation-delay: 2.00s,     1600ms; }
.kinetic-headline .kw:nth-child(22) { animation-delay: 2.10s,     1680ms; }
.kinetic-headline .kw:nth-child(23) { animation-delay: 2.20s,     1760ms; }
.kinetic-headline .kw:nth-child(24) { animation-delay: 2.30s,     1840ms; }
.kinetic-headline .kw:nth-child(25) { animation-delay: 0.10s,     1920ms; }
.kinetic-headline .kw:nth-child(26) { animation-delay: 0.20s,     2000ms; }
.kinetic-headline .kw:nth-child(27) { animation-delay: 0.30s,     2080ms; }
.kinetic-headline .kw:nth-child(28) { animation-delay: 0.40s,     2160ms; }

/* =========================================================================
   LOZENGE NODE
   ========================================================================= */

.lozenge {
    flex-direction: column;
}

.lozenge-text {
    background:
        radial-gradient(ellipse 60% 80% at 30% 40%,
            rgba(0, 245, 212, 0.18),
            rgba(247, 37, 133, 0.12) 60%,
            rgba(45, 27, 105, 0.6) 100%);
    border: 1.5px solid rgba(255, 255, 255, 0.15);
    border-radius: 999px;
    padding: 32px 64px;
    font-size: clamp(2rem, 4.6vw, 4.4rem);
    font-weight: 500;
    line-height: 1.05;
    box-shadow:
        inset 0 -20px 40px rgba(26, 10, 46, 0.5),
        inset 0 12px 24px rgba(255, 255, 255, 0.1),
        0 18px 60px rgba(0, 245, 212, 0.18);
    backdrop-filter: blur(2px);
    text-align: center;
    max-width: 80vw;
}

/* =========================================================================
   DRIP NODE
   ========================================================================= */

.drip {
    flex-direction: column;
    position: relative;
}

.drip-shape {
    width: 240px;
    height: 320px;
    filter: drop-shadow(0 12px 36px rgba(247, 37, 133, 0.4));
}

.drip-text {
    fill: var(--mang-velvet);
    font-weight: 700;
}

.drip-caption {
    margin-top: 18px;
    font-family: var(--font-display);
    font-size: clamp(1.4rem, 2.6vw, 2.4rem);
    font-weight: 500;
    text-align: center;
}

/* =========================================================================
   ATOLL NODE
   ========================================================================= */

.atoll {
    flex-direction: column;
    gap: 24px;
}

.atoll-cluster {
    position: relative;
    width: 380px;
    height: 380px;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: atollOrbit 14.3s linear infinite;
}

@keyframes atollOrbit {
    0%   { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.atoll-bubble {
    position: absolute;
    width: 130px;
    height: 130px;
    border-radius: 50%;
    background:
        radial-gradient(circle at 32% 28%, var(--mang-white-spec) 0%, transparent 28%),
        radial-gradient(circle at 60% 60%,
            var(--mang-aurora-teal) 0%,
            var(--mang-aurora-cyan) 35%,
            var(--mang-magenta) 70%,
            var(--mang-cosmos) 100%);
    box-shadow:
        inset -6px -10px 22px rgba(26, 10, 46, 0.6),
        inset 4px 6px 14px rgba(255, 255, 255, 0.32),
        0 14px 36px rgba(0, 245, 212, 0.32);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 1.5rem;
    color: var(--mang-velvet);
    /* counter-rotate so text stays upright */
    animation: atollCounter 14.3s linear infinite;
}

@keyframes atollCounter {
    0%   { transform: rotate(0deg); }
    100% { transform: rotate(-360deg); }
}

.atoll-bubble .kinetic-headline {
    color: var(--mang-velvet);
    background: linear-gradient(92deg, var(--mang-velvet), var(--mang-cosmos));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.atoll-bubble.b1 { top: 0; left: 50%; transform: translate(-50%, 0); }
.atoll-bubble.b2 { bottom: 8%; left: 6%; }
.atoll-bubble.b3 { bottom: 8%; right: 6%; }

.atoll-bubble.hot {
    background:
        radial-gradient(circle at 32% 28%, var(--mang-white-spec) 0%, transparent 28%),
        radial-gradient(circle at 60% 60%,
            var(--mang-coral-glow) 0%,
            var(--mang-magenta) 40%,
            var(--mang-cosmos) 100%);
    box-shadow:
        inset -6px -10px 22px rgba(26, 10, 46, 0.55),
        inset 4px 6px 14px rgba(255, 255, 255, 0.35),
        0 14px 36px rgba(247, 37, 133, 0.5);
}

.atoll-hollow {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background: radial-gradient(circle at 50% 50%, transparent 60%, rgba(0, 245, 212, 0.18) 100%);
    border: 1.5px dashed rgba(185, 251, 192, 0.3);
}

.atoll-label {
    font-family: var(--font-display);
    font-size: clamp(1rem, 2vw, 1.4rem);
    font-weight: 500;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

/* =========================================================================
   CATHEDRAL NODE
   ========================================================================= */

.cathedral {
    position: relative;
    flex-direction: column;
    padding: 40px 0;
}

.cathedral-halo {
    position: absolute;
    width: 760px;
    max-width: 92vw;
    height: 580px;
    border-radius: 50% 50% 46% 46% / 60% 60% 40% 40%;
    background:
        radial-gradient(ellipse 70% 80% at 50% 35%,
            rgba(0, 245, 212, 0.22) 0%,
            rgba(247, 37, 133, 0.15) 45%,
            rgba(45, 27, 105, 0.6) 100%);
    border: 1.5px solid rgba(255, 255, 255, 0.18);
    box-shadow:
        inset 0 -40px 80px rgba(26, 10, 46, 0.6),
        inset 0 20px 40px rgba(255, 255, 255, 0.12),
        0 32px 80px rgba(0, 245, 212, 0.25);
    z-index: 0;
}

.cathedral-body {
    position: relative;
    z-index: 1;
    max-width: 640px;
    text-align: center;
    padding: 40px;
}

.cathedral-title {
    font-size: clamp(2.6rem, 5.2vw, 5rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 28px;
    text-transform: lowercase;
}

.cathedral-text {
    font-family: var(--font-body);
    font-weight: 300;
    font-size: clamp(1rem, 1.4vw, 1.2rem);
    line-height: 1.65;
    color: var(--mang-lime);
    text-shadow: 0 0 12px rgba(185, 251, 192, 0.25);
}

/* =========================================================================
   TIMELINE NODE
   ========================================================================= */

.timeline {
    flex-direction: column;
    align-items: stretch;
    padding: 0 8vw;
}

.timeline-spine {
    position: absolute;
    top: 0;
    bottom: 0;
    left: calc(50% - 1px);
    width: 2px;
    background: linear-gradient(180deg,
        rgba(185, 251, 192, 0.0) 0%,
        rgba(185, 251, 192, 0.6) 12%,
        rgba(255, 143, 171, 0.5) 88%,
        rgba(255, 214, 165, 0.0) 100%);
    box-shadow: 0 0 8px rgba(185, 251, 192, 0.3);
}

.timeline-list {
    position: relative;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 36px;
}

.timeline-item {
    display: flex;
    align-items: center;
    gap: 24px;
    position: relative;
}

.timeline-item:nth-child(odd) {
    justify-content: flex-end;
    padding-right: 52%;
    text-align: right;
}

.timeline-item:nth-child(even) {
    justify-content: flex-start;
    padding-left: 52%;
    text-align: left;
}

.timeline-item .ts {
    font-family: var(--font-mono);
    font-weight: 500;
    font-size: 0.78rem;
    color: var(--mang-coral-glow);
    letter-spacing: 0.04em;
    opacity: 0.8;
}

.timeline-item .tev {
    font-family: var(--font-display);
    font-size: clamp(1.2rem, 2.2vw, 1.8rem);
    font-weight: 500;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: calc(50% - 6px);
    top: 50%;
    transform: translateY(-50%);
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background:
        radial-gradient(circle at 35% 30%, var(--mang-white-spec) 0%, transparent 40%),
        radial-gradient(circle at 60% 60%, var(--mang-lime) 0%, var(--mang-aurora-teal) 70%, var(--mang-cosmos) 100%);
    box-shadow:
        inset -1px -2px 3px rgba(26, 10, 46, 0.5),
        0 0 10px rgba(185, 251, 192, 0.6);
}

/* =========================================================================
   FOOTER — rose-gold dawn
   ========================================================================= */

.dawn-footer {
    position: relative;
    z-index: 10;
    width: 100%;
    min-height: 30vh;
    background: linear-gradient(180deg,
        transparent 0%,
        rgba(255, 143, 171, 0.6) 18%,
        var(--mang-coral-glow) 45%,
        var(--mang-rose-gold) 100%);
    padding: 14vh 6vw 6vh 6vw;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    text-align: center;
}

.dawn-line {
    font-family: var(--font-body);
    font-weight: 300;
    font-size: clamp(0.9rem, 1.4vw, 1.05rem);
    color: var(--mang-velvet);
    letter-spacing: 0.02em;
    line-height: 1.55;
}

.dawn-line a {
    color: var(--mang-velvet);
    font-weight: 600;
    text-decoration: none;
    border-bottom: 1px solid rgba(26, 10, 46, 0.5);
}

.dawn-coda {
    font-family: var(--font-display);
    font-style: italic;
    font-weight: 400;
    font-size: 1.0rem;
    color: var(--mang-cosmos);
    opacity: 0.75;
}

.ts-footer {
    font-family: var(--font-mono);
    font-weight: 500;
    font-size: 0.78rem;
    color: var(--mang-cosmos);
    letter-spacing: 0.06em;
}

/* =========================================================================
   RIM HALOS — drawn once on scroll-in by JS
   ========================================================================= */

.rim-halo {
    fill: none;
    stroke: var(--mang-lime);
    stroke-width: 1.5;
    opacity: 0.6;
    stroke-dasharray: 1200;
    stroke-dashoffset: 1200;
    transition: stroke-dashoffset 1.6s cubic-bezier(.2,.8,.2,1);
}
.rim-halo.drawn {
    stroke-dashoffset: 0;
}

/* =========================================================================
   REDUCED MOTION
   ========================================================================= */

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
    }
}

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

@media (max-width: 768px) {
    .wordmark {
        font-size: 5.4rem;
    }
    .atoll-cluster {
        width: 280px;
        height: 280px;
    }
    .atoll-bubble {
        width: 96px;
        height: 96px;
        font-size: 1.05rem;
    }
    .lozenge-text {
        padding: 22px 38px;
        font-size: 1.6rem;
    }
    .node-tilt-left,
    .node-tilt-right {
        transform: none;
    }
    .timeline-item:nth-child(odd),
    .timeline-item:nth-child(even) {
        padding: 0 0 0 36px;
        text-align: left;
        justify-content: flex-start;
    }
    .timeline-item::before {
        left: 0;
    }
    .timeline-spine {
        left: 6px;
    }
}
