/* ============================================
   bada.cafe — Ocean Depth Descent
   Seapunk + watercolor, zen-contemplative
   ============================================ */

:root {
    --pale-aquamarine: #b5ece2;
    --warm-sand-gold: #e8d5a3;
    --soft-cerulean: #7ec8e3;
    --deep-teal: #1a6b6a;
    --phosphor-green: #7ee8c7;
    --abyssal-navy: #0a1628;
    --electric-cyan: #4fd1c5;
    --true-deep: #020408;
    --ghost-white: #e0e8ef;
    --indigo-black: #06060f;
    --bio-amber: #d4a853;

    --font-display: 'Nanum Myeongjo', serif;
    --font-body: 'Karla', sans-serif;
    --font-accent: 'Gowun Batang', serif;
    --font-mono: 'IBM Plex Mono', monospace;

    --water-ease: cubic-bezier(0.25, 0.1, 0.25, 1.0);
    --fade-ease: cubic-bezier(0.4, 0.0, 0.2, 1.0);
}

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

html {
    scroll-behavior: smooth;
}

body {
    background: var(--pale-aquamarine);
    color: var(--ghost-white);
    font-family: var(--font-body);
    font-size: 17px;
    font-weight: 300;
    line-height: 1.85;
    overflow-x: hidden;
    transition: background-color 0.3s var(--fade-ease);
}

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

.depth-indicator {
    position: fixed;
    right: 24px;
    top: 10vh;
    bottom: 10vh;
    width: 2px;
    z-index: 100;
    pointer-events: none;
}

.depth-line {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: 1px;
    background: rgba(126, 232, 199, 0.3);
}

.depth-marker {
    position: absolute;
    top: 0;
    left: -4px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--phosphor-green);
    opacity: 0.6;
    transition: top 0.2s var(--water-ease);
}

.depth-label {
    position: absolute;
    right: 18px;
    top: -4px;
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 300;
    letter-spacing: 0.05em;
    color: rgba(126, 232, 199, 0.4);
    white-space: nowrap;
}

/* ============================================
   Particle Canvas
   ============================================ */

#particleCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 50;
}

/* ============================================
   Zones (common)
   ============================================ */

.zone {
    min-height: 100vh;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* ============================================
   Zone 1: Epipelagic
   ============================================ */

.zone-epipelagic {
    background: linear-gradient(180deg, var(--soft-cerulean) 0%, var(--pale-aquamarine) 100%);
}

.caustic-overlay {
    position: absolute;
    inset: 0;
    mix-blend-mode: screen;
    opacity: 0.08;
    pointer-events: none;
}

.epipelagic-content {
    text-align: center;
    z-index: 10;
    position: relative;
}

.domain-title {
    font-family: var(--font-display);
    font-size: clamp(48px, 10vw, 120px);
    font-weight: 400;
    letter-spacing: 0.08em;
    color: rgba(255, 255, 255, 0.85);
    text-shadow: 0 2px 40px rgba(181, 236, 226, 0.3);
}

.hangul-drift {
    font-family: var(--font-display);
    font-size: clamp(36px, 6vw, 72px);
    color: rgba(232, 213, 163, 0.6);
    margin-top: 2rem;
    animation: hangulDrift 8s ease-in-out infinite;
}

@keyframes hangulDrift {
    0%, 100% { transform: translateY(0); opacity: 0.6; }
    50% { transform: translateY(20px); opacity: 0.4; }
}

/* ============================================
   Zone 2: Mesopelagic
   ============================================ */

.zone-mesopelagic {
    background: linear-gradient(180deg, var(--deep-teal) 0%, #0f3d3c 100%);
    position: relative;
}

.wave-pattern {
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='40'%3E%3Cpath d='M0 20 Q25 5 50 20 Q75 35 100 20 Q125 5 150 20 Q175 35 200 20' fill='none' stroke='rgba(126,232,199,0.06)' stroke-width='1'/%3E%3C/svg%3E");
    background-size: 200px 40px;
    opacity: 0.5;
    pointer-events: none;
}

.meso-text-cluster {
    position: absolute;
    max-width: 380px;
    animation: mesoDrift 6s ease-in-out infinite;
}

.meso-text-cluster:nth-child(3) {
    animation-delay: -2s;
    animation-duration: 7s;
}

.meso-text-cluster:nth-child(4) {
    animation-delay: -4s;
    animation-duration: 8s;
}

@keyframes mesoDrift {
    0%, 100% { transform: translate(0, 0); }
    25% { transform: translate(8px, -5px); }
    50% { transform: translate(-5px, 8px); }
    75% { transform: translate(5px, 5px); }
}

.meso-text {
    font-family: var(--font-body);
    font-size: 17px;
    font-weight: 300;
    line-height: 1.85;
    color: rgba(126, 232, 199, 0.75);
    text-shadow: 0 0 20px rgba(126, 232, 199, 0.15);
}

/* ============================================
   Zone 3: Bathypelagic
   ============================================ */

.zone-bathypelagic {
    background: var(--abyssal-navy);
    position: relative;
}

.porthole {
    width: 60vmin;
    height: 60vmin;
    border-radius: 50%;
    background: rgba(6, 13, 26, 0.9);
    box-shadow: inset 0 0 60px rgba(0, 0, 0, 0.8), 0 0 80px rgba(79, 209, 197, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 10;
    border: 1px solid rgba(126, 232, 199, 0.15);
}

.porthole-content {
    max-width: 480px;
    padding: 3rem;
    text-align: center;
}

.bathy-text {
    font-family: var(--font-body);
    font-size: 16px;
    font-weight: 300;
    line-height: 1.85;
    color: rgba(126, 232, 199, 0.6);
    margin-bottom: 1.5rem;
    animation: breatheGlow 4s ease-in-out infinite;
}

.bathy-text:last-child {
    margin-bottom: 0;
    animation-delay: -2s;
}

@keyframes breatheGlow {
    0%, 100% { text-shadow: 0 0 10px rgba(126, 232, 199, 0.1); opacity: 0.6; }
    50% { text-shadow: 0 0 20px rgba(126, 232, 199, 0.2); opacity: 0.8; }
}

.pressure-lines {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 1;
}

.pressure-line {
    position: absolute;
    left: 0;
    width: 100%;
    height: 1px;
    background: rgba(126, 232, 199, 0.15);
}

/* ============================================
   Zone 4: Abyssopelagic
   ============================================ */

.zone-abyss {
    background: var(--true-deep);
}

.abyss-content {
    text-align: center;
    max-width: 600px;
    padding: 2rem;
}

.abyss-haiku {
    font-family: var(--font-accent);
    font-size: 24px;
    line-height: 2.0;
    color: var(--ghost-white);
}

.haiku-line {
    display: block;
    opacity: 0;
}

.haiku-line.visible {
    animation: haikuFadeIn 2s var(--fade-ease) forwards;
}

@keyframes haikuFadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 0.7; transform: translateY(0); }
}

/* ============================================
   Zone 5: Hadopelagic
   ============================================ */

.zone-hadal {
    background: linear-gradient(180deg, var(--indigo-black) 0%, #000000 100%);
}

.hadal-content {
    text-align: center;
    z-index: 10;
}

.anglerfish {
    width: 300px;
    max-width: 80vw;
    height: auto;
    margin-bottom: 3rem;
    opacity: 0.8;
}

.lure-glow {
    animation: lureGlow 3s ease-in-out infinite;
}

@keyframes lureGlow {
    0%, 100% { opacity: 0.4; r: 6; }
    50% { opacity: 1; r: 9; }
}

.hadal-domain {
    font-family: var(--font-display);
    font-size: clamp(24px, 4vw, 48px);
    font-weight: 400;
    letter-spacing: 0.08em;
    color: rgba(224, 232, 239, 0.12);
}

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

@media (max-width: 768px) {
    .depth-indicator {
        right: 8px;
    }

    .depth-label {
        display: none;
    }

    .meso-text-cluster {
        position: relative;
        left: auto !important;
        top: auto !important;
        max-width: 100%;
        padding: 1.5rem;
    }

    .zone-mesopelagic {
        flex-direction: column;
        justify-content: flex-start;
        padding-top: 3rem;
    }

    .porthole {
        width: 90vw;
        height: auto;
        border-radius: 24px;
        aspect-ratio: auto;
    }

    .porthole-content {
        padding: 2rem;
    }

    .anglerfish {
        width: 200px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .hangul-drift,
    .meso-text-cluster,
    .bathy-text {
        animation: none;
    }

    .hangul-drift {
        opacity: 0.6;
    }

    .bathy-text {
        opacity: 0.7;
    }

    .lure-glow {
        animation: none;
        opacity: 0.7;
    }

    .haiku-line {
        opacity: 0.7;
    }
}
