/* ============================================
   PPEBBL.com - Pop Art Vibrant Showcase
   ============================================ */

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

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

body {
    font-family: 'Work Sans', sans-serif;
    font-size: 17px;
    line-height: 1.65;
    color: #0A0A0A;
    background: #FAFAFA;
    overflow-x: hidden;
}

/* --- Typography --- */
h2, h3, .section-header {
    font-family: 'Bungee', cursive;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.cell-title {
    font-family: 'Lilita One', cursive;
    font-size: clamp(1.2rem, 3vw, 2.5rem);
    text-transform: uppercase;
    margin-bottom: 0.5rem;
}

.cell-text, .diagonal-text {
    font-family: 'Work Sans', sans-serif;
    font-weight: 400;
    font-size: 17px;
    line-height: 1.65;
}

.marker-text {
    font-family: 'Permanent Marker', cursive;
    font-size: 18px;
}

/* --- CMYK Misregistration Text --- */
.cmyk-text-wrapper, .cmyk-header {
    position: relative;
    display: block;
}

.cmyk-text-wrapper {
    font-family: 'Bungee', cursive;
    font-size: clamp(3rem, 18vw, 14rem);
    text-transform: uppercase;
    line-height: 1;
}

.cmyk-header {
    font-size: clamp(2rem, 6vw, 5rem);
    margin-bottom: 2rem;
    text-align: center;
}

.cmyk-cyan, .cmyk-magenta, .cmyk-black {
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    -webkit-text-stroke: 2px #0A0A0A;
}

.cmyk-cyan {
    color: #00CED1;
    transform: translate(-3px, -2px);
    opacity: 0.7;
}

.cmyk-magenta {
    color: #FF1493;
    transform: translate(3px, 2px);
    opacity: 0.7;
}

.cmyk-black {
    color: #0A0A0A;
    position: relative;
    -webkit-text-stroke: 0;
}

/* --- Ben-Day Dot Overlays --- */
.ben-day-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.ben-day-small {
    background: repeating-radial-gradient(circle, #D5D5D5 1px, transparent 1px) 0 0 / 8px 8px;
    opacity: 0.15;
}

.ben-day-large {
    background: repeating-radial-gradient(circle, currentColor 4px, transparent 4px) 0 0 / 30px 30px;
    opacity: 0.12;
    animation: dotShimmer 4s linear infinite;
}

@keyframes dotShimmer {
    0% { background-position: 0 0; }
    50% { background-position: 2px 2px; }
    100% { background-position: 0 0; }
}

/* --- Comic Panel Borders & Shadows --- */
.panel {
    position: relative;
    width: 100%;
    min-height: 100vh;
    overflow: hidden;
    border-bottom: 4px solid #0A0A0A;
}

/* --- Navigation --- */
#comic-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: center;
    gap: 8px;
    padding: 12px 16px;
    z-index: 1000;
    background: rgba(250, 250, 250, 0.95);
    border-bottom: 4px solid #0A0A0A;
}

.nav-bubble {
    font-family: 'Bungee', cursive;
    font-size: 13px;
    text-transform: uppercase;
    text-decoration: none;
    color: #0A0A0A;
    background: #FAFAFA;
    border: 3px solid #0A0A0A;
    border-radius: 20px;
    padding: 6px 16px;
    position: relative;
    transition: background-color 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), transform 0.2s;
    box-shadow: 3px 3px 0 #0A0A0A;
}

.nav-bubble::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 8px solid #0A0A0A;
}

.nav-bubble:hover {
    background: #FFE500;
    transform: translateY(-2px);
}

/* --- Section 1: Splash Panel --- */
.splash-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #FF1493;
    color: #FAFAFA;
    padding-top: 60px;
}

.splash-panel .ben-day-large {
    color: #0A0A0A;
}

.splash-content {
    position: relative;
    z-index: 2;
    text-align: center;
}

.splash-panel .cmyk-text-wrapper {
    color: #FAFAFA;
}

.splash-panel .cmyk-black {
    color: #FAFAFA;
    -webkit-text-stroke: 2px #0A0A0A;
}

.splash-bubble {
    position: absolute;
    bottom: 12%;
    right: 8%;
    z-index: 10;
    animation: pulseAttention 2s ease-in-out infinite;
}

/* --- Speech Bubbles --- */
.speech-bubble {
    font-family: 'Lilita One', cursive;
    font-size: clamp(1rem, 2.5vw, 1.8rem);
    text-transform: uppercase;
    color: #0A0A0A;
    background: #FAFAFA;
    border: 3px solid #0A0A0A;
    border-radius: 20px;
    padding: 12px 24px;
    position: relative;
    display: inline-block;
    box-shadow: 6px 6px 0 #0A0A0A;
    animation: bounceEnter 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

.speech-bubble::after {
    content: '';
    position: absolute;
    bottom: -16px;
    left: 24px;
    width: 0;
    height: 0;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-top: 16px solid #0A0A0A;
}

/* --- Starburst Badge --- */
.starburst-badge {
    font-family: 'Permanent Marker', cursive;
    font-size: 16px;
    color: #0A0A0A;
    background: #FFE500;
    width: 70px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 12px;
    right: 12px;
    clip-path: polygon(50% 0%, 61% 15%, 78% 5%, 75% 25%, 95% 28%, 83% 42%, 100% 50%, 83% 58%, 95% 72%, 75% 75%, 78% 95%, 61% 85%, 50% 100%, 39% 85%, 22% 95%, 25% 75%, 5% 72%, 17% 58%, 0% 50%, 17% 42%, 5% 28%, 25% 25%, 22% 5%, 39% 15%);
    animation: starburstSpin 20s linear infinite, pulseAttention 2s ease-in-out infinite;
    z-index: 5;
}

/* --- Onomatopoeia Bursts --- */
.onomatopoeia {
    font-family: 'Bungee', cursive;
    font-size: clamp(2rem, 8vw, 6rem);
    text-transform: uppercase;
    color: #FFE500;
    -webkit-text-stroke: 2px #0A0A0A;
    position: absolute;
    z-index: 3;
    pointer-events: none;
    opacity: 0.3;
}

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

/* --- Section 2: Grid Burst --- */
.grid-burst-panel {
    background: #FFE500;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 100px 40px 60px;
    color: #0A0A0A;
}

.grid-burst-panel .ben-day-small {
    color: #0A0A0A;
}

.bento-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(2, 1fr);
    gap: 0;
    width: 100%;
    max-width: 1200px;
    position: relative;
    z-index: 2;
}

.bento-cell {
    border: 4px solid #0A0A0A;
    padding: 30px;
    position: relative;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), background-color 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 6px 6px 0 #0A0A0A;
    min-height: 200px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow: hidden;
}

.bento-cell:hover {
    transform: scale(1.05);
    z-index: 10;
}

.cell-1 { background: #FF1493; color: #FAFAFA; }
.cell-2 { background: #00CED1; color: #0A0A0A; }
.cell-3 { background: #FAFAFA; color: #0A0A0A; }
.cell-4 { background: #FF6B35; color: #FAFAFA; }
.cell-5 { background: #9B59B6; color: #FAFAFA; }
.cell-6 { background: #FFE500; color: #0A0A0A; border-color: #0A0A0A; }

.cell-bubble {
    position: absolute;
    bottom: 10px;
    right: 10px;
    font-size: 1rem;
    padding: 6px 14px;
}

/* --- Section 3: Diagonal Slash --- */
.diagonal-panel {
    display: flex;
    background: #FAFAFA;
    min-height: 100vh;
    padding-top: 60px;
}

.diagonal-left {
    position: relative;
    width: 50%;
    background: #00CED1;
    clip-path: polygon(0 0, 100% 0, 70% 100%, 0 100%);
    overflow: hidden;
}

.diagonal-left .ben-day-large {
    color: #0A0A0A;
}

.diagonal-pattern {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        repeating-linear-gradient(45deg, transparent, transparent 20px, rgba(10, 10, 10, 0.05) 20px, rgba(10, 10, 10, 0.05) 22px),
        repeating-linear-gradient(-45deg, transparent, transparent 20px, rgba(10, 10, 10, 0.05) 20px, rgba(10, 10, 10, 0.05) 22px);
}

.diagonal-right {
    width: 60%;
    margin-left: -10%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 60px 60px 60px 120px;
    position: relative;
    z-index: 2;
}

.diagonal-right .cmyk-header {
    text-align: left;
}

.diagonal-text {
    font-size: 17px;
    line-height: 1.65;
    margin-bottom: 1.5rem;
    max-width: 550px;
}

.diagonal-bubble {
    margin-top: 1rem;
}

/* --- Section 4: Dot Matrix --- */
.dot-matrix-panel {
    background: #FF6B35;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 100px 40px 60px;
    color: #FAFAFA;
}

.dot-matrix-panel .ben-day-small {
    color: #FAFAFA;
}

.honeycomb-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 20px;
    max-width: 1000px;
    position: relative;
    z-index: 2;
    padding: 20px;
}

.dot-circle {
    border-radius: 50%;
    border: 4px solid #0A0A0A;
    background: var(--dot-color);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 6px 6px 0 #0A0A0A;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    overflow: hidden;
}

.dot-circle::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-radial-gradient(circle, rgba(10,10,10,0.15) 2px, transparent 2px) 0 0 / 12px 12px;
    border-radius: 50%;
}

.dot-circle:hover {
    transform: scale(1.15);
    z-index: 5;
}

.dot-xl { width: 220px; height: 220px; }
.dot-lg { width: 170px; height: 170px; }
.dot-md { width: 130px; height: 130px; }
.dot-sm { width: 90px; height: 90px; }

.dot-inner {
    position: relative;
    z-index: 2;
    text-align: center;
}

.dot-label {
    font-family: 'Bungee', cursive;
    font-size: clamp(0.8rem, 2vw, 1.5rem);
    text-transform: uppercase;
    color: #0A0A0A;
    -webkit-text-stroke: 1px #0A0A0A;
}

/* --- Section 5: Warhol Wall --- */
.warhol-panel {
    background: #9B59B6;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 100px 40px 60px;
    color: #FAFAFA;
}

.warhol-panel .ben-day-small {
    color: #FAFAFA;
}

.warhol-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(2, 1fr);
    gap: 0;
    width: 100%;
    max-width: 1000px;
    position: relative;
    z-index: 2;
}

.warhol-cell {
    border: 4px solid #0A0A0A;
    aspect-ratio: 1;
    position: relative;
    cursor: pointer;
    perspective: 800px;
    box-shadow: 6px 6px 0 #0A0A0A;
}

.warhol-front, .warhol-back {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    backface-visibility: hidden;
    transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
    border-radius: 0;
}

.warhol-front {
    transform: rotateY(0deg);
}

.warhol-back {
    transform: rotateY(180deg);
    background: #0A0A0A;
}

.warhol-cell.flipped .warhol-front {
    transform: rotateY(180deg);
}

.warhol-cell.flipped .warhol-back {
    transform: rotateY(0deg);
}

/* Warhol duotone color treatments */
.warhol-cell[data-index="0"] .warhol-front { background: #FF1493; }
.warhol-cell[data-index="1"] .warhol-front { background: #FFE500; filter: hue-rotate(0deg) saturate(1.2); }
.warhol-cell[data-index="2"] .warhol-front { background: #00CED1; filter: hue-rotate(60deg) saturate(1.5); }
.warhol-cell[data-index="3"] .warhol-front { background: #FF6B35; filter: hue-rotate(120deg) saturate(1.3); }
.warhol-cell[data-index="4"] .warhol-front { background: #9B59B6; filter: hue-rotate(180deg) saturate(1.4); }
.warhol-cell[data-index="5"] .warhol-front { background: #FF1493; filter: hue-rotate(240deg) saturate(1.6) brightness(1.1); }
.warhol-cell[data-index="6"] .warhol-front { background: #00CED1; filter: hue-rotate(300deg) saturate(1.2) brightness(0.9); }
.warhol-cell[data-index="7"] .warhol-front { background: #FFE500; filter: hue-rotate(30deg) saturate(2.0); }

.warhol-content {
    text-align: center;
}

.warhol-icon {
    font-size: clamp(2rem, 5vw, 4rem);
    color: #0A0A0A;
    line-height: 1;
    margin-bottom: 8px;
}

.warhol-label {
    font-family: 'Bungee', cursive;
    font-size: clamp(0.8rem, 2vw, 1.4rem);
    text-transform: uppercase;
    color: #0A0A0A;
    -webkit-text-stroke: 1px #0A0A0A;
}

.warhol-back .warhol-label {
    color: #FFE500;
    -webkit-text-stroke: 1px #FFE500;
    font-size: clamp(1.2rem, 3vw, 2rem);
}

/* Warhol pulse wave */
.warhol-cell.pulsing {
    animation: warholPulse 0.4s ease-out;
}

@keyframes warholPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.08); z-index: 10; }
    100% { transform: scale(1); }
}

/* --- Section 6: Exit Burst --- */
.exit-burst-panel {
    background: #0A0A0A;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 80px 40px;
    color: #FAFAFA;
    overflow: hidden;
}

.starburst-bg {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 200vmax;
    height: 200vmax;
    transform: translate(-50%, -50%);
    background: conic-gradient(
        #FF1493 0deg, #0A0A0A 15deg,
        #FFE500 30deg, #0A0A0A 45deg,
        #00CED1 60deg, #0A0A0A 75deg,
        #FF6B35 90deg, #0A0A0A 105deg,
        #9B59B6 120deg, #0A0A0A 135deg,
        #FF1493 150deg, #0A0A0A 165deg,
        #FFE500 180deg, #0A0A0A 195deg,
        #00CED1 210deg, #0A0A0A 225deg,
        #FF6B35 240deg, #0A0A0A 255deg,
        #9B59B6 270deg, #0A0A0A 285deg,
        #FF1493 300deg, #0A0A0A 315deg,
        #FFE500 330deg, #0A0A0A 345deg,
        #00CED1 360deg
    );
    opacity: 0.3;
    animation: starburstRotate 30s linear infinite;
}

@keyframes starburstRotate {
    from { transform: translate(-50%, -50%) rotate(0deg); }
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

.exit-content {
    position: relative;
    z-index: 2;
    text-align: center;
}

.spiral-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 600px;
    height: 600px;
}

.spiral-word {
    font-family: 'Bungee', cursive;
    font-size: clamp(1rem, 3vw, 2rem);
    text-transform: uppercase;
    color: #FAFAFA;
    -webkit-text-stroke: 1px #0A0A0A;
    position: absolute;
    top: 50%;
    left: 50%;
    transform-origin: center center;
    transform:
        translate(-50%, -50%)
        rotate(calc(var(--i) * 45deg))
        translateX(200px);
    opacity: 0.6;
}

.exit-center {
    position: relative;
    z-index: 5;
}

.exit-title {
    font-size: clamp(3rem, 12vw, 10rem);
    margin-bottom: 2rem;
}

.exit-title .cmyk-black {
    color: #FAFAFA;
}

.exit-bubble {
    margin-top: 1rem;
    background: #FFE500;
    color: #0A0A0A;
}

.exit-bubble::after {
    border-top-color: #0A0A0A;
}

/* --- Animations --- */
@keyframes bounceEnter {
    0% {
        opacity: 0;
        transform: scale(0.3) translateY(40px);
    }
    60% {
        opacity: 1;
        transform: scale(1.1) translateY(-5px);
    }
    80% {
        transform: scale(0.95) translateY(2px);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

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

@keyframes starburstSpin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Bounce-in for scroll-triggered elements */
.bounce-hidden {
    opacity: 0;
    transform: scale(0.6) translateY(60px);
}

.bounce-visible {
    animation: bounceEnter 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

/* --- Responsive --- */
@media (max-width: 900px) {
    .bento-grid {
        grid-template-columns: repeat(2, 1fr);
    }

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

    .diagonal-panel {
        flex-direction: column;
    }

    .diagonal-left {
        width: 100%;
        min-height: 40vh;
        clip-path: polygon(0 0, 100% 0, 100% 80%, 0 100%);
    }

    .diagonal-right {
        width: 100%;
        margin-left: 0;
        padding: 40px 24px;
    }

    .nav-bubble {
        font-size: 11px;
        padding: 4px 10px;
    }

    .spiral-text {
        width: 300px;
        height: 300px;
    }

    .spiral-word {
        transform:
            translate(-50%, -50%)
            rotate(calc(var(--i) * 45deg))
            translateX(100px);
    }

    .dot-xl { width: 150px; height: 150px; }
    .dot-lg { width: 120px; height: 120px; }
    .dot-md { width: 90px; height: 90px; }
    .dot-sm { width: 70px; height: 70px; }
}

@media (max-width: 600px) {
    body {
        font-size: 16px;
        line-height: 1.6;
    }

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

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

    #comic-nav {
        gap: 4px;
        padding: 8px 8px;
        flex-wrap: wrap;
    }

    .nav-bubble {
        font-size: 10px;
        padding: 3px 8px;
    }

    .honeycomb-grid {
        gap: 12px;
    }

    .dot-xl { width: 120px; height: 120px; }
    .dot-lg { width: 100px; height: 100px; }
    .dot-md { width: 80px; height: 80px; }
    .dot-sm { width: 60px; height: 60px; }

    .onomatopoeia {
        font-size: clamp(1.5rem, 6vw, 3rem);
    }
}

/* --- Color Cycle Animation for Exit Background --- */
@keyframes colorCycle {
    0% { background-color: #FF1493; }
    20% { background-color: #FFE500; }
    40% { background-color: #00CED1; }
    60% { background-color: #FF6B35; }
    80% { background-color: #9B59B6; }
    100% { background-color: #FF1493; }
}

/* --- Bento Cell Hover Color Morph --- */
.bento-cell:nth-child(1):hover { background-color: #FFE500; color: #0A0A0A; }
.bento-cell:nth-child(2):hover { background-color: #FF1493; color: #FAFAFA; }
.bento-cell:nth-child(3):hover { background-color: #00CED1; color: #0A0A0A; }
.bento-cell:nth-child(4):hover { background-color: #9B59B6; color: #FAFAFA; }
.bento-cell:nth-child(5):hover { background-color: #FF6B35; color: #FAFAFA; }
.bento-cell:nth-child(6):hover { background-color: #FF1493; color: #FAFAFA; }
