/* =========================================================
   iggi.boo - pop-art haunted funhouse
   Palette:
     #ff85a1 Bubblegum Pink (primary bg)
     #c3aed6 Electric Lavender (secondary bg)
     #b8f3d0 Mint Cream (tertiary bg)
     #1a1a1a Comic Black (border / stroke)
     #2d2d2d Deep Charcoal (body text)
     #ffe066 Lemon Pop (accent 1)
     #ff6b35 Tangerine Burst (accent 2)
     #00e5ff Electric Cyan (accent 3)
     #faf5ff Spectral Cream (ghost white)
     #ffb3c6 Soft Rose (dot fill)
   Fonts: Boogaloo, Bangers, Nunito, Courier Prime
   ========================================================= */

:root {
    --pink: #ff85a1;
    --lavender: #c3aed6;
    --mint: #b8f3d0;
    --black: #1a1a1a;
    --charcoal: #2d2d2d;
    --yellow: #ffe066;
    --orange: #ff6b35;
    --cyan: #00e5ff;
    --cream: #faf5ff;
    --rose: #ffb3c6;

    --border: 4px solid var(--black);
    --border-thin: 3px solid var(--black);

    --spring: cubic-bezier(0.34, 1.56, 0.64, 1);
    --ease-out: cubic-bezier(0.22, 1, 0.36, 1);

    --dots-rose: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='8' height='8' viewBox='0 0 8 8'><g transform='rotate(15 4 4)'><circle cx='4' cy='4' r='1.6' fill='%23ffb3c6'/></g></svg>");
    --dots-dark: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='8' height='8' viewBox='0 0 8 8'><g transform='rotate(15 4 4)'><circle cx='4' cy='4' r='1.6' fill='%231a1a1a' fill-opacity='0.10'/></g></svg>");
    --dots-cream: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 10 10'><g transform='rotate(15 5 5)'><circle cx='5' cy='5' r='1.8' fill='%23faf5ff' fill-opacity='0.55'/></g></svg>");
}

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

html, body {
    background: var(--pink);
    color: var(--charcoal);
    font-family: 'Nunito', system-ui, sans-serif;
    font-weight: 400;
    line-height: 1.7;
    overflow-x: hidden;
}

body {
    min-height: 100vh;
    scroll-behavior: smooth;
}

main.comic {
    scroll-snap-type: y proximity;
    overflow-x: hidden;
}

/* =========== Typography =========== */
.splash-headline,
.grid-title,
.splash-sub em,
.cell-text-only .big {
    font-family: 'Boogaloo', 'Fredoka', cursive;
}

.splash-headline {
    font-family: 'Boogaloo', cursive;
    font-size: clamp(5rem, 12vw, 14rem);
    font-weight: 400;
    letter-spacing: -0.02em;
    line-height: 0.92;
    color: var(--black);
    -webkit-text-stroke: 2px var(--black);
}

.grid-title {
    font-family: 'Boogaloo', cursive;
    font-size: clamp(3rem, 8vw, 8rem);
    font-weight: 400;
    letter-spacing: -0.02em;
    line-height: 0.95;
    color: var(--black);
    -webkit-text-stroke: 2px var(--black);
}

.sfx-word {
    font-family: 'Bangers', 'Boogaloo', cursive;
    font-size: clamp(2.4rem, 6vw, 5rem);
    letter-spacing: 0.04em;
    color: var(--black);
    text-transform: uppercase;
    line-height: 1;
}

.bubble-shake span,
.speech span,
.big-bubble span,
.splash-bubble span,
.intro-bubble > span,
.strip-text {
    font-family: 'Bangers', cursive;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.splash-sub {
    font-family: 'Nunito', sans-serif;
    font-size: clamp(1rem, 1.5vw, 1.25rem);
    line-height: 1.7;
    color: var(--charcoal);
    max-width: 36ch;
    font-weight: 400;
}

.splash-sub em {
    font-family: 'Boogaloo', cursive;
    font-style: normal;
    color: var(--orange);
    font-size: 1.2em;
    -webkit-text-stroke: 1px var(--black);
}

.panel-num,
.cell-caption,
.tiny,
.meta-note {
    font-family: 'Courier Prime', 'Courier New', monospace;
    font-size: 0.85rem;
    letter-spacing: 0.05em;
    color: var(--charcoal);
    text-transform: uppercase;
}

.cell-caption { font-weight: 700; }

.hl-yellow {
    background: var(--yellow);
    box-shadow: 0 0 0 4px var(--black);
    padding: 0 0.18em;
    display: inline-block;
    transform: rotate(-2deg);
}

.hl-cyan {
    background: var(--cyan);
    box-shadow: 0 0 0 4px var(--black);
    padding: 0 0.18em;
    display: inline-block;
    transform: rotate(2deg);
}

.outline {
    -webkit-text-stroke: 2.5px var(--black);
    color: transparent;
}

.w-yellow { color: var(--yellow); }
.w-cyan { color: var(--cyan); }
.w-mint { color: var(--mint); }

.tilt-neg { transform: rotate(-3deg); transform-origin: left top; }
.tilt-pos { transform: rotate(3deg); transform-origin: right top; }

/* =========== Panel base =========== */
.panel {
    position: relative;
    width: 100%;
    min-height: 100vh;
    border-bottom: var(--border);
    overflow: hidden;
    scroll-snap-align: start;
    padding: clamp(2rem, 5vw, 6rem) clamp(1.5rem, 4vw, 5rem);
    display: flex;
    align-items: center;
}

.panel:last-of-type { border-bottom: none; }

.panel[data-bg="pink"]      { background-color: var(--pink); }
.panel[data-bg="lavender"]  { background-color: var(--lavender); }
.panel[data-bg="mint"]      { background-color: var(--mint); }
.panel[data-bg="cream"]     { background-color: var(--cream); }
.panel[data-bg="pink-end"]  { background-color: var(--pink); }

.panel-bg-dots {
    position: absolute;
    inset: 0;
    background-image: var(--dots-rose);
    background-size: 8px 8px;
    pointer-events: none;
    opacity: 0;
    transition: opacity 600ms ease 200ms;
    mix-blend-mode: multiply;
}
.panel-bg-dots.dots-dark {
    background-image: var(--dots-dark);
    mix-blend-mode: normal;
}
.panel.in-view .panel-bg-dots { opacity: 1; }

/* Splash panel anchors */
.panel-splash .splash-content {
    position: relative;
    z-index: 5;
    max-width: 56ch;
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}
.anchor-tl .splash-content { margin-right: auto; margin-bottom: auto; margin-top: 2vh; }
.anchor-tr .splash-content { margin-left: auto; margin-right: 2vw; margin-top: 2vh; text-align: right; align-items: flex-end; }
.anchor-br .splash-content,
.sp-corner-br { margin-left: auto; margin-top: auto; margin-right: 2vw; margin-bottom: 4vh; text-align: right; align-items: flex-end; }
.anchor-c .splash-content,
.sp-center { margin: auto; text-align: center; align-items: center; }

.sp-corner-tr { margin-left: auto; margin-right: 2vw; text-align: right; align-items: flex-end; }

.splash-headline .word {
    display: inline-block;
    margin-right: 0.18em;
}

.splash-headline .w1 { color: var(--cream); -webkit-text-stroke: 3px var(--black); }
.splash-headline .w2 { color: var(--yellow); -webkit-text-stroke: 3px var(--black); }

.splash-headline.end-headline {
    line-height: 0.85;
}
.splash-headline.end-headline .word { display: block; }

/* =========== Decorative ghosts =========== */
.ghost-decor {
    position: absolute;
    pointer-events: auto;
    transition: transform 300ms var(--ease-out), filter 200ms;
    cursor: pointer;
    z-index: 3;
}
.decor-tr { top: 4vh; right: 4vw; width: clamp(140px, 18vw, 280px); transform: rotate(8deg); }
.decor-tl { top: 4vh; left: 2vw; width: clamp(140px, 18vw, 280px); transform: rotate(-8deg); }
.decor-bl { bottom: 4vh; left: 4vw; width: clamp(160px, 22vw, 320px); transform: rotate(-4deg); }
.decor-br { bottom: 4vh; right: 6vw; width: clamp(150px, 20vw, 300px); transform: rotate(6deg); }
.decor-mid { top: 50%; left: 12vw; width: clamp(140px, 18vw, 260px); transform: translateY(-50%) rotate(-5deg); }
.decor-c-l { left: 6vw; bottom: 8vh; width: clamp(140px, 16vw, 240px); transform: rotate(-6deg); }
.decor-c-r { right: 6vw; top: 12vh; width: clamp(150px, 18vw, 260px); transform: rotate(8deg); }

/* Peeking ghosts: partially off-edge */
.peek.peek-r { transform: translateX(35%) rotate(8deg); }
.peek.peek-r:hover { transform: translateX(0%) rotate(8deg); }
.peek.peek-l { transform: translateX(-35%) rotate(-8deg); }
.peek.peek-l:hover { transform: translateX(0%) rotate(-8deg); }
.peek.peek-t { transform: translateY(-30%) rotate(-3deg); }
.peek.peek-t:hover { transform: translateY(0%) rotate(-3deg); }

.ghost-decor:hover {
    filter: drop-shadow(0 0 24px currentColor);
    animation: wobble 200ms ease-in-out 2;
}

@keyframes wobble {
    0%, 100% { rotate: 0deg; }
    25% { rotate: -3deg; }
    75% { rotate: 3deg; }
}

/* =========== Speech bubbles =========== */
.splash-bubble,
.speech,
.big-bubble {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--cream);
    border: var(--border-thin);
    border-radius: 32px;
    padding: 0.8rem 1.6rem;
    color: var(--black);
    font-family: 'Bangers', cursive;
    font-size: clamp(1.5rem, 3vw, 3rem);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    transform: rotate(-3deg);
    box-shadow: 6px 6px 0 var(--black);
    margin-top: 1rem;
    z-index: 4;
}

.splash-bubble.bubble-shake { animation: shake 200ms ease-in-out; }
.splash-bubble:hover,
.speech:hover,
.big-bubble:hover {
    transform: rotate(-2deg) scale(1.10);
    transition: transform 250ms var(--spring);
}
.splash-bubble:hover span,
.speech:hover span,
.big-bubble:hover span {
    animation: shake 200ms ease-in-out;
}

@keyframes shake {
    0% { transform: translateX(0); }
    20% { transform: translateX(-2px); }
    40% { transform: translateX(2px); }
    60% { transform: translateX(-1px); }
    80% { transform: translateX(1px); }
    100% { transform: translateX(0); }
}

.bubble-tail {
    position: absolute;
    width: 24px;
    height: 24px;
    background: var(--cream);
    border: var(--border-thin);
    border-top: none;
    border-left: none;
    transform: rotate(45deg);
    bottom: -14px;
}
.tail-bl { left: 24px; }
.tail-tr { right: 24px; top: -14px; bottom: auto; transform: rotate(-135deg); }

.speech-float {
    position: absolute;
    top: 18vh;
    left: 8vw;
    background: var(--yellow);
    transform: rotate(-6deg);
    z-index: 6;
    animation: float-bob 3s ease-in-out infinite;
}

@keyframes float-bob {
    0%, 100% { transform: rotate(-6deg) translateY(0); }
    50% { transform: rotate(-4deg) translateY(-12px); }
}

.big-bubble {
    background: var(--cyan);
    border-width: 5px;
    padding: 1.4rem 3rem;
    font-size: clamp(2.5rem, 6vw, 5rem);
    cursor: pointer;
    box-shadow: 10px 10px 0 var(--black);
    transform: rotate(-4deg);
    margin-top: 1.5rem;
    color: var(--black);
}
.big-bubble:active {
    transform: rotate(-4deg) translate(4px, 4px);
    box-shadow: 6px 6px 0 var(--black);
}
.big-bubble .bubble-tail {
    background: var(--cyan);
}

/* =========== Starbursts =========== */
.starburst-decor {
    position: absolute;
    pointer-events: none;
    z-index: 2;
    width: clamp(120px, 18vw, 240px);
    animation: pulse 2s ease-in-out infinite;
    filter: drop-shadow(4px 4px 0 var(--black));
}
.sb-bl { bottom: 6vh; left: 4vw; }
.sb-tr { top: 6vh; right: 4vw; }
.sb-mid { top: 50%; left: 45%; width: clamp(180px, 22vw, 320px); transform: translate(-50%, -50%); }
.sb-end { top: 12vh; right: 8vw; width: clamp(120px, 14vw, 200px); }

@keyframes pulse {
    0%, 100% { transform: scale(1) rotate(var(--rot, 0deg)); }
    50% { transform: scale(1.05) rotate(var(--rot, 5deg)); }
}

.sb-mid { animation-name: pulse-mid; }
@keyframes pulse-mid {
    0%, 100% { transform: translate(-50%, -50%) scale(1); }
    50% { transform: translate(-50%, -50%) scale(1.06) rotate(8deg); }
}

/* =========== Grid panels =========== */
.panel-grid {
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    padding-top: clamp(3rem, 6vw, 6rem);
}

.grid-header {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    margin-bottom: 2rem;
    max-width: 100%;
}

.grid-cells {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: minmax(180px, 1fr);
    gap: 0;
    border: var(--border);
    background: var(--black);
    flex: 1;
    box-shadow: 10px 10px 0 var(--black);
}

.grid-cells .cell {
    background: var(--cream);
    border: var(--border);
    margin: -2px;
    padding: 1.2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    position: relative;
    overflow: hidden;
    transition: transform 200ms var(--spring);
}

.grid-cells .cell.cell-wide { grid-column: span 2; }
.grid-cells .cell.cell-narrow { background: var(--yellow); }

.cell-a { background: var(--pink); }
.cell-b { background: var(--mint); }
.cell-c { background: var(--lavender); }
.cell-d { background: var(--cream); }
.cell-e { background: var(--orange); }
.cell-f { background: var(--yellow); }

.ghost-figure {
    width: clamp(80px, 12vw, 160px);
    height: auto;
    display: block;
    transition: transform 200ms var(--spring);
}

.cell.interactive { cursor: pointer; }
.cell.interactive:hover .ghost-figure {
    animation: wobble 220ms ease-in-out 2;
    transform: translateY(-6px) scale(1.05);
}
.cell.interactive:hover { z-index: 10; transform: scale(1.02) rotate(-1deg); }

.cell-text-only {
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}
.cell-text-only .big {
    font-family: 'Boogaloo', cursive;
    font-size: clamp(1.4rem, 3vw, 2.4rem);
    color: var(--black);
    line-height: 1.05;
    -webkit-text-stroke: 1.5px var(--black);
}

/* 3x2 SFX grid */
.cells-3x2 {
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: minmax(200px, 1fr);
}

.cell-sfx {
    background: var(--cell-color, var(--cream));
    text-align: center;
    gap: 0.6rem;
}
.cell-sfx .sfx-def {
    font-family: 'Nunito', sans-serif;
    font-size: 1rem;
    line-height: 1.5;
    color: var(--black);
    max-width: 24ch;
}
.cell-sfx:hover .sfx-word {
    animation: shake 250ms ease-in-out;
}

/* =========== Cracks =========== */
.crack {
    position: absolute;
    width: 200px;
    pointer-events: none;
    z-index: 4;
    opacity: 0;
    stroke-dasharray: 600;
    stroke-dashoffset: 600;
    transition: stroke-dashoffset 400ms ease-out, opacity 200ms;
}
.crack-tl { top: 0; left: 0; transform: translate(-30px, -10px); }
.crack-br { bottom: 0; right: 0; transform: translate(30px, 10px) rotate(180deg); }

.panel.in-view .crack {
    opacity: 1;
    stroke-dashoffset: 0;
}

/* =========== Strips =========== */
.panel-strip {
    min-height: 30vh;
    background: var(--cream);
    align-items: center;
    overflow: hidden;
    padding: 0;
    border-top: var(--border);
}
.panel-strip[data-bg="cream"] { background: var(--cream); }
.panel-strip[data-bg="mint"] { background: var(--mint); }

.strip-track {
    display: flex;
    align-items: center;
    gap: 3rem;
    white-space: nowrap;
    width: max-content;
    animation: strip-scroll 22s linear infinite;
    padding: 0 2rem;
}

.strip-text {
    font-family: 'Bangers', cursive;
    font-size: clamp(2.5rem, 7vw, 6rem);
    color: var(--black);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    -webkit-text-stroke: 1.5px var(--black);
}
.strip-text.strip-alt {
    color: var(--cream);
    -webkit-text-stroke: 2px var(--black);
}

@keyframes strip-scroll {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}

.strip-trail-ghost {
    position: absolute;
    width: 60px;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
    color: var(--lavender);
    animation: trail-ghost 22s linear infinite;
    pointer-events: none;
}

@keyframes trail-ghost {
    0% { left: -8%; opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { left: 105%; opacity: 0; }
}

/* =========== Dividers =========== */
.divider {
    position: relative;
    width: 100%;
    line-height: 0;
    z-index: 8;
    pointer-events: none;
    margin-top: -1px;
    margin-bottom: -1px;
}
.divider svg {
    width: 100%;
    height: clamp(40px, 5vw, 70px);
    display: block;
}
.divider.flip svg { transform: scaleY(-1); }

/* =========== Intro overlay =========== */
.intro {
    position: fixed;
    inset: 0;
    background: var(--pink);
    background-image: var(--dots-rose);
    background-size: 8px 8px;
    z-index: 9999;
    display: grid;
    place-items: center;
    transition: opacity 400ms ease, visibility 400ms ease;
}
.intro.gone {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}
.intro-stage {
    position: relative;
    display: grid;
    place-items: center;
}
.intro-ghost {
    width: clamp(160px, 22vw, 280px);
    opacity: 0;
    transform: scale(0.3) rotate(-10deg);
    transition: transform 600ms var(--spring), opacity 200ms ease;
    color: var(--cream);
    filter: drop-shadow(0 0 30px rgba(250,245,255,0.7));
}
.intro-ghost.appear {
    opacity: 1;
    transform: scale(1) rotate(0deg);
}
.intro-bubble {
    position: absolute;
    top: -10%;
    right: -34%;
    background: var(--cream);
    border: 4px solid var(--black);
    border-radius: 36px;
    padding: 1rem 2rem;
    font-family: 'Bangers', cursive;
    font-size: clamp(2rem, 6vw, 5rem);
    color: var(--black);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    transform: scale(0) rotate(-6deg);
    transition: transform 300ms var(--spring);
    box-shadow: 8px 8px 0 var(--black);
}
.intro-bubble.bounce {
    transform: scale(1.2) rotate(-4deg);
}
.intro-bubble.settled {
    transform: scale(1) rotate(-4deg);
}
.intro-bubble.shake span {
    display: inline-block;
    animation: shake 200ms ease-in-out 2;
}
.intro-bubble .bubble-tail-svg {
    position: absolute;
    bottom: -22px;
    left: 22px;
    width: 32px;
    height: 32px;
    transform: rotate(-12deg);
}

/* =========== Ghost nav =========== */
.ghost-nav {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 200;
}
.ghost-nav-toggle {
    width: 70px;
    height: 80px;
    background: var(--black);
    border: 3px solid var(--black);
    border-radius: 50%;
    cursor: pointer;
    display: grid;
    place-items: center;
    box-shadow: 4px 4px 0 var(--black);
    transition: transform 200ms var(--spring);
    padding: 0;
}
.ghost-nav-toggle:hover { transform: scale(1.08) rotate(-6deg); }
.ghost-nav-toggle svg {
    width: 50px;
    height: 60px;
    filter: drop-shadow(0 0 8px rgba(255,224,102,0.6));
}

.ghost-nav-spiral {
    list-style: none;
    position: absolute;
    top: 0;
    right: 0;
    pointer-events: none;
}
.ghost-nav-spiral li {
    position: absolute;
    top: 0;
    right: 0;
    transform: scale(0) translate(0, 0);
    transition: transform 350ms var(--spring);
    transition-delay: calc(var(--i) * 40ms);
}
.ghost-nav.open .ghost-nav-spiral { pointer-events: auto; }
.ghost-nav.open .ghost-nav-spiral li {
    --angle: calc(220deg + var(--i) * 32deg);
    --radius: calc(120px + var(--i) * 14px);
    transform:
        translate(
            calc(cos(var(--angle)) * var(--radius)),
            calc(sin(var(--angle)) * var(--radius))
        )
        scale(1);
}
.ghost-nav-spiral a {
    display: grid;
    place-items: center;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--cream);
    color: var(--black);
    border: 3px solid var(--black);
    box-shadow: 4px 4px 0 var(--black);
    text-decoration: none;
    font-family: 'Bangers', cursive;
    font-size: 0.95rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    transition: transform 180ms var(--spring), box-shadow 180ms;
    animation: nav-glow 2.4s ease-in-out infinite;
}
.ghost-nav-spiral a:hover {
    transform: scale(1.15);
    box-shadow: 6px 6px 0 var(--black);
}

@keyframes nav-glow {
    0%, 100% { box-shadow: 4px 4px 0 var(--black), 0 0 0 0 transparent; }
    50% { box-shadow: 4px 4px 0 var(--black), 0 0 22px 6px var(--glow, var(--yellow)); }
}

.ghost-nav-spiral li:nth-child(1) a { --glow: #ff85a1; background: #ff85a1; }
.ghost-nav-spiral li:nth-child(2) a { --glow: #c3aed6; background: #c3aed6; }
.ghost-nav-spiral li:nth-child(3) a { --glow: #b8f3d0; background: #b8f3d0; }
.ghost-nav-spiral li:nth-child(4) a { --glow: #ffe066; background: #ffe066; }
.ghost-nav-spiral li:nth-child(5) a { --glow: #ff6b35; background: #ff6b35; color: var(--cream); }
.ghost-nav-spiral li:nth-child(6) a { --glow: #00e5ff; background: #00e5ff; }

/* =========== Confetti =========== */
.confetti-layer {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 500;
    overflow: hidden;
}
.confetti {
    position: absolute;
    width: 8px;
    height: 12px;
    will-change: transform, opacity;
    border-radius: 1px;
}

/* =========== Entrance animations =========== */
.panel { opacity: 1; }

.panel-splash .splash-content {
    opacity: 0;
    transform: translate(-30px, -30px) rotate(var(--tilt, -3deg));
    transition: opacity 400ms var(--ease-out) 100ms, transform 400ms var(--ease-out) 100ms;
}
.panel-splash.anchor-tr .splash-content { transform: translate(30px, -30px); }
.panel-splash.anchor-br .splash-content { transform: translate(30px, 30px); }
.panel-splash.anchor-c .splash-content { transform: translate(0, 30px); }

.panel-splash.in-view .splash-content {
    opacity: 1;
    transform: translate(0, 0);
}

.panel-grid .cell {
    opacity: 0;
    transform: scale(0);
    transition: transform 360ms var(--spring), opacity 200ms ease;
}
.panel-grid.in-view .cell {
    opacity: 1;
    transform: scale(1);
}
.panel-grid.in-view .cell:nth-child(1) { transition-delay: 0ms; }
.panel-grid.in-view .cell:nth-child(2) { transition-delay: 80ms; }
.panel-grid.in-view .cell:nth-child(3) { transition-delay: 160ms; }
.panel-grid.in-view .cell:nth-child(4) { transition-delay: 320ms; }
.panel-grid.in-view .cell:nth-child(5) { transition-delay: 240ms; }
.panel-grid.in-view .cell:nth-child(6) { transition-delay: 160ms; }

/* yell flash */
body.yelling {
    animation: page-jump 480ms ease-out;
}
@keyframes page-jump {
    0% { transform: translate(0,0); }
    20% { transform: translate(-6px, -10px) rotate(-0.6deg); }
    40% { transform: translate(8px, 6px) rotate(0.6deg); }
    60% { transform: translate(-4px, 4px); }
    80% { transform: translate(2px, -2px); }
    100% { transform: translate(0,0); }
}

body.yelling::before {
    content: "";
    position: fixed; inset: 0;
    background: var(--yellow);
    opacity: 0.4;
    z-index: 400;
    pointer-events: none;
    animation: flash 480ms ease-out;
}
@keyframes flash {
    0% { opacity: 0.6; }
    100% { opacity: 0; }
}

/* Bounce-enter helper */
@keyframes bounce-in {
    0% { transform: scale(0); }
    60% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

/* =========== Responsive =========== */
@media (max-width: 720px) {
    .grid-cells { grid-template-columns: 1fr 1fr; }
    .grid-cells .cell.cell-wide { grid-column: span 2; }
    .cells-3x2 { grid-template-columns: 1fr 1fr; }
    .speech-float { left: 4vw; top: 6vh; }
    .anchor-tr .splash-content,
    .anchor-br .splash-content,
    .sp-corner-br,
    .sp-corner-tr { text-align: left; align-items: flex-start; margin-left: 0; margin-right: auto; }
    .splash-headline { font-size: clamp(3.5rem, 14vw, 8rem); }
    .grid-title { font-size: clamp(2.4rem, 10vw, 5rem); }
    .ghost-nav-toggle { width: 56px; height: 64px; }
    .ghost-nav-toggle svg { width: 38px; height: 46px; }
}
