/* ============================================
   GGIGGL.com - Styles
   Dopamine Maximalist / Bubble Playful
   ============================================ */

/* --- CSS Custom Properties --- */
:root {
    --cream-fizz: #FFF8F0;
    --electric-grape: #7B2FBE;
    --coral-pop: #FF6B6B;
    --lemon-zap: #FFD93D;
    --mint-burst: #6BCB77;
    --sky-giggle: #4ECDC4;
    --plum-night: #2D1B4E;
    --warm-gray: #B8B0A8;

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

    --spring-ease: cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* --- 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);
    font-size: 17px;
    line-height: 1.7;
    color: var(--plum-night);
    background-color: var(--cream-fizz);
    overflow-x: hidden;
    cursor: default;
}

/* --- Custom Cursor --- */
.custom-cursor {
    position: fixed;
    width: 32px;
    height: 32px;
    pointer-events: none;
    z-index: 10000;
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: opacity 0.2s ease;
}

body.cursor-active .custom-cursor {
    opacity: 1;
}

/* --- Background Bubbles --- */
.bubble-background {
    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.2), transparent 70%);
    border: 2px solid rgba(123, 47, 190, 0.15);
    animation: bubble-rise linear forwards, hue-cycle 4s linear infinite;
    will-change: transform;
    pointer-events: none;
}

@keyframes bubble-rise {
    0% {
        transform: translateY(0) translateX(0);
        opacity: 0;
    }
    10% {
        opacity: 0.6;
    }
    90% {
        opacity: 0.6;
    }
    100% {
        transform: translateY(-110vh) translateX(var(--drift, 20px));
        opacity: 0;
    }
}

@keyframes hue-cycle {
    0% { border-color: rgba(123, 47, 190, 0.2); }
    25% { border-color: rgba(255, 107, 107, 0.2); }
    50% { border-color: rgba(255, 217, 61, 0.2); }
    75% { border-color: rgba(78, 205, 196, 0.2); }
    100% { border-color: rgba(123, 47, 190, 0.2); }
}

/* --- Bubble Navigation --- */
.bubble-nav {
    position: fixed;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.nav-bubble {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.5), rgba(123, 47, 190, 0.1) 70%);
    border: 2px solid rgba(123, 47, 190, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.4s var(--spring-ease), box-shadow 0.4s var(--spring-ease), border-color 0.3s ease;
    animation: nav-float 3s ease-in-out infinite;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.nav-bubble:nth-child(2) { animation-delay: -0.6s; }
.nav-bubble:nth-child(3) { animation-delay: -1.2s; }
.nav-bubble:nth-child(4) { animation-delay: -1.8s; }
.nav-bubble:nth-child(5) { animation-delay: -2.4s; }

@keyframes nav-float {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    33% { transform: translateY(-4px) rotate(2deg); }
    66% { transform: translateY(3px) rotate(-1.5deg); }
}

.nav-bubble:hover {
    transform: scale(1.15) rotate(5deg);
    border-color: var(--coral-pop);
    box-shadow: 0 0 16px rgba(255, 107, 107, 0.3);
}

.nav-bubble.active {
    transform: scale(1.4);
    border-color: var(--coral-pop);
    box-shadow: 0 0 20px rgba(255, 107, 107, 0.5);
    background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.6), rgba(255, 107, 107, 0.15) 70%);
    animation: none;
}

.nav-bubble.pop-animate {
    animation: bubble-pop 0.4s var(--spring-ease);
}

@keyframes bubble-pop {
    0% { transform: scale(1); }
    30% { transform: scale(1.5); opacity: 0.8; }
    60% { transform: scale(0.9); }
    100% { transform: scale(1); opacity: 1; }
}

.nav-label {
    font-family: var(--font-accent);
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--plum-night);
    opacity: 0.8;
    pointer-events: none;
}

/* --- Hero Section --- */
.hero-section {
    position: relative;
    width: 100%;
    height: 100vh;
    min-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--section-bg, var(--cream-fizz));
    z-index: 1;
    overflow: hidden;
}

.hero-shapes {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

.shape {
    position: absolute;
    animation-timing-function: ease-in-out;
    animation-iteration-count: infinite;
}

.shape-circle {
    border-radius: 50%;
}

.shape-1 {
    width: 120px;
    height: 120px;
    background: rgba(255, 107, 107, 0.15);
    top: 10%;
    left: 8%;
    animation: shape-float-1 8s ease-in-out infinite;
}

.shape-2 {
    width: 80px;
    height: 80px;
    background: rgba(255, 217, 61, 0.2);
    top: 15%;
    right: 15%;
    animation: shape-float-2 6s ease-in-out infinite;
}

.shape-3 {
    width: 200px;
    top: 25%;
    left: 15%;
    animation: shape-float-3 10s ease-in-out infinite;
}

.shape-4 {
    width: 60px;
    height: 60px;
    background: rgba(78, 205, 196, 0.2);
    top: 60%;
    left: 5%;
    animation: shape-float-1 7s ease-in-out infinite reverse;
}

.shape-5 {
    width: 160px;
    bottom: 20%;
    right: 10%;
    animation: shape-float-2 9s ease-in-out infinite;
}

.shape-6 {
    width: 100px;
    height: 100px;
    background: rgba(107, 203, 119, 0.15);
    bottom: 15%;
    left: 20%;
    animation: shape-float-3 8s ease-in-out infinite;
}

.shape-7 {
    width: 180px;
    top: 40%;
    right: 20%;
    animation: shape-float-1 11s ease-in-out infinite;
}

.shape-8 {
    width: 50px;
    height: 50px;
    background: rgba(123, 47, 190, 0.12);
    top: 70%;
    right: 30%;
    animation: shape-float-2 6.5s ease-in-out infinite reverse;
}

@keyframes shape-float-1 {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    25% { transform: translate(20px, -30px) rotate(5deg); }
    50% { transform: translate(-10px, -50px) rotate(-3deg); }
    75% { transform: translate(15px, -20px) rotate(4deg); }
}

@keyframes shape-float-2 {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    33% { transform: translate(-25px, 20px) rotate(-4deg); }
    66% { transform: translate(15px, -25px) rotate(6deg); }
}

@keyframes shape-float-3 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(10px, -15px) scale(1.05); }
}

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

.logo-text {
    font-family: var(--font-display);
    font-size: clamp(8rem, 20vw, 28rem);
    font-weight: 800;
    color: var(--electric-grape);
    letter-spacing: -0.02em;
    line-height: 1;
    display: flex;
    align-items: baseline;
    justify-content: center;
}

.logo-letter, .logo-dot {
    display: inline-block;
    transform: translateY(-120vh);
    opacity: 0;
    transition: color 0.3s ease;
}

.logo-letter.landed, .logo-dot.landed {
    opacity: 1;
}

.logo-letter:hover {
    animation: letter-stretch 0.5s var(--spring-ease);
}

@keyframes letter-drop {
    0% {
        transform: translateY(-120vh);
        opacity: 0;
    }
    60% {
        transform: translateY(0) scaleY(0.6) scaleX(1.2);
        opacity: 1;
    }
    75% {
        transform: translateY(-20px) scaleY(1.15) scaleX(0.95);
    }
    90% {
        transform: translateY(5px) scaleY(0.97) scaleX(1.02);
    }
    100% {
        transform: translateY(0) scaleY(1) scaleX(1);
        opacity: 1;
    }
}

@keyframes letter-stretch {
    0% { transform: scaleX(1) scaleY(1); }
    25% { transform: scaleX(1.2) scaleY(0.8); }
    50% { transform: scaleX(0.85) scaleY(1.15); }
    75% { transform: scaleX(1.08) scaleY(0.95); }
    100% { transform: scaleX(1) scaleY(1); }
}

.logo-dot {
    color: var(--coral-pop);
    cursor: pointer;
}

.tagline {
    font-family: var(--font-body);
    font-size: clamp(1rem, 2.5vw, 1.5rem);
    font-weight: 400;
    color: var(--plum-night);
    opacity: 0.8;
    margin-top: 1.5rem;
    min-height: 2em;
    position: relative;
}

.tagline .cursor-blink {
    display: inline-block;
    width: 2px;
    height: 1.2em;
    background-color: var(--coral-pop);
    margin-left: 2px;
    vertical-align: text-bottom;
    animation: blink-cursor 0.6s step-end infinite;
}

@keyframes blink-cursor {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

/* --- Squiggle Dividers --- */
.squiggle-divider {
    position: relative;
    width: 100%;
    height: 60px;
    z-index: 2;
    overflow: visible;
    margin: -10px 0;
}

.squiggle-svg {
    width: 100%;
    height: 100%;
}

.squiggle-path {
    stroke-dasharray: 2000;
    stroke-dashoffset: 2000;
    transition: stroke-dashoffset 1.5s ease-out;
}

.squiggle-path.drawn {
    stroke-dashoffset: 0;
}

/* --- Content Sections --- */
.content-section {
    position: relative;
    min-height: 80vh;
    margin: 2vh 5vw;
    border-radius: 2rem;
    background-color: var(--section-bg, var(--cream-fizz));
    box-shadow:
        inset 0 -8px 24px rgba(255, 255, 255, 0.3),
        0 8px 32px rgba(45, 27, 78, 0.08);
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    transform: translateY(60px);
    opacity: 0;
    transition: transform 0.8s var(--spring-ease), opacity 0.6s ease;
}

.content-section.visible {
    transform: translateY(0);
    opacity: 1;
}

.section-inner {
    padding: 4rem 3rem;
    max-width: 900px;
    width: 100%;
    text-align: center;
}

/* --- Section Headings --- */
.section-heading {
    font-family: var(--font-display);
    font-size: clamp(3rem, 8vw, 7rem);
    font-weight: 800;
    color: var(--electric-grape);
    letter-spacing: -0.02em;
    margin-bottom: 2rem;
    line-height: 1.1;
}

/* --- Animate In --- */
.animate-in {
    transform: translateY(40px);
    opacity: 0;
    transition: transform 0.7s var(--spring-ease), opacity 0.5s ease;
}

.animate-in.visible {
    transform: translateY(0);
    opacity: 1;
}

/* --- Section: The Spark --- */
.section-spark {
    background-color: #FFF8E6;
}

.spark-text {
    font-family: var(--font-body);
    font-size: clamp(1.2rem, 3vw, 1.8rem);
    font-weight: 400;
    color: var(--plum-night);
    max-width: 38em;
    margin: 0 auto 2rem;
    line-height: 1.7;
}

.spark-pictogram {
    display: inline-block;
    transition: transform 0.4s var(--spring-ease);
}

.spark-pictogram:hover {
    transform: scale(1.15);
}

/* --- Section: The Build --- */
.section-build {
    background-color: #EEFBE8;
}

.build-blocks {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    text-align: left;
    max-width: 800px;
    margin: 0 auto;
}

.build-block {
    background: rgba(255, 255, 255, 0.5);
    border-radius: 1.5rem;
    padding: 2rem;
    box-shadow: inset 0 -4px 12px rgba(255, 255, 255, 0.4);
    transition: transform 0.4s var(--spring-ease);
}

.build-block:hover {
    transform: scale(1.03);
}

.build-pictogram {
    margin-bottom: 1rem;
}

.build-block p {
    font-family: var(--font-body);
    font-size: 16px;
    font-weight: 400;
    color: var(--plum-night);
    line-height: 1.7;
    max-width: 38em;
}

/* --- Section: The Burst --- */
.section-burst {
    background-color: #F0E6FF;
    transition: transform 0.8s var(--spring-ease), opacity 0.6s ease, margin 0.6s ease, background-color 2s ease;
}

.section-burst.expanded {
    margin: 1vh 1vw;
}

.burst-heading {
    font-size: clamp(3.5rem, 10vw, 9rem);
    color: var(--electric-grape);
}

.burst-text {
    font-family: var(--font-display);
    font-size: clamp(1.5rem, 4vw, 3rem);
    font-weight: 800;
    color: var(--coral-pop);
    margin-bottom: 2rem;
    letter-spacing: -0.01em;
}

.burst-sub p {
    font-family: var(--font-body);
    font-size: clamp(1rem, 2vw, 1.3rem);
    font-weight: 400;
    color: var(--plum-night);
    max-width: 38em;
    margin: 0 auto;
    line-height: 1.7;
}

.burst-pictograms {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    margin-top: 2.5rem;
}

.burst-icon {
    transition: transform 0.4s var(--spring-ease);
    cursor: pointer;
}

.burst-icon:hover {
    transform: scale(1.2) rotate(10deg);
}

/* --- Section: The Afterglow --- */
.section-afterglow {
    background-color: var(--cream-fizz);
    min-height: 60vh;
}

.afterglow-text {
    font-family: var(--font-body);
    font-size: clamp(1.5rem, 3vw, 2.5rem);
    font-weight: 400;
    font-style: italic;
    color: var(--warm-gray);
    opacity: 0.9;
}

/* --- Footer --- */
.site-footer {
    background-color: var(--plum-night);
    padding: 4rem 2rem;
    text-align: center;
    position: relative;
    z-index: 2;
    border-radius: 2rem 2rem 0 0;
    margin: 0 5vw;
}

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

.footer-logo {
    font-family: var(--font-display);
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--cream-fizz);
    letter-spacing: -0.02em;
    margin-bottom: 0.5rem;
}

.footer-tagline {
    font-family: var(--font-body);
    font-size: 1rem;
    color: var(--cream-fizz);
    opacity: 0.6;
    margin-bottom: 1.5rem;
}

.footer-squiggle {
    width: 200px;
    margin: 0 auto 1.5rem;
}

.footer-squiggle svg {
    width: 100%;
}

.footer-copy {
    font-family: var(--font-accent);
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--cream-fizz);
    opacity: 0.4;
}

/* --- Confetti --- */
.confetti-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    overflow: hidden;
}

.confetti-piece {
    position: absolute;
    width: var(--size, 8px);
    height: var(--size, 8px);
    background-color: var(--color, #FF6B6B);
    opacity: 1;
    pointer-events: none;
    will-change: transform, opacity;
}

.confetti-piece.circle {
    border-radius: 50%;
}

.confetti-piece.triangle {
    width: 0;
    height: 0;
    background: none;
    border-left: calc(var(--size, 8px) / 2) solid transparent;
    border-right: calc(var(--size, 8px) / 2) solid transparent;
    border-bottom: var(--size, 8px) solid var(--color, #FF6B6B);
}

.confetti-piece.star {
    clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
}

/* --- Gradient Animation for Burst Section --- */
@keyframes burst-gradient {
    0% { background-color: #F0E6FF; }
    20% { background-color: #FFE8E8; }
    40% { background-color: #FFF5CC; }
    60% { background-color: #E0FFE8; }
    80% { background-color: #E0F7F7; }
    100% { background-color: #F0E6FF; }
}

.section-burst.gradient-active {
    animation: burst-gradient 8s linear infinite;
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .bubble-nav {
        right: 8px;
        gap: 10px;
    }

    .nav-bubble {
        width: 42px;
        height: 42px;
    }

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

    .content-section {
        margin: 2vh 3vw;
        border-radius: 1.5rem;
    }

    .section-inner {
        padding: 3rem 1.5rem;
    }

    .build-blocks {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .burst-pictograms {
        gap: 1rem;
    }

    .burst-icon {
        width: 48px;
        height: 48px;
    }

    .site-footer {
        margin: 0 3vw;
    }
}

@media (max-width: 480px) {
    .logo-text {
        font-size: clamp(4rem, 16vw, 8rem);
    }

    .section-heading {
        font-size: clamp(2rem, 10vw, 4rem);
    }

    .bubble-nav {
        display: none;
    }

    .content-section {
        margin: 1.5vh 2vw;
        min-height: 60vh;
    }
}
