/* ============================================================
   ggoomimi.com — a sealed dream, gently fermenting
   single continuous dive : five strata : --depth governs all
   ============================================================ */

:root {
    /* palette */
    --abyss: #070512;
    --trench: #0d1432;
    --indigo-deep: #1b2a6b;
    --photic: #3a5fb8;
    --surface-haze: #a9c8e8;
    --bioluminescent: #a8ffe8;
    --jelly-pink: #ffb8d1;
    --amber-warmth: #ffd28a;
    --moon-bone: #f4eee0;
    --ink-mist: #1a1a2eaa;

    /* the single dive variable, 0 -> 1 */
    --depth: 0;

    /* derived live values (interpolated in JS) */
    --bg-now: var(--surface-haze);
    --ink-now: var(--moon-bone);
    --blur-now: 0px;
    --aurora-opacity: 0.3;
    --particle-density: 0.32;

    /* cursor lantern */
    --lantern-x: 50vw;
    --lantern-y: 40vh;
}

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

html, body {
    width: 100%;
    overflow-x: hidden;
}

body {
    font-family: 'Lora', Georgia, serif;
    color: var(--moon-bone);
    background:
        radial-gradient(ellipse at 50% 0%, rgba(58,95,184,0.12) 0%, transparent 55%),
        radial-gradient(ellipse at 30% 40%, rgba(255,184,209,0.06) 0%, transparent 60%),
        linear-gradient(
            180deg,
            #0a1640 0%,
            #1b2a6b 14%,
            #1b2a6b 30%,
            #15224f 46%,
            #0d1432 64%,
            #0a0e26 80%,
            #070512 100%
        );
    background-attachment: fixed;
    min-height: 100vh;
    line-height: 1.78;
    cursor: none;
    position: relative;
    overflow-x: hidden;
}

.defs-only { position: absolute; width: 0; height: 0; pointer-events: none; }

/* ---------- particle canvas ---------- */
#motes {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    z-index: 1;
    pointer-events: none;
    mix-blend-mode: screen;
}

/* ---------- caustic refraction layer ---------- */
.caustic-layer {
    position: fixed;
    inset: 0 0 auto 0;
    height: 35vh;
    z-index: 2;
    pointer-events: none;
    opacity: calc(1 - var(--depth) * 1.4);
    mix-blend-mode: screen;
    filter: blur(0.6px);
    transition: opacity 200ms linear;
}
.caustic-layer svg { width: 100%; height: 100%; display: block; }

/* ---------- aurora gradient veil ---------- */
.aurora {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background:
        conic-gradient(
            from calc(140deg + var(--depth) * 220deg) at 30% 30%,
            rgba(58,95,184,0.18) 0deg,
            rgba(255,184,209,0.10) 70deg,
            rgba(168,255,232,0.12) 140deg,
            rgba(13,20,50,0) 240deg
        ),
        conic-gradient(
            from calc(280deg - var(--depth) * 180deg) at 70% 60%,
            rgba(168,255,232,0.10) 0deg,
            rgba(58,95,184,0.14) 90deg,
            rgba(255,210,138,0.06) 160deg,
            rgba(7,5,18,0) 240deg
        );
    filter: blur(60px) saturate(120%);
    opacity: var(--aurora-opacity);
    transition: opacity 320ms linear;
}

/* ---------- cursor lantern ---------- */
.lantern {
    position: fixed;
    width: 320px;
    height: 320px;
    left: var(--lantern-x);
    top: var(--lantern-y);
    margin: -160px 0 0 -160px;
    pointer-events: none;
    z-index: 1100;
    border-radius: 50%;
    background:
        radial-gradient(circle at 50% 50%,
            rgba(168,255,232,0.30) 0%,
            rgba(255,184,209,0.14) 28%,
            rgba(58,95,184,0.06) 55%,
            rgba(7,5,18,0) 75%);
    mix-blend-mode: screen;
    filter: blur(2px);
    transition: opacity 240ms ease;
}
@media (hover: none) {
    .lantern { opacity: 0.7; }
}

/* ---------- depth strip (DM Mono) ---------- */
.depth-strip {
    position: fixed;
    bottom: 18px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 80;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 16px;
    border-radius: 30px;
    background: rgba(7,5,18,0.42);
    backdrop-filter: blur(14px) saturate(140%);
    -webkit-backdrop-filter: blur(14px) saturate(140%);
    border: 1px solid rgba(168,200,232,0.14);
    font-family: 'DM Mono', ui-monospace, monospace;
    font-size: 0.72rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--surface-haze);
}
.depth-bar {
    display: inline-block;
    width: 120px;
    height: 2px;
    background: rgba(168,200,232,0.18);
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}
.depth-bar-fill {
    display: block;
    height: 100%;
    width: calc(var(--depth) * 100%);
    background: linear-gradient(90deg, var(--surface-haze), var(--bioluminescent));
    box-shadow: 0 0 8px rgba(168,255,232,0.7);
    transition: width 80ms linear;
}
.depth-pct {
    color: var(--bioluminescent);
    text-shadow: 0 0 6px rgba(168,255,232,0.5);
}

/* ---------- audio toggle ---------- */
.audio-toggle {
    position: fixed;
    bottom: 22px;
    right: 22px;
    z-index: 80;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: rgba(7,5,18,0.45);
    backdrop-filter: blur(14px) saturate(140%);
    -webkit-backdrop-filter: blur(14px) saturate(140%);
    border: 1px solid rgba(168,200,232,0.18);
    color: var(--surface-haze);
    display: grid;
    place-items: center;
    cursor: none;
    transition: background 200ms ease, color 200ms ease, transform 240ms cubic-bezier(0.65,0,0.35,1);
}
.audio-toggle .audio-wave { opacity: 0; transition: opacity 220ms ease; }
.audio-toggle.is-on { color: var(--bioluminescent); animation: audioPulse 2.4s ease-in-out infinite; }
.audio-toggle.is-on .audio-wave { opacity: 0.8; }
@keyframes audioPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(168,255,232,0.0); }
    50% { box-shadow: 0 0 22px 6px rgba(168,255,232,0.22); }
}

/* ---------- ribbon-vesicle header ---------- */
.ribbon-vesicle {
    position: fixed;
    top: 14px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 60;
    width: min(94%, 1180px);
    border-radius: 40px;
    background: rgba(13,20,50,0.42);
    backdrop-filter: blur(28px) saturate(140%);
    -webkit-backdrop-filter: blur(28px) saturate(140%);
    border: 1px solid rgba(168,200,232,0.15);
    box-shadow: 0 8px 36px -12px rgba(7,5,18,0.6),
                inset 0 0 0 1px rgba(255,184,209,0.06);
    overflow: hidden;
}
.ribbon-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 12px 24px;
}
.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: 'Fraunces', serif;
    font-weight: 500;
    font-size: 1.18rem;
    color: var(--moon-bone);
    letter-spacing: -0.01em;
}
.brand-sigil { color: var(--bioluminescent); animation: gentleBreathe 12s ease-in-out infinite; }
.brand-text { font-style: italic; }
.ribbon-nav {
    display: flex;
    gap: 18px;
    flex-wrap: wrap;
}
.ribbon-nav a {
    font-family: 'DM Mono', monospace;
    font-size: 0.72rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--surface-haze);
    text-decoration: none;
    padding: 6px 10px;
    border-radius: 20px;
    transition: color 240ms ease, background 240ms ease;
    cursor: none;
}
.ribbon-nav a:hover {
    color: var(--bioluminescent);
    background: rgba(168,255,232,0.08);
}
.ribbon-nav a.is-current {
    color: var(--bioluminescent);
    background: rgba(168,255,232,0.14);
    text-shadow: 0 0 12px rgba(168,255,232,0.6);
}
.ribbon-glyph {
    font-family: 'Fraunces', serif;
    font-size: 1.5rem;
    color: var(--jelly-pink);
    text-shadow: 0 0 14px rgba(255,184,209,0.5);
    animation: gentleBreathe 9s ease-in-out infinite;
}

@keyframes gentleBreathe {
    0%, 100% { transform: scale(1); opacity: 0.85; }
    50% { transform: scale(1.06); opacity: 1; }
}

/* ---------- dive container ---------- */
.dive {
    position: relative;
    z-index: 10;
    padding-top: 96px;
    padding-bottom: 240px;
}

/* ---------- stratum sections ---------- */
.stratum {
    position: relative;
    width: 100%;
    min-height: 110vh;
    padding: 8vh 6vw;
    display: flex;
    flex-direction: column;
    gap: 8vh;
}
.stratum::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    opacity: 0.5;
}
.stratum-1::before { background: radial-gradient(ellipse at 60% 10%, rgba(169,200,232,0.18) 0%, transparent 70%); }
.stratum-2::before { background: radial-gradient(ellipse at 30% 30%, rgba(58,95,184,0.16) 0%, transparent 70%); }
.stratum-3::before { background: radial-gradient(ellipse at 70% 40%, rgba(27,42,107,0.20) 0%, transparent 75%); }
.stratum-4::before { background: radial-gradient(ellipse at 30% 50%, rgba(13,20,50,0.30) 0%, transparent 75%); }
.stratum-5::before { background: radial-gradient(ellipse at 50% 60%, rgba(7,5,18,0.55) 0%, transparent 70%); }

.strata-coord {
    position: absolute;
    top: 24px;
    left: 6vw;
    font-family: 'DM Mono', monospace;
    font-size: 0.72rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: rgba(168,200,232,0.5);
    z-index: 5;
}

/* ---------- vesicles ---------- */
.vesicle {
    position: relative;
    width: min(680px, 86vw);
    padding: 0;
    isolation: isolate;
    align-self: flex-start;
}
.vesicle--right { align-self: flex-end; margin-right: 4vw; }
.vesicle--left { align-self: flex-start; margin-left: 6vw; }
.vesicle--center { align-self: center; }

.vesicle--hero { width: min(720px, 90vw); }
.vesicle--note { width: min(420px, 80vw); }
.vesicle--pulled { width: min(520px, 84vw); }
.vesicle--whisper { width: min(560px, 86vw); margin-top: 4vh; }

.vesicle-svg {
    position: absolute;
    inset: -4% -6% -4% -6%;
    width: 112%;
    height: 108%;
    z-index: -1;
    overflow: visible;
}
.vesicle-path {
    transform-origin: 50% 50%;
    animation: vesicleBreathe 12s ease-in-out infinite;
}
@keyframes vesicleBreathe {
    0%, 100% { transform: scale(1) rotate(0deg); }
    50% { transform: scale(1.025) rotate(0.4deg); }
}
.vesicle:nth-child(2n) .vesicle-path { animation-duration: 14s; animation-delay: -3s; }
.vesicle:nth-child(3n) .vesicle-path { animation-duration: 16s; animation-delay: -6s; }

.vesicle-inner {
    position: relative;
    padding: clamp(28px, 4vw, 56px) clamp(28px, 4vw, 56px);
    color: var(--moon-bone);
    z-index: 2;
}
.vesicle-inner--note {
    padding: clamp(22px, 3vw, 40px);
}
.vesicle-inner--pulled {
    padding: clamp(28px, 4vw, 50px);
    text-align: center;
}
.vesicle-inner--whisper {
    padding: clamp(22px, 3vw, 40px);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.sigil {
    color: var(--bioluminescent);
    opacity: 0.18;
    transition: opacity 600ms cubic-bezier(0.65,0,0.35,1);
    display: inline-block;
}
.sigil-corner {
    position: absolute;
    top: 18px;
    right: 22px;
    width: 38px;
    height: 38px;
}
.sigil-corner svg { width: 100%; height: 100%; }
.vesicle.is-centered .sigil { opacity: 0.55; }

/* ---------- typography in vesicles ---------- */
.kicker {
    font-family: 'DM Mono', monospace;
    font-size: 0.74rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--surface-haze);
    margin-bottom: 14px;
}
.coord {
    font-family: 'DM Mono', monospace;
    font-size: 0.7rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: rgba(168,200,232,0.6);
    display: inline-block;
    margin-bottom: 10px;
}

.hero-title {
    font-family: 'Fraunces', serif;
    font-variation-settings: "opsz" 144, "SOFT" 100, "WONK" 1;
    font-weight: 380;
    font-size: clamp(3.2rem, 7.5vw, 7.4rem);
    line-height: 0.92;
    letter-spacing: -0.025em;
    color: var(--moon-bone);
    margin: 8px 0 26px 0;
    text-shadow: 0 6px 36px rgba(7,5,18,0.6);
}
.hero-line {
    display: block;
}
.hero-line em {
    font-style: italic;
    font-weight: 500;
    color: var(--jelly-pink);
    text-shadow: 0 0 24px rgba(255,184,209,0.45);
}
.hero-title .char {
    display: inline-block;
    transform: translateY(24px);
    filter: blur(14px);
    opacity: 0;
    transition: transform 1100ms cubic-bezier(0.22, 1, 0.36, 1),
                filter 1100ms cubic-bezier(0.22, 1, 0.36, 1),
                opacity 900ms ease;
}
.hero-title.is-revealed .char {
    transform: translateY(0);
    filter: blur(0);
    opacity: 1;
}

.hero-sub {
    font-family: 'Lora', serif;
    font-size: 1.0625rem;
    line-height: 1.78;
    color: rgba(244,238,224,0.86);
    max-width: 56ch;
    margin-bottom: 28px;
}

.chapter-title {
    font-family: 'Caudex', 'Fraunces', serif;
    font-weight: 400;
    font-size: clamp(1.6rem, 3vw, 2.4rem);
    color: var(--moon-bone);
    line-height: 1.18;
    letter-spacing: -0.005em;
    margin-bottom: 16px;
}
.chapter-title em {
    font-style: italic;
    color: var(--jelly-pink);
    text-shadow: 0 0 18px rgba(255,184,209,0.4);
}
.chapter-prose {
    font-family: 'Lora', serif;
    font-size: 1.0625rem;
    line-height: 1.78;
    color: var(--moon-bone);
    max-width: 56ch;
    margin-bottom: 14px;
}
.chapter-prose em {
    font-style: italic;
    color: var(--bioluminescent);
}
.chapter-prose--quiet { color: rgba(244,238,224,0.78); }

.note-prose {
    font-family: 'Lora', serif;
    font-size: 0.96rem;
    line-height: 1.7;
    color: rgba(244,238,224,0.86);
    font-style: italic;
}
.note-prose em { color: var(--bioluminescent); font-style: italic; }

.pulled-quote {
    font-family: 'Caudex', serif;
    font-style: italic;
    font-size: clamp(1.2rem, 2vw, 1.55rem);
    line-height: 1.45;
    color: var(--moon-bone);
}
.pulled-attrib {
    display: block;
    margin-top: 14px;
    font-family: 'DM Mono', monospace;
    font-size: 0.72rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: rgba(168,200,232,0.6);
}

.movement-list {
    list-style: none;
    margin-top: 18px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.movement-list li {
    display: flex;
    gap: 14px;
    align-items: baseline;
    font-family: 'Lora', serif;
    color: rgba(244,238,224,0.88);
}
.mvm-num {
    font-family: 'DM Mono', monospace;
    color: var(--bioluminescent);
    font-size: 0.78rem;
    letter-spacing: 0.14em;
    min-width: 28px;
}
.mvm-text { font-size: 1rem; line-height: 1.6; }

/* ---------- pill-blob (the morphing button) ---------- */
.pill-blob {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 32px;
    color: var(--abyss);
    background: linear-gradient(120deg, var(--bioluminescent), var(--jelly-pink));
    font-family: 'DM Mono', monospace;
    font-size: 0.78rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    cursor: none;
    user-select: none;
    overflow: hidden;
    isolation: isolate;
    box-shadow: 0 0 28px -2px rgba(168,255,232,0.55),
                inset 0 0 0 1px rgba(244,238,224,0.4);
    /* organic blob morph base */
    clip-path: path("M 24 8 C 80 0 220 -2 280 16 C 360 36 372 76 322 92 C 240 116 84 116 24 96 C -20 80 -16 18 24 8 Z");
    transition: transform 420ms cubic-bezier(0.65,0,0.35,1),
                box-shadow 420ms ease,
                background 420ms ease,
                clip-path 700ms cubic-bezier(0.65,0,0.35,1);
}
.pill-secondary {
    background: linear-gradient(120deg, var(--jelly-pink), var(--surface-haze));
    color: var(--trench);
}
.pill-blob::before {
    /* cursor-tracked ripple mask */
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at var(--rx, 50%) var(--ry, 50%),
                rgba(255,255,255,0.55) 0%,
                rgba(255,255,255,0) 55%);
    opacity: 0;
    transition: opacity 360ms ease;
    z-index: 1;
    mix-blend-mode: screen;
    pointer-events: none;
}
.pill-blob:hover {
    clip-path: path("M 12 14 C 88 -8 232 6 296 22 C 380 42 360 92 314 100 C 222 124 60 122 14 100 C -28 80 -18 28 12 14 Z");
    transform: translateY(-1px) scale(1.02);
    box-shadow: 0 0 42px -2px rgba(168,255,232,0.75),
                inset 0 0 0 1px rgba(244,238,224,0.55);
}
.pill-blob:hover::before { opacity: 0.9; }
.pill-blob:active { transform: scale(0.985); }
.pill-text { position: relative; z-index: 2; }

/* ---------- sub-vesicles (3D card-flip) ---------- */
.sub-vesicles {
    margin-top: 26px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 14px;
    perspective: 800px;
}
.sub-vesicle {
    position: relative;
    aspect-ratio: 1 / 1;
    background: transparent;
    border: 0;
    cursor: none;
    transform-style: preserve-3d;
    transition: transform 700ms cubic-bezier(0.65,0,0.35,1);
    color: var(--moon-bone);
    font-family: 'Lora', serif;
}
.sub-vesicle.is-flipped { transform: rotateY(180deg); }
.sub-face {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 14px;
    border-radius: 50% 42% 56% 44% / 48% 56% 40% 52%;
    background:
        radial-gradient(circle at 40% 30%, rgba(255,184,209,0.20), rgba(27,42,107,0.55) 70%, rgba(7,5,18,0.6) 100%);
    border: 1px solid rgba(168,200,232,0.16);
    box-shadow: inset 0 0 18px rgba(168,255,232,0.12);
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    text-align: center;
}
.sub-face.back {
    transform: rotateY(180deg);
    background:
        radial-gradient(circle at 50% 60%, rgba(168,255,232,0.20), rgba(13,20,50,0.7) 70%, rgba(7,5,18,0.7) 100%);
}
.sub-glyph {
    color: var(--bioluminescent);
    width: 38px;
    height: 38px;
}
.sub-glyph svg { width: 100%; height: 100%; }
.sub-label {
    font-family: 'DM Mono', monospace;
    font-size: 0.7rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: rgba(244,238,224,0.86);
}
.sub-back-text {
    font-family: 'Caudex', serif;
    font-style: italic;
    font-size: 0.92rem;
    line-height: 1.5;
    color: var(--moon-bone);
}

/* ---------- tentacle connectors ---------- */
.tentacle {
    position: absolute;
    left: 0;
    right: 0;
    bottom: -40px;
    height: 200px;
    width: 100%;
    z-index: 1;
    pointer-events: none;
    filter: blur(2px);
    opacity: 0.55;
}
.tentacle-path {
    stroke-dasharray: 1400;
    stroke-dashoffset: 1400;
    transition: stroke-dashoffset 2400ms cubic-bezier(0.65,0,0.35,1);
}
.tentacle.is-drawn .tentacle-path {
    stroke-dashoffset: 0;
}

/* ---------- blur-focus reveal ---------- */
.blur-focus .vesicle-inner {
    filter: blur(8px);
    transition: filter 900ms cubic-bezier(0.65,0,0.35,1);
}
.blur-focus.is-centered .vesicle-inner { filter: blur(0); }

.vesicle.is-centered .sigil-corner { opacity: 0.55; }

/* ---------- final sigil (the pulsing CTA at the deepest point) ---------- */
.final-sigil {
    align-self: center;
    margin: 6vh 0 4vh 0;
    color: var(--bioluminescent);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    cursor: none;
    filter: drop-shadow(0 0 24px rgba(168,255,232,0.6));
    animation: finalPulse 4.6s ease-in-out infinite;
}
@keyframes finalPulse {
    0%, 100% { transform: scale(0.96); opacity: 0.78; }
    50% { transform: scale(1.07); opacity: 1; }
}
.final-coord {
    font-family: 'DM Mono', monospace;
    font-size: 0.74rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--surface-haze);
}

/* ---------- whisper input ---------- */
.whisper-label {
    font-family: 'DM Mono', monospace;
    font-size: 0.74rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--surface-haze);
}
.whisper-input {
    background: rgba(7,5,18,0.42);
    border: 1px solid rgba(168,200,232,0.22);
    color: var(--moon-bone);
    font-family: 'Caudex', serif;
    font-style: italic;
    font-size: 1.02rem;
    padding: 14px 18px;
    border-radius: 24px;
    outline: none;
    cursor: none;
    transition: border 240ms ease, background 240ms ease, box-shadow 240ms ease;
}
.whisper-input::placeholder { color: rgba(244,238,224,0.4); font-style: italic; }
.whisper-input:focus {
    border-color: rgba(168,255,232,0.5);
    background: rgba(13,20,50,0.6);
    box-shadow: 0 0 24px rgba(168,255,232,0.25);
}

/* ---------- ripple-on-click (injected element) ---------- */
.ripple {
    position: absolute;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    pointer-events: none;
    transform: translate(-50%, -50%) scale(1);
    background: radial-gradient(circle, rgba(168,255,232,0.55) 0%, rgba(168,255,232,0) 70%);
    z-index: 5;
}

/* ---------- footer dissolve ---------- */
.dissolve-footer {
    position: relative;
    z-index: 10;
    height: 60vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    gap: 18px;
    padding-bottom: 80px;
    background: linear-gradient(180deg, rgba(7,5,18,0) 0%, var(--abyss) 70%, #000 100%);
}
.dissolve-mote {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--bioluminescent);
    box-shadow: 0 0 18px 4px rgba(168,255,232,0.6),
                0 0 40px 8px rgba(58,95,184,0.4);
    animation: motePulse 3s ease-in-out infinite;
}
@keyframes motePulse {
    0%, 100% { opacity: 0.4; transform: scale(0.85); }
    50% { opacity: 1; transform: scale(1.2); }
}
.footer-coord {
    font-family: 'DM Mono', monospace;
    font-size: 0.72rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: rgba(168,200,232,0.5);
}
.footer-coord a { color: var(--bioluminescent); text-decoration: none; cursor: none; }
.footer-coord a:hover { text-shadow: 0 0 8px rgba(168,255,232,0.7); }
.footer-attrib {
    font-family: 'Caudex', serif;
    font-style: italic;
    color: rgba(244,238,224,0.4);
    font-size: 0.92rem;
}

/* ---------- wish garden (released whispers) ---------- */
.wish-garden {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 70;
    overflow: hidden;
}
.wish-mote {
    position: absolute;
    bottom: -40px;
    left: 50%;
    transform: translateX(-50%);
    font-family: 'Caudex', serif;
    font-style: italic;
    font-size: 0.96rem;
    color: var(--bioluminescent);
    text-shadow: 0 0 14px rgba(168,255,232,0.6);
    padding: 6px 14px;
    border-radius: 30px;
    background: rgba(7,5,18,0.45);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(168,255,232,0.22);
    white-space: nowrap;
    max-width: 80vw;
    overflow: hidden;
    text-overflow: ellipsis;
    animation: wishRise 9s cubic-bezier(0.22, 1, 0.36, 1) forwards;
    opacity: 0;
}
@keyframes wishRise {
    0%   { transform: translate(-50%, 0) scale(0.6); opacity: 0; }
    8%   { opacity: 0.95; }
    50%  { transform: translate(calc(-50% + var(--wx, 0px)), -55vh) scale(1); opacity: 0.85; }
    100% { transform: translate(calc(-50% + var(--wx, 0px) * 1.4), -110vh) scale(0.7); opacity: 0; }
}

/* ---------- boot sequence ---------- */
.boot {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: #050309;
    display: grid;
    place-items: center;
    transition: opacity 1200ms ease, visibility 1200ms ease;
}
.boot.is-done {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}
.boot-mote {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--bioluminescent);
    box-shadow: 0 0 22px 6px rgba(168,255,232,0.7),
                0 0 60px 14px rgba(58,95,184,0.4);
    animation: bootExpand 5.2s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
@keyframes bootExpand {
    0%   { transform: scale(1); opacity: 0; }
    8%   { opacity: 1; }
    40%  { transform: scale(38); opacity: 0.85; }
    72%  { transform: scale(96); opacity: 0.55; background: radial-gradient(circle, var(--bioluminescent), var(--jelly-pink) 35%, transparent 80%); }
    100% { transform: scale(220); opacity: 0; background: radial-gradient(circle, var(--bioluminescent), transparent 70%); }
}

/* ---------- responsive tweaks ---------- */
@media (max-width: 720px) {
    .ribbon-inner { padding: 10px 14px; gap: 10px; }
    .ribbon-nav { gap: 6px; }
    .ribbon-nav a { padding: 4px 6px; font-size: 0.62rem; letter-spacing: 0.1em; }
    .brand-text { display: none; }
    .vesicle--right, .vesicle--left { margin-left: 0; margin-right: 0; align-self: center; }
    .stratum { padding: 6vh 4vw; gap: 6vh; }
    .hero-title { font-size: clamp(2.4rem, 11vw, 4.4rem); }
    .depth-strip { font-size: 0.6rem; gap: 8px; padding: 6px 10px; }
    .depth-bar { width: 70px; }
    body { cursor: auto; }
    .lantern { display: none; }
    .audio-toggle { cursor: pointer; }
    .pill-blob { cursor: pointer; }
    .ribbon-nav a { cursor: pointer; }
    .sub-vesicle { cursor: pointer; }
    .whisper-input { cursor: text; }
    .footer-coord a { cursor: pointer; }
}

/* ---------- prefers-reduced-motion ---------- */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 200ms !important;
    }
    .vesicle-path { animation: none; }
    .boot-mote { animation: none; opacity: 0; }
    .boot { display: none; }
    .lantern { display: none; }
    body { cursor: auto; }
}
