/* ====================================
   PPADDL.com - Styles
   A horizontal paddle journey through water
   ==================================== */

/* --- CSS Custom Properties --- */
:root {
    --mist-silver: #D9E4EC;
    --abyssal-teal: #0A1F2B;
    --fjord-teal: #0A3D4F;
    --amber-light: #E8A849;
    --bioluminescent-cyan: #5CECC6;
    --pearl: #E8ECF0;
    --slate-depth: #3A5568;
    --wake-white: #FFFFFF;
    --surface-water: #C8D6E0;
    --abyss-black: #050E14;

    --font-display: 'Cormorant Garamond', Georgia, serif;
    --font-body: 'Nunito Sans', 'Segoe UI', sans-serif;
    --font-accent: 'Overpass Mono', 'Courier New', monospace;

    --waterline-position: 60%;
    --mouse-x: 50%;
    --mouse-y: 50%;
}

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

html {
    overflow: hidden;
    height: 100vh;
    width: 100vw;
}

body {
    overflow: hidden;
    height: 100vh;
    width: 100vw;
    background: var(--abyssal-teal);
    color: var(--pearl);
    font-family: var(--font-body);
    font-weight: 300;
    font-size: 18px;
    line-height: 1.8;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* --- Horizontal Scroll Container --- */
.river-container {
    display: flex;
    flex-wrap: nowrap;
    height: 100vh;
    width: max-content;
    overflow-x: scroll;
    overflow-y: hidden;
    scroll-behavior: smooth;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
}

.river-container::-webkit-scrollbar {
    display: none;
}

/* --- Panels Base --- */
.panel {
    position: relative;
    min-width: 100vw;
    height: 100vh;
    flex-shrink: 0;
    overflow: hidden;
}

/* =================================
   PANEL 1: STILLNESS (0-100vw)
   ================================= */
.panel-stillness {
    scroll-snap-align: start;
    scroll-snap-stop: always;
    background: linear-gradient(180deg, var(--mist-silver) 0%, var(--mist-silver) 58%, var(--fjord-teal) 60%, var(--abyssal-teal) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Wordmark straddling the waterline */
.wordmark-container {
    position: relative;
    z-index: 10;
    animation: wordmarkFadeIn 2s ease-out forwards;
    opacity: 0;
}

@keyframes wordmarkFadeIn {
    0% { opacity: 0; transform: translateY(10px); }
    100% { opacity: 1; transform: translateY(0); }
}

.wordmark-above,
.wordmark-below {
    display: block;
    font-family: var(--font-display);
    font-weight: 300;
    font-size: clamp(4rem, 10vw, 9rem);
    letter-spacing: 0.15em;
    text-align: center;
    line-height: 0.5;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: max-content;
}

.wordmark-above {
    color: var(--surface-water);
    bottom: 0;
    clip-path: inset(0 0 50% 0);
}

.wordmark-below {
    color: var(--fjord-teal);
    top: 0;
    clip-path: inset(50% 0 0 0);
    filter: blur(1px);
}

.wordmark-container {
    position: absolute;
    top: 60%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: max-content;
    height: clamp(4rem, 10vw, 9rem);
}

.wordmark-above {
    position: absolute;
    top: 0;
    left: 0;
    clip-path: inset(0 0 50% 0);
    bottom: auto;
    transform: none;
}

.wordmark-below {
    position: absolute;
    top: 0;
    left: 0;
    clip-path: inset(50% 0 0 0);
    transform: none;
}

/* Scroll hint */
.scroll-hint {
    position: absolute;
    bottom: 12%;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    animation: hintFadeInOut 4s ease forwards;
    opacity: 0;
}

@keyframes hintFadeInOut {
    0% { opacity: 0; }
    15% { opacity: 1; }
    75% { opacity: 1; }
    100% { opacity: 0; }
}

.hint-text {
    font-family: var(--font-accent);
    font-weight: 400;
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--bioluminescent-cyan);
}

/* Stillness ripple rings */
.stillness-ripples {
    position: absolute;
    top: 60%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 5;
}

.ripple-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.3);
    animation: rippleExpand 6s ease-out infinite;
    width: 10px;
    height: 10px;
}

.ripple-ring-1 { animation-delay: 0s; }
.ripple-ring-2 { animation-delay: 2s; }
.ripple-ring-3 { animation-delay: 4s; }

@keyframes rippleExpand {
    0% {
        width: 10px;
        height: 10px;
        opacity: 0.4;
    }
    100% {
        width: 400px;
        height: 400px;
        opacity: 0;
    }
}

/* =================================
   PANEL 2: THE GLIDE (100-400vw)
   ================================= */
.panel-glide {
    min-width: 300vw;
    background: linear-gradient(180deg, var(--mist-silver) 0%, var(--mist-silver) 58%, var(--fjord-teal) 60%, var(--abyssal-teal) 100%);
    position: relative;
}

/* Caustic light overlays */
.caustic-overlay {
    position: absolute;
    top: 62%;
    left: 0;
    width: 100%;
    height: 38%;
    pointer-events: none;
    z-index: 1;
    opacity: 0;
    transition: opacity 1s ease;
}

.panel-glide .caustic-overlay {
    opacity: 1;
}

.caustic-1 {
    background:
        radial-gradient(ellipse 300px 100px at 20% 30%, rgba(232, 168, 73, 0.08) 0%, transparent 70%),
        radial-gradient(ellipse 200px 80px at 50% 50%, rgba(232, 168, 73, 0.06) 0%, transparent 70%),
        radial-gradient(ellipse 250px 90px at 80% 40%, rgba(232, 168, 73, 0.08) 0%, transparent 70%);
    animation: causticDrift1 12s ease-in-out infinite alternate;
}

.caustic-2 {
    background:
        radial-gradient(ellipse 250px 120px at 30% 60%, rgba(232, 168, 73, 0.06) 0%, transparent 70%),
        radial-gradient(ellipse 180px 70px at 60% 30%, rgba(232, 168, 73, 0.1) 0%, transparent 70%),
        radial-gradient(ellipse 280px 100px at 85% 70%, rgba(232, 168, 73, 0.06) 0%, transparent 70%);
    animation: causticDrift2 15s ease-in-out infinite alternate;
}

@keyframes causticDrift1 {
    0% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(30px, -10px) scale(1.05); }
    100% { transform: translate(-20px, 15px) scale(0.95); }
}

@keyframes causticDrift2 {
    0% { transform: translate(0, 0) scale(1.02); }
    50% { transform: translate(-25px, 12px) scale(0.98); }
    100% { transform: translate(15px, -8px) scale(1.03); }
}

/* --- Blob Containers --- */
.blob-container {
    position: absolute;
    padding: 2.5rem 3rem;
    background: rgba(10, 61, 79, 0.85);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 5;
    transition: border-radius 8s ease-in-out;
    will-change: transform, border-radius;
    opacity: 0;
    transform: scale(0.3);
    transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.34, 1.56, 0.64, 1), border-radius 8s ease-in-out;
}

.blob-container.visible {
    opacity: 1;
    transform: scale(1) rotate(var(--blob-rotate, 0deg));
}

/* Blob shape presets */
.blob-1 {
    border-radius: 40% 60% 55% 45% / 50% 40% 60% 50%;
    top: 35%;
    left: 8%;
    max-width: 380px;
    --blob-rotate: -1deg;
    animation: blobMorph1 20s ease-in-out infinite alternate;
}

.blob-2 {
    border-radius: 55% 45% 40% 60% / 45% 55% 50% 50%;
    top: 20%;
    left: 28%;
    width: 250px;
    height: 250px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    --blob-rotate: 1.5deg;
    animation: blobMorph2 18s ease-in-out infinite alternate;
}

.blob-3 {
    border-radius: 45% 55% 60% 40% / 55% 45% 50% 50%;
    top: 55%;
    left: 22%;
    max-width: 360px;
    --blob-rotate: 0.5deg;
    animation: blobMorph3 22s ease-in-out infinite alternate;
}

.blob-4 {
    border-radius: 60% 40% 45% 55% / 40% 60% 50% 50%;
    top: 25%;
    left: 50%;
    max-width: 350px;
    --blob-rotate: -2deg;
    animation: blobMorph1 19s ease-in-out infinite alternate;
}

.blob-5 {
    border-radius: 50% 50% 55% 45% / 60% 40% 55% 45%;
    top: 50%;
    left: 45%;
    width: 220px;
    height: 220px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    --blob-rotate: 1deg;
    animation: blobMorph2 21s ease-in-out infinite alternate;
}

.blob-6 {
    border-radius: 42% 58% 52% 48% / 48% 52% 45% 55%;
    top: 30%;
    left: 72%;
    max-width: 380px;
    --blob-rotate: -0.5deg;
    animation: blobMorph3 17s ease-in-out infinite alternate;
}

/* Blob morph animations */
@keyframes blobMorph1 {
    0% { border-radius: 40% 60% 55% 45% / 50% 40% 60% 50%; }
    33% { border-radius: 55% 45% 50% 50% / 45% 55% 45% 55%; }
    66% { border-radius: 45% 55% 60% 40% / 55% 45% 50% 50%; }
    100% { border-radius: 50% 50% 45% 55% / 40% 60% 55% 45%; }
}

@keyframes blobMorph2 {
    0% { border-radius: 55% 45% 40% 60% / 45% 55% 50% 50%; }
    33% { border-radius: 45% 55% 55% 45% / 50% 50% 55% 45%; }
    66% { border-radius: 50% 50% 50% 50% / 55% 45% 45% 55%; }
    100% { border-radius: 60% 40% 45% 55% / 40% 60% 50% 50%; }
}

@keyframes blobMorph3 {
    0% { border-radius: 45% 55% 60% 40% / 55% 45% 50% 50%; }
    33% { border-radius: 50% 50% 45% 55% / 45% 55% 55% 45%; }
    66% { border-radius: 55% 45% 50% 50% / 50% 50% 45% 55%; }
    100% { border-radius: 40% 60% 55% 45% / 55% 45% 50% 50%; }
}

/* --- Typography within blobs --- */
.pull-quote {
    font-family: var(--font-display);
    font-weight: 300;
    font-size: clamp(1.4rem, 3vw, 2.2rem);
    line-height: 1.5;
    color: var(--pearl);
    letter-spacing: 0.02em;
    font-style: italic;
}

.body-text {
    font-family: var(--font-body);
    font-weight: 300;
    font-size: 18px;
    line-height: 1.8;
    color: var(--pearl);
}

/* SVG within blobs */
.wave-svg,
.vortex-svg,
.standing-wave-svg {
    width: 100%;
    height: 100%;
}

/* =================================
   PANEL 3: THE DESCENT (400-650vw)
   ================================= */
.panel-descent {
    min-width: 250vw;
    background: linear-gradient(180deg, var(--fjord-teal) 0%, var(--abyssal-teal) 60%, var(--abyss-black) 100%);
    position: relative;
}

/* Caustic overhead (above the viewer, looking up) */
.caustic-overhead {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 30%;
    pointer-events: none;
    z-index: 1;
}

.caustic-overhead-1 {
    background:
        radial-gradient(ellipse 400px 150px at 25% 40%, rgba(232, 168, 73, 0.1) 0%, transparent 70%),
        radial-gradient(ellipse 300px 120px at 55% 30%, rgba(232, 168, 73, 0.08) 0%, transparent 70%),
        radial-gradient(ellipse 350px 130px at 80% 50%, rgba(232, 168, 73, 0.1) 0%, transparent 70%);
    animation: causticDrift1 10s ease-in-out infinite alternate;
}

.caustic-overhead-2 {
    background:
        radial-gradient(ellipse 350px 160px at 35% 50%, rgba(232, 168, 73, 0.08) 0%, transparent 70%),
        radial-gradient(ellipse 280px 100px at 65% 35%, rgba(232, 168, 73, 0.12) 0%, transparent 70%),
        radial-gradient(ellipse 320px 140px at 90% 60%, rgba(232, 168, 73, 0.08) 0%, transparent 70%);
    animation: causticDrift2 13s ease-in-out infinite alternate;
}

/* Deep-water drifting background blobs */
.deep-blob {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
    opacity: 0.04;
}

.deep-blob-1 {
    width: 350px;
    height: 300px;
    background: var(--fjord-teal);
    top: 30%;
    left: 15%;
    border-radius: 55% 45% 50% 50% / 45% 55% 50% 50%;
    animation: deepDrift1 25s ease-in-out infinite alternate;
}

.deep-blob-2 {
    width: 250px;
    height: 400px;
    background: var(--fjord-teal);
    top: 50%;
    left: 45%;
    border-radius: 45% 55% 55% 45% / 50% 50% 45% 55%;
    animation: deepDrift2 30s ease-in-out infinite alternate;
}

.deep-blob-3 {
    width: 300px;
    height: 280px;
    background: var(--fjord-teal);
    top: 20%;
    left: 70%;
    border-radius: 50% 50% 45% 55% / 55% 45% 50% 50%;
    animation: deepDrift3 22s ease-in-out infinite alternate;
}

@keyframes deepDrift1 {
    0% { transform: translate(0, 0) rotate(0deg); }
    100% { transform: translate(80px, 30px) rotate(5deg); }
}

@keyframes deepDrift2 {
    0% { transform: translate(0, 0) rotate(0deg); }
    100% { transform: translate(-60px, -40px) rotate(-3deg); }
}

@keyframes deepDrift3 {
    0% { transform: translate(0, 0) rotate(0deg); }
    100% { transform: translate(50px, 60px) rotate(4deg); }
}

/* Depth indicators */
.depth-indicator {
    position: absolute;
    left: 2%;
    z-index: 10;
    font-family: var(--font-accent);
    font-weight: 400;
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--bioluminescent-cyan);
    opacity: 0.7;
}

.depth-2m {
    top: 25%;
    left: 5%;
    animation: depthRotate 20s ease-in-out infinite alternate;
}

.depth-5m {
    top: 50%;
    left: 40%;
    animation: depthRotate 25s ease-in-out infinite alternate;
}

.depth-12m {
    top: 70%;
    left: 75%;
    animation: depthRotate 18s ease-in-out infinite alternate;
}

@keyframes depthRotate {
    0% { transform: rotate(-2deg); }
    100% { transform: rotate(2deg); }
}

/* Submerged blob containers */
.blob-submerged {
    background: rgba(10, 61, 79, 0.5);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    opacity: 0;
}

.blob-submerged.visible {
    opacity: 0.7;
}

.blob-7 {
    border-radius: 50% 50% 45% 55% / 55% 45% 50% 50%;
    top: 30%;
    left: 10%;
    max-width: 380px;
    --blob-rotate: 1deg;
    animation: blobMorph1 24s ease-in-out infinite alternate;
}

.blob-8 {
    border-radius: 45% 55% 50% 50% / 50% 50% 55% 45%;
    top: 50%;
    left: 35%;
    width: 320px;
    height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    --blob-rotate: -0.5deg;
    animation: blobMorph2 20s ease-in-out infinite alternate;
}

.blob-9 {
    border-radius: 55% 45% 48% 52% / 48% 52% 50% 50%;
    top: 25%;
    left: 65%;
    max-width: 360px;
    --blob-rotate: 1.5deg;
    animation: blobMorph3 22s ease-in-out infinite alternate;
}

/* Submerged text styles */
.submerged-text {
    font-family: var(--font-body);
    font-weight: 300;
    font-size: 18px;
    line-height: 1.8;
    color: var(--bioluminescent-cyan);
}

.submerged-quote {
    font-family: var(--font-display);
    font-weight: 300;
    font-size: clamp(1.3rem, 2.5vw, 2rem);
    line-height: 1.5;
    color: var(--bioluminescent-cyan);
    font-style: italic;
}

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

/* =================================
   PANEL 4: THE STILL POINT (650-800vw)
   ================================= */
.panel-still-point {
    min-width: 150vw;
    background: var(--abyssal-teal);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    scroll-snap-align: end;
    position: relative;
}

/* Paddle circle */
.paddle-circle {
    position: relative;
    width: 120px;
    height: 120px;
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.paddle-dot {
    width: 4px;
    height: 4px;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 50%;
}

/* Still point ripple rings */
.still-ripples {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 5;
}

.still-ripple {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.2);
    animation: stillRippleExpand 4s ease-out infinite;
    width: 120px;
    height: 120px;
}

.still-ripple-1 { animation-delay: 0s; }
.still-ripple-2 { animation-delay: 0.5s; }
.still-ripple-3 { animation-delay: 1s; }
.still-ripple-4 { animation-delay: 1.5s; }
.still-ripple-5 { animation-delay: 2s; }
.still-ripple-6 { animation-delay: 2.5s; }
.still-ripple-7 { animation-delay: 3s; }
.still-ripple-8 { animation-delay: 3.5s; }

@keyframes stillRippleExpand {
    0% {
        width: 120px;
        height: 120px;
        opacity: 0.25;
    }
    100% {
        width: 800px;
        height: 800px;
        opacity: 0;
    }
}

/* Final wordmark */
.final-wordmark {
    font-family: var(--font-display);
    font-weight: 300;
    font-size: 14px;
    letter-spacing: 0.3em;
    color: rgba(232, 236, 240, 0.6);
    margin-top: 100px;
    z-index: 10;
    text-transform: uppercase;
}

/* =================================
   WATERLINE (Fixed Element)
   ================================= */
#waterline {
    position: fixed;
    top: 60%;
    left: 0;
    width: 100%;
    height: 1px;
    background: rgba(255, 255, 255, 0.3);
    z-index: 50;
    pointer-events: none;
    animation: waterlineUndulate 8s ease-in-out infinite;
    transition: opacity 1s ease, top 1s ease;
}

@keyframes waterlineUndulate {
    0% { transform: translateY(0); }
    25% { transform: translateY(-2px); }
    50% { transform: translateY(3px); }
    75% { transform: translateY(-1px); }
    100% { transform: translateY(0); }
}

/* =================================
   WAKE TRAIL (Progress)
   ================================= */
#wake-trail {
    position: fixed;
    bottom: 20px;
    left: 5%;
    width: 90%;
    height: 2px;
    background: rgba(255, 255, 255, 0.08);
    z-index: 100;
    border-radius: 1px;
    pointer-events: none;
}

#wake-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.1), rgba(92, 236, 198, 0.4));
    border-radius: 1px;
    transition: width 0.1s linear;
}

/* =================================
   WAKE PARTICLES CANVAS
   ================================= */
#wake-particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 40;
    pointer-events: none;
}

/* =================================
   GRAIN OVERLAY
   ================================= */
#grain-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 60%;
    z-index: 45;
    pointer-events: none;
    opacity: 0.02;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
    background-repeat: repeat;
    background-size: 256px 256px;
}

/* =================================
   RIPPLE INTERACTION (cursor follow)
   ================================= */
.blob-container::after {
    content: '';
    position: absolute;
    top: var(--mouse-y);
    left: var(--mouse-x);
    width: 0;
    height: 0;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    pointer-events: none;
    opacity: 0;
    transition: none;
}

.blob-container.rippling::after {
    animation: cursorRipple 2s ease-out forwards;
}

@keyframes cursorRipple {
    0% {
        width: 0;
        height: 0;
        opacity: 0.4;
    }
    100% {
        width: 200px;
        height: 200px;
        opacity: 0;
    }
}

/* =================================
   BIOLUMINESCENT GLOW
   ================================= */
.blob-container::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 150%;
    height: 150%;
    transform: translate(-50%, -50%);
    background: radial-gradient(circle, rgba(92, 236, 198, 0.15) 0%, transparent 70%);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.8s ease;
    z-index: -1;
}

.blob-container:hover::before {
    opacity: 1;
}

/* =================================
   RESPONSIVE: MOBILE (vertical scroll)
   ================================= */
@media (max-width: 768px) {
    html {
        overflow: auto;
    }

    body {
        overflow: auto;
        height: auto;
    }

    .river-container {
        flex-direction: column;
        width: 100%;
        height: auto;
        overflow-x: hidden;
        overflow-y: auto;
        scroll-snap-type: y proximity;
    }

    .panel {
        min-width: 100%;
        min-height: 100vh;
        width: 100%;
    }

    .panel-glide {
        min-width: 100%;
        min-height: 300vh;
    }

    .panel-descent {
        min-width: 100%;
        min-height: 250vh;
    }

    .panel-still-point {
        min-width: 100%;
        min-height: 100vh;
    }

    .blob-container {
        position: relative;
        top: auto;
        left: auto;
        margin: 2rem auto;
        max-width: 90%;
    }

    .blob-2, .blob-5, .blob-8 {
        width: auto;
        height: auto;
    }

    #waterline {
        display: none;
    }

    #wake-trail {
        left: 50%;
        transform: translateX(-50%);
        bottom: auto;
        right: 10px;
        top: 5%;
        width: 2px;
        height: 90%;
    }

    #wake-fill {
        width: 100%;
        height: 0%;
    }

    .depth-indicator {
        left: auto;
        right: 10px;
    }

    .wordmark-container {
        position: relative;
        top: auto;
        left: auto;
        transform: none;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .wordmark-above, .wordmark-below {
        position: relative;
        font-size: clamp(3rem, 8vw, 5rem);
    }
}
