/* =========================================================================
   yesang.org — a civic aquarium
   Frutiger Aero, taken at face value. Every surface is wet.
   ========================================================================= */

:root {
    --sky:         #7ecbff;
    --sky-deep:    #5eb6f0;
    --condense:    #c8ecff;
    --meniscus:    #e9f8ff;
    --meniscus-2:  #e0f6ff;
    --aqua:        #7ce7d6;
    --fern:        #b7f0c9;
    --koi-indigo:  #0b5289;
    --koi-ink:     #073c68;
    --abyss:       #031a2e;
    --amber:       #f6c76a;
    --cream:       #ffe9b8;

    --scroll: 0;

    --glass-bg:        rgba(255, 255, 255, 0.18);
    --glass-bg-strong: rgba(255, 255, 255, 0.28);
    --glass-border:    rgba(255, 255, 255, 0.55);
    --glass-contact:   rgba(3, 26, 46, 0.18);
}

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

html, body {
    background: var(--sky);
    color: var(--koi-indigo);
    font-family: "Nunito", system-ui, sans-serif;
    font-weight: 300;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

body {
    cursor: none;
}

.svg-defs {
    position: absolute;
    width: 0;
    height: 0;
    overflow: hidden;
}

/* -------------------------------------------------------------------------
   The glass recipe — five ingredients, one class.
   ------------------------------------------------------------------------- */

.glass {
    position: relative;
    background:
        linear-gradient(180deg, rgba(255,255,255,0.10), rgba(255,255,255,0.00)) padding-box,
        var(--glass-bg) padding-box;
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    backdrop-filter: blur(24px) saturate(1.6);
    -webkit-backdrop-filter: blur(24px) saturate(1.6);
    filter: drop-shadow(0 2px 0 var(--glass-contact)) drop-shadow(0 18px 30px rgba(11, 82, 137, 0.18));
    overflow: hidden;
}

.glass::before {
    /* inner highlight stroke along the top */
    content: "";
    position: absolute;
    inset: 1px 1px auto 1px;
    height: 40%;
    border-radius: 22px 22px 60% 60% / 22px 22px 40% 40%;
    background: linear-gradient(180deg, rgba(255,255,255,0.55), rgba(255,255,255,0.00));
    pointer-events: none;
    mix-blend-mode: screen;
}

.glass::after {
    /* curved-surface refraction */
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(120% 80% at 30% 18%, rgba(255,255,255,0.35), rgba(255,255,255,0.00) 55%);
    pointer-events: none;
}

/* -------------------------------------------------------------------------
   Cursor droplet — lensing disturbance
   ------------------------------------------------------------------------- */

.cursor-droplet {
    position: fixed;
    top: 0;
    left: 0;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    transform: translate3d(-100px, -100px, 0);
    background:
        radial-gradient(60% 55% at 35% 30%, rgba(255,255,255,0.95), rgba(255,255,255,0.00) 70%),
        radial-gradient(100% 100% at 50% 50%, rgba(200,236,255,0.55), rgba(126,203,255,0.25) 70%, rgba(11,82,137,0.25) 100%);
    border: 1px solid rgba(255,255,255,0.6);
    box-shadow:
        inset 0 1px 1px rgba(255,255,255,0.7),
        0 2px 4px rgba(3,26,46,0.25),
        0 0 18px rgba(126,203,255,0.4);
    transition: transform 0.06s linear, width 0.25s ease, height 0.25s ease, opacity 0.25s ease;
    mix-blend-mode: normal;
}

.cursor-droplet::after {
    /* micro-fern inside the droplet, fern #3 of 3 */
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: 12px;
    height: 12px;
    transform: translate(-50%, -50%);
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><g fill='none' stroke='%230b5289' stroke-width='0.7' stroke-linecap='round'><path d='M12 22 V 2'/><path d='M12 16 C 8 15 5 13 3 10'/><path d='M12 10 C 16 9 19 7 21 4'/><path d='M12 5 C 9 4 7 3 5 1.5'/></g></svg>");
    background-size: contain;
    background-repeat: no-repeat;
    opacity: 0.8;
}

/* -------------------------------------------------------------------------
   Drifting navigation droplet — parallax lag 0.92
   ------------------------------------------------------------------------- */

.nav-droplet {
    position: fixed;
    top: 28px;
    right: 36px;
    z-index: 500;
    display: flex;
    gap: 18px;
    align-items: center;
    padding: 14px 22px 14px 22px;
    background:
        linear-gradient(180deg, rgba(255,255,255,0.20), rgba(255,255,255,0.00)) padding-box,
        rgba(255,255,255,0.22) padding-box;
    border: 1px solid rgba(255,255,255,0.6);
    border-radius: 999px 999px 999px 48px;
    backdrop-filter: blur(20px) saturate(1.7);
    -webkit-backdrop-filter: blur(20px) saturate(1.7);
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.7),
        0 2px 4px rgba(3,26,46,0.2),
        0 14px 32px rgba(11,82,137,0.22);
    transform: translate3d(0, calc(var(--scroll) * 0.08 * -1px), 0);
    will-change: transform;
}

.nav-droplet::before {
    content: "";
    position: absolute;
    inset: 3px 3px auto 3px;
    height: 45%;
    border-radius: 999px 999px 40% 40% / 999px 999px 100% 100%;
    background: linear-gradient(180deg, rgba(255,255,255,0.6), rgba(255,255,255,0));
    pointer-events: none;
}

.nav-koi {
    position: relative;
    z-index: 1;
    font-family: "Nunito", sans-serif;
    font-weight: 600;
    font-size: 0.8rem;
    letter-spacing: 0.04em;
    color: var(--koi-indigo);
    padding: 6px 12px;
    border-radius: 999px;
    cursor: pointer;
    transition: background 0.4s ease, color 0.4s ease, transform 0.4s cubic-bezier(.22,1,.36,1);
}

.nav-koi::before {
    content: "";
    position: absolute;
    left: -2px;
    top: 50%;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, #fff, var(--aqua));
    transform: translateY(-50%);
    opacity: 0.85;
    box-shadow: 0 0 6px rgba(124,231,214,0.7);
}

.nav-koi:first-child::before { background: radial-gradient(circle at 30% 30%, #fff, var(--amber)); }

.nav-koi:hover {
    background: rgba(255,255,255,0.25);
    transform: translateY(-1px);
}

/* -------------------------------------------------------------------------
   Tank scaffolding
   ------------------------------------------------------------------------- */

#waterColumn {
    position: relative;
    width: 100%;
}

.tank {
    position: relative;
    width: 100%;
    min-height: 100vh;
    padding: 8vh 6vw;
    overflow: hidden;
    isolation: isolate;
}

.tank-1, .tank-3, .tank-5, .tank-7 { --weight: left; }
.tank-2, .tank-4, .tank-6 { --weight: right; }

/* asymmetric breathing */
.tank-1 > .masthead     { margin-left: 4vw;  margin-right: auto; }
.tank-2 > .frost-card   { margin-left: auto; margin-right: 6vw; }
.tank-3 .tank-header    { margin-left: 4vw; }
.tank-4 .fern-split     { margin-left: 2vw;  margin-right: 2vw; }
.tank-5 .tank-header    { margin-left: 4vw; }
.tank-6 .tank-header    { margin-left: auto; margin-right: 6vw; max-width: 42ch; text-align: right; }

.atm-gradient {
    position: absolute;
    inset: 0;
    z-index: -2;
    pointer-events: none;
}

.atm-1 {
    background:
        radial-gradient(120% 60% at 50% 110%, rgba(124,231,214,0.35), rgba(124,231,214,0) 60%),
        linear-gradient(180deg, #a9d9f7 0%, #c8ecff 45%, #e9f8ff 65%, #7ecbff 100%);
}
.atm-2 {
    background:
        radial-gradient(80% 60% at 80% 18%, rgba(255,233,184,0.45), rgba(255,233,184,0) 60%),
        linear-gradient(180deg, var(--sky) 0%, #9bd4f5 40%, var(--meniscus-2) 90%);
}
.atm-3 {
    background:
        radial-gradient(80% 70% at 30% 50%, rgba(124,231,214,0.35), rgba(124,231,214,0) 65%),
        linear-gradient(180deg, #9ad5f2 0%, #6fb6e4 55%, #2e6fa8 100%);
}
.atm-4 {
    background:
        radial-gradient(110% 70% at 100% 8%, rgba(255,233,184,0.55), rgba(255,233,184,0) 60%),
        linear-gradient(180deg, var(--meniscus-2) 0%, #a9d9f7 50%, #6fb6e4 100%);
}
.atm-5 {
    background:
        radial-gradient(90% 70% at 50% 120%, rgba(11,82,137,0.4), rgba(11,82,137,0) 55%),
        linear-gradient(180deg, #74c4e8 0%, #3a86be 60%, #1a5a8f 100%);
}
.atm-6 {
    background:
        radial-gradient(100% 80% at 50% 100%, rgba(124,231,214,0.3), rgba(124,231,214,0) 55%),
        linear-gradient(180deg, #1a5a8f 0%, #0d3f68 60%, #072943 100%);
}
.atm-7 {
    background:
        radial-gradient(80% 60% at 50% 100%, rgba(11,82,137,0.6), rgba(3,26,46,0) 70%),
        linear-gradient(180deg, #072943 0%, var(--abyss) 100%);
}

/* -------------------------------------------------------------------------
   Bubble layers — generated by JS
   ------------------------------------------------------------------------- */

.bubble-layer {
    position: absolute;
    inset: 0;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

.bubble-layer.dense {
    z-index: 0;
}

.bubble {
    position: absolute;
    bottom: -10%;
    left: var(--x, 50%);
    width: var(--r, 10px);
    height: var(--r, 10px);
    border-radius: 50%;
    background:
        radial-gradient(60% 55% at 35% 30%, rgba(255,255,255,0.9), rgba(255,255,255,0.00) 70%),
        radial-gradient(100% 100% at 50% 50%, rgba(200,236,255,0.45), rgba(126,203,255,0.15) 70%, rgba(11,82,137,0.15) 100%);
    border: 1px solid rgba(255,255,255,0.5);
    box-shadow:
        inset 0 1px 1px rgba(255,255,255,0.8),
        0 1px 2px rgba(3,26,46,0.1);
    animation: rise var(--t, 14s) linear infinite;
    animation-delay: var(--d, 0s);
    opacity: 0.85;
}

@keyframes rise {
    0%   { transform: translate3d(0, 10vh, 0) scale(0.9); opacity: 0; }
    12%  { opacity: 0.85; }
    50%  { transform: translate3d(calc(var(--wob, 10px) * -1), -55vh, 0) scale(1); }
    92%  { opacity: 0.65; }
    100% { transform: translate3d(var(--wob, 10px), -115vh, 0) scale(1.05); opacity: 0; }
}

.click-bubble {
    position: fixed;
    width: var(--r, 12px);
    height: var(--r, 12px);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9000;
    background:
        radial-gradient(60% 55% at 35% 30%, rgba(255,255,255,0.95), rgba(255,255,255,0.00) 70%),
        radial-gradient(100% 100% at 50% 50%, rgba(200,236,255,0.55), rgba(126,203,255,0.25) 70%, rgba(11,82,137,0.25) 100%);
    border: 1px solid rgba(255,255,255,0.55);
    box-shadow:
        inset 0 1px 1px rgba(255,255,255,0.8),
        0 1px 3px rgba(3,26,46,0.2);
    animation: clickRise var(--t, 2.2s) cubic-bezier(.25,.7,.3,1) forwards;
}

@keyframes clickRise {
    0%   { transform: translate(-50%, -50%) scale(0.4); opacity: 0.0; }
    10%  { opacity: 1; }
    100% { transform: translate(calc(-50% + var(--wob, 0px)), calc(-50% - 70vh)) scale(1.1); opacity: 0; }
}

/* -------------------------------------------------------------------------
   TANK I — Surface Tension Masthead
   ------------------------------------------------------------------------- */

.masthead {
    position: relative;
    padding-top: 4vh;
    max-width: 92vw;
    z-index: 2;
}

.wordmark {
    font-family: "Sofia Sans Semi Condensed", "Nunito", sans-serif;
    font-weight: 700;
    font-size: clamp(4.5rem, 14vw, 12rem);
    line-height: 0.9;
    letter-spacing: -0.025em;
    color: var(--koi-indigo);
    text-shadow: 0 1px 0 rgba(255,255,255,0.9), 0 -1px 0 rgba(11,82,137,0.4);
    margin-left: -0.03em;
    position: relative;
}

.wordmark-inner {
    display: inline-block;
    background: linear-gradient(
        90deg,
        var(--koi-indigo) 0%,
        var(--koi-indigo) 38%,
        rgba(255,255,255,0.95) 48%,
        rgba(124,231,214,0.9) 54%,
        var(--koi-indigo) 64%,
        var(--koi-indigo) 100%
    );
    background-size: 320% 100%;
    background-position: 0% 50%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: shimmer 6s ease-in-out infinite;
}

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

.water-plane {
    position: relative;
    height: clamp(4rem, 12vw, 9rem);
    margin-top: -0.4em;
    overflow: hidden;
    -webkit-mask-image: linear-gradient(180deg, rgba(0,0,0,1) 0%, rgba(0,0,0,0.25) 80%, rgba(0,0,0,0) 100%);
            mask-image: linear-gradient(180deg, rgba(0,0,0,1) 0%, rgba(0,0,0,0.25) 80%, rgba(0,0,0,0) 100%);
    transform-origin: top center;
    animation: meniscus 3.7s ease-in-out infinite;
    filter: url(#ripple);
}

.water-plane .wordmark.reflection {
    transform: scaleY(-1);
    opacity: 0.45;
    margin-top: -0.1em;
}

@keyframes meniscus {
    0%, 100% { transform: scaleY(0.99); }
    50%      { transform: scaleY(1.01); }
}

.sub-masthead {
    font-family: "Sofia Sans Semi Condensed", "Nunito", sans-serif;
    font-weight: 300;
    font-size: clamp(1.1rem, 2.2vw, 1.6rem);
    color: var(--koi-ink);
    margin-top: 2vh;
    letter-spacing: 0.01em;
}

.sub-masthead::first-letter {
    color: var(--koi-indigo);
    font-weight: 700;
}

.water-level {
    margin-top: 1.2vh;
    font-family: "Nunito", sans-serif;
    font-weight: 300;
    font-size: 0.95rem;
    color: var(--koi-ink);
    display: flex;
    gap: 0.6em;
    align-items: baseline;
    flex-wrap: wrap;
}

.water-level .label { opacity: 0.7; }
.water-level .value {
    font-family: "JetBrains Mono", monospace;
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--koi-indigo);
    font-variant-numeric: tabular-nums;
    padding: 2px 8px;
    border-radius: 10px;
    background: rgba(255,255,255,0.35);
    border: 1px solid rgba(255,255,255,0.6);
}
.water-level .qualifier { opacity: 0.7; }

/* -------------------------------------------------------------------------
   TANK II — Insolation Meter
   ------------------------------------------------------------------------- */

.lens-flare {
    position: absolute;
    pointer-events: none;
    z-index: 1;
}

.flare-a { top: 10%; left: 12%; width: 22vw; height: 22vw; animation: drift 40s ease-in-out infinite; }
.flare-b { top: 22%; left: 58%; width: 14vw; height: 14vw; animation: drift 52s ease-in-out infinite reverse; animation-delay: -9s; }
.flare-c { top: 6%;  left: 76%; width: 9vw;  height: 9vw;  animation: drift 34s ease-in-out infinite; animation-delay: -14s; }

@keyframes drift {
    0%, 100% { transform: translate3d(0, 0, 0); }
    25%      { transform: translate3d(3vw, 1vh, 0); }
    50%      { transform: translate3d(-2vw, -1vh, 0); }
    75%      { transform: translate3d(2vw, 2vh, 0); }
}

.flare-core, .flare-ghost, .flare-streak, .flare-halo {
    position: absolute;
    top: 50%;
    left: 50%;
    pointer-events: none;
}

.flare-core {
    width: 28%;
    height: 28%;
    border-radius: 50%;
    background: radial-gradient(circle at 50% 50%, rgba(255,255,255,1) 0%, rgba(255,233,184,0.9) 40%, rgba(246,199,106,0.0) 75%);
    transform: translate(-50%, -50%);
    filter: blur(1px);
}
.flare-halo {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: radial-gradient(circle at 50% 50%, rgba(255,255,255,0.0) 35%, rgba(255,233,184,0.22) 45%, rgba(255,233,184,0.0) 60%);
    transform: translate(-50%, -50%);
}
.flare-ghost.g1 {
    width: 18%;
    height: 18%;
    border-radius: 22%;
    background: radial-gradient(circle at 50% 50%, rgba(200,236,255,0.5), rgba(200,236,255,0) 60%);
    transform: translate(30%, -20%);
}
.flare-ghost.g2 {
    width: 12%;
    height: 12%;
    border-radius: 22%;
    background: radial-gradient(circle at 50% 50%, rgba(124,231,214,0.55), rgba(124,231,214,0) 60%);
    transform: translate(-80%, 40%);
}
.flare-streak {
    width: 180%;
    height: 6%;
    background: linear-gradient(90deg, rgba(255,255,255,0) 0%, rgba(255,233,184,0.35) 45%, rgba(200,236,255,0.35) 55%, rgba(255,255,255,0) 100%);
    transform: translate(-50%, -50%);
    filter: blur(3px);
    border-radius: 50%;
}

.frost-card {
    display: block;
    max-width: 72ch;
    padding: 4vh 4vw;
    margin-top: 18vh;
    background:
        linear-gradient(180deg, rgba(255,255,255,0.22), rgba(255,255,255,0.06)) padding-box,
        rgba(255,255,255,0.28) padding-box;
    position: relative;
    z-index: 3;
}

.tilt-card {
    transform: rotate(2deg);
    transition: transform 0.7s cubic-bezier(.22,1,.36,1);
}
.tilt-card:hover {
    transform: rotate(0deg) translateY(-3px);
}

.card-label {
    display: flex;
    gap: 1.5em;
    align-items: baseline;
    margin-bottom: 1.4em;
    padding-bottom: 1.1em;
    border-bottom: 1px dashed rgba(11,82,137,0.28);
}

.card-label .stamp {
    font-family: "Sofia Sans Semi Condensed", sans-serif;
    font-weight: 700;
    font-size: 1.4rem;
    color: var(--koi-indigo);
    letter-spacing: -0.015em;
}

.card-label .stamp-time {
    font-family: "JetBrains Mono", monospace;
    font-weight: 400;
    font-size: 0.78rem;
    color: var(--koi-ink);
    opacity: 0.78;
    font-variant-numeric: tabular-nums;
}

.card-prose {
    font-family: "Nunito", sans-serif;
    font-weight: 300;
    font-size: 1.0625rem;
    line-height: 1.65;
    letter-spacing: 0.002em;
    color: var(--koi-ink);
}

.card-footer {
    display: flex;
    justify-content: space-between;
    gap: 1.5em;
    margin-top: 2em;
    flex-wrap: wrap;
    padding-top: 1em;
    border-top: 1px dashed rgba(11,82,137,0.25);
}
.card-footer span {
    font-family: "JetBrains Mono", monospace;
    font-weight: 400;
    font-size: 0.78rem;
    color: var(--koi-ink);
    opacity: 0.8;
    font-variant-numeric: tabular-nums;
}

/* -------------------------------------------------------------------------
   TANK III — Reservoir Cross-Section (orbs)
   ------------------------------------------------------------------------- */

.tank-header {
    position: relative;
    z-index: 2;
    max-width: 50ch;
    margin-bottom: 6vh;
    color: var(--meniscus);
}

.tank-header .roman {
    display: inline-block;
    font-family: "JetBrains Mono", monospace;
    font-weight: 400;
    font-size: 0.78rem;
    color: var(--meniscus);
    background: rgba(255,255,255,0.18);
    border: 1px solid rgba(255,255,255,0.45);
    border-radius: 999px;
    padding: 3px 12px;
    letter-spacing: 0.08em;
}

.tank-header .tank-title {
    font-family: "Sofia Sans Semi Condensed", sans-serif;
    font-weight: 300;
    font-size: clamp(2rem, 5vw, 3.6rem);
    letter-spacing: -0.02em;
    color: var(--meniscus);
    margin-top: 0.4em;
    line-height: 1.0;
    text-shadow: 0 1px 0 rgba(255,255,255,0.3), 0 -1px 0 rgba(3,26,46,0.35);
}

.tank-header .tank-sub {
    font-family: "Nunito", sans-serif;
    font-weight: 300;
    color: var(--condense);
    opacity: 0.9;
    margin-top: 0.7em;
    font-size: 1rem;
}

.orb-field {
    position: relative;
    width: 100%;
    height: 72vh;
    z-index: 1;
}

.orb {
    position: absolute;
    left: var(--x);
    top: var(--y);
    width: 200px;
    height: 200px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    transform: translate(-50%, -50%);
    transition: transform 0.45s cubic-bezier(.22,1,.36,1);
    will-change: transform;
}

.orb.small { width: 140px; height: 140px; }
.orb.large { width: 260px; height: 260px; }

.orb-svg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 8px 14px rgba(3,26,46,0.35));
    animation: orbBob 7s ease-in-out infinite;
}
.orb:nth-child(2) .orb-svg { animation-duration: 9s;  animation-delay: -1s; }
.orb:nth-child(3) .orb-svg { animation-duration: 11s; animation-delay: -2s; }
.orb:nth-child(4) .orb-svg { animation-duration: 10s; animation-delay: -3s; }
.orb:nth-child(5) .orb-svg { animation-duration: 8s;  animation-delay: -4s; }
.orb:nth-child(6) .orb-svg { animation-duration: 12s; animation-delay: -1.5s; }

@keyframes orbBob {
    0%, 100% { transform: translate3d(0, 0, 0); }
    50%      { transform: translate3d(0, -8px, 0); }
}

.orb-spec {
    fill: rgba(255,255,255,0.85);
    filter: blur(1.2px);
}

.orb figcaption {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    text-align: center;
    color: var(--koi-ink);
    padding: 0 10px;
    text-shadow: 0 1px 0 rgba(255,255,255,0.7);
}

.orb figcaption .datum {
    font-family: "Sofia Sans Semi Condensed", sans-serif;
    font-weight: 700;
    font-size: 0.95rem;
    letter-spacing: -0.01em;
}
.orb figcaption .value {
    font-family: "JetBrains Mono", monospace;
    font-weight: 600;
    font-size: 1.25rem;
    color: var(--koi-indigo);
    font-variant-numeric: tabular-nums;
}
.orb.small figcaption .value { font-size: 1.0rem; }
.orb.large figcaption .value { font-size: 1.6rem; }

.orb figcaption .delta {
    font-family: "JetBrains Mono", monospace;
    font-weight: 400;
    font-size: 0.72rem;
    opacity: 0.75;
}

/* -------------------------------------------------------------------------
   TANK IV — Fern Reflection Panel
   ------------------------------------------------------------------------- */

.fern-split {
    position: relative;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    height: 76vh;
    z-index: 2;
}

.fog-pane {
    padding: 4vh 3.6vw;
    background:
        linear-gradient(180deg, rgba(255,255,255,0.35), rgba(255,255,255,0.12)) padding-box,
        rgba(255,255,255,0.28) padding-box;
    font-family: "Nunito", sans-serif;
    font-weight: 300;
    color: var(--koi-ink);
    overflow-y: auto;
}

.fog-real {
    border-radius: 24px 0 0 24px;
    border-right: none;
}

.fog-mirror {
    border-radius: 0 24px 24px 0;
    border-left: none;
    transform: scaleX(-1);
    filter: blur(0.35px);
    opacity: 0.85;
}

.fog-mirror::after {
    background:
        radial-gradient(120% 80% at 70% 18%, rgba(255,233,184,0.22), rgba(255,233,184,0.00) 55%),
        radial-gradient(100% 70% at 10% 90%, rgba(200,236,255,0.35), rgba(200,236,255,0.00) 55%);
}

.fog-header {
    display: flex;
    flex-direction: column;
    gap: 0.4em;
    margin-bottom: 1.4em;
    padding-bottom: 1.1em;
    border-bottom: 1px dashed rgba(11,82,137,0.3);
}

.fog-header .roman {
    font-family: "JetBrains Mono", monospace;
    font-weight: 400;
    font-size: 0.78rem;
    letter-spacing: 0.08em;
    color: var(--koi-indigo);
    opacity: 0.8;
}

.fog-header h2 {
    font-family: "Sofia Sans Semi Condensed", sans-serif;
    font-weight: 300;
    font-size: clamp(1.6rem, 3.2vw, 2.4rem);
    color: var(--koi-indigo);
    letter-spacing: -0.02em;
    line-height: 1.05;
}

.fog-pane p {
    margin-bottom: 1.15em;
    font-size: 1.0625rem;
    line-height: 1.65;
}

.fog-sign {
    margin-top: 2em;
    font-style: italic;
    opacity: 0.75;
}

.fern-center {
    position: absolute;
    left: 50%;
    bottom: -2vh;
    transform: translateX(-50%);
    height: 90%;
    width: auto;
    z-index: 3;
    pointer-events: none;
    filter: drop-shadow(0 4px 10px rgba(11,82,137,0.3));
    animation: fernSway 10s ease-in-out infinite;
    transform-origin: 50% 100%;
}

@keyframes fernSway {
    0%, 100% { transform: translateX(-50%) rotate(-0.6deg); }
    50%      { transform: translateX(-50%) rotate(0.6deg); }
}

/* -------------------------------------------------------------------------
   TANK V — The Koi Ledger (horizontal scroll)
   ------------------------------------------------------------------------- */

.koi-lane {
    position: relative;
    width: 100%;
    height: 54vh;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding: 2vh 0;
    z-index: 2;
}

.koi-lane::-webkit-scrollbar {
    height: 10px;
}
.koi-lane::-webkit-scrollbar-track {
    background: rgba(255,255,255,0.12);
    border-radius: 999px;
}
.koi-lane::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.4);
    border-radius: 999px;
}

.koi-parallax {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.lane-back {
    z-index: 0;
    transform: translate3d(var(--koi-back, 0px), 0, 0);
}
.lane-mid {
    z-index: 1;
    background:
        radial-gradient(40% 80% at 20% 60%, rgba(255,255,255,0.12), rgba(255,255,255,0) 60%),
        radial-gradient(40% 80% at 80% 30%, rgba(124,231,214,0.12), rgba(124,231,214,0) 60%);
    transform: translate3d(var(--koi-mid, 0px), 0, 0);
}

.koi-silhouette {
    position: absolute;
    top: 38%;
    left: 0%;
    transform: translate3d(0, 0, 0);
    opacity: 0.75;
    animation: koiSwim 40s linear infinite;
    filter: drop-shadow(0 2px 6px rgba(3,26,46,0.35));
}

@keyframes koiSwim {
    0%   { transform: translate3d(-20vw, 0, 0) rotate(-2deg); }
    50%  { transform: translate3d(60vw, 2vh, 0) rotate(2deg); }
    100% { transform: translate3d(130vw, 0, 0) rotate(-2deg); }
}

.koi-track {
    position: relative;
    z-index: 2;
    display: flex;
    gap: 28px;
    align-items: center;
    padding: 0 6vw;
    height: 100%;
}

.koi-pill {
    flex: 0 0 auto;
    width: 320px;
    padding: 24px 26px 22px 26px;
    scroll-snap-align: start;
    background:
        linear-gradient(180deg, rgba(255,255,255,0.25), rgba(255,255,255,0.06)) padding-box,
        rgba(255,255,255,0.22) padding-box;
    color: var(--koi-ink);
    transition: transform 0.5s cubic-bezier(.22,1,.36,1);
}

.koi-pill[data-lane="a"] { transform: translateY(-14px); }
.koi-pill[data-lane="b"] { transform: translateY(14px); }
.koi-pill[data-lane="c"] { transform: translateY(-2px); }

.koi-pill .stamp-time {
    display: inline-block;
    font-family: "JetBrains Mono", monospace;
    font-weight: 600;
    font-size: 0.78rem;
    color: var(--koi-indigo);
    background: rgba(255,255,255,0.4);
    border: 1px solid rgba(255,255,255,0.55);
    padding: 3px 10px;
    border-radius: 999px;
    margin-bottom: 12px;
    font-variant-numeric: tabular-nums;
}

.koi-pill p {
    font-family: "Nunito", sans-serif;
    font-weight: 300;
    font-size: 1rem;
    line-height: 1.55;
    color: var(--koi-ink);
}

.koi-pill.pill-amber {
    background:
        linear-gradient(180deg, rgba(255,233,184,0.45), rgba(255,233,184,0.10)) padding-box,
        rgba(255,233,184,0.35) padding-box;
    border: 1px solid rgba(255,233,184,0.7);
}
.koi-pill.pill-amber .stamp-time {
    background: rgba(255,255,255,0.55);
    color: #7a5b1c;
}

.koi-hint {
    position: absolute;
    bottom: 1vh;
    left: 6vw;
    font-family: "JetBrains Mono", monospace;
    font-weight: 400;
    font-size: 0.75rem;
    color: var(--meniscus);
    opacity: 0.65;
    pointer-events: none;
    letter-spacing: 0.06em;
}

/* -------------------------------------------------------------------------
   TANK VI — The Bubble Colophon
   ------------------------------------------------------------------------- */

.colophon-field {
    position: relative;
    width: 100%;
    height: 76vh;
    z-index: 1;
}

.signature-bubble {
    position: absolute;
    width: 150px;
    height: 150px;
    border-radius: 50%;
    padding: 18px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 4px;
    background:
        linear-gradient(180deg, rgba(255,255,255,0.30), rgba(255,255,255,0.05)) padding-box,
        rgba(255,255,255,0.22) padding-box;
    color: var(--meniscus);
    animation: floatBubble 14s ease-in-out infinite;
}

.signature-bubble::before {
    border-radius: 50% 50% 80% 80% / 50% 50% 40% 40%;
}

.signature-bubble.amber {
    background:
        linear-gradient(180deg, rgba(255,233,184,0.5), rgba(255,233,184,0.05)) padding-box,
        rgba(255,233,184,0.35) padding-box;
    border: 1px solid rgba(255,233,184,0.7);
    color: #7a5b1c;
}

.signature-bubble .sig-label {
    font-family: "JetBrains Mono", monospace;
    font-weight: 400;
    font-size: 0.65rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    opacity: 0.9;
}
.signature-bubble .sig-val {
    font-family: "Sofia Sans Semi Condensed", sans-serif;
    font-weight: 600;
    font-size: 0.92rem;
    line-height: 1.25;
    letter-spacing: -0.01em;
    color: var(--meniscus);
}

.signature-bubble.amber .sig-val { color: #593d0a; }

.b-1 { left: 8%;  top: 10%; animation-delay: -2s; }
.b-2 { left: 28%; top: 50%; animation-delay: -5s; width: 170px; height: 170px; }
.b-3 { left: 48%; top: 18%; animation-delay: -8s; width: 138px; height: 138px; }
.b-4 { left: 66%; top: 60%; animation-delay: -3s; width: 160px; height: 160px; }
.b-5 { left: 82%; top: 22%; animation-delay: -11s; width: 130px; height: 130px; }
.b-6 { left: 14%; top: 76%; animation-delay: -6s; width: 148px; height: 148px; }

@keyframes floatBubble {
    0%, 100% { transform: translate3d(0, 0, 0); }
    25%      { transform: translate3d(8px, -14px, 0); }
    50%      { transform: translate3d(-6px, -8px, 0); }
    75%      { transform: translate3d(-10px, 10px, 0); }
}

.fern-corner {
    position: absolute;
    right: 2vw;
    bottom: -3vh;
    height: 34vh;
    width: auto;
    z-index: 3;
    pointer-events: none;
    opacity: 0.85;
    filter: drop-shadow(0 4px 10px rgba(3,26,46,0.4));
    animation: fernSway2 13s ease-in-out infinite;
    transform-origin: 50% 100%;
}

@keyframes fernSway2 {
    0%, 100% { transform: rotate(-1deg); }
    50%      { transform: rotate(1.4deg); }
}

/* -------------------------------------------------------------------------
   TANK VII — Abyssal Footer
   ------------------------------------------------------------------------- */

.tank-7 {
    min-height: 65vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: var(--abyss);
}

.caustics {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background:
        radial-gradient(50% 35% at 20% 30%, rgba(124,231,214,0.18), rgba(124,231,214,0) 60%),
        radial-gradient(40% 30% at 70% 60%, rgba(126,203,255,0.18), rgba(126,203,255,0) 60%),
        radial-gradient(30% 25% at 45% 80%, rgba(183,240,201,0.14), rgba(183,240,201,0) 60%);
    opacity: 0.6;
    filter: url(#caustic) blur(1.5px);
    mix-blend-mode: screen;
    animation: causticDrift 26s linear infinite;
}

@keyframes causticDrift {
    0%   { background-position: 0% 0%, 0% 0%, 0% 0%; transform: translate3d(0,0,0); }
    100% { background-position: 40% 20%, -40% 30%, 30% -10%; transform: translate3d(-4vw, -2vh, 0); }
}

.abyss-footer {
    text-align: center;
    color: var(--meniscus);
    z-index: 2;
    position: relative;
    max-width: 50ch;
}

.abyss-line {
    font-family: "Sofia Sans Semi Condensed", sans-serif;
    font-weight: 300;
    font-size: clamp(1rem, 2vw, 1.35rem);
    letter-spacing: 0.005em;
    color: var(--meniscus);
    text-shadow: 0 0 24px rgba(126,203,255,0.45);
    opacity: 0.92;
}

.abyss-coord {
    margin-top: 1.2em;
    font-family: "JetBrains Mono", monospace;
    font-weight: 400;
    font-size: 0.78rem;
    color: var(--aqua);
    opacity: 0.8;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.05em;
}

/* -------------------------------------------------------------------------
   Reveal on scroll
   ------------------------------------------------------------------------- */

.reveal {
    opacity: 0;
    transform: translateY(12px) scale(0.98);
    transition:
        opacity 0.9s cubic-bezier(.22,1,.36,1),
        transform 0.9s cubic-bezier(.22,1,.36,1);
    transition-delay: var(--stagger, 0ms);
}

.reveal.revealed {
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* -------------------------------------------------------------------------
   Responsive adjustments
   ------------------------------------------------------------------------- */

@media (max-width: 820px) {
    .nav-droplet {
        top: 14px;
        right: 14px;
        padding: 10px 14px;
        gap: 8px;
    }
    .nav-koi { font-size: 0.72rem; padding: 4px 8px; }
    .nav-koi::before { display: none; }

    .tank { padding: 6vh 5vw; }

    .orb { width: 140px; height: 140px; }
    .orb.small { width: 100px; height: 100px; }
    .orb.large { width: 180px; height: 180px; }
    .orb-field { height: 88vh; }

    .fern-split { grid-template-columns: 1fr; height: auto; }
    .fog-real { border-radius: 24px 24px 0 0; }
    .fog-mirror { display: none; }
    .fern-center { opacity: 0.5; }

    .koi-pill { width: 260px; padding: 20px; }
    .signature-bubble { width: 120px !important; height: 120px !important; padding: 12px; }
    .signature-bubble .sig-val { font-size: 0.78rem; }

    body { cursor: auto; }
    .cursor-droplet { display: none; }
}
