/* ===================================
   RRIPPL.com — Memphis Aquatic Playground
   =================================== */

/* --- CSS Custom Properties --- */
:root {
    --deep-coffee: #3B2F2F;
    --burnt-sienna: #B56B3A;
    --honey-ochre: #E8B960;
    --sage-teal: #5B8C7A;
    --warm-cream: #F5F0E8;
    --sand-dollar: #D4C4A8;
    --deep-slate-blue: #2E4A62;
    --terracotta-pop: #E85D3A;
    --burnt-sienna-alt: #C0703A;
    --body-text-dark: #4A3F35;

    --font-heading: 'Fraunces', serif;
    --font-body: 'Source Sans 3', sans-serif;
    --font-accent: 'Anybody', sans-serif;

    --ease-water: cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    font-size: 18px;
    line-height: 1.65;
    color: var(--deep-coffee);
    background: var(--deep-coffee);
    overflow-x: hidden;
}

h1, h2, h3 {
    font-family: var(--font-heading);
    font-variation-settings: 'WONK' 1;
}

/* --- Memphis Decorative Overlay --- */
#memphis-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 100;
    overflow: hidden;
}

.memphis-shape {
    position: absolute;
    opacity: 0.18;
    transform: rotate(var(--rot, 0deg));
    animation: memphis-drift var(--drift-dur, 20s) ease-in-out infinite alternate;
}

.memphis-triangle {
    width: 0;
    height: 0;
    border-left: 24px solid transparent;
    border-right: 24px solid transparent;
    border-bottom: 42px solid var(--terracotta-pop);
}

.memphis-halfcircle {
    width: 50px;
    height: 25px;
    background: var(--honey-ochre);
    border-radius: 50px 50px 0 0;
}

.memphis-zigzag {
    width: 60px;
    height: 20px;
    background: repeating-linear-gradient(
        135deg,
        var(--burnt-sienna) 0px,
        var(--burnt-sienna) 4px,
        transparent 4px,
        transparent 8px
    );
}

.memphis-dotted-arc {
    width: 40px;
    height: 40px;
    border: 3px dotted var(--honey-ochre);
    border-radius: 50%;
    background: transparent;
    border-bottom-color: transparent;
    border-left-color: transparent;
}

.memphis-squiggle {
    width: 60px;
    height: 20px;
    position: absolute;
}

.memphis-squiggle::before {
    content: '';
    display: block;
    width: 60px;
    height: 20px;
    background:
        radial-gradient(circle at 10px 0px, transparent 8px, var(--burnt-sienna-alt) 8px, var(--burnt-sienna-alt) 11px, transparent 11px),
        radial-gradient(circle at 30px 20px, transparent 8px, var(--burnt-sienna-alt) 8px, var(--burnt-sienna-alt) 11px, transparent 11px),
        radial-gradient(circle at 50px 0px, transparent 8px, var(--burnt-sienna-alt) 8px, var(--burnt-sienna-alt) 11px, transparent 11px);
}

@keyframes memphis-drift {
    from {
        transform: rotate(var(--rot, 0deg)) translateX(0);
    }
    to {
        transform: rotate(var(--rot, 0deg)) translateX(var(--drift-x, 30px));
    }
}

/* --- Hero Section --- */
#hero {
    position: relative;
    width: 100%;
    height: 100vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 1;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse at center, var(--deep-slate-blue) 0%, var(--deep-coffee) 70%);
    z-index: 0;
}

/* --- Ripple Rings --- */
.ripple-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1;
}

.ripple-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100px;
    height: 100px;
    margin-top: -50px;
    margin-left: -50px;
    border-radius: 50%;
    border: 2px solid var(--burnt-sienna-alt);
    opacity: 0;
    animation: ripple-expand 4s var(--ease-water) infinite;
}

.ripple-ring:nth-child(1) { border-color: var(--burnt-sienna-alt); }
.ripple-ring:nth-child(2) { border-color: #C87A4A; }
.ripple-ring:nth-child(3) { border-color: #A88060; }
.ripple-ring:nth-child(4) { border-color: #8A8A6E; }
.ripple-ring:nth-child(5) { border-color: #6E8C76; }
.ripple-ring:nth-child(6) { border-color: var(--sage-teal); }

@keyframes ripple-expand {
    0% {
        transform: scale(0.1);
        opacity: 0.8;
    }
    100% {
        transform: scale(3);
        opacity: 0;
    }
}

/* --- Hero Title --- */
.hero-title {
    position: relative;
    z-index: 2;
    font-family: var(--font-heading);
    font-weight: 900;
    font-size: clamp(48px, 10vw, 96px);
    font-variation-settings: 'WONK' 1;
    color: var(--warm-cream);
    letter-spacing: 0.08em;
    text-shadow: 0 2px 20px rgba(46, 74, 98, 0.5);
}

.hero-tagline {
    position: relative;
    z-index: 2;
    font-family: var(--font-accent);
    font-weight: 500;
    font-size: 16px;
    color: var(--honey-ochre);
    letter-spacing: 0.25em;
    text-transform: lowercase;
    margin-top: 16px;
    opacity: 0.85;
}

/* --- Hero Bubbles --- */
.hero-bubbles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

.bubble {
    position: absolute;
    bottom: -120px;
    left: var(--left, 50%);
    width: var(--size, 20px);
    height: var(--size, 20px);
    border-radius: 50%;
    background: rgba(232, 185, 96, 0.12);
    border: 1px solid var(--honey-ochre);
    box-shadow: inset 0 -4px 8px rgba(94, 140, 122, 0.3);
    animation: bubble-rise var(--dur, 10s) var(--ease-water) infinite;
    animation-delay: var(--delay, 0s);
}

.bubble::before {
    content: '';
    position: absolute;
    top: 15%;
    left: 20%;
    width: 30%;
    height: 25%;
    border-radius: 50%;
    background: radial-gradient(ellipse, rgba(255,255,255,0.35) 0%, transparent 70%);
}

@keyframes bubble-rise {
    0% {
        transform: translateY(0) translateX(0);
        opacity: 0;
    }
    10% {
        opacity: 0.7;
    }
    50% {
        transform: translateY(-50vh) translateX(var(--drift, 20px));
    }
    90% {
        opacity: 0.4;
    }
    100% {
        transform: translateY(-120vh) translateX(calc(var(--drift, 20px) * -0.5));
        opacity: 0;
    }
}

/* --- Wave Band Sections --- */
.wave-band {
    position: relative;
    z-index: 2;
    padding: 0 0 64px 0;
    min-height: 60vh;
}

.wave-top {
    position: relative;
    margin-top: -1px;
    z-index: 3;
}

.wave-top svg {
    display: block;
    width: 100%;
    height: 80px;
}

.wave-band-1 {
    background: var(--warm-cream);
}
.wave-band-1 .wave-content { color: var(--body-text-dark); }
.wave-band-1 h2, .wave-band-1 h3 { color: var(--deep-coffee); }
.wave-band-1 p { color: #4A3F35; }

.wave-band-2 {
    background: var(--sand-dollar);
}
.wave-band-2 .wave-content { color: var(--body-text-dark); }
.wave-band-2 h2, .wave-band-2 h3 { color: var(--deep-coffee); }
.wave-band-2 p { color: #4A3F35; }

.wave-band-3 {
    background: var(--sage-teal);
}
.wave-band-3 .wave-content { color: var(--warm-cream); }
.wave-band-3 h2, .wave-band-3 h3 { color: var(--warm-cream); }
.wave-band-3 p { color: #E8DFD0; }

.wave-band-4 {
    background: var(--deep-slate-blue);
}
.wave-band-4 .wave-content { color: var(--warm-cream); }
.wave-band-4 h2, .wave-band-4 h3 { color: var(--warm-cream); }
.wave-band-4 p { color: #E8DFD0; }

/* --- Wave Content --- */
.wave-content {
    max-width: 960px;
    margin: 0 auto;
    padding: 64px 32px;
    display: flex;
    flex-wrap: wrap;
    gap: 32px;
    justify-content: center;
}

.content-pebble {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 40% 60% 55% 45% / 60% 40% 45% 55%;
    padding: 48px 40px;
    max-width: 520px;
    transition: border-radius 0.6s var(--ease-water),
                background-color 0.6s var(--ease-water),
                opacity 0.6s var(--ease-water),
                transform 0.6s var(--ease-water);
}

.content-pebble-alt {
    border-radius: 55% 45% 40% 60% / 45% 55% 60% 40%;
    max-width: 440px;
}

.content-pebble-small {
    border-radius: 50% 50% 45% 55% / 55% 45% 50% 50%;
    max-width: 360px;
    padding: 32px 28px;
}

.wave-band-1 .content-pebble { background: rgba(59, 47, 47, 0.05); }
.wave-band-2 .content-pebble { background: rgba(59, 47, 47, 0.06); }
.wave-band-3 .content-pebble { background: rgba(245, 240, 232, 0.1); }
.wave-band-4 .content-pebble { background: rgba(245, 240, 232, 0.08); }

.content-pebble h2 {
    font-weight: 800;
    font-size: clamp(36px, 5vw, 48px);
    margin-bottom: 16px;
    font-variation-settings: 'WONK' 1;
}

.content-pebble h3 {
    font-weight: 700;
    font-size: 24px;
    margin-bottom: 12px;
    font-variation-settings: 'WONK' 1;
}

.content-pebble p {
    font-family: var(--font-body);
    font-weight: 400;
    font-size: 18px;
    line-height: 1.65;
}

.contact-text {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 28px;
    color: var(--honey-ochre) !important;
    margin-bottom: 16px;
    font-variation-settings: 'WONK' 1;
}

/* --- Skeleton Loading / Reveal --- */
.skeleton {
    position: relative;
    overflow: hidden;
}

.skeleton > * {
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.6s var(--ease-water), transform 0.6s var(--ease-water);
}

.skeleton::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, var(--sand-dollar) 25%, var(--warm-cream) 50%, var(--sand-dollar) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: inherit;
    z-index: 5;
    transition: opacity 0.6s var(--ease-water);
}

.wave-band-3 .skeleton::after {
    background: linear-gradient(90deg, #4E7D6C 25%, #6A9E89 50%, #4E7D6C 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

.wave-band-4 .skeleton::after {
    background: linear-gradient(90deg, #263F54 25%, #365776 50%, #263F54 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Revealed state */
.skeleton.revealed::after {
    opacity: 0;
    pointer-events: none;
}

.skeleton.revealed > * {
    opacity: 1;
    transform: translateY(0);
}

.skeleton.revealed > *:nth-child(1) { transition-delay: 0.1s; }
.skeleton.revealed > *:nth-child(2) { transition-delay: 0.25s; }
.skeleton.revealed > *:nth-child(3) { transition-delay: 0.4s; }

/* --- Bubble Navigation --- */
#bubble-nav {
    position: fixed;
    bottom: 32px;
    right: 32px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    z-index: 200;
}

.nav-bubble {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid rgba(232, 185, 96, 0.5);
    background: rgba(46, 74, 98, 0.5);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    animation: bob 3s ease-in-out infinite;
    transition: width 0.4s var(--ease-water),
                border-radius 0.4s var(--ease-water),
                background 0.3s var(--ease-water);
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-bubble:nth-child(2) { animation-delay: 0.3s; }
.nav-bubble:nth-child(3) { animation-delay: 0.6s; }
.nav-bubble:nth-child(4) { animation-delay: 0.9s; }
.nav-bubble:nth-child(5) { animation-delay: 1.2s; }

.nav-label {
    font-family: var(--font-accent);
    font-size: 12px;
    font-weight: 500;
    color: var(--warm-cream);
    white-space: nowrap;
    opacity: 0;
    transform: scale(0.7);
    transition: opacity 0.3s var(--ease-water), transform 0.3s var(--ease-water);
    pointer-events: none;
}

.nav-bubble:hover {
    width: 100px;
    border-radius: 20px;
    background: rgba(46, 74, 98, 0.75);
}

.nav-bubble:hover .nav-label {
    opacity: 1;
    transform: scale(1);
}

.nav-bubble::before {
    content: '';
    position: absolute;
    top: 20%;
    left: 25%;
    width: 25%;
    height: 20%;
    border-radius: 50%;
    background: radial-gradient(ellipse, rgba(255,255,255,0.25) 0%, transparent 70%);
    pointer-events: none;
}

@keyframes bob {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-4px); }
}

/* --- Bottom Fade --- */
.bottom-fade {
    height: 128px;
    background: linear-gradient(to bottom, var(--deep-slate-blue), var(--deep-coffee));
    position: relative;
    z-index: 2;
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .wave-content {
        padding: 48px 20px;
    }

    .content-pebble {
        padding: 32px 24px;
        max-width: 100%;
    }

    .content-pebble-alt,
    .content-pebble-small {
        max-width: 100%;
    }

    #bubble-nav {
        bottom: 16px;
        right: 16px;
    }

    .nav-bubble {
        width: 36px;
        height: 36px;
    }

    .hero-title {
        font-size: clamp(40px, 12vw, 72px);
    }

    .memphis-shape {
        opacity: 0.1;
    }
}

@media (max-width: 480px) {
    .wave-content {
        padding: 32px 16px;
        gap: 24px;
    }

    .content-pebble {
        padding: 24px 20px;
    }
}
