/* ========================================
   bada.cafe -- Deep Ocean Descent
   Horizontal-scroll ocean depth narrative
   ======================================== */

/* Reset & Base */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    overflow: hidden;
    height: 100%;
}

body {
    height: 100%;
    overflow: hidden;
    background: #030712;
    color: #b2ebf2;
    font-family: 'Nunito Sans', sans-serif;
    font-weight: 400;
    font-size: clamp(15px, 1.4vw, 18px);
    line-height: 1.85;
    cursor: default;
}

/* ----------------------------------------
   Depth Gauge Navigation
   ---------------------------------------- */
#depth-gauge {
    position: fixed;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 100;
    height: 60vh;
    display: flex;
    align-items: center;
}

#depth-gauge-track {
    position: relative;
    width: 2px;
    height: 100%;
    background: rgba(0, 229, 255, 0.1);
    border-radius: 1px;
}

#depth-gauge-indicator {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 8px;
    height: 8px;
    background: #00e5ff;
    border-radius: 50%;
    transition: top 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    box-shadow: 0 0 12px rgba(0, 229, 255, 0.6), 0 0 24px rgba(0, 229, 255, 0.3);
}

.depth-marker {
    position: absolute;
    left: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    cursor: pointer;
    opacity: 0.4;
    transition: opacity 0.4s ease;
}

.depth-marker:hover {
    opacity: 1;
}

.depth-marker[data-zone="0"] { top: 0; }
.depth-marker[data-zone="1"] { top: 20%; }
.depth-marker[data-zone="2"] { top: 40%; }
.depth-marker[data-zone="3"] { top: 60%; }
.depth-marker[data-zone="4"] { top: 80%; }

.depth-marker.active {
    opacity: 1;
}

.depth-marker span {
    font-family: 'Josefin Sans', sans-serif;
    font-weight: 300;
    font-size: 11px;
    letter-spacing: 0.1em;
    color: #00e5ff;
    text-transform: uppercase;
}

.organism-icon {
    color: #00e5ff;
    opacity: 0.6;
}

/* ----------------------------------------
   Depth Counter
   ---------------------------------------- */
#depth-counter {
    position: fixed;
    bottom: 24px;
    right: 28px;
    z-index: 100;
    font-family: 'Josefin Sans', sans-serif;
    font-weight: 300;
    font-size: 13px;
    letter-spacing: 0.15em;
    color: rgba(0, 229, 255, 0.5);
}

#depth-value {
    font-variant-numeric: tabular-nums;
}

/* ----------------------------------------
   Horizontal Scroll Container
   ---------------------------------------- */
#ocean-scroll {
    display: flex;
    width: fit-content;
    height: 100vh;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    scrollbar-width: none;
}

#ocean-scroll::-webkit-scrollbar {
    display: none;
}

/* ----------------------------------------
   Ocean Zones (shared)
   ---------------------------------------- */
.ocean-zone {
    min-width: 100vw;
    height: 100vh;
    scroll-snap-align: start;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.zone-content {
    position: relative;
    z-index: 2;
    max-width: 900px;
    padding: 40px;
    display: flex;
    flex-direction: column;
    gap: 30px;
    align-items: center;
}

.zone-header {
    text-align: center;
    flex-shrink: 0;
}

.zone-heading {
    font-family: 'Outfit', sans-serif;
    font-weight: 300;
    font-size: clamp(20px, 3vw, 42px);
    letter-spacing: 0.08em;
    color: #b2ebf2;
    text-align: center;
}

.zone-depth-label {
    font-family: 'Josefin Sans', sans-serif;
    font-weight: 300;
    font-size: 13px;
    letter-spacing: 0.2em;
    color: rgba(0, 229, 255, 0.4);
    text-transform: uppercase;
    text-align: center;
    margin-top: 6px;
}

/* ----------------------------------------
   Zone 0: Opening / Surface
   ---------------------------------------- */
#zone-opening {
    background: #030712;
    justify-content: center;
    align-items: center;
}

#opening-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: radial-gradient(circle, #00e5ff 0%, rgba(0, 229, 255, 0.3) 40%, transparent 70%);
    opacity: 0;
    animation: glowAppear 0.8s 0.4s ease-out forwards,
               glowPulse1 0.6s 1.2s ease-in-out forwards,
               glowPulse2 0.6s 1.8s ease-in-out forwards,
               glowExpand 1.2s 2.4s ease-out forwards;
}

@keyframes glowAppear {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes glowPulse1 {
    0% { transform: translate(-50%, -50%) scale(1); }
    50% { transform: translate(-50%, -50%) scale(1.15); }
    100% { transform: translate(-50%, -50%) scale(1); }
}

@keyframes glowPulse2 {
    0% { transform: translate(-50%, -50%) scale(1); }
    50% { transform: translate(-50%, -50%) scale(1.15); }
    100% { transform: translate(-50%, -50%) scale(1); }
}

@keyframes glowExpand {
    from {
        width: 4px;
        height: 4px;
        opacity: 1;
    }
    to {
        width: 240px;
        height: 240px;
        opacity: 0.4;
    }
}

#logotype {
    position: relative;
    z-index: 2;
    font-family: 'Josefin Sans', sans-serif;
    font-weight: 100;
    font-size: clamp(28px, 5vw, 64px);
    letter-spacing: 1em;
    color: #b2ebf2;
    opacity: 0;
    animation: logotypeFadeIn 1s 3.6s ease-out forwards,
               logotypeTrack 1s 3.6s ease-out forwards;
    text-shadow: 0 0 40px rgba(0, 229, 255, 0.15);
}

@keyframes logotypeFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes logotypeTrack {
    from { letter-spacing: 1em; }
    to { letter-spacing: 0.35em; }
}

#opening-subtitle {
    position: relative;
    z-index: 2;
    font-family: 'Outfit', sans-serif;
    font-weight: 300;
    font-size: 16px;
    letter-spacing: 0.3em;
    color: rgba(0, 229, 255, 0.4);
    opacity: 0;
    animation: subtitleFade 1s 4.6s ease-out forwards;
    margin-top: 8px;
}

@keyframes subtitleFade {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

#scroll-hint {
    position: absolute;
    bottom: 60px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    opacity: 0;
    animation: hintFade 1.2s 5.5s ease-out forwards;
}

#scroll-hint span {
    font-family: 'Josefin Sans', sans-serif;
    font-weight: 300;
    font-size: 12px;
    letter-spacing: 0.25em;
    color: rgba(0, 229, 255, 0.35);
    text-transform: uppercase;
}

#scroll-hint svg {
    animation: hintWave 3s ease-in-out infinite;
}

@keyframes hintFade {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes hintWave {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(8px); }
}

/* ----------------------------------------
   Zone 1: Epipelagic
   ---------------------------------------- */
#zone-epipelagic {
    background: linear-gradient(to right, #0a3d5c, #0c1d36);
    min-width: 160vw;
}

.glass-panel {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(120, 220, 255, 0.15);
    border-radius: 8px;
    padding: 32px;
    max-width: 420px;
    backdrop-filter: blur(4px);
    transition: border-color 0.4s ease, background 0.4s ease, transform 0.4s ease;
}

.glass-panel:hover {
    border-color: rgba(120, 220, 255, 0.3);
    background: rgba(255, 255, 255, 0.05);
    transform: translateY(-2px);
}

.glass-panel h3 {
    font-family: 'Outfit', sans-serif;
    font-weight: 300;
    font-size: clamp(16px, 2vw, 22px);
    letter-spacing: 0.06em;
    color: #b2ebf2;
    margin-bottom: 12px;
}

.glass-panel p {
    color: rgba(178, 235, 242, 0.75);
}

#zone-epipelagic .zone-content {
    flex-direction: row;
    flex-wrap: nowrap;
    max-width: none;
    gap: 40px;
    padding: 40px 80px;
    align-items: flex-start;
}

/* ----------------------------------------
   Zone 2: Mesopelagic
   ---------------------------------------- */
#zone-mesopelagic {
    background: #060e1a;
    min-width: 160vw;
}

.bioluminescent-cluster {
    max-width: 400px;
    padding: 28px;
    transition: transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
}

.bioluminescent-cluster::before {
    content: '';
    position: absolute;
    top: -20px;
    left: -20px;
    right: -20px;
    bottom: -20px;
    background: radial-gradient(ellipse at center, rgba(0, 229, 255, 0.03) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
    transition: opacity 0.6s ease;
    opacity: 0;
}

.bioluminescent-cluster:hover::before {
    opacity: 1;
}

.glow-text {
    text-shadow: 0 0 20px rgba(0, 229, 255, 0.3), 0 0 40px rgba(0, 229, 255, 0.1);
}

.bioluminescent-cluster h3 {
    font-family: 'Outfit', sans-serif;
    font-weight: 300;
    font-size: clamp(16px, 2vw, 22px);
    letter-spacing: 0.06em;
    color: #00e5ff;
    margin-bottom: 12px;
    opacity: 0.8;
}

.bioluminescent-cluster p {
    color: rgba(178, 235, 242, 0.6);
}

#zone-mesopelagic .zone-content {
    flex-direction: row;
    flex-wrap: nowrap;
    max-width: none;
    gap: 60px;
    padding: 40px 80px;
    align-items: flex-start;
}

/* ----------------------------------------
   Zone 3: Bathypelagic
   ---------------------------------------- */
#zone-bathypelagic {
    background: #020409;
    min-width: 160vw;
}

.hidden-content {
    max-width: 380px;
    padding: 28px;
    border: 1px solid rgba(0, 229, 255, 0.08);
    border-radius: 6px;
    transition: border-color 0.6s ease, box-shadow 0.6s ease;
}

.hidden-content h3 {
    font-family: 'Outfit', sans-serif;
    font-weight: 300;
    font-size: clamp(16px, 2vw, 22px);
    letter-spacing: 0.06em;
    color: #020409;
    margin-bottom: 12px;
    transition: color 0.6s ease;
}

.hidden-content p {
    color: #020409;
    transition: color 0.6s ease;
}

.hidden-content:hover {
    border-color: rgba(0, 229, 255, 0.4);
    box-shadow: 0 0 30px rgba(0, 229, 255, 0.05);
}

.hidden-content:hover h3 {
    color: #b2ebf2;
}

.hidden-content:hover p {
    color: rgba(178, 235, 242, 0.7);
}

.hidden-content.revealed {
    border-color: rgba(0, 229, 255, 0.35);
    box-shadow: 0 0 20px rgba(0, 229, 255, 0.04);
}

.hidden-content.revealed h3 {
    color: #b2ebf2;
}

.hidden-content.revealed p {
    color: rgba(178, 235, 242, 0.65);
}

#zone-bathypelagic .zone-content {
    flex-direction: row;
    flex-wrap: nowrap;
    max-width: none;
    gap: 50px;
    padding: 40px 80px;
    align-items: flex-start;
}

.creature-divider {
    opacity: 0.5;
    margin-top: 20px;
    flex-shrink: 0;
}

.tube-worms {
    opacity: 0.4;
}

#zone-bathypelagic .zone-heading {
    color: #00b8d4;
}

/* ----------------------------------------
   Zone 4: Hadal
   ---------------------------------------- */
#zone-hadal {
    background: #020409;
    min-width: 140vw;
}

.vent-columns {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    overflow: hidden;
}

.vent-column {
    position: absolute;
    bottom: 0;
    width: 3px;
    background: linear-gradient(to top, #ff8f00, #ffd600, transparent);
    opacity: 0;
    animation: ventRise linear infinite;
}

@keyframes ventRise {
    0% {
        height: 0;
        opacity: 0;
        bottom: 0;
    }
    8% {
        opacity: 0.35;
    }
    30% {
        opacity: 0.2;
    }
    60% {
        opacity: 0.1;
    }
    100% {
        height: 85vh;
        opacity: 0;
        bottom: 0;
    }
}

/* Shimmer overlay for vent columns */
.vent-column::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top,
        transparent 0%,
        rgba(255, 255, 255, 0.1) 20%,
        transparent 40%,
        rgba(255, 255, 255, 0.08) 60%,
        transparent 80%);
    animation: ventShimmer 2s linear infinite;
}

@keyframes ventShimmer {
    0% { transform: translateY(100%); }
    100% { transform: translateY(-100%); }
}

.hadal-content {
    z-index: 2;
}

.hadal-heading {
    color: #ffd600;
}

.hadal-label {
    color: rgba(255, 143, 0, 0.5);
}

.vent-text-block {
    max-width: 420px;
    padding: 28px;
    border: 1px solid rgba(255, 143, 0, 0.15);
    border-radius: 6px;
    transition: border-color 0.4s ease, box-shadow 0.4s ease;
}

.vent-text-block:hover {
    border-color: rgba(255, 143, 0, 0.35);
    box-shadow: 0 0 30px rgba(255, 143, 0, 0.06);
}

.vent-text-block h3 {
    font-family: 'Outfit', sans-serif;
    font-weight: 300;
    font-size: clamp(16px, 2vw, 22px);
    letter-spacing: 0.06em;
    color: #ffd600;
    margin-bottom: 12px;
}

.vent-text-block p {
    color: rgba(255, 214, 0, 0.65);
}

#zone-hadal .zone-content {
    flex-direction: row;
    flex-wrap: nowrap;
    max-width: none;
    gap: 50px;
    padding: 40px 80px;
    align-items: flex-start;
}

/* ----------------------------------------
   Wave Dividers
   ---------------------------------------- */
.wave-divider {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 40px;
    z-index: 3;
}

.wave-path {
    opacity: 0.12;
    animation: waveDrift 8s ease-in-out infinite;
}

.wave-path--deep {
    animation-duration: 10s;
}

.wave-path--abyss {
    animation-duration: 14s;
}

@keyframes waveDrift {
    0%, 100% { d: path("M0 20 Q25 5 50 20 Q75 35 100 20 Q125 5 150 20 Q175 35 200 20"); }
    50% { d: path("M0 20 Q25 30 50 20 Q75 10 100 20 Q125 30 150 20 Q175 10 200 20"); }
}

/* ----------------------------------------
   Particle Canvas
   ---------------------------------------- */
#particle-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 50;
    pointer-events: none;
}

/* ----------------------------------------
   Bubble Container
   ---------------------------------------- */
#bubble-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 60;
    pointer-events: none;
}

.bubble {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, transparent 40%, rgba(0, 229, 255, 0.2) 100%);
    pointer-events: none;
    animation: bubbleRise 1.2s ease-out forwards;
}

@keyframes bubbleRise {
    0% {
        opacity: 0.6;
        transform: translateY(0) scale(1);
    }
    100% {
        opacity: 0;
        transform: translateY(-80px) scale(0.3);
    }
}

/* ----------------------------------------
   Selection color
   ---------------------------------------- */
::selection {
    background: rgba(0, 229, 255, 0.25);
    color: #b2ebf2;
}

/* ----------------------------------------
   Responsive
   ---------------------------------------- */
@media (max-width: 768px) {
    #depth-gauge {
        left: 10px;
        height: 50vh;
    }

    .depth-marker span {
        font-size: 9px;
    }

    #zone-epipelagic .zone-content,
    #zone-mesopelagic .zone-content,
    #zone-bathypelagic .zone-content,
    #zone-hadal .zone-content {
        flex-direction: column;
        padding: 30px 20px;
        gap: 20px;
        align-items: center;
    }

    .glass-panel,
    .bioluminescent-cluster,
    .hidden-content,
    .vent-text-block {
        max-width: 90vw;
    }

    #depth-counter {
        right: 14px;
        bottom: 14px;
        font-size: 11px;
    }

    #zone-epipelagic,
    #zone-mesopelagic,
    #zone-bathypelagic {
        min-width: 100vw;
    }

    #zone-hadal {
        min-width: 100vw;
    }
}
