/* ============================================
   bada.moe - McBling Underwater Experience
   ============================================ */

/* CSS Custom Properties */
:root {
    --deep-honey: #8B6914;
    --golden-cream: #F5E6C8;
    --caramel-mist: #D4B896;
    --submerged-amber: #3D2B1A;
    --bubble-glow: #FF6B8A;
    --aqua-refract: #4ECDC4;
    --chrome-glint: #E8D5A3;
    --deep-water: #1A1209;

    --font-display: 'Outfit', sans-serif;
    --font-body: 'Alegreya Sans', sans-serif;

    --elastic-entrance: cubic-bezier(0.68, -0.55, 0.265, 1.55);
    --elastic-hover: cubic-bezier(0.175, 0.885, 0.32, 1.275);
    --elastic-bubble: cubic-bezier(0.34, 1.56, 0.64, 1);

    --masonry-gap: 16px;
    --max-width: 1120px;
    --nav-height: 56px;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    font-weight: 400;
    font-size: 17px;
    line-height: 1.65;
    letter-spacing: 0.01em;
    color: var(--submerged-amber);
    background: linear-gradient(to bottom, #F5E6C8 0%, #D4B896 40%, #3D2B1A 85%, #1A1209 100%);
    background-attachment: fixed;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* ============================================
   Rhinestone Texture Overlay
   ============================================ */
.rhinestone-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    background: radial-gradient(circle 1px at 8px 8px, rgba(255,255,255,0.4) 0%, transparent 50%);
    background-size: 16px 16px;
    opacity: 0.03;
}

/* ============================================
   Floating Pill Navigation
   ============================================ */
.pill-nav {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 20px;
    background: rgba(245, 230, 200, 0.25);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-radius: 40px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    animation: navFloat 4s ease-in-out infinite;
}

@keyframes navFloat {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(-3px); }
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    text-decoration: none;
    color: var(--submerged-amber);
    border-radius: 20px;
    transition: all 0.4s var(--elastic-hover);
}

.nav-item:hover {
    background: rgba(245, 230, 200, 0.3);
}

.nav-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--caramel-mist);
    transition: all 0.4s var(--elastic-hover);
}

.nav-item.active .nav-dot {
    background: var(--bubble-glow);
    transform: scale(1.3);
    box-shadow: 0 0 8px rgba(255, 107, 138, 0.4);
    animation: dotPulse 2s ease-in-out infinite;
}

@keyframes dotPulse {
    0%, 100% { transform: scale(1.3); }
    50% { transform: scale(1.0) scaleX(1.3); }
}

.nav-item:hover .nav-dot {
    transform: scaleX(1.3);
}

.nav-label {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    opacity: 0.75;
}

/* ============================================
   Depth Zones - Common
   ============================================ */
.depth-zone {
    position: relative;
    min-height: 100vh;
    overflow: hidden;
}

/* ============================================
   SURFACE ZONE (Hero)
   ============================================ */
.surface-zone {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    position: relative;
}

.hero-blob {
    position: absolute;
    width: 600px;
    height: 600px;
    top: -50px;
    left: -100px;
    z-index: 0;
    animation: blobMorph 16s ease-in-out infinite;
}

@keyframes blobMorph {
    0%, 100% { transform: scale(1) rotate(0deg); }
    25% { transform: scale(1.05) rotate(3deg); }
    50% { transform: scale(0.97) rotate(-2deg); }
    75% { transform: scale(1.03) rotate(1deg); }
}

/* Sparkle Particles */
.sparkle-field {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    pointer-events: none;
}

.sparkle {
    position: absolute;
    width: 2px;
    height: 2px;
    background: var(--chrome-glint);
    border-radius: 50%;
    animation: sparkle var(--sparkle-duration) ease-in-out infinite;
    animation-delay: var(--sparkle-delay);
}

@keyframes sparkle {
    0%, 100% { opacity: 0; transform: scale(0.5); }
    50% { opacity: 1; transform: scale(1.5); }
}

/* Hero Content */
.hero-content {
    position: relative;
    z-index: 10;
    text-align: center;
}

.hero-title {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: clamp(56px, 12vw, 96px);
    text-transform: uppercase;
    letter-spacing: -0.04em;
    line-height: 0.95;
    background: linear-gradient(90deg, #E8D5A3, #8B6914, #E8D5A3);
    background-size: 200% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    -webkit-text-stroke: 1px rgba(139, 105, 20, 0.3);
    animation: chromeShimmer 4s linear infinite;
    margin-bottom: 20px;
}

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

.hero-subtitle {
    font-family: var(--font-body);
    font-weight: 500;
    font-size: clamp(20px, 3vw, 32px);
    color: var(--submerged-amber);
    opacity: 0.7;
    letter-spacing: 0.04em;
}

/* ============================================
   Bubble System
   ============================================ */
.bubble-field {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
}

.bubble {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, rgba(255,255,255,0.3), transparent 60%);
    box-shadow: inset 0 -4px 8px rgba(139,105,20,0.15);
    border: 1px solid rgba(255,255,255,0.2);
    animation: bubbleRise var(--bubble-duration) linear infinite;
    animation-delay: var(--bubble-delay);
    bottom: -120px;
    left: var(--bubble-x);
    width: var(--bubble-size);
    height: var(--bubble-size);
    opacity: 0;
}

@keyframes bubbleRise {
    0% {
        transform: translateY(0) translateX(0);
        opacity: 0;
    }
    5% {
        opacity: var(--bubble-opacity, 0.6);
    }
    90% {
        opacity: var(--bubble-opacity, 0.6);
    }
    100% {
        transform: translateY(calc(-100vh - 200px)) translateX(var(--bubble-drift, 30px));
        opacity: 0;
    }
}

/* Bubble Clusters in masonry cells */
.bubble-cluster {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.cluster-bubble {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, rgba(255,255,255,0.35), transparent 60%);
    box-shadow: inset 0 -3px 6px rgba(139,105,20,0.12);
    border: 1px solid rgba(255,255,255,0.18);
    animation: clusterFloat var(--float-duration) ease-in-out infinite;
    animation-delay: var(--float-delay);
}

@keyframes clusterFloat {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-15px) scale(1.05); }
}

/* ============================================
   SHIMMER ZONE (Masonry Content)
   ============================================ */
.shimmer-zone {
    position: relative;
    padding: 80px 0 120px;
}

.flank-blob {
    position: absolute;
    z-index: 0;
    animation: blobMorph 20s ease-in-out infinite;
}

.flank-blob-left {
    width: 300px;
    height: 300px;
    left: -80px;
    top: 35%;
}

.flank-blob-right {
    width: 250px;
    height: 250px;
    right: -60px;
    top: 70%;
    animation-delay: -8s;
}

/* Masonry Grid */
.masonry-grid {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--masonry-gap);
    columns: 4;
    column-gap: var(--masonry-gap);
    position: relative;
    z-index: 5;
}

.masonry-cell {
    break-inside: avoid;
    margin-bottom: var(--masonry-gap);
    border-radius: 28px;
    background: linear-gradient(135deg, rgba(245,230,200,0.6) 0%, rgba(212,184,150,0.3) 100%);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    transform: rotate(var(--rotation, 0deg));
    transition: transform 0.5s var(--elastic-hover), box-shadow 0.5s var(--elastic-hover);
    overflow: hidden;
}

.masonry-cell:hover {
    transform: rotate(var(--rotation, 0deg)) scale(1.03);
    box-shadow: 0 12px 40px rgba(26, 18, 9, 0.15);
}

/* Cell Sizes */
.cell-square {
    padding: 32px;
}

.cell-tall {
    padding: 40px 32px;
    min-height: 340px;
    display: flex;
    align-items: flex-start;
}

.cell-medium {
    padding: 32px;
    min-height: 240px;
}

.cell-wide {
    column-span: all;
    padding: 40px 48px;
}

.cell-bubble {
    min-height: 200px;
    padding: 0;
    background: linear-gradient(135deg, rgba(78,205,196,0.06) 0%, rgba(255,107,138,0.04) 100%);
}

/* Cell Inner Content */
.cell-inner {
    position: relative;
    z-index: 2;
}

.cell-tag {
    display: inline-block;
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--deep-honey);
    opacity: 0.75;
    margin-bottom: 12px;
    padding: 4px 10px;
    background: rgba(139, 105, 20, 0.08);
    border-radius: 12px;
}

.cell-title {
    font-family: var(--font-body);
    font-weight: 600;
    font-size: clamp(20px, 2.5vw, 28px);
    line-height: 1.2;
    color: var(--submerged-amber);
    margin-bottom: 12px;
}

.cell-text {
    font-family: var(--font-body);
    font-weight: 400;
    font-size: 16px;
    line-height: 1.65;
    color: var(--submerged-amber);
    max-width: 580px;
    opacity: 0.85;
}

/* Scroll Reveal States */
.reveal-cell {
    opacity: 0;
    transform: rotate(var(--rotation, 0deg)) translateY(40px) scale(0.95);
    transition: opacity 0.7s var(--elastic-entrance),
                transform 0.7s var(--elastic-entrance);
}

.reveal-cell.revealed {
    opacity: 1;
    transform: rotate(var(--rotation, 0deg)) translateY(0) scale(1);
}

.decorative-cell {
    opacity: 0;
    transform: scale(0.9);
    transition: opacity 0.8s var(--elastic-bubble),
                transform 0.8s var(--elastic-bubble);
}

.decorative-cell.revealed {
    opacity: 1;
    transform: scale(1);
}

/* ============================================
   DEEP ZONE (Footer)
   ============================================ */
.deep-zone {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    position: relative;
    background: linear-gradient(to bottom, transparent 0%, rgba(26,18,9,0.4) 100%);
}

.jellyfish-blob {
    position: absolute;
    width: 450px;
    height: 450px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 0;
    animation: jellyfishPulse 3s ease-in-out infinite;
}

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

.jellyfish-path {
    animation: blobMorph 12s ease-in-out infinite;
}

.deep-content {
    position: relative;
    z-index: 10;
    text-align: center;
    max-width: 600px;
    padding: 0 24px;
}

.deep-statement {
    font-family: var(--font-body);
    font-weight: 500;
    font-size: clamp(22px, 3vw, 30px);
    line-height: 1.5;
    color: var(--golden-cream);
    margin-bottom: 32px;
    opacity: 0.9;
}

.deep-label {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--chrome-glint);
    opacity: 0.5;
}

/* ============================================
   Reduced Motion
   ============================================ */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .bubble, .sparkle, .cluster-bubble {
        display: none;
    }

    .reveal-cell {
        opacity: 1;
        transform: rotate(var(--rotation, 0deg)) translateY(0) scale(1);
    }

    .decorative-cell {
        opacity: 1;
        transform: scale(1);
    }

    .hero-title {
        background-position: 0% 50%;
    }
}

/* ============================================
   Responsive Design
   ============================================ */

/* Tablet */
@media (max-width: 900px) {
    .masonry-grid {
        columns: 2;
    }

    .cell-wide {
        column-span: all;
    }

    .hero-blob {
        width: 400px;
        height: 400px;
    }

    .flank-blob {
        display: none;
    }

    .jellyfish-blob {
        width: 300px;
        height: 300px;
    }
}

/* Mobile */
@media (max-width: 600px) {
    .masonry-grid {
        columns: 1;
    }

    .cell-wide {
        column-span: none;
        padding: 32px;
    }

    .cell-tall {
        min-height: auto;
        padding: 32px;
    }

    .pill-nav {
        padding: 6px 14px;
        gap: 4px;
    }

    .nav-label {
        font-size: 10px;
    }

    .nav-item {
        padding: 6px 8px;
    }

    .hero-blob {
        width: 280px;
        height: 280px;
        top: 10%;
        left: -60px;
    }

    .jellyfish-blob {
        width: 250px;
        height: 250px;
    }

    .deep-statement {
        font-size: 20px;
    }
}
