/* ggaji.com - Deep Ocean Frutiger Aero */
/* Fonts: Nunito Sans, DM Sans, IBM Plex Mono */

:root {
    --abyssal: #0a2540;
    --midnight: #0d3055;
    --phosphor: #143d66;
    --pearl: #e0f0f8;
    --silver-kelp: #8ab0c4;
    --pale-silver: #c8dbe5;
    --bio-teal: #00d4aa;
    --hydro-gold: #c49a5c;
    --volcanic: #8b5e3c;
    --muted-teal: #5a8a9e;
    --mono-blue: #7ab8c8;
    --border-glow: rgba(224, 240, 248, 0.08);
    --content-max: min(640px, 55vw);
    --section-gap: clamp(15vh, 20vw, 30vh);
}

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

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    font-family: 'Nunito Sans', sans-serif;
    font-weight: 300;
    font-size: clamp(1rem, 1.1vw, 1.15rem);
    line-height: 1.85;
    letter-spacing: 0.015em;
    color: var(--pale-silver);
    background: var(--abyssal);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* ===== DEPTH OVERLAY ===== */
.depth-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, var(--abyssal) 0%, var(--midnight) 40%, var(--phosphor) 100%);
    z-index: -10;
    transition: opacity 0.3s ease;
}

/* ===== JELLYFISH SPHERES ===== */
.jellyfish-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
}

.jellyfish {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(ellipse at 35% 30%, rgba(0, 212, 170, 0.15), transparent 60%);
    box-shadow:
        inset 0 0 60px rgba(0, 212, 170, 0.05),
        0 0 80px rgba(0, 212, 170, 0.08),
        0 0 160px rgba(0, 212, 170, 0.03);
    will-change: transform, opacity;
}

.jellyfish-1 {
    width: 280px;
    height: 280px;
    top: 15%;
    left: 70%;
    opacity: 0.6;
    animation: jellyDrift1 65s ease-in-out infinite;
}

.jellyfish-2 {
    width: 180px;
    height: 180px;
    top: 55%;
    left: 10%;
    opacity: 0.4;
    animation: jellyDrift2 80s ease-in-out infinite;
}

.jellyfish-3 {
    width: 220px;
    height: 220px;
    top: 80%;
    left: 50%;
    opacity: 0.35;
    animation: jellyDrift3 90s ease-in-out infinite;
}

@keyframes jellyDrift1 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(-80px, 40px) scale(1.05); }
    50% { transform: translate(-40px, -60px) scale(0.95); }
    75% { transform: translate(60px, -20px) scale(1.02); }
}

@keyframes jellyDrift2 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(60px, -50px) scale(0.97); }
    50% { transform: translate(100px, 30px) scale(1.04); }
    75% { transform: translate(30px, 60px) scale(0.98); }
}

@keyframes jellyDrift3 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(-70px, -40px) scale(1.03); }
    66% { transform: translate(50px, 50px) scale(0.96); }
}

/* ===== PARTICLE FIELD ===== */
.particle-field {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 2;
    overflow: hidden;
}

.particle {
    position: absolute;
    border-radius: 50%;
    background: var(--bio-teal);
    will-change: opacity;
}

@keyframes particlePulse {
    0%, 100% { opacity: var(--p-opacity-min, 0.15); }
    50% { opacity: var(--p-opacity-max, 0.4); }
}

/* ===== CURRENT LINES ===== */
.current-lines {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.current-svg {
    position: absolute;
    width: 100%;
    height: 60px;
}

.current-1 { top: 25%; }
.current-2 { top: 55%; }
.current-3 { top: 78%; }

.current-path {
    fill: none;
    stroke: var(--silver-kelp);
    stroke-width: 0.5;
    opacity: 0.15;
    stroke-dasharray: 1200;
    stroke-dashoffset: 1200;
    animation: currentFlow 30s linear infinite;
}

.current-2 .current-path {
    animation-delay: -10s;
    animation-duration: 35s;
}

.current-3 .current-path {
    animation-delay: -20s;
    animation-duration: 40s;
}

@keyframes currentFlow {
    0% { stroke-dashoffset: 1200; }
    100% { stroke-dashoffset: -1200; }
}

/* ===== DEPTH ZONES ===== */
.depth-zone {
    position: relative;
    z-index: 5;
    display: grid;
    grid-template-columns: 1fr var(--content-max) 1fr;
    min-height: 80vh;
    padding: 120px 0;
}

.opening-void {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.opening-void .zone-content {
    text-align: center;
    grid-column: 2;
}

.zone-content {
    grid-column: 2;
    max-width: var(--content-max);
    padding: 0 24px;
}

.zone-content--end {
    justify-self: end;
}

.zone-content--center {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.thermocline-1 {
    margin-top: var(--section-gap);
}

.thermocline-2 {
    margin-top: var(--section-gap);
}

.thermocline-3 {
    margin-top: var(--section-gap);
}

.benthic-floor {
    min-height: 100vh;
    margin-top: var(--section-gap);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

/* ===== TYPOGRAPHY ===== */
.hero-title {
    font-family: 'Nunito Sans', sans-serif;
    font-weight: 200;
    font-size: clamp(2.8rem, 6vw, 5.5rem);
    letter-spacing: 0.06em;
    color: var(--pearl);
    text-shadow: 0 0 40px rgba(120, 200, 230, 0.15);
    line-height: 1.1;
}

.section-title {
    font-family: 'Nunito Sans', sans-serif;
    font-weight: 200;
    font-size: clamp(1.8rem, 3.5vw, 3rem);
    letter-spacing: 0.04em;
    color: var(--pearl);
    text-shadow: 0 0 30px rgba(120, 200, 230, 0.1);
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.accent-label {
    font-family: 'DM Sans', sans-serif;
    font-weight: 500;
    font-size: 0.75rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--muted-teal);
    display: inline-block;
    margin-bottom: 2rem;
}

.body-text {
    font-family: 'Nunito Sans', sans-serif;
    font-weight: 300;
    color: var(--silver-kelp);
    max-width: 52ch;
    margin-bottom: 1.5rem;
}

.body-text:last-child {
    margin-bottom: 0;
}

.mono-text {
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 300;
    color: var(--mono-blue);
    font-size: 1rem;
    letter-spacing: 0.02em;
    margin-top: 2rem;
}

.mono-data {
    color: var(--bio-teal);
}

/* ===== GLASS PANELS ===== */
.glass-panel {
    background: rgba(20, 61, 102, 0.6);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-glow);
    border-radius: 16px;
    padding: clamp(2rem, 4vw, 3.5rem);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    transition: backdrop-filter 600ms ease, border-color 600ms ease, box-shadow 600ms ease;
}

.glass-panel:hover {
    backdrop-filter: blur(28px);
    -webkit-backdrop-filter: blur(28px);
    border-color: rgba(224, 240, 248, 0.15);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
}

/* ===== SONAR TYPEWRITER EFFECT ===== */
.sonar-type .sonar-char {
    opacity: 0;
    filter: blur(4px);
    transform: translateY(3px);
    display: inline-block;
    will-change: opacity, filter, transform;
    transition: opacity 0.08s ease forwards, filter 0.08s ease forwards, transform 0.08s ease forwards;
}

.sonar-type .sonar-char.revealed {
    opacity: 1;
    filter: blur(0);
    transform: translateY(0);
}

.sonar-type .sonar-space {
    display: inline;
    width: 0.3em;
}

/* ===== REVEAL ANIMATIONS ===== */
[data-reveal] {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 1.2s ease-out, transform 1.2s ease-out;
    will-change: opacity, transform;
}

[data-reveal].visible {
    opacity: 1;
    transform: translateY(0);
}

/* Staggered children */
.glass-panel[data-reveal].visible .section-title {
    transition-delay: 0ms;
}

.glass-panel[data-reveal].visible .body-text:nth-child(2) {
    opacity: 0;
    transform: translateY(15px);
    animation: revealChild 1.2s ease-out 150ms forwards;
}

.glass-panel[data-reveal].visible .body-text:nth-child(3) {
    opacity: 0;
    transform: translateY(15px);
    animation: revealChild 1.2s ease-out 300ms forwards;
}

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

/* ===== BENTHIC JELLYFISH ===== */
.benthic-jellyfish {
    width: 200px;
    height: 200px;
    position: relative;
    margin: 0 auto;
}

.benthic-jelly-inner {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: radial-gradient(ellipse at 35% 30%, rgba(0, 212, 170, 0.2), transparent 60%);
    box-shadow:
        inset 0 0 60px rgba(0, 212, 170, 0.08),
        0 0 80px rgba(0, 212, 170, 0.12),
        0 0 160px rgba(0, 212, 170, 0.05);
    animation: benthicPulse 6s ease-in-out infinite;
}

.benthic-jelly-glow {
    position: absolute;
    top: -30%;
    left: -30%;
    width: 160%;
    height: 160%;
    border-radius: 50%;
    background: radial-gradient(ellipse at center, rgba(0, 212, 170, 0.06) 0%, transparent 70%);
    animation: benthicGlow 8s ease-in-out infinite;
}

@keyframes benthicPulse {
    0%, 100% { transform: scale(1); opacity: 0.8; }
    50% { transform: scale(1.08); opacity: 1; }
}

@keyframes benthicGlow {
    0%, 100% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.15); opacity: 0.8; }
}

/* ===== HYDROTHERMAL VENT ===== */
.hydrothermal-vent {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 800px;
    height: 400px;
    background: radial-gradient(ellipse at 50% 100%, rgba(196, 154, 92, 0.1) 0%, rgba(196, 154, 92, 0.04) 40%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    :root {
        --content-max: min(640px, 85vw);
        --section-gap: clamp(8vh, 12vw, 18vh);
    }

    .depth-zone {
        padding: 60px 0;
        grid-template-columns: 1fr 85vw 1fr;
    }

    .jellyfish-1 { width: 168px; height: 168px; }
    .jellyfish-2 { width: 108px; height: 108px; }
    .jellyfish-3 { width: 132px; height: 132px; }

    .benthic-jellyfish {
        width: 140px;
        height: 140px;
    }

    .glass-panel {
        background: rgba(13, 48, 85, 0.92);
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
    }

    .glass-panel:hover {
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
    }

    .body-text {
        max-width: 100%;
    }
}
