/* =====================================================================
   mujun.work — vaporwave / parallax-sections / glitch / jewel-tones
   colors:
     #0A0A14 obsidian void  | #1A0E2E amethyst deep | #1845A3 sapphire
     #A3183C ruby           | #0FA36E emerald       | #9B4DCA plasma amethyst
     #1E1A24 smoky topaz    | #E8E0F0 moonstone     | #8A7FA0 faded opal
     #E5C100 citrine flash
   fonts (Google Fonts): Outfit (display), DM Sans (body), IBM Plex Mono (accent)
   ===================================================================== */

:root {
    --void: #0A0A14;
    --amethyst-deep: #1A0E2E;
    --sapphire: #1845A3;
    --ruby: #A3183C;
    --emerald: #0FA36E;
    --plasma: #9B4DCA;
    --topaz: #1E1A24;
    --moonstone: #E8E0F0;
    --opal: #8A7FA0;
    --citrine: #E5C100;

    --font-display: "Outfit", "Inter", "Helvetica Neue", Arial, sans-serif;
    --font-body: "DM Sans", "Inter", "Helvetica Neue", Arial, sans-serif;
    --font-mono: "IBM Plex Mono", "Space Mono", ui-monospace, monospace;
}

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

html, body {
    background: var(--void);
    color: var(--moonstone);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

body {
    min-height: 100%;
    background:
        radial-gradient(ellipse at 50% 0%, rgba(155, 77, 202, 0.08), transparent 50%),
        var(--void);
}

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

img, svg { display: block; max-width: 100%; }

a { color: inherit; text-decoration: none; }

/* ----- Typography base -------------------------------------------------- */
h1, h2, h3, .hh {
    font-family: var(--font-display);
    font-weight: 800;
    letter-spacing: 0.06em;
    line-height: 1.05;
    color: var(--moonstone);
}

.mono, .mono-line, .eyebrow, .kicker, .meta-line, .stratum-tag, .hud {
    font-family: var(--font-mono);
    font-weight: 300;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

p { font-family: var(--font-body); font-weight: 400; }

.body { max-width: 38em; line-height: 1.65; color: var(--moonstone); }
.body.small { font-size: 0.92rem; color: var(--opal); }
.body.center { margin-left: auto; margin-right: auto; }
.maxw { max-width: 36em; }

.hl { color: var(--citrine); text-shadow: 0 0 18px rgba(229, 193, 0, 0.55); }
.cit { color: var(--citrine); }
.sap { color: var(--sapphire); text-shadow: 0 0 12px rgba(24, 69, 163, 0.55); }
.emr { color: var(--emerald); text-shadow: 0 0 12px rgba(15, 163, 110, 0.55); }
.ruby { color: var(--ruby); text-shadow: 0 0 12px rgba(163, 24, 60, 0.55); }

.ruby { background: linear-gradient(90deg, #A3183C 0%, #9B4DCA 60%, #1845A3 100%); -webkit-background-clip: text; background-clip: text; color: transparent; text-shadow: none; }

/* ----- Persistent overlays --------------------------------------------- */
.scanlines {
    position: fixed; inset: 0;
    background-image: repeating-linear-gradient(
        to bottom,
        rgba(232, 224, 240, 0.05) 0px,
        rgba(232, 224, 240, 0.05) 1px,
        transparent 1px,
        transparent 4px
    );
    pointer-events: none; z-index: 80; mix-blend-mode: overlay;
}

.grid-skeleton {
    position: fixed; inset: 0;
    display: grid; grid-template-columns: repeat(12, 1fr);
    pointer-events: none; z-index: 5; opacity: 0;
    animation: gridFlicker 7.5s infinite;
}
.grid-skeleton span { border-right: 1px solid rgba(155, 77, 202, 0.18); }
.grid-skeleton span:last-child { border-right: none; }

@keyframes gridFlicker {
    0%, 100% { opacity: 0; }
    44% { opacity: 0; }
    45% { opacity: 0.45; }
    47% { opacity: 0; }
    62% { opacity: 0; }
    63% { opacity: 0.6; }
    63.6% { opacity: 0; }
    80% { opacity: 0.25; }
    81% { opacity: 0; }
}

#particle-canvas {
    position: fixed; inset: 0;
    width: 100vw; height: 100vh;
    pointer-events: none; z-index: 70;
}

/* ----- Progress rail --------------------------------------------------- */
.progress-rail {
    position: fixed; left: 28px; top: 12vh; bottom: 12vh;
    width: 3px;
    background: rgba(232, 224, 240, 0.08);
    z-index: 90;
    border-radius: 2px;
}
.progress-fill {
    position: absolute; left: 0; top: 0; right: 0; height: 0;
    background: linear-gradient(180deg, var(--sapphire), var(--plasma) 35%, var(--ruby) 65%, var(--emerald));
    box-shadow: 0 0 16px rgba(155, 77, 202, 0.6);
    border-radius: 2px;
    transition: height 0.05s linear;
}
.progress-tick {
    position: absolute; left: -4px; width: 11px; height: 11px;
    border: 1px solid var(--plasma);
    background: var(--void);
    border-radius: 50%;
    transform: translateY(-50%);
    box-shadow: 0 0 8px rgba(155, 77, 202, 0.4);
}
.progress-tick[data-stratum="0"] { top: 0%; }
.progress-tick[data-stratum="1"] { top: 25%; }
.progress-tick[data-stratum="2"] { top: 50%; }
.progress-tick[data-stratum="3"] { top: 75%; }
.progress-tick[data-stratum="4"] { top: 100%; }
.progress-tick.live {
    background: var(--citrine);
    box-shadow: 0 0 16px rgba(229, 193, 0, 0.9);
    animation: tickPulse 1.6s infinite;
}
@keyframes tickPulse {
    0%, 100% { transform: translateY(-50%) scale(1); }
    50% { transform: translateY(-50%) scale(1.4); }
}

/* ----- HUD ------------------------------------------------------------- */
.hud {
    position: fixed; right: 24px; top: 24px;
    z-index: 90;
    font-size: 0.72rem;
    color: var(--opal);
    background: rgba(10, 10, 20, 0.55);
    border: 1px solid rgba(155, 77, 202, 0.25);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    padding: 12px 14px;
    min-width: 160px;
}
.hud-row { display: flex; justify-content: space-between; gap: 14px; padding: 2px 0; }
.hud-label { color: var(--plasma); }
.hud-val { color: var(--moonstone); }
.hud-row.pulse .hud-val {
    color: var(--citrine);
    animation: monoPulse 4s infinite;
}
@keyframes monoPulse { 0%, 100% { opacity: 0.6; } 50% { opacity: 1; } }

/* ----- Stratum scaffolding -------------------------------------------- */
main#descent { position: relative; z-index: 10; }

.stratum {
    position: relative;
    height: 100vh;
    min-height: 720px;
    width: 100vw;
    overflow: hidden;
    isolation: isolate;
}
.stratum + .stratum { border-top: 1px solid rgba(155, 77, 202, 0.18); }

.stratum .layer {
    position: absolute; inset: -8% 0 -8% 0;
    will-change: transform;
}
.stratum .layer-bg { z-index: 1; }
.stratum .layer-mid, .stratum .layer-mid-l, .stratum .layer-mid-r { z-index: 2; }
.stratum .layer-fg { z-index: 3; display: flex; align-items: center; justify-content: center; padding: 0 7vw; }
.stratum .layer-foreground { z-index: 4; }

.stratum-tag {
    position: absolute; bottom: 18px; right: 28px;
    z-index: 5;
    color: var(--opal);
    font-size: 0.7rem;
    letter-spacing: 0.18em;
    opacity: 0.7;
}

/* ===================== STRATUM 0 :: SURFACE =========================== */
.stratum-0 { background: linear-gradient(180deg, #2a1240 0%, #61225e 30%, #b3496e 65%, #ed8a5b 100%); }

.vapor-gradient {
    position: absolute; inset: 0;
    background:
        linear-gradient(180deg,
            rgba(26, 14, 46, 0.0) 0%,
            rgba(26, 14, 46, 0.0) 40%,
            rgba(10, 10, 20, 0.55) 100%
        ),
        linear-gradient(180deg,
            #281148 0%,
            #5a1f6a 30%,
            #b13b69 60%,
            #e8a85e 90%,
            #f6c879 100%
        );
    animation: gradientCycle 60s linear infinite;
    background-size: 100% 100%, 100% 200%;
}

@keyframes gradientCycle {
    0% { background-position: 0 0, 0 0%; filter: hue-rotate(0deg) saturate(1); }
    25% { filter: hue-rotate(-20deg) saturate(1.05); }
    50% { background-position: 0 0, 0 100%; filter: hue-rotate(15deg) saturate(1.15); }
    75% { filter: hue-rotate(-10deg) saturate(1.05); }
    100% { background-position: 0 0, 0 0%; filter: hue-rotate(0deg) saturate(1); }
}

.vapor-sun { position: absolute; inset: 10% 0 0 0; height: 80%; width: 100%; }

.horizon-grid {
    position: absolute; bottom: -10%; left: -10%; right: -10%; height: 55%;
    background:
        linear-gradient(to bottom, transparent 0%, rgba(229, 193, 0, 0.15) 70%, rgba(229, 193, 0, 0.35) 100%),
        repeating-linear-gradient(90deg, rgba(232, 224, 240, 0.18) 0 1px, transparent 1px 80px),
        repeating-linear-gradient(0deg, rgba(232, 224, 240, 0.22) 0 1px, transparent 1px 50px);
    transform: perspective(500px) rotateX(58deg);
    transform-origin: top center;
    mask-image: linear-gradient(to bottom, transparent 0%, #000 30%, #000 100%);
    -webkit-mask-image: linear-gradient(to bottom, transparent 0%, #000 30%, #000 100%);
}

.scan-banding {
    position: absolute; inset: 0;
    background:
        repeating-linear-gradient(0deg,
            rgba(232, 224, 240, 0) 0,
            rgba(232, 224, 240, 0) 4px,
            rgba(155, 77, 202, 0.06) 4px,
            rgba(155, 77, 202, 0.06) 5px),
        repeating-linear-gradient(0deg,
            rgba(0, 0, 0, 0) 0,
            rgba(0, 0, 0, 0) 80px,
            rgba(0, 0, 0, 0.18) 80px,
            rgba(0, 0, 0, 0.18) 84px);
    mix-blend-mode: overlay;
    animation: bandShift 9s linear infinite;
}
@keyframes bandShift {
    0% { background-position: 0 0, 0 0; }
    100% { background-position: 0 0, 0 84px; }
}

.acrylic-panel {
    position: relative;
    width: min(820px, 86vw);
    padding: 38px 44px;
    background: rgba(26, 14, 46, 0.35);
    border: 1px solid rgba(232, 224, 240, 0.22);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow:
        0 0 50px rgba(155, 77, 202, 0.25),
        inset 0 0 30px rgba(232, 224, 240, 0.06);
    transform: rotate(-0.5deg);
}
.acrylic-panel::before {
    content: ""; position: absolute; inset: 6px;
    border: 1px solid rgba(229, 193, 0, 0.25);
    pointer-events: none;
}

.meta-line {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: var(--moonstone);
    letter-spacing: 0.18em;
    margin-bottom: 18px;
    display: flex; align-items: center; gap: 10px;
}
.meta-line .dot {
    display: inline-block; width: 8px; height: 8px; border-radius: 50%;
    background: var(--citrine);
    box-shadow: 0 0 12px rgba(229, 193, 0, 0.9);
    animation: dotPulse 1.4s infinite;
}
@keyframes dotPulse { 0%, 100% { opacity: 0.4; transform: scale(1); } 50% { opacity: 1; transform: scale(1.3); } }

.site-title {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: clamp(56px, 11vw, 148px);
    line-height: 0.95;
    letter-spacing: 0.08em;
    color: var(--moonstone);
    mix-blend-mode: difference;
    margin-bottom: 22px;
}
.site-title .char {
    display: inline-block;
    transition: transform 0.18s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.site-title .dotchar { color: var(--citrine); }

.title-sub {
    font-family: var(--font-body);
    font-size: clamp(15px, 1.2vw, 18px);
    color: var(--moonstone);
    max-width: 38em;
    margin-bottom: 20px;
}

.mono-line {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--citrine);
    letter-spacing: 0.18em;
    animation: monoPulse 4s infinite;
}

/* Floating shards in stratum 0 foreground */
.floating-shard {
    position: absolute; pointer-events: none;
    background: linear-gradient(135deg, rgba(155, 77, 202, 0.55), rgba(24, 69, 163, 0.2));
    border: 1px solid rgba(232, 224, 240, 0.4);
    box-shadow: 0 0 30px rgba(155, 77, 202, 0.5);
    backdrop-filter: blur(2px);
}
.floating-shard.shard-a {
    top: 18%; left: 8%;
    width: 140px; height: 220px;
    clip-path: polygon(0 0, 100% 14%, 86% 100%, 6% 92%);
    transform: rotate(-9deg);
    animation: shardFloat 8s ease-in-out infinite;
}
.floating-shard.shard-b {
    bottom: 16%; right: 10%;
    width: 100px; height: 160px;
    clip-path: polygon(20% 0, 100% 8%, 80% 100%, 0 90%);
    transform: rotate(7deg);
    animation: shardFloat 9.5s ease-in-out infinite reverse;
}
@keyframes shardFloat {
    0%, 100% { transform: translateY(0) rotate(-9deg); }
    50% { transform: translateY(-18px) rotate(-6deg); }
}

/* ===================== STRATUM 1 :: FRACTURE ========================== */
.stratum-1 {
    background:
        radial-gradient(ellipse at 30% 40%, rgba(24, 69, 163, 0.25), transparent 60%),
        radial-gradient(ellipse at 80% 80%, rgba(163, 24, 60, 0.2), transparent 65%),
        var(--amethyst-deep);
}

.void-deep {
    position: absolute; inset: 0;
    background:
        radial-gradient(circle at 20% 20%, rgba(155, 77, 202, 0.25), transparent 40%),
        radial-gradient(circle at 80% 30%, rgba(24, 69, 163, 0.3), transparent 45%),
        radial-gradient(circle at 50% 90%, rgba(163, 24, 60, 0.2), transparent 50%),
        var(--void);
    animation: voidShift 18s ease-in-out infinite alternate;
}
@keyframes voidShift {
    0% { filter: hue-rotate(0deg); }
    100% { filter: hue-rotate(20deg); }
}

.mycelium-svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.mycelium {
    fill: none;
    stroke: var(--plasma);
    stroke-opacity: 0.4;
    stroke-width: 1.4;
    stroke-linecap: round;
    filter: drop-shadow(0 0 6px rgba(155, 77, 202, 0.6));
    stroke-dasharray: 1400;
    stroke-dashoffset: 0;
    animation: myceliumPulse 6s ease-in-out infinite;
}
.mycelium.thin { stroke-width: 0.9; stroke-opacity: 0.32; }
@keyframes myceliumPulse {
    0%, 100% { stroke-opacity: 0.18; }
    50% { stroke-opacity: 0.55; }
}

.shard-cluster { position: absolute; inset: 0; pointer-events: none; }
.shard {
    position: absolute;
    background: linear-gradient(135deg, rgba(232, 224, 240, 0.22), rgba(155, 77, 202, 0.14) 60%, rgba(0, 0, 0, 0));
    border: 1px solid rgba(232, 224, 240, 0.28);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5), inset 0 0 18px rgba(155, 77, 202, 0.18);
    backdrop-filter: blur(2px);
}
.shard.s1 { top: 8%; right: 12%; width: 280px; height: 180px; clip-path: polygon(0 10%, 100% 0, 92% 100%, 6% 86%); transform: rotate(8deg); }
.shard.s2 { top: 38%; right: 6%; width: 220px; height: 320px; clip-path: polygon(8% 0, 100% 12%, 92% 100%, 0 88%); transform: rotate(-6deg); }
.shard.s3 { bottom: 10%; right: 22%; width: 260px; height: 200px; clip-path: polygon(0 0, 90% 8%, 100% 100%, 10% 90%); transform: rotate(4deg); }
.shard.s4 { top: 22%; right: 36%; width: 160px; height: 220px; clip-path: polygon(0 6%, 100% 0, 94% 100%, 6% 92%); transform: rotate(12deg); }
.shard.s5 { bottom: 24%; right: 44%; width: 140px; height: 180px; clip-path: polygon(0 0, 100% 14%, 88% 100%, 4% 84%); transform: rotate(-3deg); }

.content-cluster.left {
    width: 36%;
    margin-right: auto;
    padding-left: 4%;
}

.eyebrow {
    font-size: 0.78rem;
    color: var(--plasma);
    margin-bottom: 14px;
    display: block;
}
.eyebrow.center { text-align: center; }

.hh {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: clamp(34px, 4.6vw, 64px);
    letter-spacing: 0.06em;
    line-height: 1.05;
    margin-bottom: 22px;
    color: var(--moonstone);
}
.hh.center { text-align: center; }
.hh.mega {
    font-size: clamp(44px, 6.5vw, 90px);
    letter-spacing: 0.04em;
}

.panel {
    background: var(--topaz);
    border: 1px solid rgba(155, 77, 202, 0.3);
    padding: 22px 24px;
    margin: 14px 0;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45), inset 0 0 0 1px rgba(232, 224, 240, 0.04);
    position: relative;
}
.panel::before {
    content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
    background: linear-gradient(180deg, var(--sapphire), var(--ruby));
}
.panel.tilt-a { transform: rotate(-1.2deg); }
.panel.tilt-b { transform: rotate(0.8deg); margin-left: 24px; }
.panel .kicker { color: var(--emerald); font-size: 0.7rem; margin-bottom: 8px; display: block; }
.panel .body {
    color: var(--moonstone);
    text-shadow: 1px 0 0 rgba(163, 24, 60, 0.25), -1px 0 0 rgba(15, 163, 110, 0.18);
}

/* ===================== STRATUM 2 :: EMERGENCE ========================= */
.stratum-2 {
    background:
        radial-gradient(ellipse at 10% 30%, rgba(15, 163, 110, 0.18), transparent 50%),
        radial-gradient(ellipse at 90% 70%, rgba(155, 77, 202, 0.2), transparent 55%),
        var(--amethyst-deep);
    height: 130vh;
}

.amethyst-bg {
    position: absolute; inset: 0;
    background:
        radial-gradient(circle at 30% 30%, rgba(24, 69, 163, 0.35), transparent 50%),
        radial-gradient(circle at 70% 80%, rgba(163, 24, 60, 0.25), transparent 50%),
        linear-gradient(180deg, var(--amethyst-deep) 0%, #0c0820 100%);
    animation: gradientCycle 90s linear infinite reverse;
}

.root-svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.root {
    fill: none;
    stroke: var(--opal);
    stroke-width: 1.2;
    stroke-opacity: 0.35;
    stroke-linecap: round;
    filter: drop-shadow(0 0 4px rgba(138, 127, 160, 0.5));
}

.collage {
    position: absolute;
    width: 360px; height: 460px;
    overflow: hidden;
    border: 1px solid rgba(232, 224, 240, 0.18);
    box-shadow: 0 18px 60px rgba(0, 0, 0, 0.6);
}
.collage.collage-a { top: 8%; right: 6%; transform: rotate(2deg); }
.collage.collage-b { bottom: 6%; left: 4%; width: 320px; height: 400px; transform: rotate(-3deg); }

.col-base {
    position: absolute; inset: 0;
    background:
        radial-gradient(circle at 30% 30%, rgba(24, 69, 163, 0.7), rgba(10, 10, 20, 0.9) 70%),
        repeating-radial-gradient(circle at 50% 50%, rgba(15, 163, 110, 0.18) 0 4px, rgba(15, 163, 110, 0) 4px 14px);
    mix-blend-mode: screen;
    filter: hue-rotate(0deg) saturate(1.1);
}
.col-tech {
    position: absolute; inset: 8% 6% 30% 8%;
    opacity: 0.85;
    mix-blend-mode: screen;
    filter: drop-shadow(0 0 6px rgba(15, 163, 110, 0.6));
}
.col-vapor {
    position: absolute; inset: 50% 0 0 0;
    background: linear-gradient(180deg, rgba(155, 77, 202, 0.0), rgba(155, 77, 202, 0.55) 60%, rgba(229, 193, 0, 0.35) 100%);
    mix-blend-mode: screen;
    -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 40%, #000 100%);
    mask-image: linear-gradient(180deg, transparent 0%, #000 40%, #000 100%);
}
.col-frond {
    position: absolute; left: -6%; top: 10%;
    width: 70%; height: 70%;
    color: var(--emerald);
    opacity: 0.8;
    filter: drop-shadow(0 0 6px rgba(15, 163, 110, 0.65));
    transform: rotate(-12deg);
}

.collage::after {
    content: ""; position: absolute; inset: 0;
    background:
        repeating-linear-gradient(0deg,
            rgba(232, 224, 240, 0) 0 2px,
            rgba(232, 224, 240, 0.06) 2px 3px);
    pointer-events: none;
}

.zigzag {
    width: 100%; max-width: 1200px;
    display: flex; flex-direction: column; gap: 80px;
    padding: 12vh 4vw;
    position: relative;
    z-index: 4;
}
.zig-block {
    width: min(560px, 80%);
    background: rgba(30, 26, 36, 0.5);
    backdrop-filter: blur(4px);
    border: 1px solid rgba(155, 77, 202, 0.25);
    padding: 28px 32px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.55);
    position: relative;
}
.zig-block.right { align-self: flex-end; transform: rotate(0.6deg); }
.zig-block.left  { align-self: flex-start; transform: rotate(-0.7deg); }
.zig-block::after {
    content: ""; position: absolute; right: -2px; top: 0; bottom: 0; width: 2px;
    background: linear-gradient(180deg, var(--emerald), var(--plasma));
    box-shadow: 0 0 10px rgba(15, 163, 110, 0.7);
}
.zig-block.left::after { left: -2px; right: auto; background: linear-gradient(180deg, var(--ruby), var(--sapphire)); }

.frond-stack { display: flex; gap: 12px; margin-top: 18px; }
.frond-stack svg {
    width: 58px; height: 58px;
    color: var(--emerald);
    filter: drop-shadow(0 0 6px rgba(15, 163, 110, 0.6));
}
.frond-stack svg:nth-child(2) { color: var(--plasma); transform: rotate(15deg); filter: drop-shadow(0 0 6px rgba(155, 77, 202, 0.6)); }
.frond-stack svg:nth-child(3) { color: var(--sapphire); transform: rotate(-12deg); filter: drop-shadow(0 0 6px rgba(24, 69, 163, 0.6)); }

/* ===================== STRATUM 3 :: CONVERGENCE ======================= */
.stratum-3 {
    background:
        radial-gradient(ellipse at 50% 50%, rgba(155, 77, 202, 0.18), transparent 50%),
        var(--void);
    height: 130vh;
}

.tunnel-bg {
    position: absolute; inset: 0;
    background:
        radial-gradient(ellipse at 50% 50%, rgba(229, 193, 0, 0.05), transparent 30%),
        radial-gradient(ellipse at 50% 50%, rgba(155, 77, 202, 0.15) 30%, transparent 70%),
        radial-gradient(ellipse at 50% 50%, rgba(24, 69, 163, 0.4) 0%, transparent 50%),
        var(--void);
    animation: tunnelPulse 12s ease-in-out infinite alternate;
}
@keyframes tunnelPulse {
    0% { filter: hue-rotate(0deg) brightness(1); }
    100% { filter: hue-rotate(30deg) brightness(1.1); }
}

.flank {
    position: absolute; top: 0; bottom: 0;
    width: 28%;
    display: flex; flex-direction: column; gap: 60px;
    padding: 8vh 3vw;
}
.flank-l { left: 0; align-items: flex-start; }
.flank-r { right: 0; align-items: flex-end; }

.flank-collage {
    width: 78%;
    aspect-ratio: 3 / 4;
    background:
        radial-gradient(circle at 30% 30%, rgba(24, 69, 163, 0.6), transparent 60%),
        linear-gradient(135deg, rgba(155, 77, 202, 0.4), rgba(15, 163, 110, 0.25));
    border: 1px solid rgba(232, 224, 240, 0.2);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6);
    position: relative;
    overflow: hidden;
}
.flank-collage::before {
    content: ""; position: absolute; inset: 8%;
    background-image: repeating-linear-gradient(45deg, rgba(15, 163, 110, 0.4) 0 1px, transparent 1px 12px),
                      repeating-linear-gradient(-45deg, rgba(155, 77, 202, 0.4) 0 1px, transparent 1px 12px);
    mix-blend-mode: screen;
    opacity: 0.7;
}
.flank-collage::after {
    content: ""; position: absolute; inset: 0;
    background: linear-gradient(180deg, transparent 50%, rgba(229, 193, 0, 0.18));
    mix-blend-mode: screen;
}
.fc-a { transform: rotate(-2deg); }
.fc-b { transform: rotate(1.5deg) translateX(20%); }
.fc-c { transform: rotate(-1.2deg); }
.fc-d { transform: rotate(2deg); }
.fc-e { transform: rotate(-1.5deg) translateX(-20%); }
.fc-f { transform: rotate(1deg); }

.trunk {
    width: min(640px, 90%);
    text-align: center;
    padding: 0 24px;
    position: relative;
    z-index: 5;
}
.trunk::before, .trunk::after {
    content: ""; position: absolute; left: 50%;
    width: 2px; transform: translateX(-50%);
    background: linear-gradient(180deg, transparent, var(--emerald), var(--plasma), transparent);
    box-shadow: 0 0 12px rgba(155, 77, 202, 0.6);
}
.trunk::before { top: -10vh; height: 10vh; }
.trunk::after { bottom: -10vh; height: 10vh; }

.trunk-list {
    list-style: none;
    margin: 30px auto 22px;
    max-width: 460px;
    text-align: left;
    border-top: 1px solid rgba(155, 77, 202, 0.3);
    border-bottom: 1px solid rgba(155, 77, 202, 0.3);
    padding: 14px 0;
}
.trunk-list li {
    display: flex; gap: 16px; align-items: baseline;
    padding: 8px 0;
    font-family: var(--font-body);
    color: var(--moonstone);
    border-bottom: 1px dashed rgba(138, 127, 160, 0.25);
}
.trunk-list li:last-child { border-bottom: none; }
.li-key {
    color: var(--citrine);
    font-size: 0.72rem;
    min-width: 36px;
}

/* ===================== STRATUM 4 :: TRANSMISSION ====================== */
.stratum-4 {
    background: #050509;
    height: 110vh;
}

.deep-void {
    position: absolute; inset: 0;
    background:
        radial-gradient(circle at 50% 50%, rgba(155, 77, 202, 0.25), transparent 30%),
        radial-gradient(circle at 50% 50%, rgba(24, 69, 163, 0.25) 0%, transparent 50%),
        #04040a;
}

.halo {
    position: absolute; left: 50%; top: 50%;
    border-radius: 50%;
    border: 1px solid rgba(232, 224, 240, 0.18);
    transform: translate(-50%, -50%);
    pointer-events: none;
}
.halo-a { width: 700px; height: 700px; box-shadow: 0 0 80px rgba(155, 77, 202, 0.25), inset 0 0 80px rgba(24, 69, 163, 0.25); animation: haloSpin 60s linear infinite; }
.halo-b { width: 1100px; height: 1100px; border-color: rgba(155, 77, 202, 0.2); animation: haloSpin 90s linear infinite reverse; }
.halo-c { width: 500px; height: 500px; border-color: rgba(229, 193, 0, 0.3); box-shadow: 0 0 60px rgba(229, 193, 0, 0.18); animation: haloSpin 40s linear infinite; }
@keyframes haloSpin { from { transform: translate(-50%, -50%) rotate(0deg); } to { transform: translate(-50%, -50%) rotate(360deg); } }

.transmission { width: min(700px, 90%); text-align: center; }

.jewel-rect {
    position: relative;
    padding: 44px 38px;
    background: linear-gradient(135deg, rgba(24, 69, 163, 0.45), rgba(155, 77, 202, 0.4) 55%, rgba(163, 24, 60, 0.35));
    border: 1px solid rgba(232, 224, 240, 0.35);
    box-shadow:
        0 0 80px rgba(155, 77, 202, 0.55),
        0 0 120px rgba(24, 69, 163, 0.3),
        inset 0 0 40px rgba(232, 224, 240, 0.1);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    overflow: hidden;
}
.jewel-rect::before {
    content: ""; position: absolute; inset: 8px;
    border: 1px solid rgba(229, 193, 0, 0.4);
    pointer-events: none;
}
.jewel-rect .kicker {
    color: var(--citrine); font-size: 0.74rem;
    display: block; margin-bottom: 14px;
}

.transmit-ticker {
    margin-top: 22px;
    display: flex; gap: 28px;
    overflow: hidden;
    color: var(--opal);
    font-size: 0.72rem;
    border-top: 1px solid rgba(155, 77, 202, 0.4);
    padding-top: 12px;
    white-space: nowrap;
}
.transmit-ticker span { flex: 0 0 auto; animation: tickerScroll 16s linear infinite; }
@keyframes tickerScroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-200%); }
}

.closing { margin-top: 26px; color: var(--opal); font-size: 0.78rem; letter-spacing: 0.2em; }

/* ----- Glitch cascade overlay ----------------------------------------- */
.cascade {
    position: fixed; inset: 0;
    pointer-events: none;
    z-index: 95;
}
.cascade-flash {
    position: absolute; inset: 0;
    background: var(--citrine);
    opacity: 0;
    mix-blend-mode: screen;
}
.cascade-band {
    position: absolute; left: 0; right: 0;
    top: 50%; height: 20px;
    background: linear-gradient(90deg, transparent, rgba(232, 224, 240, 0.4), transparent);
    mix-blend-mode: screen;
    opacity: 0;
}
.cascade.fire .cascade-flash {
    animation: cascadeFlash 400ms ease-out forwards;
}
.cascade.fire .cascade-band {
    animation: cascadeBand 400ms ease-out forwards;
}
@keyframes cascadeFlash {
    0% { opacity: 0; }
    8% { opacity: 0.15; }
    20% { opacity: 0; }
    100% { opacity: 0; }
}
@keyframes cascadeBand {
    0% { opacity: 0; transform: translateX(0); }
    20% { opacity: 0.9; transform: translateX(-10px); }
    60% { opacity: 0.4; transform: translateX(0); }
    100% { opacity: 0; }
}

/* During cascade, jolt all text */
body.cascading .stratum .layer-fg,
body.cascading .acrylic-panel,
body.cascading .panel,
body.cascading .zig-block,
body.cascading .trunk,
body.cascading .jewel-rect {
    animation: textJolt 200ms ease-in-out;
}
@keyframes textJolt {
    0% { transform: translateX(0); }
    25% { transform: translateX(4px); }
    50% { transform: translateX(0); }
    75% { transform: translateX(-2px); }
    100% { transform: translateX(0); }
}

/* ----- Character glitch animation (applied via JS) -------------------- */
.site-title .char.glitched {
    animation: charGlitch 80ms linear;
}
@keyframes charGlitch {
    0% { transform: translateX(0); }
    50% { transform: translateX(2px); color: var(--citrine); }
    100% { transform: translateX(0); }
}

/* ----- Reveal states (stagger / typewriter) --------------------------- */
.site-title .char.in {
    transform: translateY(0);
    opacity: 1;
}
.site-title .char {
    opacity: 0;
    transform: translateY(10px);
}

.zig-block, .panel, .acrylic-panel, .jewel-rect {
    opacity: 1;
}

/* ----- Responsive ------------------------------------------------------ */
@media (max-width: 900px) {
    .progress-rail { left: 14px; }
    .hud { right: 12px; top: 12px; min-width: 130px; font-size: 0.66rem; }
    .stratum-1 .content-cluster.left { width: 80%; padding-left: 0; }
    .stratum-1 .panel.tilt-b { margin-left: 0; }
    .shard.s1, .shard.s2, .shard.s3 { transform: scale(0.7) rotate(6deg); right: 0; }
    .collage.collage-a { width: 240px; height: 320px; right: -10%; }
    .collage.collage-b { width: 220px; height: 280px; left: -8%; }
    .flank { width: 22%; padding: 4vh 2vw; }
    .flank-collage { width: 95%; }
    .trunk { padding: 0 12px; }
    .stratum-2, .stratum-3 { height: 150vh; }
    .stratum-4 { height: 130vh; }
    .acrylic-panel { padding: 24px 22px; }
}

@media (max-width: 640px) {
    .hud { display: none; }
    .flank { display: none; }
    .trunk { width: 96%; }
    .site-title { letter-spacing: 0.04em; }
    .floating-shard.shard-a, .floating-shard.shard-b { display: none; }
    .horizon-grid { transform: perspective(400px) rotateX(60deg); }
}
