/* =========================================================
   PPADDL.com — Zen-Contemplative Isometric Water Design
   ========================================================= */

/* --- Custom Properties --- */
:root {
    --abyssal-blue: #0a0f1e;
    --twilight-indigo: #121a33;
    --submerged-slate: #1a2540;
    --moonlit-foam: #d4dce8;
    --pearl-white: #edf1f7;
    --phosphor-cyan: #3ecfcf;
    --deep-tide-teal: #1a7a8a;
    --bioluminescent-gold: #c9a84c;
    --darker-right: #141d35;
    --darker-left: #0f1628;
    --deep-bg-1: #080c18;
    --deep-bg-2: #060a14;

    --iso-rotate: rotateX(55deg) rotateZ(-45deg);

    --font-headline: 'Space Grotesk', sans-serif;
    --font-body: 'DM Sans', sans-serif;
    --font-mono: 'IBM Plex Mono', monospace;
}

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

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

body {
    background-color: var(--abyssal-blue);
    color: var(--moonlit-foam);
    font-family: var(--font-body);
    font-size: 1.125rem;
    line-height: 1.8;
    overflow-x: hidden;
}

/* --- Typography --- */
h1, h2, h3 {
    font-family: var(--font-headline);
    color: var(--pearl-white);
    letter-spacing: -0.02em;
}

h1 {
    font-size: clamp(2rem, 5vw, 4.5rem);
    font-weight: 700;
}

h2 {
    font-size: clamp(1.5rem, 3.5vw, 3rem);
    font-weight: 500;
    margin-bottom: 1rem;
}

p {
    max-width: 38em;
    margin-bottom: 1em;
}

p:last-child {
    margin-bottom: 0;
}

.depth-label {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 400;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--deep-tide-teal);
    display: block;
    margin-bottom: 1rem;
}

/* --- Water Chambers (Sections) --- */
.water-chamber {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.chamber-surface {
    background-color: var(--abyssal-blue);
}

.chamber-shallow {
    background-color: var(--twilight-indigo);
}

.chamber-mid {
    background-color: var(--deep-bg-1);
}

.chamber-deep {
    background-color: var(--deep-bg-2);
}

.chamber-abyss {
    background-color: #050911;
}

.chamber-content {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 4rem 2rem;
}

/* --- Hero Layout --- */
.hero-layout {
    display: flex;
    align-items: center;
    gap: 4rem;
}

.hero-text {
    flex: 0 0 40%;
    max-width: 40%;
}

.hero-title {
    font-size: clamp(3rem, 8vw, 7rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 0.95;
    margin-bottom: 1.5rem;
    background: linear-gradient(180deg, var(--pearl-white) 0%, var(--phosphor-cyan) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-sub {
    font-size: 1.125rem;
    line-height: 1.8;
    color: var(--moonlit-foam);
    opacity: 0.85;
}

.hero-visual {
    flex: 0 0 55%;
    max-width: 55%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* --- Isometric Elements --- */
.iso-pool {
    position: relative;
    width: 400px;
    height: 300px;
    transform-style: preserve-3d;
    perspective: 800px;
}

.iso-face {
    position: absolute;
    transition: transform 400ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

.iso-pool .iso-top {
    width: 340px;
    height: 200px;
    background: var(--submerged-slate);
    transform: var(--iso-rotate);
    top: 20px;
    left: 30px;
    border: 1px solid rgba(62, 207, 207, 0.1);
    border-radius: 4px;
}

.iso-pool .iso-right {
    width: 200px;
    height: 80px;
    background: var(--darker-right);
    transform: skewY(-30deg);
    top: 152px;
    right: 30px;
    border-right: 1px solid rgba(62, 207, 207, 0.05);
}

.iso-pool .iso-left {
    width: 200px;
    height: 80px;
    background: var(--darker-left);
    transform: skewY(30deg);
    top: 150px;
    left: 30px;
    border-left: 1px solid rgba(62, 207, 207, 0.05);
}

.pool-water {
    position: absolute;
    top: 40px;
    left: 60px;
    width: 280px;
    height: 150px;
    transform: var(--iso-rotate);
    overflow: hidden;
}

.pool-bubble {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, rgba(62, 207, 207, 0.15), transparent 70%);
    border: 1px solid rgba(255, 255, 255, 0.12);
    animation: pool-rise linear infinite;
}

.pool-bubble-1 { width: 6px; height: 6px; left: 20%; bottom: -10px; animation-duration: 10s; animation-delay: 0s; }
.pool-bubble-2 { width: 8px; height: 8px; left: 45%; bottom: -10px; animation-duration: 12s; animation-delay: 2s; }
.pool-bubble-3 { width: 5px; height: 5px; left: 70%; bottom: -10px; animation-duration: 9s; animation-delay: 4s; }
.pool-bubble-4 { width: 7px; height: 7px; left: 30%; bottom: -10px; animation-duration: 11s; animation-delay: 1s; }
.pool-bubble-5 { width: 4px; height: 4px; left: 60%; bottom: -10px; animation-duration: 14s; animation-delay: 3s; }
.pool-bubble-6 { width: 6px; height: 6px; left: 85%; bottom: -10px; animation-duration: 8s; animation-delay: 5s; }
.pool-bubble-7 { width: 5px; height: 5px; left: 10%; bottom: -10px; animation-duration: 13s; animation-delay: 6s; }

@keyframes pool-rise {
    0% { transform: translateY(0) translateX(0); opacity: 0; }
    10% { opacity: 0.8; }
    50% { transform: translateY(-80px) translateX(8px); }
    90% { opacity: 0.6; }
    100% { transform: translateY(-160px) translateX(-4px); opacity: 0; }
}

/* --- Isometric Platforms --- */
.iso-platform {
    position: relative;
    width: 260px;
    height: 180px;
    transform-style: preserve-3d;
    perspective: 600px;
    flex-shrink: 0;
}

.iso-platform .iso-top {
    width: 220px;
    height: 130px;
    background: var(--submerged-slate);
    transform: var(--iso-rotate);
    position: absolute;
    top: 10px;
    left: 20px;
    border: 1px solid rgba(62, 207, 207, 0.08);
    border-radius: 3px;
}

.iso-platform .iso-right {
    width: 130px;
    height: 50px;
    background: var(--darker-right);
    transform: skewY(-30deg);
    position: absolute;
    top: 97px;
    right: 20px;
}

.iso-platform .iso-left {
    width: 130px;
    height: 50px;
    background: var(--darker-left);
    transform: skewY(30deg);
    position: absolute;
    top: 95px;
    left: 20px;
}

/* Varied platform arrangements */
.chamber-shallow .chamber-content {
    display: flex;
    align-items: center;
    gap: 4rem;
}

.chamber-mid .chamber-content {
    display: flex;
    align-items: center;
    gap: 4rem;
    flex-direction: row;
}

.island-right {
    margin-left: auto;
}

.island-center {
    text-align: center;
    margin: 0 auto;
}

.island-center p {
    margin-left: auto;
    margin-right: auto;
}

/* --- Content Islands --- */
.content-island {
    background: rgba(26, 37, 64, 0.6);
    border: 1px solid rgba(140, 180, 220, 0.15);
    border-radius: 16px;
    padding: 3rem;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    max-width: 560px;
    position: relative;
}

/* Hover bubble release */
.content-island .hover-bubble {
    position: absolute;
    bottom: -4px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, rgba(62, 207, 207, 0.12), transparent 70%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    pointer-events: none;
    opacity: 0;
}

/* --- Breathing Gaps --- */
.breathing-gap {
    position: relative;
    height: 40vh;
    background: var(--abyssal-blue);
    overflow: hidden;
}

.gap-1 { background: linear-gradient(var(--abyssal-blue), var(--twilight-indigo)); }
.gap-2 { background: linear-gradient(var(--twilight-indigo), var(--deep-bg-1)); }
.gap-3 { background: linear-gradient(var(--deep-bg-1), var(--deep-bg-2)); }
.gap-4 { background: linear-gradient(var(--deep-bg-2), #050911); }

/* --- Stray Bubbles (in breathing gaps) --- */
.stray-bubble {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, rgba(62, 207, 207, 0.08), transparent 70%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    animation: stray-rise linear infinite;
}

.stray-1 { width: 6px; height: 6px; left: 25%; bottom: -10px; animation-duration: 12s; animation-delay: 0s; }
.stray-2 { width: 4px; height: 4px; left: 55%; bottom: -10px; animation-duration: 16s; animation-delay: 3s; }
.stray-3 { width: 5px; height: 5px; left: 80%; bottom: -10px; animation-duration: 10s; animation-delay: 6s; }
.stray-4 { width: 7px; height: 7px; left: 35%; bottom: -10px; animation-duration: 14s; animation-delay: 1s; }
.stray-5 { width: 5px; height: 5px; left: 65%; bottom: -10px; animation-duration: 11s; animation-delay: 4s; }
.stray-6 { width: 4px; height: 4px; left: 15%; bottom: -10px; animation-duration: 13s; animation-delay: 2s; }
.stray-7 { width: 6px; height: 6px; left: 50%; bottom: -10px; animation-duration: 15s; animation-delay: 5s; }
.stray-8 { width: 5px; height: 5px; left: 75%; bottom: -10px; animation-duration: 9s;  animation-delay: 7s; }
.stray-9 { width: 4px; height: 4px; left: 40%; bottom: -10px; animation-duration: 12s; animation-delay: 0s; }
.stray-10 { width: 6px; height: 6px; left: 70%; bottom: -10px; animation-duration: 10s; animation-delay: 3s; }

@keyframes stray-rise {
    0% {
        transform: translateY(0) translateX(0) scale(0.8);
        opacity: 0;
    }
    10% {
        opacity: 0.6;
        transform: translateY(-20px) translateX(5px) scale(0.9);
    }
    50% {
        transform: translateY(-50vh) translateX(-10px) scale(1.1);
        opacity: 0.5;
    }
    90% {
        opacity: 0.2;
        transform: translateY(-85vh) translateX(8px) scale(0.9);
    }
    100% {
        transform: translateY(-100vh) translateX(0) scale(0.8);
        opacity: 0;
    }
}

/* --- Medium Bubbles --- */
.medium-bubble {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 35%, rgba(62, 207, 207, 0.1), transparent 65%);
    border: 1px solid rgba(255, 255, 255, 0.12);
    z-index: 1;
    animation: medium-float ease-in-out infinite;
}

/* Inner highlight */
.medium-bubble::before {
    content: '';
    position: absolute;
    width: 40%;
    height: 40%;
    top: 15%;
    left: 20%;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.08), transparent 70%);
}

/* Wobble */
.medium-bubble::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    animation: wobble 4s ease-in-out infinite;
}

.medium-bubble-1 {
    width: 24px; height: 24px;
    top: 30%; right: 15%;
    animation-duration: 8s;
}

.medium-bubble-2 {
    width: 18px; height: 18px;
    top: 60%; left: 10%;
    animation-duration: 10s;
    animation-delay: 2s;
}

.medium-bubble-3 {
    width: 28px; height: 28px;
    top: 25%; left: 8%;
    animation-duration: 9s;
    animation-delay: 1s;
}

.medium-bubble-4 {
    width: 20px; height: 20px;
    top: 50%; right: 12%;
    animation-duration: 11s;
    animation-delay: 3s;
}

@keyframes medium-float {
    0%, 100% {
        transform: translateY(0) translateX(0);
    }
    25% {
        transform: translateY(-15px) translateX(8px);
    }
    50% {
        transform: translateY(-5px) translateX(-6px);
    }
    75% {
        transform: translateY(-20px) translateX(4px);
    }
}

@keyframes wobble {
    0%, 100% { border-radius: 50%; }
    25% { border-radius: 48% 52% 50% 50%; }
    50% { border-radius: 52% 48% 48% 52%; }
    75% { border-radius: 50% 50% 52% 48%; }
}

/* --- Macro Bubbles --- */
.macro-bubble {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, rgba(62, 207, 207, 0.06), transparent 60%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 1;
    animation: macro-drift ease-in-out infinite;
}

.macro-bubble::before {
    content: '';
    position: absolute;
    width: 30%;
    height: 20%;
    top: 12%;
    left: 18%;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), transparent);
}

.macro-bubble-1 {
    width: 100px; height: 100px;
    top: 20%; right: 8%;
    animation-duration: 12s;
}

.macro-bubble-2 {
    width: 80px; height: 80px;
    top: 35%; left: 5%;
    animation-duration: 14s;
    animation-delay: 2s;
}

.macro-bubble-3 {
    width: 90px; height: 90px;
    bottom: 20%; right: 10%;
    animation-duration: 11s;
    animation-delay: 1s;
}

@keyframes macro-drift {
    0%, 100% {
        transform: translateX(0) translateY(0);
    }
    25% {
        transform: translateX(20px) translateY(-10px);
    }
    50% {
        transform: translateX(-15px) translateY(-5px);
    }
    75% {
        transform: translateX(10px) translateY(8px);
    }
}

/* --- Golden Bubble --- */
.golden-bubble {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 35%, rgba(201, 168, 76, 0.2), transparent 65%);
    border: 1px solid rgba(201, 168, 76, 0.3);
    margin: 3rem auto 0;
    position: relative;
    animation: golden-pulse 4s ease-in-out infinite;
}

.golden-bubble::before {
    content: '';
    position: absolute;
    width: 35%;
    height: 25%;
    top: 15%;
    left: 20%;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(201, 168, 76, 0.3), transparent);
}

@keyframes golden-pulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(201, 168, 76, 0);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 0 30px 10px rgba(201, 168, 76, 0.08);
    }
}

/* --- Cursor-Following Bubble --- */
#cursor-bubble {
    position: fixed;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, rgba(62, 207, 207, 0.15), transparent 70%);
    border: 1px solid rgba(255, 255, 255, 0.15);
    pointer-events: none;
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.3s ease;
    will-change: transform;
}

body:hover #cursor-bubble {
    opacity: 1;
}

/* --- Background Bubble Field (Micro) --- */
.bubble-field {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.bubble-field .micro-bubble {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, rgba(62, 207, 207, 0.06), transparent 70%);
    border: 1px solid rgba(255, 255, 255, 0.06);
    animation: micro-rise linear infinite;
    will-change: transform, opacity;
}

@keyframes micro-rise {
    0% {
        transform: translateY(0) translateX(0) scale(0.8);
        opacity: 0;
    }
    10% {
        opacity: 0.5;
    }
    30% {
        transform: translateY(-30vh) translateX(12px) scale(1);
    }
    60% {
        transform: translateY(-60vh) translateX(-8px) scale(1.1);
    }
    90% {
        opacity: 0.3;
        transform: translateY(-90vh) translateX(5px) scale(0.9);
    }
    100% {
        transform: translateY(-105vh) translateX(0) scale(0.8);
        opacity: 0;
    }
}

/* --- Navigation Pill --- */
.nav-pill {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(26, 37, 64, 0.7);
    border: 1px solid rgba(62, 207, 207, 0.15);
    border-radius: 24px;
    padding: 0.5rem 1.5rem;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 100;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transition: width 300ms ease, background-color 500ms ease;
    overflow: hidden;
}

.pill-fill {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--phosphor-cyan);
    flex-shrink: 0;
    transition: transform 0.3s ease;
    box-shadow: 0 0 8px rgba(62, 207, 207, 0.4);
}

.pill-label {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 400;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--moonlit-foam);
    white-space: nowrap;
    opacity: 0.8;
}

/* --- Bounce-Enter Animation --- */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(40px);
    transition: none;
}

.animate-on-scroll.visible {
    animation: bounce-enter 600ms cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes bounce-enter {
    0% {
        opacity: 0;
        transform: translateY(40px);
    }
    70% {
        opacity: 1;
        transform: translateY(-8px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- Isometric Platform Reveal --- */
.iso-platform .iso-top,
.iso-platform .iso-right,
.iso-platform .iso-left {
    opacity: 0;
}

.iso-platform.visible .iso-top {
    animation: face-reveal-top 400ms cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
    animation-delay: 0ms;
}

.iso-platform.visible .iso-right {
    animation: face-reveal-right 400ms cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
    animation-delay: 80ms;
}

.iso-platform.visible .iso-left {
    animation: face-reveal-left 400ms cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
    animation-delay: 160ms;
}

@keyframes face-reveal-top {
    0% { opacity: 0; transform: var(--iso-rotate) translateY(-30px); }
    100% { opacity: 1; transform: var(--iso-rotate) translateY(0); }
}

@keyframes face-reveal-right {
    0% { opacity: 0; transform: skewY(-30deg) translateX(30px); }
    100% { opacity: 1; transform: skewY(-30deg) translateX(0); }
}

@keyframes face-reveal-left {
    0% { opacity: 0; transform: skewY(30deg) translateX(-30px); }
    100% { opacity: 1; transform: skewY(30deg) translateX(0); }
}

/* --- Footer --- */
.site-footer {
    position: relative;
    min-height: 20vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #050911;
    padding: 3rem 2rem;
}

.footer-bubble {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, rgba(62, 207, 207, 0.1), transparent 70%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 1.5rem;
    animation: footer-drift 6s ease-in-out infinite;
}

@keyframes footer-drift {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.footer-text {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--deep-tide-teal);
    opacity: 0.5;
    max-width: none;
}

/* --- Hover Bubble Release --- */
.content-island {
    overflow: visible;
}

.release-bubble {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, rgba(62, 207, 207, 0.12), transparent 70%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    pointer-events: none;
    z-index: 3;
    animation: release-up 1.2s ease-out forwards;
}

@keyframes release-up {
    0% {
        opacity: 0.8;
        transform: translateY(0) scale(1);
    }
    70% {
        opacity: 0.4;
        transform: translateY(-60px) scale(0.6);
    }
    100% {
        opacity: 0;
        transform: translateY(-80px) scale(0);
    }
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .hero-layout {
        flex-direction: column;
        gap: 2rem;
    }

    .hero-text {
        flex: 1 1 auto;
        max-width: 100%;
        text-align: center;
    }

    .hero-visual {
        flex: 1 1 auto;
        max-width: 100%;
    }

    .iso-pool {
        width: 300px;
        height: 220px;
    }

    .iso-pool .iso-top {
        width: 250px;
        height: 150px;
    }

    .iso-pool .iso-right,
    .iso-pool .iso-left {
        width: 150px;
        height: 60px;
    }

    .pool-water {
        width: 200px;
        height: 110px;
    }

    .chamber-shallow .chamber-content,
    .chamber-mid .chamber-content {
        flex-direction: column;
        gap: 2rem;
    }

    .content-island {
        max-width: 100%;
        padding: 2rem;
    }

    .island-right {
        margin-left: 0;
    }

    .iso-platform {
        width: 200px;
        height: 140px;
        margin: 0 auto;
    }

    .iso-platform .iso-top {
        width: 170px;
        height: 100px;
    }

    .iso-platform .iso-right,
    .iso-platform .iso-left {
        width: 100px;
        height: 40px;
    }

    .macro-bubble-1 { width: 60px; height: 60px; }
    .macro-bubble-2 { width: 50px; height: 50px; }
    .macro-bubble-3 { width: 55px; height: 55px; }
}

@media (max-width: 480px) {
    .chamber-content {
        padding: 3rem 1.25rem;
    }

    .content-island {
        padding: 1.5rem;
    }

    .hero-title {
        font-size: clamp(2.5rem, 12vw, 4rem);
    }

    .iso-pool {
        width: 240px;
        height: 180px;
    }

    .iso-pool .iso-top {
        width: 200px;
        height: 120px;
    }

    .iso-pool .iso-right,
    .iso-pool .iso-left {
        width: 120px;
        height: 50px;
    }
}
