/* ===================================
   gabs.day - Dopamine Maximalist CSS
   =================================== */

/* --- CSS Custom Properties --- */
:root {
    --snow-white: #FAFBFF;
    --coral-pop: #FF6B6B;
    --tangerine-fizz: #FFA94D;
    --lemon-spark: #FFD93D;
    --mint-bounce: #6BCB77;
    --sky-bubble: #4D96FF;
    --grape-soda: #9B5DE5;
    --bubblegum: #F15BB5;
    --charcoal-soft: #2D3047;
    --slate-mist: #6B7280;
    --lavender-haze: #E8E0F0;

    --spring-ease: cubic-bezier(0.34, 1.56, 0.64, 1);
    --smooth-ease: cubic-bezier(0.25, 0.46, 0.45, 0.94);

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

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

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-body);
    font-weight: 400;
    font-size: clamp(1rem, 1.2vw, 1.15rem);
    line-height: 1.7;
    letter-spacing: 0.01em;
    color: var(--charcoal-soft);
    background: var(--snow-white);
    overflow-x: hidden;
    position: relative;
}

/* --- Rainbow Background Wash --- */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        135deg,
        rgba(255,107,107,0.03),
        rgba(255,169,77,0.03),
        rgba(255,217,61,0.03),
        rgba(107,203,119,0.03),
        rgba(77,150,255,0.03),
        rgba(155,93,229,0.03),
        rgba(241,91,181,0.03)
    );
    background-size: 400% 400%;
    animation: rainbowWash 20s ease infinite;
    pointer-events: none;
    z-index: 0;
    mix-blend-mode: multiply;
}

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

/* --- Intro Bubble --- */
#intro-bubble {
    position: fixed;
    top: 50%;
    left: 50%;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 35%, white 20%, var(--sky-bubble) 60%, transparent 100%);
    transform: translate(-50%, -50%) scale(1);
    z-index: 9999;
    pointer-events: none;
    opacity: 1;
    transition: none;
}

#intro-bubble.pulse {
    animation: bubblePulse 400ms ease-in-out;
}

#intro-bubble.expand {
    animation: bubbleExpand 800ms var(--spring-ease) forwards;
}

#intro-bubble.hidden {
    opacity: 0;
    pointer-events: none;
    display: none;
}

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

@keyframes bubbleExpand {
    0% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
    80% { transform: translate(-50%, -50%) scale(200); opacity: 0.6; }
    100% { transform: translate(-50%, -50%) scale(250); opacity: 0; }
}

/* --- Floating Navigation Pill --- */
#nav-pill {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 60px;
    height: 36px;
    border-radius: 18px;
    background: var(--grape-soda);
    border: none;
    cursor: pointer;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(155, 93, 229, 0.35);
    animation: pillBounce 2s ease-in-out infinite;
    transition: transform 250ms var(--spring-ease), background 250ms ease;
}

#nav-pill:hover {
    transform: scale(1.08);
}

#nav-pill.active {
    background: var(--coral-pop);
    animation: none;
}

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

/* --- Nav Overlay --- */
.nav-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(250, 251, 255, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 300ms ease;
}

.nav-overlay.open {
    opacity: 1;
    pointer-events: all;
}

.nav-overlay-inner {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    max-width: 400px;
}

.nav-bubble {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: var(--bubble-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-family: var(--font-accent);
    font-weight: 500;
    font-size: clamp(0.75rem, 1vw, 0.9rem);
    text-decoration: none;
    transform: scale(0);
    transition: transform 400ms var(--spring-ease);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
}

.nav-overlay.open .nav-bubble {
    transform: scale(1);
}

.nav-bubble:nth-child(1) { transition-delay: 50ms; }
.nav-bubble:nth-child(2) { transition-delay: 100ms; }
.nav-bubble:nth-child(3) { transition-delay: 150ms; }
.nav-bubble:nth-child(4) { transition-delay: 200ms; }
.nav-bubble:nth-child(5) { transition-delay: 250ms; }
.nav-bubble:nth-child(6) { transition-delay: 300ms; }
.nav-bubble:nth-child(7) { transition-delay: 350ms; }

.nav-bubble:hover {
    transform: scale(1.12) !important;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.15);
}

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

.bg-bubble {
    position: absolute;
    width: var(--size);
    height: var(--size);
    left: var(--x);
    top: var(--y);
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, rgba(255,255,255,0.7) 0%, var(--color) 60%, transparent 100%);
    animation: bubbleBob var(--duration) ease-in-out var(--delay) infinite;
    will-change: transform;
}

@keyframes bubbleBob {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    25% { transform: translateY(-10px) rotate(2deg); }
    50% { transform: translateY(-5px) rotate(-1deg); }
    75% { transform: translateY(-12px) rotate(1deg); }
}

/* --- Hero Section --- */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    position: relative;
    z-index: 2;
    background: linear-gradient(
        135deg,
        var(--coral-pop),
        var(--tangerine-fizz),
        var(--lemon-spark),
        var(--mint-bounce),
        var(--sky-bubble),
        var(--grape-soda),
        var(--bubblegum),
        var(--coral-pop)
    );
    background-size: 400% 400%;
    animation: heroRainbow 20s ease infinite;
}

@keyframes heroRainbow {
    0% { background-position: 0% 50%; }
    25% { background-position: 50% 0%; }
    50% { background-position: 100% 50%; }
    75% { background-position: 50% 100%; }
    100% { background-position: 0% 50%; }
}

.hero-card {
    width: 100%;
    max-width: 100%;
    min-height: calc(100vh - 48px);
    background: var(--snow-white);
    border-radius: 32px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(45, 48, 71, 0.12);
}

/* --- Hero Title (Bouncy Letters) --- */
.hero-title {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: clamp(3rem, 8vw + 1rem, 8rem);
    line-height: 1.1;
    letter-spacing: -0.01em;
    text-align: center;
    display: flex;
    align-items: baseline;
    gap: 0;
}

.hero-title .letter {
    display: inline-block;
    color: var(--color);
    opacity: 0;
    transform: translateY(60px);
    animation: letterBounceIn 600ms var(--spring-ease) forwards;
}

.hero-title .letter:nth-child(1) { animation-delay: 1200ms; }
.hero-title .letter:nth-child(2) { animation-delay: 1320ms; }
.hero-title .letter:nth-child(3) { animation-delay: 1440ms; }
.hero-title .letter:nth-child(4) { animation-delay: 1560ms; }
.hero-title .letter:nth-child(5) { animation-delay: 1680ms; }
.hero-title .letter:nth-child(6) { animation-delay: 1800ms; }
.hero-title .letter:nth-child(7) { animation-delay: 1920ms; }
.hero-title .letter:nth-child(8) { animation-delay: 2040ms; }

@keyframes letterBounceIn {
    0% { opacity: 0; transform: translateY(60px) scale(0.8); }
    60% { opacity: 1; transform: translateY(-8px) scale(1.05); }
    80% { transform: translateY(3px) scale(0.98); }
    100% { opacity: 1; transform: translateY(0) scale(1); }
}

/* --- Hero Subtitle --- */
.hero-subtitle {
    font-family: var(--font-body);
    font-weight: 600;
    font-size: clamp(1rem, 2vw, 1.4rem);
    color: var(--slate-mist);
    margin-top: 16px;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeUp 500ms ease forwards;
    animation-delay: 2400ms;
    text-align: center;
    padding: 0 20px;
}

@keyframes fadeUp {
    0% { opacity: 0; transform: translateY(20px); }
    100% { opacity: 1; transform: translateY(0); }
}

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

.hero-deco-bubble {
    position: absolute;
    width: var(--size);
    height: var(--size);
    left: var(--x);
    top: var(--y);
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, rgba(255,255,255,0.6) 0%, var(--color) 70%, transparent 100%);
    opacity: 0;
    animation: heroDecoBubbleIn 600ms ease forwards, bubbleBob 5s ease-in-out infinite;
    animation-delay: 2600ms, 2600ms;
}

/* --- Scroll Indicator --- */
.scroll-indicator {
    position: absolute;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    animation: scrollPulse 1.5s ease-in-out infinite, fadeUp 400ms ease forwards;
    animation-delay: 3200ms, 3200ms;
}

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

@keyframes heroDecoBubbleIn {
    0% { opacity: 0; transform: scale(0); }
    100% { opacity: 1; transform: scale(1); }
}

/* --- Card Grid --- */
.card-grid {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 1fr 1.2fr 1fr;
    gap: 24px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 60px 24px 40px;
}

/* --- Cards --- */
.card {
    background: var(--snow-white);
    border-radius: 24px;
    padding: 32px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 12px var(--accent-shadow, rgba(232,224,240,0.4));
    border: 2px solid var(--accent-bg, transparent);
    opacity: 0;
    transform: translateY(40px) scale(0.95);
    transition: transform 250ms var(--spring-ease), box-shadow 250ms var(--spring-ease);
}

.card.visible {
    animation: cardBounceIn 500ms var(--spring-ease) forwards;
}

.card:hover {
    transform: translateY(-6px) scale(1.02);
    box-shadow: 0 12px 32px var(--accent-shadow, rgba(232,224,240,0.5));
}

.card:hover .card-top-border {
    height: 5px;
}

@keyframes cardBounceIn {
    0% { opacity: 0; transform: translateY(40px) scale(0.95); }
    60% { opacity: 1; transform: translateY(-5px) scale(1.01); }
    80% { transform: translateY(2px) scale(0.995); }
    100% { opacity: 1; transform: translateY(0) scale(1); }
}

/* --- Card Top Border --- */
.card-top-border {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--accent, var(--lavender-haze));
    border-radius: 24px 24px 0 0;
    transition: height 250ms var(--spring-ease);
}

/* --- Card Wide Span --- */
.card-wide {
    grid-column: 1 / -1;
}

/* --- Card Icon --- */
.card-icon {
    margin-bottom: 16px;
}

/* --- Card Title --- */
.card-title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(1.6rem, 3vw, 2.8rem);
    line-height: 1.1;
    color: var(--charcoal-soft);
    margin-bottom: 12px;
}

/* --- Card Body --- */
.card-body {
    font-family: var(--font-body);
    font-weight: 400;
    font-size: clamp(1rem, 1.2vw, 1.15rem);
    line-height: 1.7;
    color: var(--charcoal-soft);
    letter-spacing: 0.01em;
}

/* --- Card Illustration --- */
.card-illustration {
    margin-top: 24px;
    display: flex;
    justify-content: center;
}

.illustration-svg {
    width: 100%;
    max-width: 300px;
    height: auto;
}

/* --- Card Hover Bubble Particles (CSS only) --- */
.card::before,
.card::after {
    content: '';
    position: absolute;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--accent, var(--lavender-haze));
    opacity: 0;
    pointer-events: none;
    transition: none;
}

.card::before {
    top: 20%;
    right: -5px;
}

.card::after {
    bottom: 20%;
    left: -5px;
}

.card:hover::before {
    animation: hoverBubbleRight 600ms var(--spring-ease) forwards;
}

.card:hover::after {
    animation: hoverBubbleLeft 600ms var(--spring-ease) 100ms forwards;
}

@keyframes hoverBubbleRight {
    0% { opacity: 0.6; transform: scale(0) translateX(0) translateY(0); }
    100% { opacity: 0; transform: scale(1.5) translateX(15px) translateY(-30px); }
}

@keyframes hoverBubbleLeft {
    0% { opacity: 0.6; transform: scale(0) translateX(0) translateY(0); }
    100% { opacity: 0; transform: scale(1.2) translateX(-15px) translateY(-25px); }
}

/* --- Bubble Section Divider --- */
.bubble-divider {
    grid-column: 1 / -1;
    display: flex;
    justify-content: center;
    padding: 16px 0;
}

.divider-svg {
    width: 300px;
    max-width: 100%;
    height: auto;
}

/* --- Section anchors (invisible) --- */
#about, #features, #gallery, #community, #stories, #contact {
    grid-column: 1 / -1;
    height: 0;
    overflow: hidden;
}

/* --- Gallery Grid --- */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-top: 24px;
}

.gallery-item {
    aspect-ratio: 1;
    border-radius: var(--item-radius, 24px);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 250ms var(--spring-ease);
    overflow: hidden;
}

.gallery-item svg {
    width: 70%;
    height: 70%;
}

.gallery-item:hover {
    transform: scale(1.06) rotate(2deg);
}

/* --- Testimonials --- */
.testimonials {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-top: 24px;
}

.testimonial {
    text-align: center;
}

.testimonial-bubble {
    background: var(--snow-white);
    border: 2px solid var(--t-color, var(--lavender-haze));
    border-radius: 20px;
    padding: 24px;
    position: relative;
    box-shadow: 0 4px 12px rgba(0,0,0,0.04);
}

.testimonial-bubble p {
    font-family: var(--font-body);
    font-size: clamp(0.9rem, 1.1vw, 1.05rem);
    line-height: 1.6;
    color: var(--charcoal-soft);
    font-style: italic;
}

.testimonial-author {
    display: block;
    margin-top: 12px;
    font-family: var(--font-accent);
    font-size: clamp(0.75rem, 1vw, 0.9rem);
    color: var(--slate-mist);
}

/* --- CTA Button --- */
.card-cta {
    text-align: center;
}

.cta-bubble-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 24px;
    padding: 14px 36px;
    background: var(--grape-soda);
    color: white;
    font-family: var(--font-accent);
    font-weight: 500;
    font-size: clamp(1rem, 1.4vw, 1.2rem);
    text-decoration: none;
    border-radius: 50px;
    box-shadow: 0 6px 24px rgba(155, 93, 229, 0.35);
    transition: transform 250ms var(--spring-ease), box-shadow 250ms ease;
}

.cta-bubble-btn:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 10px 32px rgba(155, 93, 229, 0.45);
}

/* --- Footer --- */
.footer {
    position: relative;
    z-index: 2;
    padding: 80px 24px 40px;
    text-align: center;
    background: linear-gradient(
        135deg,
        var(--coral-pop),
        var(--tangerine-fizz),
        var(--lemon-spark),
        var(--mint-bounce),
        var(--sky-bubble),
        var(--grape-soda),
        var(--bubblegum)
    );
    background-size: 400% 400%;
    animation: heroRainbow 20s ease infinite;
    clip-path: ellipse(80% 100% at 50% 100%);
    margin-top: 40px;
}

.footer-content {
    max-width: 600px;
    margin: 0 auto;
}

.footer-logo {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: clamp(2rem, 4vw, 3rem);
    color: white;
    margin-bottom: 8px;
}

.footer-tagline {
    font-family: var(--font-body);
    font-weight: 600;
    font-size: clamp(0.9rem, 1.2vw, 1.1rem);
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 24px;
}

.footer-links {
    display: flex;
    gap: 24px;
    justify-content: center;
    flex-wrap: wrap;
}

.footer-links a {
    font-family: var(--font-accent);
    font-weight: 500;
    font-size: clamp(0.8rem, 1vw, 0.95rem);
    color: white;
    text-decoration: none;
    transition: transform 200ms var(--spring-ease);
}

.footer-links a:hover {
    transform: scale(1.1);
}

/* ===========================
   Responsive Breakpoints
   =========================== */

/* Tablet: 2 columns */
@media (max-width: 1199px) {
    .card-grid {
        grid-template-columns: 1fr 1fr;
    }
}

/* Mobile: 1 column */
@media (max-width: 767px) {
    .card-grid {
        grid-template-columns: 1fr;
        padding: 40px 16px 24px;
    }

    .hero {
        padding: 16px;
    }

    .hero-card {
        min-height: calc(100vh - 32px);
        border-radius: 24px;
    }

    .card {
        padding: 24px;
    }

    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .testimonials {
        grid-template-columns: 1fr;
    }

    .nav-overlay-inner {
        grid-template-columns: repeat(3, 1fr);
        gap: 16px;
    }

    .nav-bubble {
        width: 80px;
        height: 80px;
        font-size: 0.75rem;
    }

    .footer {
        clip-path: ellipse(100% 100% at 50% 100%);
    }
}

/* Small mobile */
@media (max-width: 480px) {
    .hero-title {
        font-size: clamp(2.5rem, 12vw, 4rem);
    }

    .gallery-grid {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }
}
