/* ==========================================================================
   OPERATION: GET TO CHINA — stylesheet
   ==========================================================================
   EDIT ME markers below flag the spots you're most likely to touch:
   colours, fonts, timings, and slide art sizing all live in :root.
   ========================================================================== */

/* -------------------- EDIT ME: design tokens -------------------- */
:root {
  /* Palette */
  --color-red: #b3121b;
  --color-red-dark: #7a0c12;
  --color-charcoal: #1c1a17;
  --color-charcoal-soft: #26221d;
  --color-cream: #f3e9d2;
  --color-cream-dim: #e6d9b8;
  --color-gold: #c9a227;
  --color-gold-bright: #e8c565;
  --color-jade: #2f6f5e;
  --color-ink: #100e0c;

  /* Typography — EDIT ME: swap font-family stacks to change the look site-wide.
     Bowlby One SC drives big display titles (matches the chunky, rounded
     lettering style of the generated poster art); Oswald stays for small,
     widely-tracked HUD labels. */
  --font-display: "Bowlby One SC", "Arial Narrow Bold", "Impact", sans-serif;
  --font-heading: "Oswald", "Arial Narrow", sans-serif;
  --font-body: "Oswald", "Segoe UI", system-ui, sans-serif;
  --font-cjk: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;

  /* Timing — EDIT ME: keep script.js's SLIDE_DURATION_MS in sync with --slide-duration */
  --slide-duration: 10000ms;
  --transition-duration: 900ms;
  --box-shake-duration: 550ms;
  --box-open-duration: 700ms;
  --buck-rise-duration: 900ms;
  --ease-snap: cubic-bezier(.2, .9, .25, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  /* Gentle overshoot-then-settle, used for the envelope flap so it eases
     past its resting angle slightly and drops back into place naturally. */
  --ease-envelope: cubic-bezier(.32, 1.35, .4, 1);

  --radius-md: 10px;
  --radius-lg: 18px;
  --shadow-hard: 5px 5px 0 rgba(16, 14, 12, 0.9);
  --outline-heavy: -3px -3px 0 var(--color-ink), 3px -3px 0 var(--color-ink),
                    -3px 3px 0 var(--color-ink), 3px 3px 0 var(--color-ink),
                    0 12px 28px rgba(0,0,0,.7);
  --z-art: 2;
  --z-scrim: 3;
  --z-decor: 4;
  --z-content: 5;
  --z-nav: 20;
  --z-overlay: 100;
}

/* -------------------- Reset -------------------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--color-charcoal);
  color: var(--color-cream);
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
a { color: inherit; }
ul { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, p { margin: 0; }
svg { display: block; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* Visible keyboard focus states everywhere */
:focus-visible {
  outline: 3px solid var(--color-gold-bright);
  outline-offset: 3px;
  border-radius: 4px;
}
button:focus:not(:focus-visible) { outline: none; }

#app { position: relative; width: 100%; height: 100dvh; overflow: hidden; }

/* ==========================================================================
   SHARED TEXTURES — film grain / halftone (intro screen only — kept subtle)
   ========================================================================== */
.grain {
  position: absolute; inset: -20%;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix type='saturate' values='0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)' opacity='0.35'/></svg>");
  background-size: 180px 180px;
  opacity: 0.18;
  mix-blend-mode: overlay;
  animation: grain-shift 8s steps(8) infinite;
}
@keyframes grain-shift {
  0% { transform: translate(0,0); }
  25% { transform: translate(-2%, 1%); }
  50% { transform: translate(1%, -2%); }
  75% { transform: translate(-1%, -1%); }
  100% { transform: translate(0,0); }
}
.halftone {
  position: absolute; inset: 0;
  background-image: radial-gradient(rgba(243,233,210,0.12) 1px, transparent 1.4px);
  background-size: 6px 6px;
  opacity: 0.5;
}

/* ==========================================================================
   INTRO SCREEN
   ========================================================================== */
.intro-screen {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: radial-gradient(120% 120% at 50% 20%, #2a231a 0%, var(--color-charcoal) 55%, var(--color-ink) 100%);
  overflow: hidden;
  transition: opacity .4s ease;
}
.intro-texture { position: absolute; inset: 0; pointer-events: none; }

.intro-content {
  position: relative;
  z-index: var(--z-content);
  display: flex; flex-direction: column; align-items: center;
  /* Extra clearance between the heading and the envelope/buck below it,
     so the (now-shorter) rise never reads as overlapping the headline. */
  gap: clamp(2rem, 6vw, 3.6rem);
  padding: 1.5rem;
  text-align: center;
}

.intro-kicker {
  font-family: var(--font-cjk);
  letter-spacing: .35em;
  font-size: .7rem;
  color: var(--color-gold);
  text-transform: uppercase;
  opacity: .85;
}

/* Always a single line: font-size scales with viewport width (vw-driven
   clamp) rather than wrapping, so it shrinks to fit narrow screens instead
   of breaking across two lines. */
.intro-heading {
  font-family: var(--font-display);
  font-size: clamp(0.95rem, 4.2vw, 2.6rem);
  line-height: 1.1;
  letter-spacing: 0;
  color: var(--color-cream);
  text-shadow: var(--outline-heavy);
  white-space: nowrap;
  max-width: 94vw;
  transition: opacity .25s ease, transform .25s ease;
  /* Nudged down slightly, and always layered above the buck PNG (z:1) and
     envelope flap (z:2) within .intro-content's stacking context, so the
     heading never renders behind him. */
  position: relative;
  top: 28px;
  z-index: 4;
}
.intro-heading.is-swapping { opacity: 0; transform: translateY(6px) scale(.98); }

@media (max-width: 380px) {
  .intro-heading { letter-spacing: -.02em; }
}

.intro-footnote {
  position: absolute; bottom: 1.4rem; left: 0; right: 0;
  text-align: center;
  font-size: .65rem;
  letter-spacing: .25em;
  color: var(--color-cream-dim);
  opacity: .55;
  text-transform: uppercase;
}

/* ---------- Mystery box (pure CSS Chinese takeout carton) ---------- */
.mystery-box {
  position: relative;
  width: clamp(180px, 32vw, 260px);
  height: clamp(170px, 30vw, 240px);
  perspective: 900px;
  padding: 0;
  /* Pushes the whole envelope (and the buck that rises out of it) further
     down the screen, independent of the heading above — keeps his resting
     position clear of "OH Y'ALL GON LEARN CHINESE" without touching the
     heading itself or shrinking him. */
  margin-top: clamp(1.5rem, 6vw, 3.25rem);
}
.box-shadow {
  position: absolute;
  bottom: -14px; left: 50%;
  width: 70%; height: 22px;
  transform: translateX(-50%);
  background: radial-gradient(closest-side, rgba(0,0,0,.55), transparent 75%);
  filter: blur(2px);
}

/* Red envelope (hongbao) body — deep red gradient, gold trim, soft
   cinematic ambient shadow layered under the site's usual hard offset
   shadow so it still reads as part of the same visual system. */
.box-body {
  position: absolute;
  left: 7%; right: 7%; bottom: 3%; top: 30%;
  background: linear-gradient(160deg, #cf232c 0%, var(--color-red) 45%, var(--color-red-dark) 100%);
  border: 2px solid var(--color-gold);
  border-radius: 5px;
  box-shadow: var(--shadow-hard), 0 26px 44px rgba(0,0,0,.5);
  overflow: hidden;
}
/* Thin gold inset frame + soft diagonal sheen for a premium, lit feel */
.box-stripe {
  position: absolute; inset: 6px;
  border: 1px solid rgba(232, 197, 101, .5);
  border-radius: 3px;
  background: linear-gradient(120deg, rgba(255,255,255,.22) 0%, transparent 32%, transparent 68%, rgba(0,0,0,.22) 100%);
  pointer-events: none;
}
/* Gold medallion seal with an embossed Chinese character (福 = fortune) */
.box-body-glyph {
  position: absolute; bottom: 12%; left: 50%; transform: translateX(-50%);
  font-family: var(--font-cjk);
  font-weight: 900;
  font-size: 1.5rem;
  color: var(--color-red-dark);
  text-shadow: 0 1px 0 rgba(255,255,255,.35);
  background: radial-gradient(circle at 34% 28%, #f6e18f 0%, var(--color-gold) 55%, #8a6a12 100%);
  border: 2px solid var(--color-ink);
  border-radius: 50%;
  box-shadow: 0 6px 14px rgba(0,0,0,.5), inset 0 1px 2px rgba(255,255,255,.5);
  width: 2.3em; height: 2.3em;
  display: flex; align-items: center; justify-content: center;
}

.box-lid {
  position: absolute;
  /* top aligns exactly with .box-body's top edge (32%) so the hinge line
     sits right at the seam — no gap between the flap and the envelope
     body once it lifts open. */
  left: 3%; right: 3%; top: 32%; height: 28%;
  /* Hinge at the TOP edge — the fold line where the flap is attached to
     the envelope — not the tip. This is what makes it read as a flap
     lifting open rather than a hinged box lid. */
  transform-origin: 50% 0%;
  transform: rotateX(0deg);
  transition: transform var(--box-open-duration) var(--ease-envelope);
  z-index: 2;
  filter: drop-shadow(0 10px 14px rgba(0,0,0,.4));
}
/* Envelope flap: a gold-trimmed triangular fold (clip-path), matching the
   deep red / gold palette used across the rest of the Buck Ops artwork. */
.box-lid-face {
  position: absolute; inset: 0;
  background: var(--color-gold);
  clip-path: polygon(0 0, 100% 0, 50% 100%);
}
.box-lid-face::after {
  content: "";
  position: absolute; top: 0; left: 3px; right: 3px; bottom: 0;
  background: linear-gradient(160deg, var(--color-red-dark) 0%, var(--color-red) 55%, #cf232c 100%);
  clip-path: polygon(0 0, 100% 0, 50% 95%);
}
/* Small gold accent at the flap's tip, where it meets the seal below */
.box-glyph {
  position: absolute; bottom: 4%; left: 50%;
  width: 10px; height: 10px;
  transform: translate(-50%, 50%) rotate(45deg);
  background: var(--color-gold-bright);
  border: 1px solid var(--color-ink);
  box-shadow: 0 2px 5px rgba(0,0,0,.45);
  z-index: 3;
}

.buck-cutout {
  position: absolute;
  left: 50%; bottom: 30%;
  width: 62%;
  max-width: 220px;
  transform: translate(-50%, 10%) scale(.7);
  opacity: 0;
  filter: drop-shadow(4px 10px 10px rgba(0,0,0,.55));
  transition: transform var(--buck-rise-duration) var(--ease-out) 120ms,
              opacity var(--buck-rise-duration) var(--ease-out) 120ms;
  z-index: 1;
  pointer-events: none;
}

/* Broken-image fallback: keep layout stable, show a friendly glyph instead */
.buck-cutout.img-fallback,
.slide-buck.img-fallback {
  color: transparent;
}
.buck-cutout.img-fallback::after,
.slide-buck.img-fallback::after {
  content: "IMAGE MISSING \2014 add asset";
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  text-align: center; font-size: .7rem; letter-spacing: .05em;
  color: var(--color-charcoal);
  background: repeating-linear-gradient(45deg, var(--color-gold) 0 10px, var(--color-cream) 10px 20px);
  border: 2px dashed var(--color-charcoal);
  border-radius: var(--radius-md);
}

/* box states, driven by JS */
.mystery-box.is-shaking { animation: box-shake var(--box-shake-duration) var(--ease-snap) both; }
@keyframes box-shake {
  10%, 90% { transform: translate3d(-1px, 0, 0) rotate(-.5deg); }
  20%, 80% { transform: translate3d(3px, 0, 0) rotate(1deg); }
  30%, 50%, 70% { transform: translate3d(-6px, 0, 0) rotate(-2deg); }
  40%, 60% { transform: translate3d(6px, 0, 0) rotate(2deg); }
}

/* A realistic open angle — lifted well clear of the front, but not folded
   flat backwards like a hinged lid. */
.mystery-box.is-open .box-lid { transform: rotateX(-118deg); }
/* Rise height ~50% of the original — keeps his head/body comfortably in
   the viewport while still clearly popping out of the envelope. */
.mystery-box.is-open .buck-cutout { opacity: 1; transform: translate(-50%, -39%) scale(1); }
.mystery-box.is-clickable .buck-cutout {
  pointer-events: auto;
  cursor: pointer;
  animation: buck-bob 2.2s ease-in-out infinite;
}
.mystery-box.is-clickable .buck-cutout:hover,
.mystery-box.is-clickable .buck-cutout:focus-visible { transform: translate(-50%, -42%) scale(1.05); }
@keyframes buck-bob {
  0%, 100% { transform: translate(-50%, -39%) scale(1); }
  50% { transform: translate(-50%, -42%) scale(1.02); }
}

.intro-instruction {
  font-family: var(--font-heading);
  font-weight: 600;
  letter-spacing: .18em;
  font-size: .8rem;
  color: var(--color-gold-bright);
  text-transform: uppercase;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity .5s ease, transform .5s ease;
}
.intro-instruction.is-visible { opacity: 1; transform: translateY(0); }

/* ==========================================================================
   TRANSITION OVERLAY (cinematic wipe + flash between intro and main site)
   ========================================================================== */
.transition-overlay {
  position: fixed; inset: 0;
  z-index: var(--z-overlay);
  pointer-events: none;
  opacity: 0;
}
.transition-flash, .transition-wipe { position: absolute; inset: 0; opacity: 0; }
.transition-flash { background: var(--color-cream); }
.transition-wipe {
  background: linear-gradient(100deg, transparent 0%, var(--color-red) 35%, var(--color-ink) 60%, transparent 100%);
  transform: translateX(-120%);
}

.transition-overlay.is-active { opacity: 1; }
.transition-overlay.is-active .transition-flash {
  animation: flash-pulse calc(var(--transition-duration) * .4) ease-out forwards;
}
.transition-overlay.is-active .transition-wipe {
  animation: wipe-across var(--transition-duration) var(--ease-snap) forwards;
}
@keyframes flash-pulse {
  0% { opacity: 0; }
  35% { opacity: .9; }
  100% { opacity: 0; }
}
@keyframes wipe-across {
  0% { transform: translateX(-120%); opacity: 0; }
  10% { opacity: 1; }
  55% { transform: translateX(0%); opacity: 1; }
  100% { transform: translateX(120%); opacity: 1; }
}

/* ==========================================================================
   MAIN SITE — artwork-first "game loading screen" layout
   ========================================================================== */
.main-site {
  position: absolute; inset: 0;
  background: var(--color-charcoal);
}
.main-site[hidden] { display: none; }

.progress-bar {
  position: fixed; top: 0; left: 0; right: 0; height: 3px;
  background: rgba(243,233,210,.12);
  z-index: var(--z-nav);
}
.progress-bar-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--color-gold), var(--color-red));
  transition: width 120ms linear;
}

.slides { position: relative; width: 100%; height: 100dvh; }

.slide {
  position: absolute; inset: 0;
  overflow: hidden;
  background: var(--color-charcoal);
  opacity: 0;
  transition: opacity .6s var(--ease-out);
  pointer-events: none;
}
.slide[hidden] { display: block; }
.slide.is-active {
  opacity: 1;
  pointer-events: auto;
}

.slide--flights { background: radial-gradient(140% 100% at 85% 15%, #3a1414 0%, var(--color-charcoal) 60%); }
.slide--plan { background: radial-gradient(140% 100% at 15% 85%, #1c2f28 0%, var(--color-charcoal) 60%); }
.slide--pranks { background: radial-gradient(140% 100% at 60% 0%, #3a1414 0%, var(--color-charcoal) 65%); }

/* ---------- Hero artwork layer — full-screen cinematic background ----------
   The artwork IS the background now: object-fit: cover, no max-width/
   max-height, no contained "poster" box. It's always rendered oversized
   (scale 1.08 at rest) so the Ken Burns pan/zoom (below) never reveals an
   edge. EDIT ME: per-slide object-position lives just under this block —
   that's how each character stays framed in shot. */
.slide-art {
  position: absolute; inset: 0;
  z-index: var(--z-art);
  overflow: hidden;
}
.slide-buck {
  position: absolute; inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  object-fit: cover;
  object-position: center;
  transform: scale(1.08);
  will-change: transform;
}

/* EDIT ME: per-slide framing so each character stays in shot */
.slide--flights .slide-buck { object-position: center; }
.slide--plan .slide-buck { object-position: 62% center; }
.slide--pranks .slide-buck { object-position: 62% center; }

/* Ken Burns is scoped to the active slide so it restarts fresh every time a
   slide comes back around, and its duration matches --slide-duration (10s)
   so the zoom/pan plays out over exactly one slide's time on screen. It
   only ever zooms further IN (1.08 → 1.16) with a tiny pan, so the
   already-oversized image never exposes an edge. */
.slide.is-active .slide-buck {
  animation: ken-burns var(--slide-duration) ease-in-out forwards;
}
@keyframes ken-burns {
  from { transform: scale(1.08) translate(0, 0); }
  to   { transform: scale(1.16) translate(-1.5%, -1%); }
}

/* Left-side readability scrim — gradient, never a solid box. Left stays
   dark for text contrast; the right side is left mostly clear so the
   artwork reads as a full background rather than a boxed-in poster. */
/* Alpha values roughly halved from the previous pass so the vibrant
   artwork reads through clearly — text stays legible via the heavy
   outline/shadow on the headings rather than a heavy scrim. */
.slide-scrim {
  position: absolute; inset: 0;
  z-index: var(--z-scrim);
  background: linear-gradient(90deg, rgba(6,5,4,.5) 0%, rgba(6,5,4,.4) 38%, rgba(6,5,4,.16) 62%, transparent 82%);
  pointer-events: none;
}
.slide-scrim--wide {
  background: linear-gradient(90deg, rgba(8,7,6,.48) 0%, rgba(8,7,6,.4) 42%, rgba(8,7,6,.18) 66%, transparent 85%);
}

.chapter-caption {
  position: absolute; left: clamp(1rem, 2.6vw, 1.6rem); bottom: 1rem;
  z-index: var(--z-content);
  display: inline-flex; align-items: center; gap: .5em;
  font-family: var(--font-heading);
  font-size: .64rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--color-cream-dim);
  opacity: .65;
  text-shadow: 0 2px 6px rgba(0,0,0,.85);
}
.chapter-caption-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--color-red);
  animation: pulse-dot 1.4s ease-in-out infinite;
}
@keyframes pulse-dot { 0%,100% { opacity: 1; } 50% { opacity: .25; } }

/* ---------- Text / UI overlay ---------- */
.slide-inner {
  position: relative;
  z-index: var(--z-content);
  height: 100%;
  display: flex;
  align-items: center;
  padding: 5.5rem clamp(1.2rem, 5vw, 4rem) 3.5rem;
}

.slide-copy {
  max-width: min(46ch, 46vw);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: .55rem;
}
.slide-copy--form { max-width: min(30rem, 90vw); }

.slide-label {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: .68rem;
  letter-spacing: .3em;
  color: var(--color-gold-bright);
  text-transform: uppercase;
  padding-left: .9em;
  border-left: 2px solid var(--color-red);
}

.slide-heading {
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 8.6vw, 6.4rem);
  line-height: .88;
  letter-spacing: 0;
  color: var(--color-cream);
  text-shadow: var(--outline-heavy);
  display: flex;
  flex-direction: column;
  margin: .1rem 0 .25rem;
}
.slide-heading .line { display: block; }
.slide-heading .line--accent { color: var(--color-red); -webkit-text-stroke: 1px var(--color-ink); }

.slide-subheading {
  font-family: var(--font-heading);
  font-weight: 400;
  font-style: italic;
  font-size: clamp(.82rem, 1.15vw, .98rem);
  color: var(--color-cream-dim);
  max-width: 34ch;
  margin-bottom: .3rem;
}

.btn-eyebrow {
  margin-top: .4rem;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: .62rem;
  letter-spacing: .28em;
  color: var(--color-cream-dim);
  text-transform: uppercase;
  opacity: .8;
}

.btn {
  display: inline-flex; align-items: center; gap: .55em;
  font-family: var(--font-heading);
  font-weight: 700;
  letter-spacing: .12em;
  font-size: clamp(.8rem, 1.2vw, .92rem);
  text-transform: uppercase;
  text-decoration: none;
  padding: .85em 1.6em;
  border-radius: 3px;
  border: 2px solid var(--color-gold);
  background: rgba(10,9,8,.35);
  color: var(--color-cream);
  backdrop-filter: blur(2px);
  transition: transform .15s var(--ease-snap), background .15s var(--ease-snap), border-color .15s var(--ease-snap);
}
.btn-arrow { color: var(--color-red); font-size: .8em; transform: translateY(-1px); }
.btn--primary:hover, .btn--primary:focus-visible {
  background: var(--color-red);
  border-color: var(--color-red);
  transform: translateX(3px);
}
.btn--primary:hover .btn-arrow, .btn--primary:focus-visible .btn-arrow { color: var(--color-cream); }
.btn--primary:active { transform: translateX(1px); }

.hud-block { margin-top: .9rem; }
.hud-label {
  font-family: var(--font-heading);
  font-size: .6rem;
  letter-spacing: .24em;
  color: var(--color-cream-dim);
  text-transform: uppercase;
  opacity: .75;
}
.hud-value {
  margin-top: .15em;
  display: inline-flex; align-items: center; gap: .5em;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: .85rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--color-gold-bright);
}
.hud-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--color-gold-bright);
  animation: pulse-dot 1.6s ease-in-out infinite;
}

/* ---------- preview stat row (slide 2) ---------- */
.preview-cards {
  display: flex;
  flex-wrap: wrap;
  gap: 1.2rem 1.6rem;
  margin-top: 1.1rem;
}
.preview-card {
  padding-right: 1.6rem;
  border-right: 1px solid rgba(243,233,210,.22);
}
.preview-card:last-child { border-right: none; padding-right: 0; }
.preview-card-title {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: .6rem;
  letter-spacing: .16em;
  color: var(--color-gold-bright);
  text-transform: uppercase;
  margin-bottom: .35rem;
}
.preview-card-body { font-size: .76rem; color: var(--color-cream-dim); line-height: 1.35; max-width: 15rem; }
.preview-card--stat .preview-card-body { font-family: var(--font-display); font-size: 1.5rem; color: var(--color-jade); -webkit-text-stroke: .5px var(--color-ink); }

/* ---------- form (slide 3) ---------- */
/* The global scrim is deliberately light now, so the form gets its own
   semi-transparent dark backing to stay readable/usable on top of the
   (still visible) artwork. */
.form-panel {
  position: relative; width: 100%; margin-top: .6rem;
  background: rgba(6,5,4,.55);
  border-radius: var(--radius-lg);
  padding: clamp(1rem, 2.4vw, 1.5rem);
  backdrop-filter: blur(3px);
}
.prank-form {
  display: flex; flex-direction: column; gap: .65rem;
}
.form-row { display: flex; flex-direction: column; gap: .3rem; }
.form-row--checkbox { flex-direction: row; align-items: center; gap: .55rem; }
.prank-form label {
  font-family: var(--font-heading);
  font-size: .66rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--color-cream-dim);
}
.optional { opacity: .55; text-transform: none; letter-spacing: 0; }
.required { color: var(--color-red); }

.prank-form input[type="text"],
.prank-form textarea,
.prank-form select {
  font: inherit;
  font-size: .88rem;
  background: rgba(243,233,210,.94);
  color: var(--color-ink);
  border: 1px solid rgba(16,14,12,.6);
  border-radius: 4px;
  padding: .55em .7em;
  resize: vertical;
}
.prank-form input[type="text"]::placeholder,
.prank-form textarea::placeholder { color: #7a7264; }
.prank-form input[type="checkbox"] { width: 1.1em; height: 1.1em; accent-color: var(--color-red); }

.btn--submit {
  justify-content: center;
  margin-top: .2rem;
  position: relative;
  width: 100%;
}
.btn--submit[disabled] { opacity: .75; cursor: progress; }
.btn-spinner {
  display: none;
  width: 1em; height: 1em;
  border: 2px solid rgba(243,233,210,.4);
  border-top-color: var(--color-cream);
  border-radius: 50%;
}
.btn--submit.is-loading .btn-spinner { display: inline-block; animation: spin .7s linear infinite; }
.btn--submit.is-loading .btn-label { opacity: .7; }
@keyframes spin { to { transform: rotate(360deg); } }

.form-error {
  font-size: .78rem;
  color: #ffd1c9;
  background: rgba(179,18,27,.35);
  border: 1px solid var(--color-red);
  border-radius: 4px;
  padding: .55em .75em;
}

.form-success {
  text-align: left;
  padding: 1.1rem 0;
  animation: stamp-in .35s var(--ease-snap);
}
.form-success-stamp {
  display: inline-block;
  font-family: var(--font-heading);
  font-weight: 700;
  letter-spacing: .3em;
  font-size: .68rem;
  color: var(--color-jade);
  border: 2px solid var(--color-jade);
  padding: .3em .9em;
  margin-bottom: .7rem;
}
.form-success-text {
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 3.6vw, 1.9rem);
  color: var(--color-cream);
  text-shadow: var(--outline-heavy);
}
@keyframes stamp-in {
  0% { opacity: 0; transform: translateY(6px); }
  100% { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   NAVIGATION & CONTROLS
   ========================================================================== */
.nav-arrow {
  position: fixed; top: 50%; transform: translateY(-50%);
  z-index: var(--z-nav);
  width: 42px; height: 42px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(8,7,6,.4);
  border: 1px solid rgba(232,197,101,.55);
  border-radius: 50%;
  color: var(--color-cream);
  backdrop-filter: blur(3px);
  transition: background .2s, border-color .2s;
}
.nav-arrow svg { width: 18px; height: 18px; }
.nav-arrow:hover, .nav-arrow:focus-visible { background: var(--color-red); border-color: var(--color-red); }
.nav-arrow--prev { left: clamp(.6rem, 2vw, 1.4rem); }
.nav-arrow--next { right: clamp(.6rem, 2vw, 1.4rem); }

.dots {
  position: fixed; bottom: clamp(1rem, 2.6vw, 1.6rem); left: 50%; transform: translateX(-50%);
  z-index: var(--z-nav);
  display: flex; gap: .55rem;
  padding: .45rem .65rem;
  background: rgba(8,7,6,.4);
  border-radius: 999px;
  backdrop-filter: blur(3px);
}
.dot {
  width: 9px; height: 9px; border-radius: 50%;
  background: rgba(243,233,210,.4);
  border: 1px solid rgba(16,14,12,.4);
  transition: background .2s, transform .2s;
}
.dot.is-active { background: var(--color-gold-bright); transform: scale(1.25); }

.top-controls {
  position: fixed; top: clamp(.8rem, 2vw, 1.4rem); right: clamp(.8rem, 2vw, 1.4rem);
  z-index: var(--z-nav);
  display: flex; gap: .55rem;
}
.icon-btn {
  width: 38px; height: 38px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(8,7,6,.4);
  border: 1px solid rgba(232,197,101,.55);
  border-radius: 50%;
  color: var(--color-cream);
  backdrop-filter: blur(3px);
}
.icon-btn svg { width: 18px; height: 18px; }
.icon-btn:hover, .icon-btn:focus-visible { background: var(--color-red); border-color: var(--color-red); }

.menu-wrap { position: relative; }
.menu-panel {
  position: absolute; top: calc(100% + .6rem); right: 0;
  background: var(--color-charcoal-soft);
  border: 1px solid var(--color-gold);
  border-radius: var(--radius-md);
  padding: .4rem;
  min-width: 160px;
  box-shadow: var(--shadow-hard);
}
.menu-item {
  display: block; width: 100%; text-align: left;
  padding: .55em .7em;
  border-radius: 6px;
  font-size: .82rem;
}
.menu-item:hover, .menu-item:focus-visible { background: rgba(201,162,39,.2); }

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */

@media (max-width: 900px) {
  .slide-inner {
    align-items: flex-end;
    padding: 1.4rem 1.2rem 6.5rem;
  }
  .slide-copy, .slide-copy--form { max-width: 100%; }

  /* Artwork stays full-bleed cover on mobile too — just re-center the crop
     so the character isn't pushed out of frame on narrow portrait screens. */
  .slide--flights .slide-buck,
  .slide--plan .slide-buck,
  .slide--pranks .slide-buck { object-position: center; }

  /* Bottom-up scrim instead of left-right — a narrow phone has no room for
     a side gradient, so the text band anchors to the bottom edge instead. */
  .slide-scrim, .slide-scrim--wide {
    background: linear-gradient(0deg, rgba(6,5,4,.5) 15%, rgba(6,5,4,.38) 42%, transparent 78%);
  }

  .preview-cards { gap: .9rem 1.2rem; }
  .preview-card { flex: 1 1 40%; border-right: none; padding-right: 0; }

  .chapter-caption { bottom: auto; top: 1rem; left: auto; right: 1rem; }
}

@media (max-width: 560px) {
  .slide-inner { padding: 1.2rem 1rem 6rem; }
  .nav-arrow { width: 36px; height: 36px; }
  .icon-btn { width: 36px; height: 36px; }
  .slide-heading { font-size: clamp(2.4rem, 13vw, 3.4rem); }
  .preview-card { flex: 1 1 100%; }
}

/* ==========================================================================
   REDUCED MOTION
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
  .grain { animation: none; opacity: .08; }
  .mystery-box.is-clickable .buck-cutout { animation: none; }
}
