/* ===== GGIGGL.com - Maximalist Candy Fever Dream ===== */

/* --- CSS Custom Properties --- */
:root {
    --candy-pink: #FF2D8A;
    --electric-yellow: #FFE622;
    --bubblegum-blue: #29BFFF;
    --acid-green: #A8FF3E;
    --grape-soda: #9B30FF;
    --tangerine: #FF6B2B;
    --bg-base: #FFF8F0;
    --text-dark: #2D1B00;

    --bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
    --stagger: 80ms;
}

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

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    font-family: 'Nunito', sans-serif;
    font-size: 18px;
    line-height: 1.6;
    letter-spacing: 0.02em;
    color: var(--text-dark);
    background: var(--bg-base);
    overflow-x: hidden;
    position: relative;
}

/* --- Confetti Canvas --- */
#confetti-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

/* --- Mouse Trail Canvas --- */
#trail-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
}

/* --- Floating Pill Nav --- */
#main-nav {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 4px;
    padding: 6px;
    background: rgba(45, 27, 0, 0.85);
    border-radius: 999px;
    z-index: 1000;
    box-shadow: 0 6px 24px rgba(45, 27, 0, 0.3);
    transition: transform 0.4s var(--bounce);
}

#main-nav.nav-bounce {
    transform: translateX(-50%) translateY(-4px);
}

.nav-item {
    display: inline-block;
    padding: 8px 18px;
    border-radius: 999px;
    color: var(--bg-base);
    font-family: 'Bungee', cursive;
    font-size: 12px;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: transform 0.3s var(--bounce), box-shadow 0.3s ease;
    white-space: nowrap;
}

.nav-item:hover {
    transform: scale(1.1) rotate(2deg);
    box-shadow: 4px 4px 0 rgba(45, 27, 0, 0.2);
}

/* --- Sections Base --- */
.section {
    position: relative;
    min-height: 100vh;
    overflow: hidden;
    z-index: 1;
}

/* --- Sticker Effect --- */
.sticker {
    border: 4px solid white;
    box-shadow: 6px 6px 0 rgba(45, 27, 0, 0.15);
    transition: transform 0.3s var(--bounce), box-shadow 0.3s ease;
}

.sticker:hover {
    transform: scale(1.08) rotate(1.5deg) !important;
    box-shadow: 8px 8px 0 rgba(45, 27, 0, 0.25);
}

/* --- Bounce-In Animation --- */
@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3) translateY(40px);
    }
    50% {
        opacity: 1;
        transform: scale(1.15) translateY(-8px);
    }
    70% {
        transform: scale(0.95) translateY(3px);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.bounce-in {
    opacity: 0;
    transform: scale(0.3) translateY(40px);
}

.bounce-in.visible {
    animation: bounceIn 0.7s var(--bounce) forwards;
    animation-delay: var(--delay, 0s);
}

/* --- Floating Element Animations --- */
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-8px); }
}

@keyframes slowSpin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes wiggle {
    0%, 100% { transform: rotate(-3deg); }
    50% { transform: rotate(3deg); }
}

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

@keyframes drift {
    0% { transform: translate(0, 0) rotate(0deg); }
    25% { transform: translate(5px, -4px) rotate(2deg); }
    50% { transform: translate(-3px, -8px) rotate(-1deg); }
    75% { transform: translate(-6px, -3px) rotate(3deg); }
    100% { transform: translate(0, 0) rotate(0deg); }
}

/* --- Hero Section --- */
.hero-section {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-base);
    clip-path: polygon(0 0, 100% 0, 100% 92%, 0 100%);
    padding-bottom: 60px;
}

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

.bg-shape {
    position: absolute;
    border-radius: 50%;
    mix-blend-mode: multiply;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 80px 20px;
}

/* --- Hero Title (letter-by-letter) --- */
.hero-title {
    display: flex;
    justify-content: center;
    gap: 0.02em;
    margin-bottom: 20px;
}

.hero-letter {
    font-family: 'Lilita One', cursive;
    font-size: 14vw;
    display: inline-block;
    text-shadow:
        4px 4px 0 rgba(45, 27, 0, 0.15),
        8px 8px 0 rgba(45, 27, 0, 0.08);
    opacity: 0;
    transition: transform 0.3s var(--bounce);
}

.hero-letter:hover {
    transform: scale(1.15) rotate(5deg) !important;
}

@keyframes letterBounceTop {
    0% { opacity: 0; transform: translateY(-200px) rotate(-15deg) scale(0.5); }
    60% { opacity: 1; transform: translateY(15px) rotate(3deg) scale(1.1); }
    80% { transform: translateY(-5px) rotate(-1deg) scale(0.97); }
    100% { opacity: 1; transform: translateY(0) rotate(0deg) scale(1); }
}

@keyframes letterBounceBottom {
    0% { opacity: 0; transform: translateY(200px) rotate(15deg) scale(0.5); }
    60% { opacity: 1; transform: translateY(-15px) rotate(-3deg) scale(1.1); }
    80% { transform: translateY(5px) rotate(1deg) scale(0.97); }
    100% { opacity: 1; transform: translateY(0) rotate(0deg) scale(1); }
}

@keyframes letterBounceLeft {
    0% { opacity: 0; transform: translateX(-200px) rotate(-15deg) scale(0.5); }
    60% { opacity: 1; transform: translateX(15px) rotate(3deg) scale(1.1); }
    80% { transform: translateX(-5px) rotate(-1deg) scale(0.97); }
    100% { opacity: 1; transform: translateX(0) rotate(0deg) scale(1); }
}

@keyframes letterBounceRight {
    0% { opacity: 0; transform: translateX(200px) rotate(15deg) scale(0.5); }
    60% { opacity: 1; transform: translateX(-15px) rotate(-3deg) scale(1.1); }
    80% { transform: translateX(5px) rotate(1deg) scale(0.97); }
    100% { opacity: 1; transform: translateX(0) rotate(0deg) scale(1); }
}

.hero-letter.animate-top {
    animation: letterBounceTop 0.8s var(--bounce) forwards;
}
.hero-letter.animate-bottom {
    animation: letterBounceBottom 0.8s var(--bounce) forwards;
}
.hero-letter.animate-left {
    animation: letterBounceLeft 0.8s var(--bounce) forwards;
}
.hero-letter.animate-right {
    animation: letterBounceRight 0.8s var(--bounce) forwards;
}

/* --- Hero Tagline --- */
.hero-tagline {
    font-family: 'Bungee', cursive;
    font-size: 2.5vw;
    color: var(--text-dark);
    text-shadow: 3px 3px 0 var(--electric-yellow);
    margin-top: 10px;
}

/* --- Speech Bubbles --- */
.speech-bubble {
    position: absolute;
    font-family: 'Bangers', cursive;
    font-size: 22px;
    letter-spacing: 0.05em;
    padding: 12px 22px;
    background: white;
    color: var(--text-dark);
    border: 3px solid var(--text-dark);
    border-radius: 20px;
    z-index: 5;
    white-space: nowrap;
}

.speech-bubble::after {
    content: '';
    position: absolute;
    bottom: -12px;
    left: 25px;
    width: 0;
    height: 0;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-top: 12px solid var(--text-dark);
}

.sb-1 { top: 18%; left: 8%; transform: rotate(-8deg); background: var(--electric-yellow); }
.sb-2 { top: 25%; right: 8%; transform: rotate(6deg); background: var(--acid-green); }
.sb-3 { bottom: 20%; left: 15%; transform: rotate(-4deg); background: var(--bubblegum-blue); color: white; }
.sb-collage { transform: rotate(5deg); background: var(--electric-yellow); }

/* --- Floating Stars & Bolts --- */
.floating-star, .floating-bolt {
    position: absolute;
    z-index: 3;
    pointer-events: none;
}

.star-1 { top: 12%; left: 6%; animation: drift 5s ease-in-out infinite; }
.star-2 { top: 65%; right: 12%; animation: drift 4s ease-in-out infinite 1s; }
.star-3 { bottom: 10%; left: 35%; animation: drift 6s ease-in-out infinite 0.5s; }
.bolt-1 { top: 35%; right: 5%; animation: float 3s ease-in-out infinite; }
.bolt-2 { bottom: 25%; left: 5%; animation: float 3.5s ease-in-out infinite 0.8s; }

.collage-star { position: absolute; bottom: 10%; right: 5%; animation: slowSpin 20s linear infinite; }

/* Footer decorative */
.footer-star-1 { top: 10%; left: 5%; animation: drift 5s ease-in-out infinite; }
.footer-star-2 { top: 20%; right: 8%; animation: drift 4s ease-in-out infinite 1s; }
.footer-bolt-1 { bottom: 15%; left: 10%; animation: float 3s ease-in-out infinite; }

/* --- Interstitial Strips --- */
.interstitial-strip {
    position: relative;
    z-index: 2;
    overflow: hidden;
    padding: 15px 0;
    background: var(--text-dark);
}

.strip-content {
    display: flex;
    align-items: center;
    gap: 30px;
    width: max-content;
    will-change: transform;
}

.strip-icon {
    flex-shrink: 0;
}

.strip-1 { background: var(--text-dark); }
.strip-2 { background: var(--electric-yellow); }
.strip-3 { background: var(--text-dark); }
.strip-4 { background: var(--candy-pink); }

/* --- Feature Spreads --- */
.feature-spread {
    display: flex;
    align-items: center;
    padding: 80px 5%;
    gap: 40px;
    clip-path: polygon(0 0, 100% 4%, 100% 96%, 0 100%);
    padding-top: 100px;
    padding-bottom: 100px;
}

.feature-spread.spread-reverse {
    flex-direction: row-reverse;
}

.spread-left {
    flex: 1;
    position: relative;
    z-index: 2;
}

.spread-right {
    flex: 1;
    position: relative;
    z-index: 2;
}

.spread-heading {
    font-family: 'Lilita One', cursive;
    font-size: 8vw;
    line-height: 0.95;
    text-shadow:
        3px 3px 0 rgba(45, 27, 0, 0.12),
        6px 6px 0 rgba(0, 0, 0, 0.06);
    margin-bottom: 20px;
}

.spread-body {
    font-size: 20px;
    line-height: 1.7;
    max-width: 500px;
    color: var(--bg-base);
    font-weight: 600;
}

/* --- Checkerboard Patches --- */
.checkerboard-patch {
    position: absolute;
    width: 200px;
    height: 200px;
    z-index: 0;
    opacity: 0.15;
    pointer-events: none;
    background-image:
        repeating-conic-gradient(
            var(--text-dark) 0% 25%,
            transparent 0% 50%
        );
    background-size: 30px 30px;
}

.patch-1 { top: 10%; right: 5%; transform: rotate(12deg); }
.patch-2 { bottom: 8%; left: 3%; transform: rotate(-8deg); }
.patch-3 { top: 5%; right: 10%; transform: rotate(5deg); }
.patch-4 { bottom: 12%; right: 8%; transform: rotate(-15deg); }

/* --- Collage Blocks (About section) --- */
.spread-right {
    position: relative;
    min-height: 400px;
}

.collage-block {
    position: absolute;
    border-radius: 20px;
    mix-blend-mode: multiply;
    opacity: 0.7;
}

.cb-1 {
    width: 200px; height: 200px;
    top: 0; left: 10%;
    border-radius: 50%;
    transform: rotate(-5deg);
}
.cb-2 {
    width: 180px; height: 250px;
    top: 30px; right: 10%;
    border-radius: 30px;
    transform: rotate(3deg);
}
.cb-3 {
    width: 150px; height: 150px;
    bottom: 20px; left: 25%;
    clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
    transform: rotate(-2deg);
}
.cb-4 {
    width: 120px; height: 120px;
    bottom: 60px; right: 20%;
    border-radius: 50%;
    transform: rotate(8deg);
}

/* --- Feature Cards --- */
.feature-cards {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.feature-card {
    padding: 25px;
    border-radius: 20px;
    transform: rotate(-1deg);
    transition: transform 0.3s var(--bounce), box-shadow 0.3s ease;
}

.feature-card:nth-child(2) { transform: rotate(1.5deg); }
.feature-card:nth-child(3) { transform: rotate(-0.5deg); }

.feature-icon {
    margin-bottom: 10px;
}

.feature-label {
    font-family: 'Bungee', cursive;
    font-size: 22px;
    margin-bottom: 6px;
}

.feature-card p {
    font-size: 16px;
    line-height: 1.5;
    font-weight: 600;
}

/* --- Gallery Grid --- */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.gallery-item {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 180px;
    border: 4px solid white;
    box-shadow: 6px 6px 0 rgba(45, 27, 0, 0.15);
    transition: transform 0.3s var(--bounce), box-shadow 0.3s ease;
    position: relative;
    overflow: hidden;
}

.gallery-item:hover {
    transform: scale(1.08) rotate(2deg);
    box-shadow: 8px 8px 0 rgba(45, 27, 0, 0.25);
}

.gi-blob {
    border-radius: 42% 58% 70% 30% / 45% 45% 55% 55%;
}

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

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

.gallery-label {
    font-family: 'Bangers', cursive;
    font-size: 28px;
    color: var(--bg-base);
    text-shadow: 2px 2px 0 rgba(45, 27, 0, 0.2);
    letter-spacing: 0.05em;
    z-index: 1;
}

/* --- Vibes Grid --- */
.vibes-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.vibe-block {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 140px;
    border-radius: 20px;
    cursor: default;
}

.vibe-text {
    font-family: 'Lilita One', cursive;
    font-size: 36px;
    color: var(--bg-base);
    text-shadow: 2px 2px 0 rgba(45, 27, 0, 0.15);
}

/* --- Footer Explosion --- */
.footer-explosion {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: var(--tangerine);
    clip-path: polygon(0 6%, 100% 0, 100% 100%, 0 100%);
    padding-top: 80px;
    position: relative;
}

.footer-bg-gradient {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        45deg,
        var(--tangerine) 0%,
        var(--candy-pink) 40%,
        var(--grape-soda) 70%,
        var(--bubblegum-blue) 100%
    );
    opacity: 0.6;
    z-index: 0;
}

.footer-starburst {
    position: relative;
    z-index: 2;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 20px;
    max-width: 700px;
    margin: 0 auto;
}

.starburst-center {
    width: 100%;
    text-align: center;
    margin-bottom: 20px;
}

.footer-logo {
    font-family: 'Lilita One', cursive;
    font-size: 10vw;
    color: var(--bg-base);
    text-shadow:
        4px 4px 0 var(--candy-pink),
        8px 8px 0 rgba(45, 27, 0, 0.15);
    display: block;
}

.starburst-ray {
    flex: 0 0 auto;
}

.footer-link {
    display: inline-block;
    padding: 14px 28px;
    border-radius: 999px;
    font-family: 'Bungee', cursive;
    font-size: 16px;
    text-decoration: none;
    color: var(--bg-base);
    border: 4px solid white;
    box-shadow: 6px 6px 0 rgba(45, 27, 0, 0.15);
    transition: transform 0.3s var(--bounce), box-shadow 0.3s ease;
}

.footer-link:hover {
    transform: scale(1.08) rotate(2deg);
    box-shadow: 8px 8px 0 rgba(45, 27, 0, 0.25);
}

.footer-tagline {
    position: relative;
    z-index: 2;
    margin-top: 40px;
    font-family: 'Nunito', sans-serif;
    font-size: 16px;
    font-weight: 700;
    color: var(--bg-base);
    text-shadow: 1px 1px 0 rgba(45, 27, 0, 0.2);
}

/* --- Responsive --- */
@media (max-width: 900px) {
    .feature-spread {
        flex-direction: column;
        padding: 60px 5%;
    }

    .feature-spread.spread-reverse {
        flex-direction: column-reverse;
    }

    .spread-heading {
        font-size: 12vw;
    }

    .hero-letter {
        font-size: 16vw;
    }

    .hero-tagline {
        font-size: 4vw;
    }

    .nav-item {
        padding: 6px 12px;
        font-size: 10px;
    }

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

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

    .gallery-item {
        height: 140px;
    }

    .vibe-block {
        height: 110px;
    }

    .vibe-text {
        font-size: 28px;
    }
}

@media (max-width: 600px) {
    #main-nav {
        top: auto;
        bottom: 15px;
        padding: 4px;
        gap: 2px;
    }

    .nav-item {
        padding: 5px 8px;
        font-size: 9px;
    }

    .hero-letter {
        font-size: 18vw;
    }

    .hero-tagline {
        font-size: 5vw;
    }

    .spread-heading {
        font-size: 14vw;
    }

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

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

    .feature-card {
        padding: 18px;
    }

    .speech-bubble {
        font-size: 16px;
        padding: 8px 14px;
    }

    .sb-1 { top: 14%; left: 3%; }
    .sb-2 { top: 22%; right: 3%; }
    .sb-3 { bottom: 18%; left: 5%; }

    .footer-link {
        padding: 10px 18px;
        font-size: 13px;
    }

    .footer-logo {
        font-size: 14vw;
    }
}
