:root {
    --mustard: #F2C744;
    --tomato: #E83A30;
    --lettuce: #4CAF50;
    --mayo: #FFF8E7;
    --eggplant: #6A1B9A;
    --cyan: #00BCD4;
    --ink: #1a1a1a;
    --white: #FFFFFF;
}

*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-snap-type: y mandatory;
    overflow-x: hidden;
}

body {
    background: var(--ink);
    font-family: 'Lato', sans-serif;
    font-weight: 400;
    color: var(--ink);
    overflow-x: hidden;
}

/* Strip container */
.strip {
    width: 100%;
}

/* Panel base */
.panel {
    position: relative;
    width: 100%;
    height: 100vh;
    overflow: hidden;
    border: 6px solid var(--ink);
    border-radius: 8px;
    scroll-snap-align: start;
    scroll-snap-stop: always;
}

/* Halftone Ben-Day dot overlay */
.panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.panel-mustard { background: var(--mustard); }
.panel-mustard::before {
    background: radial-gradient(circle, rgba(0,0,0,0.10) 1.5px, transparent 1.5px);
    background-size: 6px 6px;
}

.panel-tomato { background: var(--tomato); }
.panel-tomato::before {
    background: radial-gradient(circle, rgba(0,0,0,0.12) 2px, transparent 2px);
    background-size: 8px 8px;
}

.panel-lettuce { background: var(--lettuce); }
.panel-lettuce::before {
    background: radial-gradient(circle, rgba(0,0,0,0.08) 1px, transparent 1px);
    background-size: 5px 5px;
}

.panel-mayo { background: var(--mayo); }
.panel-mayo::before {
    background: radial-gradient(circle, rgba(0,0,0,0.06) 1.5px, transparent 1.5px);
    background-size: 7px 7px;
}

.panel-eggplant { background: var(--eggplant); color: var(--white); }
.panel-eggplant::before {
    background: radial-gradient(circle, rgba(255,255,255,0.08) 1px, transparent 1px);
    background-size: 6px 6px;
}

.panel-cyan { background: var(--cyan); }
.panel-cyan::before {
    background: radial-gradient(circle, rgba(0,0,0,0.10) 2px, transparent 2px);
    background-size: 7px 7px;
}

.panel-end {
    background: var(--ink);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Panel number circle */
.panel-number {
    position: absolute;
    top: 16px;
    left: 16px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--ink);
    color: var(--white);
    font-family: 'Bangers', cursive;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

/* Sound effects */
.sfx {
    position: absolute;
    font-family: 'Bangers', cursive;
    font-size: clamp(2.5rem, 6vw, 5rem);
    color: var(--ink);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    text-shadow: 3px 3px 0 var(--white), -1px -1px 0 var(--white);
    z-index: 5;
    opacity: 0;
    transform-origin: center center;
    animation: sfx-bounce 0.5s ease-out forwards;
    animation-play-state: paused;
}

.panel-eggplant .sfx {
    color: var(--white);
    text-shadow: 3px 3px 0 var(--ink), -1px -1px 0 var(--ink);
}

.panel.is-active .sfx {
    animation-play-state: running;
}

@keyframes sfx-bounce {
    0% {
        opacity: 0;
        transform: scale(0.3) rotate(var(--sfx-rotate, -3deg));
    }
    50% {
        opacity: 1;
        transform: scale(1.15) rotate(var(--sfx-rotate, -3deg));
    }
    100% {
        opacity: 1;
        transform: scale(1) rotate(var(--sfx-rotate, -3deg));
    }
}

/* Splash layout */
.splash-layout {
    position: relative;
    z-index: 2;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.food-zone {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
    width: 100%;
}

.splash-title-zone {
    padding: 24px;
    text-align: center;
}

.splash-title {
    font-family: 'Bangers', cursive;
    font-size: clamp(3rem, 8vw, 7rem);
    letter-spacing: 0.04em;
    color: var(--ink);
    text-transform: uppercase;
    text-shadow: 3px 3px 0 var(--white);
    line-height: 1;
}

/* Split layout */
.split-layout {
    position: relative;
    z-index: 2;
    width: 100%;
    height: 100%;
    display: flex;
}

.split-left {
    flex: 0 0 45%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
}

.split-divider {
    width: 6px;
    background: var(--ink);
    flex-shrink: 0;
}

.split-right {
    flex: 1;
    position: relative;
    padding: 40px 24px;
    overflow: hidden;
}

/* Grid layout */
.grid-layout {
    position: relative;
    z-index: 2;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
}

.bento-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(2, 1fr);
    gap: 12px;
    width: 100%;
    max-width: 600px;
    aspect-ratio: 3 / 2;
}

.bento-cell {
    background: rgba(255,255,255,0.25);
    border: 4px solid var(--ink);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    transition: transform 0.3s ease;
}

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

.grid-number {
    font-family: 'Bangers', cursive;
    font-size: 120px;
    color: rgba(0,0,0,0.08);
    position: absolute;
    bottom: 10px;
    right: 30px;
    z-index: 0;
    line-height: 1;
}

/* ==================
   FOOD ILLUSTRATIONS
   ================== */

/* Sandwich (Panel 1) */
.food-sandwich {
    position: relative;
    width: 220px;
    height: 180px;
}

.bread-top {
    position: absolute;
    top: 0;
    left: 10px;
    width: 200px;
    height: 60px;
    background: #D4923A;
    border: 4px solid var(--ink);
    border-radius: 80px 80px 4px 4px;
}

.bread-top::before {
    content: '';
    position: absolute;
    top: 10px;
    left: 30px;
    width: 12px;
    height: 8px;
    background: #C08030;
    border-radius: 50%;
}

.bread-top::after {
    content: '';
    position: absolute;
    top: 18px;
    left: 80px;
    width: 10px;
    height: 6px;
    background: #C08030;
    border-radius: 50%;
}

.filling {
    position: absolute;
    left: 5px;
    width: 210px;
    border: 3px solid var(--ink);
}

.filling-lettuce {
    top: 55px;
    height: 22px;
    background: #5DBF40;
    border-radius: 2px;
    clip-path: polygon(0% 50%, 5% 0%, 12% 60%, 20% 10%, 28% 55%, 35% 5%, 42% 50%, 50% 0%, 58% 55%, 65% 10%, 72% 50%, 80% 5%, 88% 55%, 95% 0%, 100% 50%, 100% 100%, 0% 100%);
}

.filling-tomato {
    top: 72px;
    height: 20px;
    background: #E83A30;
    border-radius: 2px;
}

.filling-cheese {
    top: 88px;
    height: 16px;
    background: #F2C744;
    border-radius: 1px;
    transform: rotate(-1deg);
}

.filling-cheese::before {
    content: '';
    position: absolute;
    right: -8px;
    top: 2px;
    width: 16px;
    height: 12px;
    background: #F2C744;
    border: 3px solid var(--ink);
    transform: rotate(5deg);
}

.bread-bottom {
    position: absolute;
    bottom: 20px;
    left: 10px;
    width: 200px;
    height: 40px;
    background: #D4923A;
    border: 4px solid var(--ink);
    border-radius: 4px 4px 8px 8px;
}

/* Soup (Panel 2) */
.food-soup {
    position: relative;
    width: 200px;
    height: 200px;
}

.soup-bowl {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 200px;
    height: 120px;
    background: var(--white);
    border: 4px solid var(--ink);
    border-radius: 0 0 80px 80px;
    overflow: hidden;
}

.soup-bowl::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 70%;
    background: #E83A30;
    border-bottom: 3px solid #C02A20;
}

.soup-lid {
    position: absolute;
    bottom: 115px;
    left: -10px;
    width: 220px;
    height: 16px;
    background: var(--white);
    border: 4px solid var(--ink);
    border-radius: 8px;
}

.steam {
    position: absolute;
    width: 3px;
    background: transparent;
    border-left: 3px solid rgba(255,255,255,0.6);
    animation: steam-rise 2s ease-in-out infinite;
}

.steam-1 {
    left: 60px;
    bottom: 140px;
    height: 40px;
    border-radius: 50%;
    animation-delay: 0s;
}

.steam-2 {
    left: 100px;
    bottom: 145px;
    height: 50px;
    border-radius: 50%;
    animation-delay: 0.6s;
}

.steam-3 {
    left: 140px;
    bottom: 138px;
    height: 35px;
    border-radius: 50%;
    animation-delay: 1.2s;
}

@keyframes steam-rise {
    0% {
        opacity: 0;
        transform: translateY(0) scaleX(1);
    }
    30% {
        opacity: 0.7;
    }
    100% {
        opacity: 0;
        transform: translateY(-30px) scaleX(2);
    }
}

/* Speech bubbles */
.speech-bubble {
    position: absolute;
    background: var(--white);
    border: 2px solid var(--ink);
    border-radius: 16px;
    padding: 14px 18px;
    max-width: 75%;
    z-index: 3;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.panel.is-active .speech-bubble {
    opacity: 1;
    transform: translateY(0);
}

.panel.is-active .speech-bubble:nth-child(2) {
    transition-delay: 0.2s;
}

.panel.is-active .speech-bubble:nth-child(3) {
    transition-delay: 0.4s;
}

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

.speech-bubble::before {
    content: '';
    position: absolute;
    left: 21px;
    bottom: -9px;
    width: 0;
    height: 0;
    border-left: 9px solid transparent;
    border-right: 9px solid transparent;
    border-top: 10px solid var(--white);
    z-index: 1;
}

.bubble-text {
    font-family: 'Lato', sans-serif;
    font-size: 15px;
    line-height: 1.5;
    color: var(--ink);
}

.bubble-text strong {
    font-weight: 700;
}

/* Bento food icons */
.icon-bowl,
.icon-sandwich,
.icon-plate,
.icon-tray,
.icon-cup,
.icon-apple {
    width: 60px;
    height: 60px;
    position: relative;
}

/* Bowl icon */
.icon-bowl {
    border: 4px solid var(--ink);
    border-radius: 0 0 50% 50%;
    border-top: none;
    height: 40px;
    width: 60px;
    margin-top: 20px;
}

.icon-bowl::before {
    content: '';
    position: absolute;
    top: -6px;
    left: -6px;
    width: calc(100% + 12px);
    height: 6px;
    background: var(--ink);
    border-radius: 3px;
}

/* Sandwich icon */
.icon-sandwich {
    height: 36px;
    width: 60px;
}

.icon-sandwich::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 14px;
    background: #D4923A;
    border: 3px solid var(--ink);
    border-radius: 20px 20px 2px 2px;
}

.icon-sandwich::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 10px;
    background: #D4923A;
    border: 3px solid var(--ink);
    border-radius: 2px 2px 4px 4px;
}

/* Plate icon */
.icon-plate {
    width: 60px;
    height: 60px;
    border: 4px solid var(--ink);
    border-radius: 50%;
}

.icon-plate::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 32px;
    height: 32px;
    border: 2px solid var(--ink);
    border-radius: 50%;
}

/* Tray icon */
.icon-tray {
    width: 60px;
    height: 40px;
    border: 4px solid var(--ink);
    border-radius: 4px;
    margin-top: 10px;
}

.icon-tray::before {
    content: '';
    position: absolute;
    top: -8px;
    left: 10px;
    width: 40px;
    height: 8px;
    border: 3px solid var(--ink);
    border-bottom: none;
    border-radius: 4px 4px 0 0;
}

/* Cup icon */
.icon-cup {
    width: 36px;
    height: 48px;
    border: 4px solid var(--ink);
    border-radius: 0 0 6px 6px;
}

.icon-cup::before {
    content: '';
    position: absolute;
    top: 6px;
    right: -14px;
    width: 14px;
    height: 20px;
    border: 3px solid var(--ink);
    border-left: none;
    border-radius: 0 8px 8px 0;
}

/* Apple icon */
.icon-apple {
    width: 44px;
    height: 48px;
    background: #E83A30;
    border: 3px solid var(--ink);
    border-radius: 44% 44% 50% 50%;
}

.icon-apple::before {
    content: '';
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 3px;
    height: 10px;
    background: var(--ink);
}

.icon-apple::after {
    content: '';
    position: absolute;
    top: -10px;
    left: 55%;
    width: 10px;
    height: 8px;
    background: #4CAF50;
    border-radius: 50% 50% 0 50%;
    transform: rotate(30deg);
}

/* Plate (Panel 4) */
.food-plate {
    position: relative;
    width: 260px;
    height: 260px;
}

.plate-rim {
    position: absolute;
    top: 0;
    left: 0;
    width: 260px;
    height: 260px;
    border: 6px solid var(--ink);
    border-radius: 50%;
    background: var(--white);
}

.plate-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 160px;
    height: 160px;
    border: 3px solid rgba(0,0,0,0.15);
    border-radius: 50%;
}

.plate-line {
    position: absolute;
    top: 50%;
    left: 50%;
    background: rgba(0,0,0,0.06);
}

.plate-line-1 {
    width: 80px;
    height: 3px;
    transform: translate(-50%, -50%) rotate(30deg);
}

.plate-line-2 {
    width: 60px;
    height: 3px;
    transform: translate(-50%, -50%) rotate(75deg);
}

.plate-line-3 {
    width: 70px;
    height: 3px;
    transform: translate(-50%, -50%) rotate(120deg);
}

.plate-line-4 {
    width: 50px;
    height: 3px;
    transform: translate(-50%, -50%) rotate(160deg);
}

/* Drink (Panel 5) */
.food-drink {
    position: relative;
    width: 120px;
    height: 200px;
}

.drink-glass {
    position: absolute;
    bottom: 0;
    left: 10px;
    width: 100px;
    height: 160px;
    background: rgba(255,255,255,0.3);
    border: 4px solid var(--white);
    border-radius: 4px 4px 12px 12px;
}

.drink-liquid {
    position: absolute;
    bottom: 4px;
    left: 14px;
    width: 92px;
    height: 100px;
    background: #00BCD4;
    border-radius: 0 0 8px 8px;
    opacity: 0.7;
}

.drink-liquid::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 6px;
    background: rgba(255,255,255,0.4);
    border-radius: 50%;
}

.drink-straw {
    position: absolute;
    top: 10px;
    left: 70px;
    width: 4px;
    height: 160px;
    background: var(--tomato);
    border: 2px solid var(--ink);
    transform: rotate(-8deg);
    transform-origin: bottom center;
}

/* Tray (Panel 6) */
.food-tray {
    position: relative;
    width: 260px;
    height: 180px;
}

.tray-base {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 260px;
    height: 140px;
    background: #a08060;
    border: 5px solid var(--ink);
    border-radius: 8px;
}

.tray-base::before {
    content: '';
    position: absolute;
    top: 8px;
    left: 8px;
    right: 8px;
    bottom: 8px;
    border: 2px solid rgba(0,0,0,0.15);
    border-radius: 4px;
}

.tray-item {
    position: absolute;
    border: 3px solid var(--ink);
    border-radius: 50%;
}

.tray-item-1 {
    width: 60px;
    height: 60px;
    background: var(--white);
    bottom: 40px;
    left: 30px;
}

.tray-item-2 {
    width: 50px;
    height: 50px;
    background: #E83A30;
    bottom: 45px;
    left: 110px;
}

.tray-item-3 {
    width: 40px;
    height: 40px;
    background: #4CAF50;
    bottom: 50px;
    left: 180px;
}

/* THE END panel */
.end-text {
    font-family: 'Bangers', cursive;
    font-size: clamp(4rem, 12vw, 10rem);
    color: var(--white);
    text-shadow: 4px 4px 0 var(--tomato);
    letter-spacing: 0.06em;
}

/* Panel entrance animation */
.panel {
    opacity: 0;
    transform: scale(0.92);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.panel.is-active {
    opacity: 1;
    transform: scale(1);
}

/* Permanent Marker annotation (general) */
.annotation {
    font-family: 'Permanent Marker', cursive;
    font-size: 14px;
    color: var(--ink);
    opacity: 0.7;
}

/* Mobile adjustments */
@media (max-width: 600px) {
    .split-layout {
        flex-direction: column;
    }

    .split-left {
        flex: 0 0 40%;
    }

    .split-divider {
        width: 100%;
        height: 6px;
    }

    .split-right {
        flex: 1;
        padding: 20px 16px;
    }

    .speech-bubble {
        max-width: 90%;
        position: relative;
        top: auto !important;
        right: auto !important;
        margin-bottom: 12px;
    }

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

    .food-sandwich {
        transform: scale(0.8);
    }

    .food-soup {
        transform: scale(0.8);
    }

    .food-plate {
        width: 180px;
        height: 180px;
    }

    .plate-rim {
        width: 180px;
        height: 180px;
    }

    .food-drink {
        transform: scale(0.8);
    }

    .food-tray {
        transform: scale(0.75);
    }
}
