/* ============================================
   goomimi.com - Soap-Bubble Pastel Dreamscape
   Fonts: Quicksand (display), Nunito (body), Baloo 2 (accent)
   Palette: Cloud White, Lavender Mist, Mint Foam, Peach Blossom,
            Lemon Cream, Dusty Plum, Warm Gray, Lilac Shadow
   ============================================ */

/* --- CSS Custom Properties --- */
:root {
    --cloud-white: #FFF8F5;
    --lavender-mist: #C8A2E0;
    --mint-foam: #A8E6CF;
    --peach-blossom: #FFB8B8;
    --lemon-cream: #FFF3B0;
    --dusty-plum: #5B4A6A;
    --warm-gray: #8E7F92;
    --lilac-shadow: #E0D0F0;
    --pure-white: #FFFFFF;
    --pure-black: #000000;
    --zone-mint: #F0FFF5;
    --zone-peach: #FFF5F0;
    --zone-lilac: #F8F0FF;

    --font-display: 'Quicksand', sans-serif;
    --font-body: 'Nunito', sans-serif;
    --font-accent: 'Baloo 2', cursive;

    --bubble-shadow: 0 4px 12px rgba(224, 208, 240, 0.3);
    --bubble-shadow-hover: 0 12px 32px rgba(224, 208, 240, 0.5);
    --hover-lift: translateY(-8px) scale(1.03);
    --hover-on: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    --hover-off: all 0.5s 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;
    overflow-x: hidden;
}

body {
    font-family: var(--font-body);
    background-color: var(--cloud-white);
    color: var(--dusty-plum);
    overflow-x: hidden;
    min-height: 100vh;
    line-height: 1.75;
    font-size: clamp(1rem, 1.2vw + 0.5rem, 1.25rem);
    font-weight: 400;
    position: relative;
    transition: background-color 0.1s linear;
}

/* --- Typography --- */
.headline {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(2rem, 5vw + 0.5rem, 4.5rem);
    letter-spacing: 0.02em;
    color: var(--dusty-plum);
    line-height: 1.2;
    margin-bottom: 0.5em;
}

h2.headline {
    font-size: clamp(1.6rem, 4vw + 0.3rem, 3.5rem);
}

h3.headline {
    font-size: clamp(1.2rem, 3vw + 0.2rem, 2.5rem);
}

.body-text {
    font-family: var(--font-body);
    font-weight: 400;
    font-size: clamp(1rem, 1.2vw + 0.5rem, 1.25rem);
    line-height: 1.75;
    color: var(--dusty-plum);
}

.label-text {
    font-family: var(--font-accent);
    font-weight: 500;
    font-size: clamp(0.9rem, 1.2vw + 0.2rem, 1.3rem);
    color: var(--dusty-plum);
    margin: 0.5em 0 0.25em;
}

.caption-text {
    font-family: var(--font-body);
    font-weight: 400;
    font-size: clamp(0.75rem, 1vw, 1rem);
    color: var(--warm-gray);
    line-height: 1.6;
}

/* --- Background Bubbles --- */
.bg-bubbles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.bg-bubble {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.3), rgba(200, 162, 224, 0.08));
    border: 1px solid var(--lilac-shadow);
    opacity: 0.2;
    animation: bubble-float 12s ease-in-out infinite;
    will-change: transform;
}

.bg-bubble:nth-child(even) {
    background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.3), rgba(168, 230, 207, 0.08));
    opacity: 0.18;
    animation-duration: 14s;
}

.bg-bubble:nth-child(3n) {
    background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.3), rgba(255, 184, 184, 0.08));
    opacity: 0.15;
    animation-duration: 10s;
}

.bg-bubble:nth-child(5n) {
    background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.3), rgba(255, 243, 176, 0.1));
    opacity: 0.16;
    animation-duration: 16s;
}

@keyframes bubble-float {
    0%, 100% {
        transform: translateY(0) scale(1);
    }
    33% {
        transform: translateY(-15px) scale(1.02);
    }
    66% {
        transform: translateY(10px) scale(0.98);
    }
}

/* --- Sparkles (4-pointed CSS stars) --- */
.sparkles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.sparkle {
    position: absolute;
    width: 8px;
    height: 8px;
    animation: sparkle-pulse 2s ease-in-out infinite;
}

.sparkle::before,
.sparkle::after {
    content: '';
    position: absolute;
    background: var(--lemon-cream);
}

.sparkle::before {
    width: 8px;
    height: 3px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border-radius: 1px;
}

.sparkle::after {
    width: 3px;
    height: 8px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border-radius: 1px;
}

@keyframes sparkle-pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 0.6;
    }
    50% {
        transform: scale(1.3);
        opacity: 1;
    }
}

/* --- Dotted Path SVG --- */
.dotted-path {
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    opacity: 0.35;
}

/* --- Content Zones / Sections --- */
.content-zone {
    position: relative;
    min-height: 100vh;
    padding: 10vh 5vw;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
}

/* --- Bubble Clusters --- */
.bubble-cluster {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    align-items: center;
    justify-content: center;
    max-width: 1100px;
    padding: 2rem;
    position: relative;
}

.cluster-right {
    justify-content: flex-end;
    margin-left: auto;
    margin-right: 5vw;
}

.cluster-left {
    justify-content: flex-start;
    margin-right: auto;
    margin-left: 5vw;
}

.cluster-center {
    justify-content: center;
    margin: 0 auto;
}

/* --- Content Bubbles (core container element) --- */
.content-bubble {
    background: radial-gradient(ellipse at 25% 20%, rgba(255, 255, 255, 0.7), rgba(200, 162, 224, 0.1));
    background-color: rgba(255, 255, 255, 0.85);
    border: 1px solid var(--lilac-shadow);
    box-shadow: var(--bubble-shadow);
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: var(--hover-off);
    position: relative;
    overflow: hidden;
}

/* Hover-lift: springy overshoot on hover */
.content-bubble:hover {
    transform: var(--hover-lift);
    box-shadow: var(--bubble-shadow-hover);
    transition: var(--hover-on);
}

/* Jiggle on click animation */
.content-bubble.jiggling {
    animation: jiggle 0.4s ease-in-out;
}

@keyframes jiggle {
    0% { transform: rotate(0deg); }
    20% { transform: rotate(-2deg); }
    40% { transform: rotate(2deg); }
    60% { transform: rotate(-1deg); }
    80% { transform: rotate(1deg); }
    100% { transform: rotate(0deg); }
}

/* --- Bubble Size Variants --- */
.bubble-large {
    width: clamp(260px, 50vw, 420px);
    height: auto;
    min-height: clamp(260px, 40vw, 400px);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.bubble-medium {
    width: clamp(200px, 35vw, 320px);
    min-height: clamp(180px, 28vw, 280px);
    border-radius: 48% 52% 45% 55% / 50% 46% 54% 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.bubble-wide {
    width: clamp(280px, 60vw, 600px);
    min-height: clamp(120px, 18vw, 220px);
    border-radius: 40% 60% 55% 45% / 55% 45% 50% 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2.5rem 3rem;
}

.bubble-small-decor {
    width: 80px;
    height: 80px;
    padding: 0;
    border-radius: 50%;
    background: radial-gradient(ellipse at 30% 25%, rgba(255, 255, 255, 0.6), rgba(200, 162, 224, 0.15));
    background-color: rgba(200, 162, 224, 0.2);
    flex-shrink: 0;
}

.bubble-tiny-decor {
    width: 40px;
    height: 40px;
    padding: 0;
    border-radius: 50%;
    background: radial-gradient(ellipse at 30% 25%, rgba(255, 255, 255, 0.5), rgba(200, 162, 224, 0.1));
    background-color: rgba(200, 162, 224, 0.15);
    flex-shrink: 0;
}

/* --- Bubble Color Variants --- */
.bubble-accent {
    background-color: rgba(200, 162, 224, 0.15);
    background: radial-gradient(ellipse at 25% 20%, rgba(255, 255, 255, 0.6), rgba(200, 162, 224, 0.15));
}

.bubble-mint {
    background-color: rgba(168, 230, 207, 0.2);
    background: radial-gradient(ellipse at 25% 20%, rgba(255, 255, 255, 0.6), rgba(168, 230, 207, 0.2));
}

.bubble-peach {
    background-color: rgba(255, 184, 184, 0.2);
    background: radial-gradient(ellipse at 25% 20%, rgba(255, 255, 255, 0.6), rgba(255, 184, 184, 0.2));
}

.bubble-lemon {
    background-color: rgba(255, 243, 176, 0.3);
    background: radial-gradient(ellipse at 25% 20%, rgba(255, 255, 255, 0.6), rgba(255, 243, 176, 0.25));
}

/* --- Bubble Reveal Animation (float-up-and-fade) --- */
.bubble-reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
    transition-delay: var(--reveal-delay, 0s);
    will-change: opacity, transform;
}

.bubble-reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* --- Mascot Wrapper --- */
.mascot-wrapper {
    width: clamp(140px, 30vw, 200px);
    height: auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.goomimi-mascot {
    width: 100%;
    height: auto;
    filter: drop-shadow(0 4px 8px rgba(200, 162, 224, 0.25));
}

/* --- Inline Illustrations --- */
.inline-illustration {
    width: clamp(100px, 20vw, 150px);
    height: auto;
    filter: drop-shadow(0 3px 6px rgba(200, 162, 224, 0.2));
}

.friend-illustration {
    width: clamp(100px, 18vw, 140px);
    height: auto;
    filter: drop-shadow(0 3px 6px rgba(200, 162, 224, 0.2));
    margin-bottom: 0.5rem;
}

.farewell-mascot {
    width: clamp(100px, 18vw, 140px);
    height: auto;
    filter: drop-shadow(0 3px 6px rgba(200, 162, 224, 0.2));
    margin-bottom: 0.5rem;
}

/* --- Feature Items --- */
.feature-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
}

.feature-icon {
    width: 60px;
    height: 60px;
    margin-bottom: 0.5rem;
}

/* --- Micro Bubbles (Transition clusters between sections) --- */
.micro-bubble-cluster {
    position: relative;
    width: 100%;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    z-index: 2;
    pointer-events: none;
}

.micro-bubble {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.5), rgba(200, 162, 224, 0.2));
    border: 1px solid var(--lilac-shadow);
    opacity: 0.5;
    animation: micro-drift 10s ease-in-out infinite;
}

.micro-bubble:nth-child(even) {
    width: 14px;
    height: 14px;
    background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.5), rgba(168, 230, 207, 0.2));
}

.micro-bubble:nth-child(3n) {
    width: 8px;
    height: 8px;
    background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.5), rgba(255, 184, 184, 0.2));
}

.micro-bubble:nth-child(5n) {
    width: 12px;
    height: 12px;
    background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.5), rgba(255, 243, 176, 0.2));
}

@keyframes micro-drift {
    0%, 100% {
        transform: translate(0, 0);
        opacity: 0.5;
    }
    25% {
        transform: translate(var(--drift-x, 20px), var(--drift-y, -15px));
        opacity: 0.7;
    }
    50% {
        transform: translate(calc(var(--drift-x, 20px) * -0.5), calc(var(--drift-y, -15px) * 1.2));
        opacity: 0.4;
    }
    75% {
        transform: translate(calc(var(--drift-x, 20px) * 0.3), calc(var(--drift-y, -15px) * -0.5));
        opacity: 0.6;
    }
}

/* --- Navigation Dots (fixed bottom-center, gently bobbing) --- */
.nav-dots {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 14px;
    z-index: 100;
    padding: 8px 16px;
    border-radius: 30px;
    background: rgba(255, 248, 245, 0.7);
    backdrop-filter: blur(10px);
    border: 1px solid var(--lilac-shadow);
    box-shadow: 0 4px 16px rgba(224, 208, 240, 0.3);
    align-items: center;
}

.nav-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    background: var(--lilac-shadow);
    position: relative;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    animation: dot-bob 3s ease-in-out infinite;
    outline: none;
    padding: 0;
}

.nav-dot:nth-child(1) { animation-delay: 0s; background: var(--lavender-mist); }
.nav-dot:nth-child(2) { animation-delay: 0.4s; background: var(--mint-foam); }
.nav-dot:nth-child(3) { animation-delay: 0.8s; background: var(--peach-blossom); }
.nav-dot:nth-child(4) { animation-delay: 1.2s; background: var(--lemon-cream); }
.nav-dot:nth-child(5) { animation-delay: 1.6s; background: var(--lavender-mist); }

.nav-dot.active {
    width: 18px;
    height: 18px;
    box-shadow: 0 0 12px rgba(200, 162, 224, 0.4);
    animation: dot-bob-active 3s ease-in-out infinite;
}

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

@keyframes dot-bob-active {
    0%, 100% {
        transform: translateY(0) scale(1);
    }
    50% {
        transform: translateY(-3px) scale(1.05);
    }
}

/* Dot label - appears on hover above the dot */
.dot-label {
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    font-family: var(--font-accent);
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--dusty-plum);
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    background: rgba(255, 248, 245, 0.9);
    padding: 2px 8px;
    border-radius: 10px;
    border: 1px solid var(--lilac-shadow);
}

.nav-dot:hover .dot-label {
    opacity: 1;
}

/* --- Thought Input (Contact Section) --- */
.thought-input-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    width: 100%;
}

.thought-input {
    width: 100%;
    max-width: 300px;
    background: rgba(255, 255, 255, 0.7);
    border: 2px solid var(--lilac-shadow);
    border-radius: 24px;
    padding: 1rem 1.2rem;
    font-family: var(--font-body);
    font-size: 0.95rem;
    color: var(--dusty-plum);
    resize: none;
    outline: none;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    line-height: 1.6;
}

.thought-input::placeholder {
    color: var(--warm-gray);
    font-style: italic;
}

.thought-input:focus {
    border-color: var(--lavender-mist);
    box-shadow: 0 0 16px rgba(200, 162, 224, 0.25);
}

.send-bubble-btn {
    background: none;
    border: none;
    cursor: pointer;
    transition: var(--hover-on);
    border-radius: 50%;
    padding: 0;
    line-height: 0;
}

.send-bubble-btn:hover {
    transform: translateY(-4px) scale(1.1);
}

.send-bubble-btn:active {
    transform: scale(0.95);
}

/* --- Sent Thoughts (floating thought bubbles) --- */
.sent-thoughts {
    position: relative;
    width: 100%;
    min-height: 60px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    padding: 1rem 0;
}

.sent-thought-bubble {
    background: radial-gradient(ellipse at 30% 25%, rgba(255, 255, 255, 0.7), rgba(200, 162, 224, 0.15));
    background-color: rgba(200, 162, 224, 0.2);
    border: 1px solid var(--lilac-shadow);
    border-radius: 50%;
    width: clamp(50px, 10vw, 80px);
    height: clamp(50px, 10vw, 80px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
    font-family: var(--font-body);
    font-size: 0.6rem;
    color: var(--dusty-plum);
    text-align: center;
    overflow: hidden;
    word-break: break-word;
    animation: thought-float-in 0.8s ease-out forwards;
    cursor: pointer;
    transition: var(--hover-off);
    box-shadow: var(--bubble-shadow);
}

.sent-thought-bubble:hover {
    transform: var(--hover-lift);
    box-shadow: var(--bubble-shadow-hover);
    transition: var(--hover-on);
}

.sent-thought-bubble.jiggling {
    animation: jiggle 0.4s ease-in-out;
}

.sent-thought-bubble.bubble-mint {
    background-color: rgba(168, 230, 207, 0.2);
    background: radial-gradient(ellipse at 30% 25%, rgba(255, 255, 255, 0.6), rgba(168, 230, 207, 0.2));
}

.sent-thought-bubble.bubble-peach {
    background-color: rgba(255, 184, 184, 0.2);
    background: radial-gradient(ellipse at 30% 25%, rgba(255, 255, 255, 0.6), rgba(255, 184, 184, 0.2));
}

.sent-thought-bubble.bubble-lemon {
    background-color: rgba(255, 243, 176, 0.3);
    background: radial-gradient(ellipse at 30% 25%, rgba(255, 255, 255, 0.6), rgba(255, 243, 176, 0.25));
}

.sent-thought-bubble.bubble-accent {
    background-color: rgba(200, 162, 224, 0.2);
    background: radial-gradient(ellipse at 30% 25%, rgba(255, 255, 255, 0.6), rgba(200, 162, 224, 0.2));
}

@keyframes thought-float-in {
    0% {
        opacity: 0;
        transform: translateY(20px) scale(0.5);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* --- Responsive Adjustments --- */
@media (max-width: 768px) {
    .content-zone {
        padding: 8vh 4vw;
    }

    .bubble-cluster {
        flex-direction: column;
        align-items: center;
        gap: 1.5rem;
        padding: 1rem;
    }

    .cluster-right,
    .cluster-left {
        margin-left: auto;
        margin-right: auto;
        justify-content: center;
    }

    .bubble-large {
        width: clamp(200px, 70vw, 320px);
        min-height: clamp(200px, 60vw, 300px);
    }

    .bubble-medium {
        width: clamp(180px, 70vw, 300px);
        min-height: clamp(160px, 50vw, 260px);
    }

    .bubble-wide {
        width: clamp(260px, 85vw, 500px);
        min-height: auto;
        padding: 2rem;
    }

    .nav-dots {
        bottom: 1rem;
        gap: 10px;
        padding: 6px 12px;
    }

    .micro-bubble-cluster {
        height: 50px;
    }
}

@media (max-width: 480px) {
    .bubble-large {
        width: clamp(180px, 80vw, 280px);
        min-height: clamp(180px, 70vw, 260px);
    }

    .bubble-medium {
        width: clamp(160px, 80vw, 260px);
        min-height: clamp(140px, 55vw, 230px);
    }

    .bubble-wide {
        width: clamp(240px, 90vw, 400px);
        padding: 1.5rem;
    }

    .headline {
        font-size: clamp(1.5rem, 5vw + 0.3rem, 3rem);
    }

    h2.headline {
        font-size: clamp(1.3rem, 4vw + 0.2rem, 2.5rem);
    }
}

/* Ensure SVGs don't overflow bubbles */
.content-bubble svg {
    max-width: 100%;
    height: auto;
}
