/* ==========================================================================
   gabs.ai - Rainbow Fizz Design System
   Fonts: Nunito (headlines), Quicksand (body), Baloo 2 (accent/tags)
   Palette: Rainbow Fizz - Full spectrum dopamine maximalism
   ========================================================================== */

/* CSS Custom Properties */
:root {
    /* Rainbow Fizz Palette */
    --red-bubble: #FF6B8A;
    --orange-bubble: #FFa94D;
    --yellow-bubble: #FFE066;
    --green-bubble: #69DB7C;
    --cyan-bubble: #66D9E8;
    --blue-bubble: #748FFC;
    --purple-bubble: #CC5DE8;
    --pink-bubble: #F783AC;
    --bg-cream: #FFFDF7;
    --surface-white: #FFFFFF;
    --text-primary: #3D3D4E;
    --text-secondary: #868E96;

    /* Rainbow gradient */
    --rainbow-gradient: linear-gradient(135deg, #FF6B8A 0%, #FFa94D 16%, #FFE066 33%, #69DB7C 50%, #66D9E8 66%, #748FFC 83%, #CC5DE8 100%);

    /* Shared border-radius */
    --radius-card: 24px;
    --radius-pill: 50px;
    --radius-min: 12px;
}

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

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: 'Quicksand', sans-serif;
    font-weight: 500;
    font-size: clamp(0.95rem, 1.1vw, 1.1rem);
    line-height: 1.65;
    color: var(--text-primary);
    background-color: var(--bg-cream);
    overflow-x: hidden;
    position: relative;
}

/* ==========================================================================
   Background Floating 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;
    width: var(--size);
    height: var(--size);
    left: var(--left);
    top: var(--top);
    border-radius: 50%;
    background: var(--color);
    animation:
        floatY var(--duration) ease-in-out infinite,
        floatX calc(var(--duration) * 1.3) ease-in-out infinite;
    animation-delay: var(--delay);
}

@keyframes floatY {
    0%, 100% { transform: translateY(0); }
    25% { transform: translateY(-25px); }
    50% { transform: translateY(-40px); }
    75% { transform: translateY(-20px); }
}

@keyframes floatX {
    0%, 100% { transform: translateX(0); }
    33% { transform: translateX(15px); }
    66% { transform: translateX(-10px); }
}

/* ==========================================================================
   Hero Section
   ========================================================================== */

.hero-section {
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 1;
    padding: 2rem;
    overflow: hidden;
}

/* Hero Bubble */
.hero-bubble {
    position: relative;
    width: clamp(260px, 45vw, 420px);
    aspect-ratio: 1.05 / 1;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow:
        0 8px 60px rgba(116, 143, 252, 0.12),
        0 2px 20px rgba(204, 93, 232, 0.08),
        inset 0 0 80px rgba(255, 255, 255, 0.5);
    animation: heroFloat 6s ease-in-out infinite;
}

.hero-bubble-ring {
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    background: conic-gradient(
        from var(--shimmer-angle, 0deg),
        #FF6B8A, #FFa94D, #FFE066, #69DB7C, #66D9E8, #748FFC, #CC5DE8, #FF6B8A
    );
    z-index: -1;
    opacity: 0.6;
    animation: shimmer 8s linear infinite;
}

@property --shimmer-angle {
    syntax: '<angle>';
    initial-value: 0deg;
    inherits: false;
}

@keyframes shimmer {
    to { --shimmer-angle: 360deg; }
}

@keyframes heroFloat {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-12px) scale(1.01); }
}

/* Hero Text */
.hero-text {
    display: flex;
    gap: clamp(0.15rem, 1vw, 0.5rem);
}

.hero-letter {
    font-family: 'Nunito', sans-serif;
    font-weight: 800;
    font-size: clamp(3rem, 8vw + 1rem, 7rem);
    letter-spacing: 0.01em;
    color: var(--text-primary);
    display: inline-block;
    animation: letterWobble 3s ease-in-out infinite;
    animation-delay: calc(var(--i) * 0.15s);
}

@keyframes letterWobble {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    25% { transform: translateY(-4px) rotate(-2deg); }
    75% { transform: translateY(2px) rotate(1.5deg); }
}

/* Tagline Bubbles */
.tagline-bubbles {
    display: flex;
    flex-wrap: wrap;
    gap: clamp(0.6rem, 1.5vw, 1rem);
    justify-content: center;
    margin-top: clamp(1.5rem, 3vw, 2.5rem);
}

.tagline-bubble {
    font-family: 'Baloo 2', cursive;
    font-weight: 600;
    font-size: clamp(0.85rem, 1.2vw, 1.1rem);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--surface-white);
    background: var(--color);
    padding: 0.4em 1.2em;
    border-radius: var(--radius-pill);
    opacity: 0;
    animation: bounceEnter 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
    animation-delay: var(--delay);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

/* Hero Subtitle */
.hero-subtitle {
    font-family: 'Quicksand', sans-serif;
    font-weight: 500;
    font-size: clamp(1rem, 1.6vw, 1.25rem);
    color: var(--text-secondary);
    margin-top: 1.5rem;
    text-align: center;
    opacity: 0;
    animation: bounceEnter 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
    animation-delay: 1.5s;
}

/* ==========================================================================
   Bounce Enter Animation
   ========================================================================== */

@keyframes bounceEnter {
    0% { opacity: 0; transform: translateY(60px) scale(0.9); }
    50% { opacity: 1; transform: translateY(-8px) scale(1.02); }
    70% { transform: translateY(3px) scale(0.99); }
    85% { transform: translateY(-2px) scale(1.005); }
    100% { opacity: 1; transform: translateY(0) scale(1); }
}

/* ==========================================================================
   Bubble Break Dividers
   ========================================================================== */

.bubble-break {
    position: relative;
    height: 120px;
    z-index: 1;
    overflow: hidden;
}

.divider-circle {
    position: absolute;
    width: var(--size);
    height: var(--size);
    left: var(--left);
    top: 50%;
    transform: translateY(-50%);
    border-radius: 50%;
    background: var(--color);
    animation: dividerPulse 5s ease-in-out infinite;
}

.bubble-break .divider-circle:nth-child(odd) {
    animation-delay: 0.5s;
}

.bubble-break .divider-circle:nth-child(3n) {
    animation-delay: 1.2s;
}

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

/* ==========================================================================
   Content Sections
   ========================================================================== */

.content-section {
    position: relative;
    z-index: 1;
    padding: clamp(3rem, 6vw, 5rem) 0;
}

.section-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 clamp(1.5rem, 4vw, 3rem);
}

/* Section Headings */
.section-heading {
    font-family: 'Nunito', sans-serif;
    font-weight: 700;
    font-size: clamp(1.75rem, 3.5vw, 2.75rem);
    letter-spacing: 0.01em;
    color: var(--text-primary);
    text-align: center;
    margin-bottom: clamp(2rem, 4vw, 3.5rem);
    line-height: 1.3;
}

/* Section background tints (rainbow progression) */
.section--warm {
    background: linear-gradient(180deg, rgba(255, 107, 138, 0.04) 0%, rgba(255, 169, 77, 0.06) 100%);
}

.section--growth {
    background: linear-gradient(180deg, rgba(255, 224, 102, 0.04) 0%, rgba(105, 219, 124, 0.06) 100%);
}

.section--depth {
    background: linear-gradient(180deg, rgba(102, 217, 232, 0.04) 0%, rgba(116, 143, 252, 0.06) 100%);
}

.section--rainbow {
    background: linear-gradient(180deg,
        rgba(255, 107, 138, 0.03) 0%,
        rgba(255, 224, 102, 0.03) 25%,
        rgba(105, 219, 124, 0.03) 50%,
        rgba(116, 143, 252, 0.03) 75%,
        rgba(204, 93, 232, 0.03) 100%
    );
}

.section--finale {
    background: linear-gradient(180deg,
        rgba(204, 93, 232, 0.04) 0%,
        rgba(247, 131, 172, 0.03) 50%,
        transparent 100%
    );
}

/* ==========================================================================
   Card Grid
   ========================================================================== */

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: clamp(1.5rem, 3vw, 2.5rem);
}

/* ==========================================================================
   Cards
   ========================================================================== */

.card {
    position: relative;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: var(--radius-card);
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.06),
        0 2px 8px rgba(0, 0, 0, 0.04);
    overflow: hidden;
    transform: translateY(var(--offset, 0px));
    transition: transform 300ms cubic-bezier(0.34, 1.56, 0.64, 1),
                box-shadow 300ms cubic-bezier(0.34, 1.56, 0.64, 1);
    opacity: 0;
}

.card.animate-in {
    animation: bounceEnter 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
    animation-delay: calc(var(--card-index) * 80ms);
}

.card:hover {
    transform: translateY(calc(var(--offset, 0px) - 6px));
    box-shadow:
        0 16px 48px rgba(0, 0, 0, 0.1),
        0 4px 16px rgba(0, 0, 0, 0.06);
}

.card:hover .card-svg {
    animation: wobble 0.6s ease-in-out;
}

@keyframes wobble {
    0%, 100% { transform: rotate(0); }
    25% { transform: rotate(-2deg) scale(1.03); }
    75% { transform: rotate(2deg) scale(1.03); }
}

/* Card Illustration */
.card-illustration {
    width: 100%;
    height: 0;
    padding-bottom: 60%;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(255, 253, 247, 0.5), rgba(255, 255, 255, 0.3));
}

.card-svg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    transition: transform 0.3s ease;
}

/* Card Content */
.card-content {
    padding: 1.25rem 1.5rem;
}

.card-title {
    font-family: 'Quicksand', sans-serif;
    font-weight: 600;
    font-size: clamp(1.1rem, 1.4vw, 1.35rem);
    line-height: 1.3;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.card-desc {
    font-family: 'Quicksand', sans-serif;
    font-weight: 500;
    font-size: clamp(0.88rem, 1vw, 1rem);
    line-height: 1.65;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
}

/* Card Tags */
.card-tag {
    display: inline-block;
    font-family: 'Baloo 2', cursive;
    font-weight: 600;
    font-size: clamp(0.75rem, 0.9vw, 0.9rem);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--surface-white);
    background: var(--tag-color);
    padding: 0.2em 0.8em;
    border-radius: var(--radius-pill);
}

/* Card Corner Bubbles */
.card-corner-bubbles {
    position: absolute;
    top: -4px;
    right: -4px;
    display: flex;
    gap: 2px;
}

.card-corner-bubbles span {
    display: block;
    width: var(--s);
    height: var(--s);
    border-radius: 50%;
    background: var(--c);
    opacity: 0.7;
}

.card-corner-bubbles span:nth-child(1) { transform: translate(-2px, 4px); }
.card-corner-bubbles span:nth-child(2) { transform: translate(0, 1px); }
.card-corner-bubbles span:nth-child(3) { transform: translate(2px, 6px); }

/* ==========================================================================
   Finale / CTA Section
   ========================================================================== */

.finale-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}

.finale-bubble {
    position: relative;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-radius: 40px;
    padding: clamp(2.5rem, 5vw, 4rem) clamp(2rem, 4vw, 3.5rem);
    max-width: 600px;
    text-align: center;
    box-shadow:
        0 12px 60px rgba(116, 143, 252, 0.12),
        0 4px 20px rgba(204, 93, 232, 0.08);
    z-index: 2;
}

.finale-heading {
    font-family: 'Nunito', sans-serif;
    font-weight: 800;
    font-size: clamp(2rem, 5vw, 3.5rem);
    letter-spacing: 0.01em;
    color: var(--text-primary);
    margin-bottom: 1rem;
    line-height: 1.2;
}

.finale-text {
    font-family: 'Quicksand', sans-serif;
    font-weight: 500;
    font-size: clamp(1rem, 1.3vw, 1.15rem);
    line-height: 1.65;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.cta-bubble {
    display: inline-block;
    font-family: 'Nunito', sans-serif;
    font-weight: 700;
    font-size: clamp(1.1rem, 1.5vw, 1.3rem);
    color: var(--surface-white);
    background: var(--rainbow-gradient);
    background-size: 200% 200%;
    animation: rainbowShift 6s ease infinite;
    padding: 0.8em 2.5em;
    border-radius: var(--radius-pill);
    text-decoration: none;
    box-shadow: 0 6px 24px rgba(116, 143, 252, 0.25);
    transition: transform 300ms cubic-bezier(0.34, 1.56, 0.64, 1),
                box-shadow 300ms ease;
}

.cta-bubble:hover {
    transform: scale(1.06);
    box-shadow: 0 10px 36px rgba(116, 143, 252, 0.35);
}

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

/* Finale Decoration Bubbles */
.finale-decoration {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 1px;
    height: 1px;
    z-index: 1;
}

.finale-float-bubble {
    position: absolute;
    width: var(--size);
    height: var(--size);
    border-radius: 50%;
    background: var(--color);
    opacity: 0.35;
    left: var(--x);
    top: var(--y);
    animation:
        finaleFloat 4s ease-in-out infinite,
        breathe 3s ease-in-out infinite;
    animation-delay: var(--delay);
}

@keyframes finaleFloat {
    0%, 100% { transform: translate(0, 0); }
    33% { transform: translate(8px, -12px); }
    66% { transform: translate(-6px, 8px); }
}

@keyframes breathe {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.06); }
}

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
    position: relative;
    z-index: 1;
    padding: 3rem 2rem;
    text-align: center;
}

.footer-bubbles {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.footer-bubble {
    display: block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--color);
    opacity: 0.6;
    animation: breathe 3s ease-in-out infinite;
}

.footer-bubble:nth-child(1) { animation-delay: 0s; }
.footer-bubble:nth-child(2) { animation-delay: 0.2s; }
.footer-bubble:nth-child(3) { animation-delay: 0.4s; }
.footer-bubble:nth-child(4) { animation-delay: 0.6s; }
.footer-bubble:nth-child(5) { animation-delay: 0.8s; }
.footer-bubble:nth-child(6) { animation-delay: 1.0s; }
.footer-bubble:nth-child(7) { animation-delay: 1.2s; }

.footer-text {
    font-family: 'Baloo 2', cursive;
    font-weight: 600;
    font-size: clamp(0.75rem, 0.9vw, 0.9rem);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-secondary);
    opacity: 0.6;
}

/* ==========================================================================
   Floating Navigation
   ========================================================================== */

.floating-nav {
    position: fixed;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    display: flex;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-radius: var(--radius-pill);
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.08),
        0 2px 8px rgba(0, 0, 0, 0.04);
    animation: bob 3s ease-in-out infinite;
}

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

.nav-capsule {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.4rem 0.8rem;
    border-radius: var(--radius-pill);
    text-decoration: none;
    color: var(--text-secondary);
    font-family: 'Baloo 2', cursive;
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    transition: all 300ms cubic-bezier(0.34, 1.56, 0.64, 1);
    white-space: nowrap;
}

.nav-capsule .nav-icon {
    flex-shrink: 0;
}

.nav-capsule:hover {
    background: rgba(116, 143, 252, 0.08);
    color: var(--blue-bubble);
}

.nav-capsule.active {
    background: var(--blue-bubble);
    color: var(--surface-white);
    transform: scale(1.08);
}

/* Nav accent colors based on active section */
.nav-capsule.active[data-accent="warm"] {
    background: var(--red-bubble);
}

.nav-capsule.active[data-accent="growth"] {
    background: var(--green-bubble);
}

.nav-capsule.active[data-accent="depth"] {
    background: var(--blue-bubble);
}

.nav-capsule.active[data-accent="rainbow"] {
    background: var(--pink-bubble);
}

.nav-capsule.active[data-accent="finale"] {
    background: var(--purple-bubble);
}

/* ==========================================================================
   Click Burst Container
   ========================================================================== */

#click-burst-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 999;
}

.burst-particle {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    animation: burstFloat 1.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

@keyframes burstFloat {
    0% {
        opacity: 1;
        transform: translate(0, 0) scale(1);
    }
    100% {
        opacity: 0;
        transform: translate(var(--tx), var(--ty)) scale(0);
    }
}

/* ==========================================================================
   Mobile Responsive
   ========================================================================== */

@media (max-width: 640px) {
    .card-grid {
        grid-template-columns: 1fr;
    }

    .card + .card {
        margin-top: -12px;
    }

    .card {
        transform: translateY(0);
    }

    .card:hover {
        transform: translateY(-4px);
    }

    .floating-nav {
        bottom: 1rem;
        padding: 0.4rem 0.5rem;
        gap: 0.25rem;
    }

    .nav-capsule {
        padding: 0.35rem 0.6rem;
        font-size: 0.7rem;
    }

    .nav-capsule span {
        display: none;
    }

    .hero-bubble {
        width: clamp(220px, 70vw, 320px);
    }

    .bubble-break {
        height: 80px;
    }

    .finale-bubble {
        border-radius: var(--radius-card);
    }

    .finale-float-bubble {
        display: none;
    }

    .tagline-bubbles {
        gap: 0.5rem;
    }

    .tagline-bubble {
        font-size: 0.75rem;
        padding: 0.3em 0.9em;
    }
}

@media (min-width: 641px) and (max-width: 960px) {
    .card-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ==========================================================================
   Breathing circles on background SVGs
   ========================================================================== */

.card-svg circle[opacity] {
    animation: breathe 4s ease-in-out infinite;
    animation-delay: calc(var(--i, 0) * 0.5s);
}

/* Selection styling */
::selection {
    background: rgba(116, 143, 252, 0.2);
    color: var(--text-primary);
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-cream);
}

::-webkit-scrollbar-thumb {
    background: rgba(116, 143, 252, 0.3);
    border-radius: var(--radius-pill);
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(116, 143, 252, 0.5);
}
