/* ============================================
   gabs.cx - Ocean-Deep Mid-Century Design
   ============================================ */

:root {
    --abyss-bg: #0a0e1a;
    --trench-bg: #111b2e;
    --bio-teal: #0d8a8a;
    --meso-blue: #1a4b6e;
    --copper: #b87333;
    --foam-text: #d4e4e8;
    --mist-text: #7a9aad;
    --phosphor: #2dd4a8;
}

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

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--abyss-bg);
    color: var(--foam-text);
    font-family: 'Commissioner', sans-serif;
    font-weight: 300;
    font-size: clamp(1rem, 1.15vw, 1.25rem);
    line-height: 1.7;
    overflow-x: hidden;
}

/* ============================================
   VERTICAL NAVIGATION (Depth Gauge)
   ============================================ */

.depth-nav {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: 50px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 28px;
    z-index: 100;
    padding: 20px 0;
}

.nav-line {
    width: 1px;
    flex: 1;
    background: linear-gradient(to bottom, transparent, var(--meso-blue), transparent);
    opacity: 0.3;
}

.nav-indicator {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.nav-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 1.5px solid var(--meso-blue);
    background: transparent;
    transition: background-color 0.6s ease, border-color 0.6s ease, box-shadow 0.6s ease;
}

.nav-indicator.active .nav-dot {
    background: var(--bio-teal);
    border-color: var(--bio-teal);
    box-shadow: 0 0 12px rgba(13, 138, 138, 0.6);
}

.nav-label {
    position: absolute;
    left: 22px;
    font-family: 'DM Mono', monospace;
    font-size: 0.6rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--mist-text);
    opacity: 0;
    transform: translateX(-5px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    white-space: nowrap;
}

.nav-indicator:hover .nav-label {
    opacity: 0.7;
    transform: translateX(0);
}

/* ============================================
   PARTICLE CONTAINER
   ============================================ */

.particle-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 50;
    overflow: hidden;
}

.particle {
    position: absolute;
    border-radius: 50%;
    background: var(--foam-text);
    pointer-events: none;
}

/* ============================================
   BLOB LAYERS
   ============================================ */

.blob-layer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
}

.blob {
    position: absolute;
    pointer-events: none;
}

.blob-1 {
    width: 60vw;
    max-width: 700px;
    top: -10%;
    left: -10%;
    opacity: 0.2;
}

.blob-morph-1 {
    fill: var(--bio-teal);
}

.blob-2 {
    width: 45vw;
    max-width: 550px;
    top: 20%;
    right: -15%;
    opacity: 0.15;
}

.blob-morph-2 {
    fill: var(--meso-blue);
}

.blob-section {
    position: absolute;
    pointer-events: none;
}

.blob-meso-1 {
    width: 50vw;
    max-width: 600px;
    top: 10%;
    right: -5%;
    opacity: 0.12;
}

.blob-morph-3 {
    fill: var(--bio-teal);
}

.blob-bathy-main {
    width: 55vw;
    max-width: 650px;
    top: 5%;
    left: -10%;
    opacity: 0.08;
}

.blob-morph-4 {
    fill: var(--phosphor);
}

.blob-abyss-main {
    width: 90vw;
    max-width: 1000px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0.03;
}

.blob-morph-5 {
    fill: var(--bio-teal);
}

/* ============================================
   ZONES (Sections)
   ============================================ */

.zone {
    position: relative;
    overflow: hidden;
}

.zone-epipelagic {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.zone-mesopelagic {
    min-height: 150vh;
    padding: 10vh 0;
}

.zone-bathypelagic {
    min-height: 150vh;
    padding: 10vh 0;
}

.zone-abyssopelagic {
    min-height: 150vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

/* ============================================
   ZONE GLOWS (Radial light pools)
   ============================================ */

.zone-glow {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

.zone-glow-surface {
    background: radial-gradient(ellipse at 30% 40%, rgba(13, 138, 138, 0.12) 0%, transparent 60%);
}

.zone-glow-twilight {
    background: radial-gradient(ellipse at 70% 30%, rgba(13, 138, 138, 0.06) 0%, transparent 50%),
                radial-gradient(ellipse at 20% 70%, rgba(26, 75, 110, 0.08) 0%, transparent 50%);
}

.zone-glow-midnight {
    background: radial-gradient(ellipse at 40% 50%, rgba(13, 138, 138, 0.04) 0%, transparent 50%);
}

/* ============================================
   HERO (Epipelagic Zone)
   ============================================ */

.hero-content {
    position: relative;
    z-index: 10;
    padding-left: 60%;
    padding-right: 5%;
    opacity: 0;
    transform: translateY(30px);
    animation: heroFadeIn 2s ease-out 0.3s forwards;
}

@keyframes heroFadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-title {
    font-family: 'Commissioner', sans-serif;
    font-weight: 100;
    font-size: clamp(5rem, 12vw, 10rem);
    line-height: 0.95;
    letter-spacing: -0.03em;
    color: var(--foam-text);
    margin-bottom: 1.5rem;
}

.depth-reading {
    font-family: 'DM Mono', monospace;
    font-weight: 400;
    font-size: clamp(0.7rem, 0.85vw, 0.85rem);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--mist-text);
    opacity: 0.7;
}

/* ============================================
   BATHYMETRIC LINES
   ============================================ */

.bathymetric-lines {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

.bathymetric-draw {
    width: 100%;
    height: 200px;
    margin: 8vh 0;
    position: relative;
    z-index: 2;
}

.bathy-path {
    stroke-dasharray: 2000;
    stroke-dashoffset: 2000;
    transition: stroke-dashoffset 2.5s ease-out;
}

.bathy-path.drawn {
    stroke-dashoffset: 0;
}

/* ============================================
   GEOMETRIC ACCENTS
   ============================================ */

.geo-accent {
    position: absolute;
    pointer-events: none;
    z-index: 5;
    opacity: 0.5;
}

.geo-starburst {
    width: 60px;
    height: 60px;
    bottom: 15%;
    left: 12%;
}

.geo-sonar {
    width: 100px;
    height: 100px;
    top: 8%;
    right: 8%;
}

.geo-diagonal {
    width: 120px;
    height: 120px;
    bottom: 20%;
    right: 15%;
}

/* ============================================
   GLASS CARDS (Mesopelagic Content)
   ============================================ */

.content-grid {
    position: relative;
    z-index: 10;
    padding: 5vh 80px 5vh 80px;
    max-width: 1200px;
    margin: 0 auto;
}

.glass-card {
    background: rgba(17, 27, 46, 0.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(13, 138, 138, 0.15);
    border-radius: 2px;
    padding: 3rem 2.5rem;
    margin-bottom: 6vh;
    max-width: 600px;
    position: relative;
}

.glass-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(ellipse at 30% 40%, rgba(13, 138, 138, 0.04) 0%, transparent 60%);
    pointer-events: none;
}

.card-offset-right {
    margin-left: auto;
    margin-right: 5%;
    transform: rotate(2deg);
}

.card-offset-left {
    margin-left: 5%;
    margin-right: auto;
    transform: rotate(-3deg);
}

.card-offset-center {
    margin-left: 25%;
    transform: rotate(1.5deg);
}

.card-heading {
    font-family: 'Commissioner', sans-serif;
    font-weight: 700;
    font-size: clamp(1.3rem, 2.5vw, 1.8rem);
    line-height: 0.95;
    letter-spacing: -0.03em;
    color: var(--foam-text);
    margin-bottom: 1.2rem;
}

.card-body {
    font-family: 'Commissioner', sans-serif;
    font-weight: 300;
    font-size: clamp(0.9rem, 1.1vw, 1.1rem);
    line-height: 1.7;
    color: var(--foam-text);
    max-width: 38em;
    margin-bottom: 1.5rem;
    opacity: 0.9;
}

.card-annotation {
    font-family: 'DM Mono', monospace;
    font-weight: 400;
    font-size: clamp(0.65rem, 0.75vw, 0.8rem);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--mist-text);
    opacity: 0.7;
}

/* ============================================
   ZOOM-FOCUS ANIMATIONS
   ============================================ */

.zoom-focus {
    opacity: 0;
    transform: scale(0.92);
    filter: blur(4px);
    transition: opacity 0.5s ease-out, transform 0.5s ease-out, filter 0.5s ease-out;
}

.zoom-focus.visible {
    opacity: 1;
    transform: scale(1) rotate(0deg);
    filter: blur(0);
}

.card-offset-right.zoom-focus.visible {
    transform: scale(1) rotate(2deg);
}

.card-offset-left.zoom-focus.visible {
    transform: scale(1) rotate(-3deg);
}

.card-offset-center.zoom-focus.visible {
    transform: scale(1) rotate(1.5deg);
}

.zoom-focus-slow {
    opacity: 0;
    transform: scale(0.92);
    filter: blur(4px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out, filter 0.8s ease-out;
}

.zoom-focus-slow.visible {
    opacity: 1;
    transform: scale(1);
    filter: blur(0);
}

/* ============================================
   PULL QUOTE (Bathypelagic Zone)
   ============================================ */

.pull-quote {
    position: relative;
    z-index: 10;
    padding-left: calc(25% + 80px);
    padding-right: 15%;
    margin: 15vh 0;
}

.pull-quote-border {
    position: absolute;
    left: calc(25% + 60px);
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--copper);
    opacity: 0.7;
}

.pull-quote-text {
    font-family: 'Commissioner', sans-serif;
    font-weight: 100;
    font-size: clamp(2rem, 4vw, 4rem);
    line-height: 1.25;
    color: var(--foam-text);
    margin-bottom: 1.5rem;
    opacity: 0.9;
}

.pull-quote-depth {
    display: block;
    margin-top: 1.5rem;
}

/* ============================================
   MIDNIGHT CONTENT
   ============================================ */

.midnight-content {
    position: relative;
    z-index: 10;
    padding: 5vh 80px;
    max-width: 1200px;
    margin: 0 auto;
}

.card-midnight {
    max-width: 550px;
    margin-left: 15%;
    transform: rotate(-1.5deg);
}

.card-midnight.zoom-focus-slow.visible {
    transform: scale(1) rotate(-1.5deg);
}

/* ============================================
   ABYSS CONTENT (Final Zone)
   ============================================ */

.abyss-content {
    position: relative;
    z-index: 10;
    text-align: center;
    padding: 0 10%;
}

.abyss-heading {
    font-family: 'Commissioner', sans-serif;
    font-weight: 700;
    font-size: clamp(2rem, 5vw, 3rem);
    line-height: 1.1;
    letter-spacing: -0.03em;
    color: var(--bio-teal);
    margin-bottom: 2rem;
}

.abyss-depth {
    display: block;
}

/* ============================================
   ABYSS FADE OVERLAY
   ============================================ */

.abyss-fade {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 50vh;
    background: linear-gradient(to bottom, transparent, var(--abyss-bg));
    opacity: 0;
    transition: opacity 1s ease;
    pointer-events: none;
    z-index: 20;
}

.abyss-fade.active {
    opacity: 0.8;
}

/* ============================================
   REDUCED MOTION
   ============================================ */

@media (prefers-reduced-motion: reduce) {
    .blob animate {
        animation: none;
    }

    .particle {
        animation: none !important;
    }

    .zoom-focus,
    .zoom-focus-slow {
        opacity: 1;
        transform: none;
        filter: none;
        transition: none;
    }

    .hero-content {
        opacity: 1;
        transform: none;
        animation: none;
    }

    .bathy-path {
        stroke-dasharray: none;
        stroke-dashoffset: 0;
    }
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
    .hero-content {
        padding-left: 15%;
        padding-right: 10%;
    }

    .content-grid {
        padding: 5vh 20px 5vh 60px;
    }

    .glass-card {
        max-width: 100%;
        padding: 2rem 1.5rem;
    }

    .card-offset-right,
    .card-offset-left,
    .card-offset-center {
        margin-left: 0;
        margin-right: 0;
        transform: none;
    }

    .card-offset-right.zoom-focus.visible,
    .card-offset-left.zoom-focus.visible,
    .card-offset-center.zoom-focus.visible {
        transform: scale(1);
    }

    .pull-quote {
        padding-left: 80px;
        padding-right: 10%;
    }

    .pull-quote-border {
        left: 60px;
    }

    .midnight-content {
        padding: 5vh 20px 5vh 60px;
    }

    .card-midnight {
        margin-left: 0;
        max-width: 100%;
        transform: none;
    }

    .card-midnight.zoom-focus-slow.visible {
        transform: scale(1);
    }

    .depth-nav {
        width: 35px;
    }

    .nav-label {
        display: none;
    }

    .geo-starburst {
        width: 40px;
        height: 40px;
    }

    .geo-sonar {
        width: 60px;
        height: 60px;
    }
}
