/* RRIPPL.com - Pixel Art meets Liquid Physics */
/* Palette hex values from DESIGN.md:
   #0a1628 #0d2b3e #00e5ff #4dd0b8 #7b8cff #e0f0f4 #6b8a99 #ff6b7a #d0e4ef */

:root {
    /* Core palette */
    --abyss-navy: #0a1628;     /* Deep Water / Primary BG */
    --midnight-teal: #0d2b3e;  /* Mid Water / Section BG */
    --electric-cyan: #00e5ff;  /* Surface Glow / Accent 1 */
    --soft-aqua: #4dd0b8;      /* Bubble Highlight / Accent 2 */
    --periwinkle: #7b8cff;     /* Bioluminescent / Accent 3 */
    --salt-foam: #e0f0f4;      /* Text Primary */
    --depth-gray: #6b8a99;     /* Text Secondary / Muted */
    --coral-pixel: #ff6b7a;    /* Danger / Pixel Pop */
    --tinted-foam: #d0e4ef;    /* Text deep-tint */
    --deep-abyss: #061018;     /* Vertical fade destination */

    /* Fonts */
    --font-body: 'Space Mono', 'Courier New', monospace;
    --font-display: 'Silkscreen', 'Press Start 2P', monospace;
    --font-accent: 'Space Grotesk', 'Inter', sans-serif;

    /* Depth-driven */
    --depth: 0;
    --water-hue: 190;

    /* Grid */
    --grid: 8px;
}

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

html {
    font-size: 16px;
    background: var(--abyss-navy);
}

body {
    font-family: var(--font-body);
    font-size: 15px;
    line-height: 1.85;
    letter-spacing: 0.02em;
    color: var(--salt-foam);
    background: linear-gradient(180deg, var(--abyss-navy) 0%, var(--deep-abyss) 100%);
    overflow-x: hidden;
    image-rendering: pixelated;
    min-height: 100vh;
}

::selection {
    background: var(--electric-cyan);
    color: var(--abyss-navy);
}

/* ===== 8px grid overlay (pulses near cursor) ===== */
#pixel-grid {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 1;
    background-image:
        linear-gradient(to right, rgba(0, 229, 255, 0.04) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(0, 229, 255, 0.04) 1px, transparent 1px);
    background-size: 8px 8px;
    opacity: calc(1 - var(--depth) * 0.6);
    transition: opacity 0.6s;
}

/* ===== Sonar ping (follows cursor) ===== */
#sonar-ping {
    position: fixed;
    width: 160px;
    height: 160px;
    pointer-events: none;
    z-index: 2;
    transform: translate(-50%, -50%);
    background: radial-gradient(circle, rgba(0, 229, 255, 0.08) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.4s;
    top: -200px;
    left: -200px;
}

#sonar-ping.sonar-active {
    opacity: 1;
}

/* ===== Ripple canvas ===== */
#ripple-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 1500;
}

/* ===== Ambient creatures layer ===== */
#pixel-creatures {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 3;
    overflow: hidden;
}

.pixel-creature {
    position: absolute;
    image-rendering: pixelated;
    opacity: 0;
    transition: opacity 0.8s;
    will-change: transform;
}

.pixel-creature.lit {
    opacity: 0.55;
}

/* ===== Ambient rising bubbles layer ===== */
#bubble-particles {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 2;
    overflow: hidden;
}

.bubble {
    position: absolute;
    width: var(--size, 16px);
    height: var(--size, 16px);
    border: 2px solid rgba(0, 229, 255, 0.35);
    background: rgba(0, 229, 255, 0.04);
    animation: bubbleRise var(--duration, 14s) linear infinite;
    animation-delay: var(--delay, 0s);
    bottom: -40px;
    image-rendering: pixelated;
    will-change: transform;
}

.bubble::before {
    /* 4x4 highlight square upper-left */
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 4px;
    height: 4px;
    background: rgba(224, 240, 244, 0.85);
}

@keyframes bubbleRise {
    0% {
        transform: translate3d(0, 0, 0);
        opacity: 0;
    }
    10% { opacity: 0.65; }
    90% { opacity: 0.2; }
    100% {
        transform: translate3d(calc(var(--drift, 0) * 1px), -110vh, 0);
        opacity: 0;
    }
}

/* ===== Compass Navigation ===== */
#compass-nav {
    position: fixed;
    bottom: 32px;
    right: 32px;
    z-index: 2500;
}

#compass-btn {
    width: 48px;
    height: 48px;
    background: rgba(10, 22, 40, 0.9);
    border: 2px solid var(--electric-cyan);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s;
    padding: 0;
    image-rendering: pixelated;
    position: relative;
}

#compass-btn:hover {
    transform: scale(1.1) rotate(45deg);
    box-shadow: 0 0 16px rgba(0, 229, 255, 0.55), 0 0 32px rgba(0, 229, 255, 0.25);
}

#compass-btn svg {
    image-rendering: pixelated;
    shape-rendering: crispEdges;
}

#compass-menu {
    position: absolute;
    bottom: 24px;
    right: 24px;
    width: 0;
    height: 0;
    pointer-events: none;
}

.compass-bubble {
    position: absolute;
    width: 72px;
    height: 72px;
    background: rgba(13, 43, 62, 0.9);
    border: 2px solid var(--electric-cyan);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: var(--salt-foam);
    font-family: var(--font-body);
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    transition:
        transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1),
        opacity 0.35s,
        background 0.25s,
        box-shadow 0.25s;
    bottom: -36px;
    right: -36px;
    transform: translate(0, 0) scale(0);
    opacity: 0;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

#compass-menu.compass-menu-visible {
    pointer-events: none;
}

#compass-menu.compass-menu-visible .compass-bubble {
    opacity: 1;
    pointer-events: auto;
}

#compass-menu.compass-menu-visible .compass-n { transform: translate(0, -96px) scale(1); }
#compass-menu.compass-menu-visible .compass-e { transform: translate(-96px, 0) scale(1); }
#compass-menu.compass-menu-visible .compass-s { transform: translate(0, 96px) scale(1); }
#compass-menu.compass-menu-visible .compass-w { transform: translate(96px, 0) scale(1); }

.compass-bubble:hover {
    background: rgba(0, 229, 255, 0.18);
    box-shadow: 0 0 20px rgba(0, 229, 255, 0.55);
    color: var(--electric-cyan);
}

.compass-bubble span { pointer-events: none; }

/* ===== Depth HUD ===== */
#depth-hud {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 2000;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 14px;
    background: rgba(10, 22, 40, 0.7);
    border: 2px solid rgba(107, 138, 153, 0.4);
    font-family: var(--font-body);
    font-size: 11px;
    color: var(--depth-gray);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.hud-key { color: var(--depth-gray); }

.hud-bar {
    display: inline-block;
    width: 96px;
    height: 6px;
    background: rgba(107, 138, 153, 0.25);
    border: 1px solid rgba(107, 138, 153, 0.4);
    position: relative;
}

.hud-fill {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 0%;
    background: var(--electric-cyan);
    transition: width 0.3s;
}

.hud-val {
    color: var(--electric-cyan);
    font-weight: 700;
    min-width: 32px;
    text-align: right;
}

/* ===== Scroll container ===== */
#scroll-container {
    position: relative;
    z-index: 10;
    scroll-snap-type: y proximity;
    overflow-y: auto;
    overflow-x: hidden;
    height: 100vh;
    scroll-behavior: smooth;
}

/* ===== Pool sections ===== */
.pool {
    min-height: 100vh;
    scroll-snap-align: start;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    padding: 96px 48px;
}

#pool-surface {
    background: var(--midnight-teal);
}

#pool-shallow {
    background: color-mix(in srgb, var(--midnight-teal) 92%, var(--abyss-navy));
    background: #0c2538;
}

#pool-deep {
    background: var(--abyss-navy);
}

#pool-floor {
    background: var(--deep-abyss);
}

.pool-content {
    z-index: 20;
    position: relative;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

.align-left {
    text-align: left;
    margin-left: 0;
    margin-right: auto;
    max-width: 720px;
    padding-left: 4vw;
}

.align-right {
    text-align: left;
    margin-left: auto;
    margin-right: 0;
    max-width: 760px;
    padding-right: 4vw;
}

.align-floor {
    text-align: left;
    max-width: 900px;
    margin: 0 auto;
}

.narrow { max-width: 680px; }

/* ===== Section tag ===== */
.section-tag {
    display: inline-block;
    font-family: var(--font-accent);
    font-size: 11px;
    color: var(--soft-aqua);
    letter-spacing: 0.2em;
    text-transform: uppercase;
    margin-bottom: 16px;
    opacity: 0.85;
}

/* ===== Surface title ===== */
.glitch-title {
    font-family: var(--font-display);
    font-size: clamp(48px, 10vw, 112px);
    font-weight: 400;
    color: var(--electric-cyan);
    text-transform: uppercase;
    position: relative;
    display: inline-block;
    letter-spacing: 0.06em;
    line-height: 0.95;
    margin-top: 8px;
    text-shadow:
        0 0 24px rgba(0, 229, 255, 0.5),
        0 0 48px rgba(0, 229, 255, 0.18);
    -webkit-font-smoothing: none;
    -moz-osx-font-smoothing: none;
    font-smooth: never;
}

.glitch-title::before,
.glitch-title::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    pointer-events: none;
}

.glitch-title::before {
    color: var(--periwinkle);
    animation: glitch1 4.2s infinite;
    clip-path: polygon(0 0, 100% 0, 100% 42%, 0 42%);
}

.glitch-title::after {
    color: var(--coral-pixel);
    animation: glitch2 4.2s infinite;
    clip-path: polygon(0 58%, 100% 58%, 100% 100%, 0 100%);
}

@keyframes glitch1 {
    0%, 92%, 100% { opacity: 0; transform: translate(0, 0); }
    93% { opacity: 0.85; transform: translate(-4px, -2px); }
    94% { opacity: 0; }
    95% { opacity: 0.6; transform: translate(2px, 1px); }
    96% { opacity: 0; }
}

@keyframes glitch2 {
    0%, 95%, 100% { opacity: 0; transform: translate(0, 0); }
    96% { opacity: 0.7; transform: translate(3px, 2px); }
    97% { opacity: 0; }
    98% { opacity: 0.5; transform: translate(-2px, -1px); }
    99% { opacity: 0; }
}

.tagline {
    font-family: var(--font-accent);
    font-size: 20px;
    color: var(--salt-foam);
    margin-top: 24px;
    letter-spacing: 0.08em;
    font-weight: 500;
}

.sub-tagline {
    font-family: var(--font-body);
    font-size: 14px;
    color: var(--depth-gray);
    margin-top: 16px;
    max-width: 560px;
    line-height: 1.75;
}

/* ===== Coord block ===== */
.coord-block {
    margin-top: 32px;
    display: inline-grid;
    grid-template-columns: auto auto;
    gap: 4px 16px;
    padding: 12px 20px;
    border: 2px solid rgba(107, 138, 153, 0.3);
    background: rgba(6, 16, 24, 0.45);
    font-family: var(--font-body);
    font-size: 12px;
    line-height: 1.5;
}

.coord-label {
    color: var(--depth-gray);
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

.coord-val {
    color: var(--soft-aqua);
    font-weight: 700;
}

/* ===== Bubble cluster (decorative pixel bubbles) ===== */
.bubble-cluster {
    margin-top: 48px;
    display: flex;
    align-items: flex-end;
    gap: 12px;
}

.pixel-bubble {
    display: inline-block;
    border: 2px solid var(--electric-cyan);
    background: rgba(0, 229, 255, 0.05);
    position: relative;
    image-rendering: pixelated;
    animation: clusterFloat 6s ease-in-out infinite;
}

.pixel-bubble::before {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 4px;
    height: 4px;
    background: var(--salt-foam);
}

.pixel-bubble.b-8  { width: 8px;  height: 8px;  animation-delay: 0s; }
.pixel-bubble.b-16 { width: 16px; height: 16px; animation-delay: 0.4s; }
.pixel-bubble.b-24 { width: 24px; height: 24px; animation-delay: 0.8s; }
.pixel-bubble.b-32 { width: 32px; height: 32px; animation-delay: 1.2s; }

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

/* ===== Scroll hint ===== */
.scroll-hint {
    margin-top: 56px;
    display: inline-flex;
    flex-direction: column;
    align-items: flex-start;
    animation: scrollBounce 2.2s ease-in-out infinite;
}

.scroll-hint span {
    font-family: var(--font-display);
    font-size: 11px;
    color: var(--depth-gray);
    text-transform: uppercase;
    letter-spacing: 0.25em;
    margin-top: 10px;
}

.scroll-arrow {
    width: 14px;
    height: 14px;
    border-right: 2px solid var(--electric-cyan);
    border-bottom: 2px solid var(--electric-cyan);
    transform: rotate(45deg);
}

@keyframes scrollBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(10px); }
}

/* ===== Water line ===== */
.water-line {
    position: absolute;
    left: 0;
    right: 0;
    height: 4px;
    background: repeating-linear-gradient(
        90deg,
        var(--electric-cyan) 0px,
        var(--electric-cyan) 16px,
        var(--soft-aqua) 16px,
        var(--soft-aqua) 24px,
        transparent 24px,
        transparent 32px
    );
    opacity: 0.4;
    image-rendering: pixelated;
    pointer-events: none;
}

#pool-surface .water-line { top: 65vh; }
#pool-shallow .water-line { top: 75vh; }
#pool-deep    .water-line { top: 85vh; opacity: 0.25; }

/* ===== Section titles ===== */
.section-title {
    font-family: var(--font-display);
    font-size: clamp(40px, 6vw, 64px);
    font-weight: 400;
    color: var(--electric-cyan);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 24px;
    text-shadow: 0 0 20px rgba(0, 229, 255, 0.3);
    -webkit-font-smoothing: none;
    font-smooth: never;
}

.section-intro {
    font-family: var(--font-body);
    font-size: 15px;
    color: var(--tinted-foam);
    max-width: 520px;
    margin-bottom: 48px;
    line-height: 1.8;
    opacity: 0.85;
}

/* ===== Shallow scatter field ===== */
.scatter-field {
    position: relative;
    min-height: 540px;
    margin-top: 32px;
}

.scatter-card {
    position: absolute;
    width: 260px;
    padding: 24px 22px;
    background: rgba(13, 43, 62, 0.75);
    border: 2px solid rgba(0, 229, 255, 0.35);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    opacity: 0;
    transform: translateY(32px) rotate(var(--tilt, 0deg));
    transition: opacity 0.8s, transform 0.8s, border-color 0.3s, box-shadow 0.3s;
    image-rendering: pixelated;
}

.scatter-card.visible {
    opacity: 1;
    transform: translateY(0) rotate(var(--tilt, 0deg));
}

.scatter-card:hover {
    border-color: var(--electric-cyan);
    box-shadow: 0 0 28px rgba(0, 229, 255, 0.25);
    z-index: 5;
}

.scatter-card.c-1 { top: 0;    left: 0;    --tilt: -2deg; }
.scatter-card.c-2 { top: 40px; right: 0;   --tilt: 3deg; }
.scatter-card.c-3 { top: 280px; left: 80px; --tilt: 1deg; }
.scatter-card.c-4 { top: 240px; right: 40px; --tilt: -3deg; }

.card-icon {
    margin-bottom: 20px;
    image-rendering: pixelated;
}

.card-icon svg { image-rendering: pixelated; shape-rendering: crispEdges; }

.scatter-card h3 {
    font-family: var(--font-display);
    font-size: 22px;
    color: var(--soft-aqua);
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    -webkit-font-smoothing: none;
    font-smooth: never;
}

.scatter-card p {
    font-family: var(--font-body);
    font-size: 13px;
    color: var(--tinted-foam);
    line-height: 1.7;
    opacity: 0.85;
}

.card-meta {
    display: block;
    margin-top: 16px;
    font-family: var(--font-accent);
    font-size: 11px;
    color: var(--depth-gray);
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

/* ===== Deep - long-form ===== */
.long-form p {
    font-family: var(--font-body);
    font-size: 15px;
    color: var(--tinted-foam);
    line-height: 1.95;
    margin-bottom: 28px;
}

.long-form .lead {
    font-size: 17px;
    color: var(--salt-foam);
    line-height: 1.8;
    border-left: 2px solid var(--electric-cyan);
    padding-left: 20px;
    margin-bottom: 40px;
}

.long-form .pull-quote {
    font-family: var(--font-display);
    font-size: 22px;
    color: var(--periwinkle);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    line-height: 1.4;
    margin: 40px 0;
    padding: 24px;
    border-top: 2px solid rgba(123, 140, 255, 0.35);
    border-bottom: 2px solid rgba(123, 140, 255, 0.35);
    text-align: center;
    -webkit-font-smoothing: none;
    font-smooth: never;
}

.inline-chip {
    display: inline-block;
    padding: 2px 8px;
    background: rgba(13, 43, 62, 0.8);
    border: 1px solid var(--chip, var(--depth-gray));
    color: var(--chip, var(--salt-foam));
    font-size: 13px;
    margin: 0 2px;
    letter-spacing: 0.06em;
}

/* ===== Terminal pre block ===== */
.pixel-terminal {
    font-family: var(--font-body);
    font-size: 13px;
    background: rgba(6, 16, 24, 0.95);
    border: 2px solid var(--depth-gray);
    padding: 20px 24px;
    margin: 32px 0;
    color: var(--tinted-foam);
    line-height: 2;
    overflow-x: auto;
    white-space: pre-wrap;
}

.prompt {
    color: var(--electric-cyan);
    font-weight: 700;
    margin-right: 6px;
}

.highlight { color: var(--coral-pixel); }
.accent { color: var(--periwinkle); }
.success { color: var(--soft-aqua); }

.cursor-block {
    color: var(--electric-cyan);
    animation: cursorBlink 0.8s step-end infinite;
}

@keyframes cursorBlink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

/* ===== Floor - mosaic, terrain, artifacts ===== */
.floor-message {
    margin: 32px 0 48px;
}

.floor-message p {
    font-family: var(--font-body);
    font-size: 18px;
    color: var(--salt-foam);
    line-height: 1.8;
}

.floor-message .muted {
    color: var(--depth-gray);
    font-size: 14px;
    margin-top: 8px;
}

.floor-title {
    animation: abyssPulse 6s ease-in-out infinite;
}

@keyframes abyssPulse {
    0%, 100% { opacity: 1; text-shadow: 0 0 20px rgba(0, 229, 255, 0.3); }
    50% { opacity: 0.5; text-shadow: 0 0 40px rgba(0, 229, 255, 0.6); }
}

/* Pixel mosaic (procedurally generated in JS) */
.pixel-mosaic {
    display: grid;
    grid-template-columns: repeat(16, 16px);
    grid-auto-rows: 16px;
    gap: 0;
    justify-content: start;
    margin: 40px 0;
    padding: 16px;
    border: 2px solid rgba(0, 229, 255, 0.15);
    background: rgba(10, 22, 40, 0.5);
    width: max-content;
    image-rendering: pixelated;
}

.mosaic-px {
    width: 16px;
    height: 16px;
    transition: transform 0.3s, box-shadow 0.3s;
    image-rendering: pixelated;
}

.mosaic-px:hover {
    transform: scale(1.4);
    box-shadow: 0 0 10px currentColor;
    z-index: 5;
    position: relative;
}

/* Pixel terrain (ocean floor heightmap) */
.terrain {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 0;
    margin: 48px 0 24px;
    height: 72px;
    image-rendering: pixelated;
}

.terrain-col {
    width: 16px;
    background: var(--midnight-teal);
    border-top: 2px solid var(--depth-gray);
    border-left: 1px solid rgba(107, 138, 153, 0.3);
}

.terrain-col:nth-child(odd) { background: color-mix(in srgb, var(--midnight-teal) 80%, var(--abyss-navy)); }

/* Sunken artifacts nestled between terrain peaks */
.floor-artifacts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin: 24px 0 48px;
}

.artifact {
    padding: 16px 20px;
    background: rgba(13, 43, 62, 0.4);
    border: 2px solid rgba(77, 208, 184, 0.3);
    font-family: var(--font-body);
    font-size: 12px;
    position: relative;
    transition: border-color 0.3s, background 0.3s;
}

.artifact:hover {
    border-color: var(--soft-aqua);
    background: rgba(77, 208, 184, 0.08);
}

.artifact::before {
    content: '';
    position: absolute;
    top: -8px;
    left: 16px;
    width: 8px;
    height: 8px;
    background: var(--soft-aqua);
}

.artifact-title {
    display: block;
    font-family: var(--font-accent);
    color: var(--soft-aqua);
    font-size: 11px;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    margin-bottom: 6px;
}

.artifact-body {
    display: block;
    color: var(--tinted-foam);
    font-size: 13px;
}

/* Floor CTA button */
.floor-cta {
    margin: 32px 0;
}

.pixel-btn {
    font-family: var(--font-display);
    font-size: 16px;
    color: var(--electric-cyan);
    background: transparent;
    border: 2px solid var(--electric-cyan);
    padding: 14px 28px;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    transition: background 0.3s, color 0.3s, box-shadow 0.3s, transform 0.3s;
    image-rendering: pixelated;
    -webkit-font-smoothing: none;
    font-smooth: never;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.pixel-btn:hover {
    background: var(--electric-cyan);
    color: var(--deep-abyss);
    box-shadow: 0 0 24px rgba(0, 229, 255, 0.6);
    transform: translateY(-2px);
}

.btn-text, .btn-bracket { pointer-events: none; }
.btn-bracket { color: var(--periwinkle); }
.pixel-btn:hover .btn-bracket { color: var(--deep-abyss); }

/* ===== Footer ===== */
.pool-footer {
    margin-top: 48px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    font-family: var(--font-accent);
    font-size: 11px;
    color: var(--depth-gray);
    letter-spacing: 0.2em;
    text-transform: uppercase;
    padding-top: 24px;
    border-top: 2px dotted rgba(107, 138, 153, 0.25);
}

.footer-dot { color: var(--coral-pixel); opacity: 0.5; }

/* ===== Depth-driven body tint ===== */
body {
    color: color-mix(in srgb, var(--salt-foam) calc(100% - var(--depth) * 20%), var(--tinted-foam));
}

/* ===== Responsive ===== */
@media (max-width: 900px) {
    .pool { padding: 80px 24px; }
    .align-left, .align-right { padding-left: 0; padding-right: 0; max-width: 100%; }

    .scatter-field { min-height: auto; }
    .scatter-card {
        position: relative;
        width: 100%;
        top: auto !important;
        left: auto !important;
        right: auto !important;
        margin-bottom: 24px;
        --tilt: 0deg;
    }

    #depth-hud { top: 16px; right: 16px; padding: 6px 10px; }
    .hud-bar { width: 60px; }
}

@media (max-width: 640px) {
    .pool { padding: 64px 16px; }
    .tagline { font-size: 16px; }
    .sub-tagline { font-size: 13px; }

    #compass-nav { bottom: 16px; right: 16px; }
    .compass-bubble { width: 60px; height: 60px; font-size: 10px; }

    #compass-menu.compass-menu-visible .compass-n { transform: translate(0, -80px) scale(1); }
    #compass-menu.compass-menu-visible .compass-e { transform: translate(-80px, 0) scale(1); }
    #compass-menu.compass-menu-visible .compass-s { transform: translate(0, 80px) scale(1); }
    #compass-menu.compass-menu-visible .compass-w { transform: translate(-80px, 0) scale(1); }

    .pixel-mosaic { grid-template-columns: repeat(12, 16px); }
    .long-form .pull-quote { font-size: 18px; padding: 16px; }
    .pixel-terminal { font-size: 12px; padding: 14px 16px; }
}
