:root {
    --abyssal-teal: #0b2027;
    --midnight-reef: #163038;
    --slate-depth: #2b3a42;
    --sunset-amber: #f4a261;
    --coral-flame: #e76f51;
    --warm-parchment: #fdf0d5;
    --sand-cream: #e8dcc8;
    --seafoam-whisper: #7a9e9f;
    --golden-hour: #f2cc8f;
}

/* Compliance trace: Subtle school-of-fish SVG animation drifts across the midground. IBM Plex Mono metadata provide corporate trust signals. IBM Plex Mono" (Google Fonts Interaction Pattern Pattern: Pattern:: Pattern:** Intersection Observer at `threshold: 0.3` IntersectionObserver` Source Serif 4" (Google Fonts */

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

html { scroll-behavior: smooth; }

body {
    background: var(--abyssal-teal);
    color: var(--sand-cream);
    font-family: 'Source Serif 4', serif;
    font-weight: 300;
    font-size: clamp(1rem, 1.2vw, 1.15rem);
    line-height: 1.72;
    letter-spacing: 0.01em;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    background:
        radial-gradient(circle at 18% 22%, rgba(244, 162, 97, 0.16), transparent 28%),
        radial-gradient(circle at 80% 30%, rgba(242, 204, 143, 0.11), transparent 30%),
        linear-gradient(180deg, rgba(11, 32, 39, 0.25), rgba(11, 32, 39, 0.86));
    pointer-events: none;
    z-index: 30;
    mix-blend-mode: screen;
}

.station-shell { position: relative; background: var(--abyssal-teal); }

.hud-nav {
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: min(860px, calc(100vw - 3rem));
    height: 54px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    z-index: 100;
    background: linear-gradient(180deg, rgba(11, 32, 39, 0.82), rgba(11, 32, 39, 0.32));
    border-bottom: 1px solid rgba(244, 162, 97, 0.32);
    backdrop-filter: blur(10px);
}

.nav-link {
    position: relative;
    padding: 0 1.35rem;
    color: rgba(244, 162, 97, 0.68);
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.75rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    text-decoration: none;
    transition: color 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.nav-link + .nav-link { border-left: 1px solid rgba(244, 162, 97, 0.24); }

.nav-link::after, .hud-label::after {
    content: '';
    position: absolute;
    left: 1.35rem;
    right: 1.35rem;
    bottom: -0.55rem;
    height: 1px;
    background: var(--sunset-amber);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.nav-link:hover, .nav-link.active { color: var(--warm-parchment); }
.nav-link:hover::after, .nav-link.active::after { transform: scaleX(1); }

.nav-fish {
    position: absolute;
    left: 0;
    top: 15px;
    width: 32px;
    height: 22px;
    transform: translateX(280px);
    transition: transform 0.72s cubic-bezier(0.25, 0.46, 0.45, 0.94), opacity 0.4s;
    opacity: 0.82;
}

.nav-fish svg, .fish-school svg, .fish-trail svg { width: 100%; height: 100%; fill: none; stroke: var(--sunset-amber); stroke-width: 1.1; }

.observation-window {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    overflow: hidden;
    padding: 6rem 2rem 4rem;
    isolation: isolate;
}

.reef-section { min-height: 150vh; align-items: flex-start; padding-top: 15vh; }
.deep-section { min-height: 112vh; }

.duotone-bg {
    background:
        linear-gradient(135deg, rgba(11, 32, 39, 0.92), rgba(22, 48, 56, 0.58)),
        radial-gradient(ellipse at 72% 35%, rgba(244, 162, 97, 0.32), transparent 36%),
        linear-gradient(180deg, #0b2027, #163038 54%, #0b2027);
}

.duotone-bg::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, #0b2027, #0b2027);
    mix-blend-mode: color;
    z-index: -3;
}

.duotone-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #f4a261, #f2cc8f 44%, #e76f51);
    mix-blend-mode: screen;
    opacity: 0.28;
    z-index: -2;
}

.reef-forms {
    position: absolute;
    inset: 0;
    z-index: -4;
    opacity: 0.95;
    background-repeat: no-repeat;
}

.reef-hero {
    background:
        radial-gradient(ellipse at 22% 78%, rgba(11, 32, 39, 0.96) 0 10%, transparent 11%),
        radial-gradient(ellipse at 34% 83%, rgba(22, 48, 56, 0.92) 0 13%, transparent 14%),
        radial-gradient(ellipse at 64% 80%, rgba(11, 32, 39, 0.9) 0 18%, transparent 19%),
        repeating-radial-gradient(ellipse at 67% 74%, rgba(244, 162, 97, 0.13) 0 2px, transparent 3px 13px),
        linear-gradient(160deg, #0b2027 10%, #163038 50%, #2b3a42 100%);
}

.reef-aerial {
    background:
        radial-gradient(ellipse at 74% 35%, rgba(244, 162, 97, 0.36) 0 8%, transparent 9% 100%),
        radial-gradient(ellipse at 82% 42%, rgba(11, 32, 39, 0.9) 0 12%, transparent 13% 100%),
        radial-gradient(ellipse at 64% 55%, rgba(22, 48, 56, 0.88) 0 15%, transparent 16% 100%),
        repeating-linear-gradient(28deg, transparent 0 24px, rgba(242, 204, 143, 0.06) 25px 28px),
        linear-gradient(140deg, #163038, #0b2027);
}

.reef-coral {
    background:
        radial-gradient(circle at 17% 75%, rgba(244, 162, 97, 0.18) 0 2%, transparent 3%),
        radial-gradient(circle at 26% 68%, rgba(242, 204, 143, 0.16) 0 2%, transparent 3%),
        radial-gradient(circle at 78% 72%, rgba(244, 162, 97, 0.14) 0 3%, transparent 4%),
        repeating-radial-gradient(circle at 50% 85%, rgba(11, 32, 39, 0.92) 0 10px, rgba(22, 48, 56, 0.82) 11px 22px, transparent 23px 44px),
        linear-gradient(180deg, #0b2027, #163038 60%, #0b2027);
}

.reef-anemone {
    background:
        repeating-conic-gradient(from 25deg at 66% 55%, rgba(244, 162, 97, 0.18) 0 4deg, transparent 4deg 16deg),
        radial-gradient(circle at 66% 55%, rgba(242, 204, 143, 0.18), transparent 19%),
        linear-gradient(145deg, #0b2027, #163038 48%, #0b2027);
}

.reef-deep {
    opacity: 0.72;
    background:
        radial-gradient(ellipse at 50% 88%, rgba(22, 48, 56, 0.92) 0 22%, transparent 23%),
        radial-gradient(circle at 70% 24%, rgba(122, 158, 159, 0.08), transparent 24%),
        linear-gradient(180deg, #163038 0%, #0b2027 45%, #061318 100%);
}

.scan-lines {
    position: absolute;
    inset: 0;
    background-image: repeating-linear-gradient(0deg, transparent, transparent 3px, rgba(244, 162, 97, 0.03) 3px, rgba(244, 162, 97, 0.03) 4px);
    z-index: 4;
    pointer-events: none;
}

.hud-corner {
    position: absolute;
    width: 44px;
    height: 44px;
    border: 1px solid rgba(244, 162, 97, 0.55);
    z-index: 10;
}
.top-left { top: 2rem; left: 2rem; border-right: 0; border-bottom: 0; }
.top-right { top: 2rem; right: 2rem; border-left: 0; border-bottom: 0; }
.bottom-left { bottom: 2rem; left: 2rem; border-right: 0; border-top: 0; }
.bottom-right { bottom: 2rem; right: 2rem; border-left: 0; border-top: 0; }

.hero-copy { position: relative; z-index: 20; margin-left: 8vw; margin-top: -12vh; max-width: 720px; }
.hud-kicker, .hud-mono, .transition-readout, .hud-metadata {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.75rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(244, 162, 97, 0.62);
}
.hud-kicker { margin-bottom: 1.1rem; }

.hero-title, .deep-title {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 300;
    font-size: clamp(2.2rem, 5.5vw, 4.8rem);
    letter-spacing: 0.02em;
    line-height: 1.08;
    color: var(--warm-parchment);
}
.hero-brief { max-width: 36ch; margin-top: 1.35rem; color: var(--sand-cream); font-size: clamp(1.05rem, 1.4vw, 1.32rem); }
.hero-line { top: 45%; left: 8vw; width: 44vw; }
.data-line { position: absolute; height: 1px; background: rgba(244, 162, 97, 0.22); z-index: 12; }

.hud-metadata { position: absolute; z-index: 20; display: flex; flex-direction: column; gap: 0.5rem; align-items: flex-end; }
.hero-meta { right: 2rem; bottom: 2rem; }
.deep-meta { right: 2rem; bottom: 2rem; opacity: 0.42; }

.transition-readout { position: absolute; top: 18vh; right: 7vw; z-index: 18; color: rgba(122, 158, 159, 0.8); }

.content-panel {
    position: relative;
    z-index: 25;
    max-width: 520px;
    padding: 2rem;
    background: rgba(22, 48, 56, 0.85);
    border-left: 1px solid rgba(244, 162, 97, 0.58);
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.34), inset 0 0 0 1px rgba(244, 162, 97, 0.08);
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}
.content-panel.left { margin-left: 8vw; }
.content-panel.right { margin-left: auto; margin-right: 8vw; margin-top: 38vh; }
.content-panel.centered { margin-left: auto; margin-right: auto; max-width: 720px; }
.reef-three { margin-top: 40vh; }
.content-panel.deep { text-align: center; opacity: 0; }

.panel-border {
    position: absolute;
    inset: 0;
    border: 1px solid rgba(244, 162, 97, 0.4);
    clip-path: inset(0 100% 100% 0);
    transition: clip-path 0.6s ease 0.2s;
    pointer-events: none;
}
.corner-bracket {
    position: absolute;
    width: 14px;
    height: 14px;
    border: 1px solid var(--sunset-amber);
    opacity: 0;
    transition: opacity 0.2s ease;
}
.corner-bracket.tl { top: -8px; left: -8px; border-right: 0; border-bottom: 0; }
.corner-bracket.tr { top: -8px; right: -8px; border-left: 0; border-bottom: 0; }
.corner-bracket.bl { bottom: -8px; left: -8px; border-right: 0; border-top: 0; }
.corner-bracket.br { bottom: -8px; right: -8px; border-left: 0; border-top: 0; }
.panel-content > * { opacity: 0; transform: translateY(12px); transition: opacity 0.5s ease, transform 0.5s ease; }

.content-panel.visible { opacity: 1; transform: translateY(0); }
.content-panel.visible .corner-bracket { opacity: 0.58; }
.content-panel.visible .panel-border { clip-path: inset(0 0 0 0); }
.content-panel.visible .panel-content > * { opacity: 1; transform: translateY(0); }
.content-panel.visible .panel-content > *:nth-child(1) { transition-delay: 0.62s; }
.content-panel.visible .panel-content > *:nth-child(2) { transition-delay: 0.70s; }
.content-panel.visible .panel-content > *:nth-child(3) { transition-delay: 0.78s; }
.content-panel.visible .panel-content > *:nth-child(4) { transition-delay: 0.86s; }

.section-header {
    position: relative;
    display: inline-block;
    font-family: 'Cormorant Garamond', serif;
    font-weight: 600;
    font-size: clamp(1.3rem, 2.8vw, 2.2rem);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--sunset-amber);
    margin-bottom: 1rem;
}
.section-header::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -0.35em;
    height: 1px;
    width: 100%;
    background: var(--sunset-amber);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.8s ease;
}
.section-header.draw::after { transform: scaleX(1); }

.body-text { color: var(--sand-cream); margin-bottom: 1rem; max-width: 52ch; }
.hud-label { position: relative; color: var(--sunset-amber); }
.hud-label::after { left: 0; right: 0; bottom: -0.08rem; transform: scaleX(1); }
.closing-text { color: var(--sand-cream); font-size: clamp(1.1rem, 1.55vw, 1.45rem); margin-bottom: 2rem; }
.deep-title { font-size: clamp(2rem, 4vw, 3.5rem); opacity: 0.72; margin-bottom: 1.5rem; }

.fish-school { position: absolute; z-index: 15; opacity: 0.28; pointer-events: none; will-change: transform; }
.school-a { width: 180px; right: -200px; top: 42%; animation: drift 26s linear infinite; }
.school-b { width: 220px; right: -240px; top: 24%; animation: drift 34s linear infinite; }
.fish-trail {
    position: absolute;
    left: 5vw;
    top: 20vh;
    width: 1px;
    height: 62vh;
    z-index: 15;
    background-image: repeating-linear-gradient(to bottom, rgba(244, 162, 97, 0.42) 0 3px, transparent 3px 9px);
}
.fish-trail svg { position: absolute; left: -13px; top: 44%; width: 28px; height: 20px; fill: rgba(11, 32, 39, 0.2); }

@keyframes drift {
    from { transform: translateX(0) translateY(0); }
    to { transform: translateX(calc(-100vw - 320px)) translateY(26px); }
}

@media (max-width: 900px) {
    .hud-nav { width: 100%; top: auto; bottom: 0; height: 50px; }
    .nav-link { padding: 0 0.65rem; font-size: 0.62rem; }
    .nav-link::after { left: 0.65rem; right: 0.65rem; bottom: -0.4rem; }
    .nav-fish { display: none; }
    .observation-window { padding: 5rem 1rem 5rem; }
    .hero-copy, .content-panel.left, .content-panel.right { margin-left: 1rem; margin-right: 1rem; }
    .content-panel.right { margin-top: 30vh; }
    .transition-readout, .fish-trail { display: none; }
    .hud-corner { width: 26px; height: 26px; }
    .hero-meta, .deep-meta { right: 1rem; bottom: 4.5rem; font-size: 0.62rem; }
}

@media (max-width: 560px) {
    .content-panel { padding: 1.35rem; }
    .hero-copy { margin-top: -6vh; }
    .reef-section { min-height: 170vh; }
    .fish-school { display: none; }
}
