:root {
    --abyssal-navy: #0B1D3A;
    --hadal-black: #050A14;
    --bioluminescent-cyan: #7FDBDA;
    --steel-blue: #8BA7C2;
    --silver-mist: #C8D8E4;
    --deep-current: #4A6B8A;
    --abyssal-teal: #1A3A4A;
    --phosphor-white: #E0F7FA;
    --void-black: #020508;
    --mid-deep: #081428;
}

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

html {
    scroll-behavior: smooth;
    scroll-snap-type: y proximity;
}

body {
    font-family: 'Inter', sans-serif;
    font-weight: 300;
    font-size: 1.125rem;
    line-height: 1.85;
    color: var(--steel-blue);
    background: linear-gradient(
        180deg,
        var(--abyssal-navy) 0%,
        var(--mid-deep) 40%,
        var(--hadal-black) 70%,
        var(--void-black) 100%
    );
    background-attachment: fixed;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* ============================
   SVG Filters (hidden)
   ============================ */

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

/* ============================
   Noise Texture Overlays
   ============================ */

.noise-layer {
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    pointer-events: none;
    z-index: 1000;
    will-change: transform;
}

.noise-layer--fine {
    filter: url(#noise-fine);
    opacity: 0.03;
}

.noise-layer--coarse {
    filter: url(#noise-coarse);
    opacity: 0.02;
}

/* ============================
   Depth Indicator
   ============================ */

.depth-indicator {
    position: fixed;
    left: 2rem;
    top: 10vh;
    height: 80vh;
    width: 1px;
    z-index: 500;
}

.depth-indicator__track {
    position: absolute;
    top: 0;
    left: 0;
    width: 1px;
    height: 100%;
    background: var(--deep-current);
    opacity: 0.4;
}

.depth-indicator__fill {
    position: absolute;
    top: 0;
    left: 0;
    width: 1px;
    height: 0%;
    background: var(--bioluminescent-cyan);
    transition: height 0.4s ease-out;
    opacity: 0.7;
}

.depth-indicator__tick {
    position: absolute;
    left: 0;
    transform: translateY(-50%);
}

.depth-indicator__tick::before {
    content: '';
    display: block;
    width: 8px;
    height: 1px;
    background: var(--deep-current);
    position: absolute;
    left: -3px;
    top: 50%;
    opacity: 0.5;
}

.depth-indicator__label {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 400;
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--deep-current);
    white-space: nowrap;
    transition: color 0.5s ease, opacity 0.5s ease;
    opacity: 0.5;
}

.depth-indicator__label.active {
    color: var(--bioluminescent-cyan);
    opacity: 1;
}

/* ============================
   Main + Zones Base
   ============================ */

main {
    position: relative;
    width: 100%;
    z-index: 10;
}

.zone {
    position: relative;
    width: 100%;
    overflow: hidden;
    scroll-snap-align: start;
}

/* ============================
   Typography
   ============================ */

h1, h2, h3 {
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    line-height: 1.2;
}

h2 {
    font-size: clamp(1.4rem, 2.5vw, 2rem);
    color: var(--bioluminescent-cyan);
    margin-bottom: 1.5rem;
}

p {
    max-width: 62ch;
    color: var(--steel-blue);
}

/* ============================
   Content Blocks + Zoom Focus
   ============================ */

.content-block {
    max-width: 720px;
    position: relative;
    z-index: 20;
}

.content-block.zoom-focus {
    opacity: 0;
    transform: scale(0.85);
    transition: opacity 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                transform 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.content-block.zoom-focus.revealed {
    opacity: 1;
    transform: scale(1);
}

/* ============================
   Surface Zone
   ============================ */

.zone--surface {
    height: 100vh;
    min-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4rem 4rem 4rem 8rem;
}

.surface__shimmer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(ellipse 120% 60% at 50% 0%, rgba(127, 219, 218, 0.04) 0%, transparent 70%),
        radial-gradient(ellipse 80% 40% at 30% 10%, rgba(200, 216, 228, 0.03) 0%, transparent 60%),
        radial-gradient(ellipse 60% 30% at 70% 5%, rgba(127, 219, 218, 0.02) 0%, transparent 50%);
    animation: shimmer-drift 20s ease-in-out infinite alternate;
    pointer-events: none;
}

@keyframes shimmer-drift {
    0% { transform: translateY(0) scale(1); opacity: 1; }
    100% { transform: translateY(15px) scale(1.02); opacity: 0.7; }
}

.surface__content {
    text-align: center;
    position: relative;
    z-index: 20;
}

.surface__title {
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 600;
    font-size: clamp(2.4rem, 6vw, 4.8rem);
    color: var(--silver-mist);
    text-transform: uppercase;
    letter-spacing: 0.35em;
    line-height: 1.15;
    margin-bottom: 2rem;
    animation: title-emerge 2.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;
}

.surface__title-dot {
    color: var(--bioluminescent-cyan);
}

@keyframes title-emerge {
    0% { opacity: 0; transform: translateY(20px); letter-spacing: 0.5em; }
    100% { opacity: 1; transform: translateY(0); letter-spacing: 0.35em; }
}

.surface__tagline {
    font-size: 1.125rem;
    color: var(--steel-blue);
    max-width: 40ch;
    margin: 0 auto 4rem;
    opacity: 0;
    animation: tagline-fade 2s ease-out 1.5s both;
}

@keyframes tagline-fade {
    0% { opacity: 0; transform: translateY(10px); }
    100% { opacity: 0.8; transform: translateY(0); }
}

.surface__chevron {
    display: flex;
    justify-content: center;
    animation: chevron-pulse 3s ease-in-out infinite;
    cursor: pointer;
}

.surface__chevron svg {
    opacity: 0.5;
}

@keyframes chevron-pulse {
    0%, 100% { transform: translateY(0); opacity: 0.3; }
    50% { transform: translateY(8px); opacity: 0.8; }
}

/* ============================
   Twilight Zone
   ============================ */

.zone--twilight {
    min-height: 150vh;
    padding: 10vh 4rem 10vh 8rem;
}

.twilight__columns {
    display: flex;
    gap: 4rem;
    width: 100%;
    max-width: 1100px;
}

.twilight__text-column {
    flex: 0 0 55%;
    display: flex;
    flex-direction: column;
    gap: 20vh;
    padding: 10vh 0;
}

.twilight__particle-column {
    flex: 1;
    position: relative;
    min-height: 100%;
}

/* Particles - Marine Snow */

.particle-field {
    position: sticky;
    top: 20vh;
    height: 60vh;
    width: 100%;
}

.particle {
    position: absolute;
    left: var(--x);
    top: var(--y);
    width: var(--size);
    height: var(--size);
    background: var(--silver-mist);
    border-radius: 50%;
    opacity: var(--opacity);
    animation: particle-rise var(--duration) linear var(--delay) infinite;
}

@keyframes particle-rise {
    0% { transform: translateY(0); opacity: var(--opacity); }
    80% { opacity: var(--opacity); }
    100% { transform: translateY(-60vh); opacity: 0; }
}

/* ============================
   Midnight Zone
   ============================ */

.zone--midnight {
    min-height: 150vh;
    padding: 10vh 4rem 10vh 8rem;
    display: flex;
    align-items: flex-start;
    justify-content: center;
}

.midnight__content {
    max-width: 680px;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 40vh;
    padding: 10vh 0;
    position: relative;
    z-index: 20;
}

/* Star Constellations */

.midnight__constellation {
    position: absolute;
    pointer-events: none;
    z-index: 5;
}

.midnight__constellation--1 {
    right: 8%;
    top: 15%;
    width: 70px;
    height: 60px;
}

.midnight__constellation--2 {
    left: 5%;
    top: 45%;
    width: 50px;
    height: 55px;
}

.midnight__constellation--3 {
    right: 12%;
    top: 60%;
    width: 65px;
    height: 70px;
}

.midnight__constellation--4 {
    left: 15%;
    top: 80%;
    width: 45px;
    height: 40px;
}

.star {
    position: absolute;
    width: var(--size);
    height: var(--size);
    background: var(--bioluminescent-cyan);
    border-radius: 50%;
    opacity: var(--opacity);
    animation: star-twinkle 8s ease-in-out infinite;
}

.star:nth-child(odd) {
    animation-delay: -3s;
}

.star:nth-child(3n) {
    animation-delay: -6s;
}

@keyframes star-twinkle {
    0%, 100% { opacity: var(--opacity); }
    50% { opacity: calc(var(--opacity) * 0.4); }
}

/* ============================
   Abyss Zone
   ============================ */

.zone--abyss {
    min-height: 150vh;
    padding: 20vh 4rem 20vh 8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.abyss__content {
    position: relative;
    z-index: 30;
    max-width: 680px;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 30vh;
    padding: 5vh 0;
}

.abyss-text h2 {
    color: var(--bioluminescent-cyan);
    text-shadow: 0 0 30px rgba(127, 219, 218, 0.3);
}

.abyss-text p {
    color: var(--steel-blue);
    text-shadow: 0 0 15px rgba(127, 219, 218, 0.08);
}

/* The Monopole */

.monopole {
    position: fixed;
    top: 50%;
    left: 50%;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: radial-gradient(
        circle at 40% 40%,
        var(--bioluminescent-cyan) 0%,
        rgba(127, 219, 218, 0.4) 25%,
        rgba(127, 219, 218, 0.1) 50%,
        transparent 70%
    );
    box-shadow:
        0 0 60px 20px rgba(127, 219, 218, 0.08),
        0 0 120px 40px rgba(127, 219, 218, 0.04),
        0 0 200px 80px rgba(127, 219, 218, 0.02);
    transform: translate(-50%, -50%) scale(0.98);
    animation: monopole-breathe 50s ease-in-out infinite;
    z-index: 15;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.8s ease;
    will-change: transform, width, height;
}

.monopole.visible {
    opacity: 1;
}

@keyframes monopole-breathe {
    0%, 100% { transform: translate(-50%, -50%) scale(var(--monopole-scale, 1)); }
    25% { transform: translate(-50%, -50%) scale(calc(var(--monopole-scale, 1) * 1.02)); }
    50% { transform: translate(-50%, -50%) scale(var(--monopole-scale, 1)); }
    75% { transform: translate(-50%, -50%) scale(calc(var(--monopole-scale, 1) * 0.98)); }
}

/* ============================
   Hadal Zone
   ============================ */

.zone--hadal {
    min-height: 100vh;
    padding: 10vh 4rem 10vh 8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    position: relative;
}

.hadal__void {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 40%;
    background: linear-gradient(180deg, transparent 0%, #000000 100%);
    pointer-events: none;
    z-index: 5;
}

.hadal__content {
    position: relative;
    z-index: 30;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 15vh;
    align-items: center;
}

.final-text p {
    max-width: 45ch;
    text-align: center;
}

.hadal__final {
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 600;
    font-size: clamp(1.4rem, 2.5vw, 2rem);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--phosphor-white);
    text-shadow: 0 0 40px rgba(224, 247, 250, 0.2);
    line-height: 1.4;
}

.hadal__coda {
    font-size: 1rem;
    color: var(--steel-blue);
    opacity: 0.7;
    font-style: italic;
}

/* ============================
   Responsive
   ============================ */

@media (max-width: 900px) {
    .zone--surface,
    .zone--twilight,
    .zone--midnight,
    .zone--abyss,
    .zone--hadal {
        padding-left: 5rem;
        padding-right: 2rem;
    }

    .twilight__columns {
        flex-direction: column;
    }

    .twilight__text-column {
        flex: none;
        width: 100%;
    }

    .twilight__particle-column {
        display: none;
    }
}

@media (max-width: 600px) {
    .depth-indicator {
        left: 1rem;
    }

    .zone--surface,
    .zone--twilight,
    .zone--midnight,
    .zone--abyss,
    .zone--hadal {
        padding-left: 3.5rem;
        padding-right: 1rem;
    }

    .depth-indicator__label {
        font-size: 0.65rem;
    }

    .surface__title {
        font-size: clamp(1.8rem, 8vw, 3rem);
        letter-spacing: 0.2em;
    }

    .midnight__constellation {
        display: none;
    }
}
