/* ============================================
   op9.rs — Frosted Mineral Water Descent
   ============================================ */

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

:root {
    --frost-base: #f0f4f8;
    --frost-depth: #dce4ed;
    --text-primary: #2b3a4a;
    --text-body: #3d4f5f;
    --text-secondary: #6b7d8d;
    --accent-warm: #c47d5e;
    --accent-coral: #e07a5f;
    --watercolor-pink: #f2d0c4;
    --watercolor-teal: #a8d5d0;
    --deep-ground: #1e2d3d;
    --postcard-light: #f5ebe0;
    --postcard-warm: #ede4d8;
    --scroll-progress: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Nunito Sans', sans-serif;
    font-weight: 400;
    color: var(--text-primary);
    background: var(--frost-base);
    overflow-x: hidden;
    line-height: 1.72;
}

/* ---- Base Watercolor Wash ---- */
.watercolor-base {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background:
        radial-gradient(ellipse at 30% 60%, rgba(242, 208, 196, 0.35) 0%, transparent 70%),
        radial-gradient(ellipse at 70% 30%, rgba(168, 213, 208, 0.25) 0%, transparent 65%),
        radial-gradient(ellipse at 50% 80%, rgba(224, 122, 95, 0.08) 0%, transparent 60%);
    animation: wash-drift 30s ease-in-out infinite alternate;
}

@keyframes wash-drift {
    0% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(-20px, 15px) scale(1.03); }
    100% { transform: translate(15px, -10px) scale(0.98); }
}

/* ---- Rooms ---- */
.room {
    position: relative;
    width: 100%;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
    overflow: hidden;
}

.room-wash {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    opacity: 0;
    transition: opacity 0.8s ease;
}

.room-wash.visible {
    opacity: 1;
}

/* ---- Transition Zones ---- */
.transition-zone {
    position: relative;
    height: 50vh;
    z-index: 1;
    backdrop-filter: blur(0px);
    transition: backdrop-filter 0.5s ease;
}

.transition-zone.blurred {
    backdrop-filter: blur(20px);
}

/* ============================================
   ROOM 1: THE FOYER
   ============================================ */
.room-1 {
    background: linear-gradient(180deg, #e8eff5, var(--frost-base));
    flex-direction: column;
    gap: 2rem;
}

.room-1-wash {
    background:
        radial-gradient(ellipse at 25% 45%, rgba(242, 208, 196, 0.15) 0%, transparent 55%),
        radial-gradient(ellipse at 75% 55%, rgba(168, 213, 208, 0.12) 0%, transparent 50%);
    animation: wash-drift 25s ease-in-out infinite alternate;
}

.foyer-title {
    font-family: 'Bebas Neue', sans-serif;
    font-size: clamp(6rem, 18vw, 22rem);
    letter-spacing: 0.06em;
    color: var(--text-primary);
    z-index: 2;
    display: flex;
    align-items: baseline;
    opacity: 0;
    animation: fade-in 600ms ease 400ms forwards;
}

@keyframes fade-in {
    to { opacity: 1; }
}

.char {
    display: inline-block;
    transition: transform 0.1s linear;
    will-change: transform, opacity;
}

.char-dot {
    font-size: 0.6em;
    margin: 0 -0.02em;
}

/* Foyer bubbles */
.bubble-s1 {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 35%, rgba(255,255,255,0.5) 0%, rgba(168, 213, 208, 0.1) 60%, transparent 70%);
    border: 1px solid rgba(43, 58, 74, 0.08);
    z-index: 1;
}

.bubble-s1.b1 { width: 40px; height: 40px; bottom: 15%; right: 10%; animation: bubble-float 7s ease-in-out infinite; }
.bubble-s1.b2 { width: 25px; height: 25px; bottom: 20%; right: 15%; animation: bubble-float 8s ease-in-out 1s infinite; }
.bubble-s1.b3 { width: 55px; height: 55px; bottom: 10%; right: 5%; animation: bubble-pulse 3.5s ease-in-out infinite; }
.bubble-s1.b4 { width: 30px; height: 30px; bottom: 25%; right: 20%; animation: bubble-float 6s ease-in-out 2s infinite; }
.bubble-s1.b5 { width: 20px; height: 20px; bottom: 8%; right: 25%; animation: bubble-float 9s ease-in-out 0.5s infinite; }
.bubble-s1.b6 { width: 45px; height: 45px; bottom: 18%; right: 2%; animation: bubble-pulse 3.5s ease-in-out 1.2s infinite; }

@keyframes bubble-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-12px); }
}

@keyframes bubble-pulse {
    0%, 100% { transform: scale(1); opacity: 0.7; }
    50% { transform: scale(1.04); opacity: 0.9; }
}

.caveat-hint {
    font-family: 'Caveat', cursive;
    font-size: clamp(0.875rem, 1.5vw, 1.125rem);
    color: var(--accent-warm);
    position: absolute;
    bottom: 8%;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    opacity: 0.8;
    animation: hint-bob 2s ease-in-out infinite;
}

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

/* ============================================
   ROOM 2: THE STUDIO
   ============================================ */
.room-2 {
    background: linear-gradient(180deg, var(--frost-base), var(--frost-depth));
}

.room-2-wash {
    background:
        radial-gradient(ellipse at 40% 50%, rgba(242, 208, 196, 0.2) 0%, transparent 60%),
        radial-gradient(ellipse at 60% 40%, rgba(168, 213, 208, 0.15) 0%, transparent 55%);
}

.studio-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(3, auto);
    grid-template-areas:
        ". a a ."
        ". . b b"
        "c c . .";
    gap: 2rem;
    padding: 3rem;
    width: 100%;
    max-width: 1100px;
    z-index: 2;
}

.frost-card {
    background: rgba(240, 244, 248, 0.35);
    backdrop-filter: blur(12px) saturate(1.2);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(30, 45, 61, 0.06);
    padding: 2rem 2.2rem;
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.6s ease, transform 0.6s ease;
    position: relative;
}

.frost-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.card-a { grid-area: a; }
.card-b { grid-area: b; transition-delay: 150ms; }
.card-c { grid-area: c; transition-delay: 300ms; }

.card-title {
    font-family: 'Bebas Neue', sans-serif;
    font-size: clamp(1.5rem, 3vw, 2.2rem);
    letter-spacing: 0.06em;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
}

.frost-card p {
    font-family: 'Nunito Sans', sans-serif;
    font-weight: 300;
    font-size: clamp(0.9rem, 1.4vw, 1.1rem);
    line-height: 1.72;
    color: var(--text-body);
    max-width: 38ch;
}

.caveat-note {
    font-family: 'Caveat', cursive;
    font-size: 1rem;
    color: var(--accent-coral);
    position: absolute;
    top: -1.2rem;
    right: -0.5rem;
    transform: rotate(4deg);
}

/* ============================================
   ROOM 3: THE GALLERY
   ============================================ */
.room-3 {
    background: linear-gradient(180deg, var(--frost-depth), #d5e4e2);
}

.room-3-wash {
    background:
        radial-gradient(ellipse at 50% 50%, rgba(168, 213, 208, 0.35) 0%, transparent 65%),
        radial-gradient(ellipse at 30% 70%, rgba(242, 208, 196, 0.15) 0%, transparent 55%);
}

.gallery-strip {
    display: flex;
    gap: 2.5rem;
    align-items: center;
    z-index: 2;
    transition: transform 0.1s linear;
    will-change: transform;
    padding: 0 4rem;
}

.gallery-bubble {
    flex-shrink: 0;
    width: 180px;
    height: 180px;
    border-radius: 50%;
    position: relative;
    cursor: pointer;
    box-shadow: inset 0 0 30px rgba(255,255,255,0.5);
    border: 1px solid rgba(43, 58, 74, 0.08);
    overflow: hidden;
    animation: bubble-float 6s ease-in-out infinite;
}

.gallery-bubble:nth-child(3n) {
    animation: bubble-pulse 3.5s ease-in-out infinite;
}

.gallery-bubble:nth-child(2) { animation-delay: 0.8s; }
.gallery-bubble:nth-child(4) { animation-delay: 1.6s; }
.gallery-bubble:nth-child(5) { animation-delay: 0.4s; }
.gallery-bubble:nth-child(7) { animation-delay: 2s; }

.gb-fill {
    width: 100%;
    height: 100%;
    border-radius: 50%;
}

.gb-1 .gb-fill { background: radial-gradient(circle at 40% 35%, #f2d0c4 0%, #dce4ed 60%, transparent 100%); }
.gb-2 .gb-fill { background: radial-gradient(circle at 55% 40%, #a8d5d0 0%, #e8eff5 65%, transparent 100%); }
.gb-3 .gb-fill { background: radial-gradient(circle at 35% 50%, #e07a5f 0%, #f2d0c4 55%, transparent 100%); }
.gb-4 .gb-fill { background: radial-gradient(circle at 45% 30%, #dce4ed 0%, #a8d5d0 60%, transparent 100%); }
.gb-5 .gb-fill { background: radial-gradient(circle at 50% 45%, #c47d5e 0%, #f2d0c4 55%, transparent 100%); }
.gb-6 .gb-fill { background: radial-gradient(circle at 30% 55%, #a8d5d0 0%, #f0f4f8 65%, transparent 100%); }
.gb-7 .gb-fill { background: radial-gradient(circle at 60% 35%, #f2d0c4 0%, #a8d5d0 50%, transparent 100%); }

.gb-tooltip {
    position: absolute;
    bottom: -2.5rem;
    left: 50%;
    transform: translateX(-50%);
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1rem;
    letter-spacing: 0.06em;
    color: var(--text-primary);
    background: rgba(240, 244, 248, 0.6);
    backdrop-filter: blur(8px);
    padding: 0.3rem 0.8rem;
    border-radius: 8px;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.25s ease;
    pointer-events: none;
}

.gallery-bubble:hover .gb-tooltip {
    opacity: 1;
}

.gallery-hint {
    bottom: 12%;
    animation-name: hint-bob;
}

@media (max-width: 768px) {
    .gallery-bubble {
        width: 120px;
        height: 120px;
    }
}

/* ============================================
   ROOM 4: THE PROCESS
   ============================================ */
.room-4 {
    background: linear-gradient(180deg, #e8d8d0, #f0ddd5);
    flex-direction: column;
}

.room-4-wash {
    background:
        radial-gradient(ellipse at 45% 50%, rgba(242, 208, 196, 0.5) 0%, transparent 60%),
        radial-gradient(ellipse at 65% 60%, rgba(224, 122, 95, 0.12) 0%, transparent 55%);
}

.process-content {
    max-width: 600px;
    padding: 2rem;
    z-index: 2;
}

.process-line {
    font-family: 'Nunito Sans', sans-serif;
    font-weight: 400;
    font-size: clamp(1rem, 1.8vw, 1.25rem);
    line-height: 1.72;
    color: var(--text-primary);
    max-width: 38ch;
    margin-bottom: 1.5rem;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.process-line.visible {
    opacity: 1;
    transform: translateY(0);
}

.geo-accent {
    width: 32px;
    height: 32px;
    margin: 1rem auto;
    opacity: 0.5;
}

.starburst {
    background: none;
    position: relative;
}

.starburst::before, .starburst::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 2px;
    height: 100%;
    background: var(--accent-warm);
    transform-origin: center;
}

.starburst::before { transform: translate(-50%, -50%) rotate(0deg); }
.starburst::after { transform: translate(-50%, -50%) rotate(45deg); }

.bowtie {
    position: relative;
}

.bowtie::before, .bowtie::after {
    content: '';
    position: absolute;
    width: 0;
    height: 0;
    border-style: solid;
    top: 50%;
    left: 50%;
}

.bowtie::before {
    border-width: 12px 0 12px 14px;
    border-color: transparent transparent transparent var(--accent-warm);
    transform: translate(-1px, -50%);
}

.bowtie::after {
    border-width: 12px 14px 12px 0;
    border-color: transparent var(--accent-warm) transparent transparent;
    transform: translate(1px, -50%);
}

.bubble-lg {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 35%, rgba(255,255,255,0.4) 0%, rgba(242, 208, 196, 0.15) 60%, transparent 70%);
    border: 1px solid rgba(43, 58, 74, 0.06);
    z-index: 1;
}

.bubble-p1 { width: 160px; height: 160px; top: 10%; left: 5%; animation: bubble-float 8s ease-in-out infinite; }
.bubble-p2 { width: 200px; height: 200px; bottom: 8%; right: 3%; animation: bubble-pulse 3.5s ease-in-out 0.5s infinite; }
.bubble-p3 { width: 120px; height: 120px; top: 50%; right: 10%; animation: bubble-float 7s ease-in-out 1s infinite; }

/* ============================================
   ROOM 5: THE POSTCARD
   ============================================ */
.room-5 {
    background: linear-gradient(180deg, var(--postcard-light), var(--postcard-warm));
    flex-direction: column;
    gap: 2rem;
}

.room-5-wash {
    background:
        radial-gradient(ellipse at 70% 70%, rgba(224, 122, 95, 0.2) 0%, transparent 55%),
        radial-gradient(ellipse at 40% 50%, rgba(168, 213, 208, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 80%, rgba(242, 208, 196, 0.3) 0%, transparent 60%);
}

.postcard-content {
    z-index: 2;
    text-align: center;
}

.postcard-email {
    font-family: 'Bebas Neue', sans-serif;
    font-size: clamp(3rem, 8vw, 6rem);
    letter-spacing: 0.06em;
    color: var(--accent-warm);
    text-shadow: 0 2px 20px rgba(43, 58, 74, 0.15);
}

.postcard-socials {
    margin-top: 2rem;
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    justify-content: center;
}

.social-handle {
    font-family: 'Caveat', cursive;
    font-size: clamp(1rem, 2vw, 1.3rem);
    color: var(--accent-coral);
}

.sh-1 { transform: rotate(-3deg); }
.sh-2 { transform: rotate(5deg); }
.sh-3 { transform: rotate(-6deg); }

.postcard-splash {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 50%;
    height: 50%;
    pointer-events: none;
    z-index: 0;
    background:
        radial-gradient(ellipse at 60% 70%, rgba(224, 122, 95, 0.25) 0%, transparent 55%),
        radial-gradient(ellipse at 40% 80%, rgba(168, 213, 208, 0.2) 0%, transparent 50%),
        radial-gradient(ellipse at 70% 50%, rgba(242, 208, 196, 0.3) 0%, transparent 60%);
}

/* Rising bubbles */
.rising-bubbles {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 200px;
    height: 100%;
    z-index: 1;
    pointer-events: none;
    overflow: hidden;
}

.rise-bubble {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 35%, rgba(255,255,255,0.5) 0%, rgba(168, 213, 208, 0.1) 60%, transparent 70%);
    border: 1px solid rgba(43, 58, 74, 0.08);
    animation: bubble-rise linear infinite;
}

@keyframes bubble-rise {
    0% { transform: translateY(100vh) translateX(0); opacity: 0.7; }
    20% { opacity: 0.9; }
    100% { transform: translateY(-100px) translateX(20px); opacity: 0; }
}

.rb-1 { width: 20px; height: 20px; left: 30%; animation-duration: 8s; animation-delay: 0s; }
.rb-2 { width: 30px; height: 30px; left: 60%; animation-duration: 10s; animation-delay: 1.5s; }
.rb-3 { width: 15px; height: 15px; left: 45%; animation-duration: 7s; animation-delay: 3s; }
.rb-4 { width: 25px; height: 25px; left: 20%; animation-duration: 9s; animation-delay: 0.8s; }
.rb-5 { width: 18px; height: 18px; left: 70%; animation-duration: 11s; animation-delay: 4s; }
.rb-6 { width: 35px; height: 35px; left: 50%; animation-duration: 12s; animation-delay: 2s; }
.rb-7 { width: 12px; height: 12px; left: 35%; animation-duration: 6s; animation-delay: 5s; }
.rb-8 { width: 22px; height: 22px; left: 75%; animation-duration: 9.5s; animation-delay: 3.5s; }

.thanks-note {
    bottom: 4%;
    font-size: clamp(1rem, 2vw, 1.3rem);
    color: var(--accent-warm);
    animation: none;
    opacity: 0.7;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
    .studio-grid {
        grid-template-columns: 1fr;
        grid-template-areas:
            "a"
            "b"
            "c";
        padding: 2rem;
    }

    .foyer-title {
        font-size: clamp(4rem, 15vw, 8rem);
    }

    .process-content {
        padding: 1.5rem;
    }
}
