/* bada.day - Ocean Depth Horizontal Scroll Experience */
/* Palette: Abyssal Black #070E1A | Midnight Trench #0B1D3A | Bathyal Blue #14325A | Mesopelagic Teal #1B5B6F | Photic Steel #8BA7BF | Dawn Foam #C8D8E4 | Bioluminescent Cyan #00E5CC */

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

html, body {
    height: 100vh;
    overflow: hidden;
    background: #070E1A;
    font-family: 'Newsreader', serif;
}

/* Horizontal Scroll Container */
.ocean-scroll {
    display: flex;
    width: 600vw;
    height: 100vh;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
}

/* Each Zone */
.zone {
    position: relative;
    flex-shrink: 0;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    scroll-snap-align: start;
}

/* Depth Gauge */
.depth-gauge {
    position: fixed;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    height: 40vh;
    width: 2px;
    z-index: 100;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.depth-gauge-track {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 1px;
    height: 100%;
    background: #1B5B6F;
    opacity: 0.4;
}

.depth-gauge-indicator {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translate(-50%, 0);
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #00E5CC;
    box-shadow: 0 0 8px rgba(0, 229, 204, 0.5);
    transition: top 0.3s ease-out;
}

.depth-label {
    position: absolute;
    font-family: 'Azeret Mono', monospace;
    font-size: 0.7rem;
    font-weight: 400;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #4A7A8C;
    writing-mode: vertical-rl;
}

.depth-label-top {
    top: -30px;
}

.depth-label-bottom {
    bottom: -30px;
}

/* Persistent Horizon Line */
.horizon-line {
    position: fixed;
    top: 50vh;
    left: 0;
    width: 100%;
    height: 1px;
    background: #8BA7BF;
    opacity: 0.3;
    z-index: 50;
    animation: horizonUndulate 8s ease-in-out infinite;
}

@keyframes horizonUndulate {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(0.5px); }
}

/* === ZONE 0: The Shore === */
.zone-0 {
    background: #0B1D3A;
}

.zone-sky {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 50vh;
    background: #C8D8E4;
}

.zone-deep {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 50vh;
    background: #0B1D3A;
}

.hero-title {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-family: 'Outfit', sans-serif;
    font-weight: 200;
    font-size: 15vw;
    letter-spacing: 0.12em;
    text-transform: lowercase;
    color: #0B1D3A;
    z-index: 10;
    white-space: nowrap;
    line-height: 1;
}

.hero-subtitle {
    position: absolute;
    top: calc(50% + 8vw);
    left: 50%;
    transform: translateX(-50%);
    font-family: 'Newsreader', serif;
    font-weight: 300;
    font-size: clamp(0.95rem, 1.1vw, 1.15rem);
    line-height: 1.85;
    color: #8BA7BF;
    z-index: 10;
    white-space: nowrap;
}

/* Current Indicator */
.current-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 12px;
    z-index: 10;
}

.current-dot {
    display: block;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #8BA7BF;
    opacity: 0.4;
    animation: driftRight 3s ease-in-out infinite;
}

.current-dot:nth-child(2) { animation-delay: 0.3s; }
.current-dot:nth-child(3) { animation-delay: 0.6s; }
.current-dot:nth-child(4) { animation-delay: 0.9s; }
.current-dot:nth-child(5) { animation-delay: 1.2s; animation-name: driftRightPulse; }

@keyframes driftRight {
    0% { transform: translateX(0); opacity: 0.4; }
    50% { transform: translateX(8px); opacity: 0.7; }
    100% { transform: translateX(16px); opacity: 0.2; }
}

@keyframes driftRightPulse {
    0% { transform: translateX(0) scale(1); opacity: 0.4; }
    50% { transform: translateX(8px) scale(1.5); opacity: 1; }
    100% { transform: translateX(16px) scale(1); opacity: 0.2; }
}

/* === ZONE 1: The Sunlit Layer === */
.zone-1 {
    background: #14325A;
}

.caustic-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 40%;
    background: rgba(200, 216, 228, 0.06);
    filter: url(#caustics);
    pointer-events: none;
}

/* Wave Patterns */
.wave-pattern {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    opacity: 0.04;
}

.wave-pattern-1 {
    background:
        repeating-linear-gradient(45deg, transparent, transparent 40px, rgba(0, 229, 204, 0.15) 40px, rgba(0, 229, 204, 0.15) 41px),
        repeating-linear-gradient(-30deg, transparent, transparent 60px, rgba(139, 167, 191, 0.1) 60px, rgba(139, 167, 191, 0.1) 61px);
    animation: waveShift1 20s linear infinite;
}

.wave-pattern-2 {
    background:
        repeating-linear-gradient(30deg, transparent, transparent 30px, rgba(0, 229, 204, 0.12) 30px, rgba(0, 229, 204, 0.12) 31px),
        repeating-linear-gradient(-45deg, transparent, transparent 45px, rgba(139, 167, 191, 0.08) 45px, rgba(139, 167, 191, 0.08) 46px);
    animation: waveShift2 18s linear infinite;
    opacity: 0.05;
}

.wave-pattern-3 {
    background:
        repeating-linear-gradient(60deg, transparent, transparent 20px, rgba(0, 229, 204, 0.1) 20px, rgba(0, 229, 204, 0.1) 21px),
        repeating-linear-gradient(-60deg, transparent, transparent 25px, rgba(27, 91, 111, 0.12) 25px, rgba(27, 91, 111, 0.12) 26px);
    animation: waveShift1 15s linear infinite;
    opacity: 0.05;
}

.wave-pattern-4 {
    background:
        repeating-linear-gradient(75deg, transparent, transparent 12px, rgba(0, 229, 204, 0.08) 12px, rgba(0, 229, 204, 0.08) 13px),
        repeating-linear-gradient(-75deg, transparent, transparent 15px, rgba(27, 91, 111, 0.1) 15px, rgba(27, 91, 111, 0.1) 16px);
    animation: waveShift2 12s linear infinite;
    opacity: 0.06;
}

@keyframes waveShift1 {
    0% { transform: translate(0, 0); }
    100% { transform: translate(40px, -20px); }
}

@keyframes waveShift2 {
    0% { transform: translate(0, 0); }
    100% { transform: translate(-30px, 15px); }
}

/* Floating Text Blocks */
.floating-text {
    position: absolute;
    max-width: 28ch;
    z-index: 10;
}

.zone-heading {
    font-family: 'Outfit', sans-serif;
    font-weight: 400;
    font-size: 4vw;
    letter-spacing: 0.04em;
    text-transform: lowercase;
    color: #C8D8E4;
    margin-bottom: 1.2rem;
}

.zone-body {
    font-family: 'Newsreader', serif;
    font-weight: 300;
    font-size: clamp(0.95rem, 1.1vw, 1.15rem);
    line-height: 1.85;
    color: #8BA7BF;
}

/* Zone 1 positions */
.text-top-left {
    top: 15vh;
    left: 20vw;
}

.text-bottom-right {
    top: 70vh;
    left: 65vw;
}

/* === ZONE 2: The Twilight Layer === */
.zone-2 {
    background: linear-gradient(to right, #14325A, #0B1D3A);
}

.text-center-deep {
    top: 60vh;
    left: 50%;
    transform: translateX(-50%);
}

.text-center-deep .zone-heading {
    font-size: 3.5vw;
}

/* === ZONE 3: The Midnight Layer === */
.zone-3 {
    background: #0B1D3A;
}

.text-fragment-a {
    top: 25vh;
    left: 15vw;
    border: 1px solid rgba(27, 91, 111, 0.2);
    padding: 1.5rem 2rem;
}

.text-fragment-b {
    top: 65vh;
    left: 60vw;
    border: 1px solid rgba(27, 91, 111, 0.2);
    padding: 1.5rem 2rem;
}

/* === ZONE 4: The Abyssal Layer === */
.zone-4 {
    background: linear-gradient(to right, #0B1D3A, #070E1A);
}

.text-single-word {
    top: 40vh;
    left: 35vw;
}

.abyssal-word {
    font-family: 'Outfit', sans-serif;
    font-weight: 200;
    font-size: 8vw;
    letter-spacing: 0.08em;
    text-transform: lowercase;
    color: #14325A;
}

/* === ZONE 5: The Hadal Zone === */
.zone-5 {
    background: #070E1A;
}

.bioluminescent-core {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(0, 229, 204, 0.4) 0%, rgba(0, 229, 204, 0.1) 40%, transparent 70%);
    animation: biolumPulse 4s ease-in-out infinite;
}

@keyframes biolumPulse {
    0%, 100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.3;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.15);
        opacity: 0.5;
    }
}

/* Depth Particles */
.particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
}

.particle {
    position: absolute;
    border-radius: 50%;
    background: #00E5CC;
    will-change: transform;
    animation: riseParticle var(--duration) linear infinite;
    opacity: var(--opacity);
    width: var(--size);
    height: var(--size);
    left: var(--left);
    bottom: -10px;
}

@keyframes riseParticle {
    0% {
        transform: translateY(0) translateX(0);
    }
    25% {
        transform: translateY(-25vh) translateX(5px);
    }
    50% {
        transform: translateY(-50vh) translateX(-3px);
    }
    75% {
        transform: translateY(-75vh) translateX(4px);
    }
    100% {
        transform: translateY(-110vh) translateX(0);
    }
}

/* Zone 5 horizon hidden */
.zone-5 ~ .horizon-line {
    display: none;
}

/* Scrollbar hidden */
.ocean-scroll::-webkit-scrollbar {
    display: none;
}

.ocean-scroll {
    -ms-overflow-style: none;
    scrollbar-width: none;
}
