/* Punchlines home page. The legal pages keep style.css. */

:root {
  --night: #0c0a12;
  --night2: #120d1a;
  --panel: #1a1424;
  --panel2: #231b30;
  --line: #2c2338;
  --ink: #f5efe4;
  --mute: #a99fb8;
  --gold: #ffc93c;
  --gold2: #ff9f1c;
  --red: #e3262f;
  --red-deep: #8c0f16;
  --blue: #8fd3ff;
  --green: #6bdc57;
  --tile-top: #fffaf0;
  --tile: #efe4cf;
  --tile-ink: #1d1626;
  --display: "Bowlby One", Impact, "Arial Black", sans-serif;
  --body: "Fredoka", ui-rounded, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--night);
  color: var(--ink);
  font: 500 17px/1.5 var(--body);
  overflow-x: hidden;
}
img, video { display: block; max-width: 100%; }
a { color: var(--gold); }
button { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }

/* ── buttons ─────────────────────────────────────────────────────────── */
.btn {
  --c: var(--red);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 22px;
  border: 3px solid #000;
  border-radius: 16px;
  background: var(--c);
  color: #fff;
  font: 400 18px/1 var(--display);
  letter-spacing: .5px;
  text-decoration: none;
  text-transform: uppercase;
  box-shadow: 0 6px 0 #000, 0 10px 24px rgba(0, 0, 0, .45);
  cursor: pointer;
  transition: transform .08s, box-shadow .08s;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.btn:hover { transform: translateY(-2px) rotate(-1deg); box-shadow: 0 8px 0 #000, 0 14px 28px rgba(0, 0, 0, .5); }
.btn:active { transform: translateY(5px); box-shadow: 0 1px 0 #000; }
.btn.gold { --c: var(--gold); color: var(--tile-ink); }
.btn.ghost { --c: var(--panel2); }
.btn-sm { padding: 9px 14px; font-size: 14px; border-radius: 12px; box-shadow: 0 4px 0 #000; }
.btn small { display: block; font: 600 12px/1.1 var(--body); text-transform: none; letter-spacing: 0; opacity: .85; }
.store { text-align: left; }
.store .ico { font-size: 26px; line-height: 1; }

/* ── top bar ─────────────────────────────────────────────────────────── */
.top {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px max(16px, env(safe-area-inset-left)) 10px max(16px, env(safe-area-inset-right));
  background: rgba(12, 10, 18, .82);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, .06);
}
.logo {
  font: 400 22px/1 var(--display);
  color: var(--gold);
  text-decoration: none;
  text-shadow: 0 3px 0 var(--red-deep);
  transform: rotate(-2deg);
}
.top-r { display: flex; align-items: center; gap: 10px; }
.snd {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 2px solid var(--line);
  background: var(--panel);
  font-size: 20px;
  cursor: pointer;
}
.snd[aria-pressed="false"] { opacity: .6; }

/* ── hero ────────────────────────────────────────────────────────────── */
.hero {
  position: relative;
  display: grid;
  grid-template-areas: "copy" "game" "more";
  gap: 18px;
  max-width: 1120px;
  margin: 0 auto;
  padding: 14px 16px 48px;
}
.hero::before {
  /* the ring's two spotlights, behind everything */
  content: "";
  position: absolute;
  inset: -80px 0 0;
  z-index: -1;
  background:
    radial-gradient(40% 55% at 22% 10%, rgba(227, 38, 47, .22), transparent 70%),
    radial-gradient(40% 55% at 80% 18%, rgba(70, 120, 255, .18), transparent 70%);
  pointer-events: none;
}
.floaty { position: absolute; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.floaty span {
  position: absolute;
  font-size: var(--s, 40px);
  opacity: .12;
  animation: float var(--d, 14s) ease-in-out infinite alternate;
}
@keyframes float {
  from { transform: translateY(0) rotate(-12deg); }
  to { transform: translateY(-46px) rotate(14deg); }
}

.hero-copy { grid-area: copy; text-align: center; }
.hero-more { grid-area: more; text-align: center; }
.title {
  margin: 0;
  font: 400 clamp(58px, 17vw, 128px)/.86 var(--display);
  color: var(--gold);
  letter-spacing: -1px;
  transform: rotate(-3deg);
  text-shadow: 0 4px 0 var(--gold2), 0 8px 0 var(--red-deep), 0 14px 26px rgba(0, 0, 0, .6);
}
.title .line { display: block; white-space: nowrap; }
.title .ch { display: inline-block; }
.title.go .ch { animation: slam .46s cubic-bezier(.2, 1.6, .4, 1) both; animation-delay: calc(var(--i) * 55ms); }
.title.go { animation: thud .35s ease-out .62s both; }
@keyframes slam {
  0% { opacity: 0; transform: translateY(-60px) scale(2.6) rotate(-14deg); }
  60% { opacity: 1; }
  100% { opacity: 1; transform: none; }
}
@keyframes thud {
  0% { transform: rotate(-3deg); }
  20% { transform: rotate(-3deg) translate(-6px, 4px); }
  40% { transform: rotate(-3deg) translate(5px, -3px); }
  60% { transform: rotate(-3deg) translate(-3px, 2px); }
  100% { transform: rotate(-3deg); }
}
.tag {
  margin: 16px 0 0;
  font: 400 clamp(22px, 5.4vw, 34px)/1.1 var(--display);
  text-transform: uppercase;
}
.tag em {
  display: inline-block;
  font-style: normal;
  color: var(--red);
  -webkit-text-stroke: 1.5px #000;
  animation: wobble 1.8s ease-in-out infinite;
}
@keyframes wobble {
  0%, 70%, 100% { transform: rotate(0) scale(1); }
  76% { transform: rotate(-10deg) scale(1.25); }
  84% { transform: rotate(8deg) scale(1.18); }
  92% { transform: rotate(-4deg) scale(1.05); }
}
.lede { max-width: 30em; margin: 10px auto 18px; color: var(--mute); font-size: 18px; }
.lede b { color: var(--ink); font-family: var(--display); font-weight: 400; letter-spacing: .5px; }
.ctas { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.soon { margin: 12px 0 0; color: var(--mute); font-size: 14px; }

/* ── the playable fight ──────────────────────────────────────────────── */
.game {
  grid-area: game;
  position: relative;
  width: 100%;
  max-width: 460px;
  margin: 0 auto;
  padding: 12px 12px 14px;
  border: 3px solid #000;
  border-radius: 24px;
  background: linear-gradient(#17111f, #0f0b16);
  box-shadow: 0 0 0 2px var(--line), 0 24px 60px rgba(0, 0, 0, .6), 0 0 80px rgba(255, 201, 60, .08);
  overflow: hidden; /* a callout's slam starts at 1.9×: never let it widen the page */
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}
.game.shake { animation: shake .28s linear; }
.game.shake-big { animation: shake-big .42s linear; }
@keyframes shake {
  0%, 100% { transform: none; }
  20% { transform: translate(-5px, 3px) rotate(-.6deg); }
  40% { transform: translate(5px, -2px) rotate(.5deg); }
  60% { transform: translate(-3px, -2px); }
  80% { transform: translate(2px, 2px); }
}
@keyframes shake-big {
  0%, 100% { transform: none; }
  15% { transform: translate(-10px, 5px) rotate(-1.4deg); }
  30% { transform: translate(9px, -6px) rotate(1.2deg); }
  45% { transform: translate(-7px, -3px) rotate(-.6deg); }
  60% { transform: translate(5px, 4px); }
  80% { transform: translate(-2px, -2px); }
}

.hud { display: grid; grid-template-columns: 1fr auto 1fr; align-items: end; gap: 8px; margin-bottom: 8px; }
.side { min-width: 0; }
.side.them { text-align: right; }
.who {
  display: flex;
  align-items: center;
  gap: 6px;
  font: 700 13px/1 var(--body);
  letter-spacing: .6px;
  text-transform: uppercase;
  white-space: nowrap;
}
.them .who { justify-content: flex-end; }
.who .face { font-size: 20px; }
.who .nm { overflow: hidden; text-overflow: ellipsis; }
.hp {
  position: relative;
  height: 16px;
  margin-top: 5px;
  border: 2px solid #000;
  border-radius: 6px;
  background: #2a1f33;
  overflow: hidden;
  transform: skewX(-12deg);
}
.them .hp { transform: skewX(12deg); }
.hp i { position: absolute; top: 0; bottom: 0; left: 0; width: calc(var(--hp, 100) * 1%); }
.them .hp i { left: auto; right: 0; }
.hp .lag { background: #fff; transition: width .5s ease-in .35s; }
.hp .fill {
  background: linear-gradient(#ffe07a, var(--gold) 45%, var(--gold2));
  transition: width .12s ease-out;
}
.hp.low .fill { background: linear-gradient(#ff8a80, var(--red) 50%, #a3121a); animation: pulse .6s ease-in-out infinite alternate; }
.hp.flash .fill { filter: brightness(2.2); }
@keyframes pulse { to { filter: brightness(1.4); } }
.tick {
  height: 16px;
  margin-top: 4px;
  font: 800 11.5px/16px var(--body);
  letter-spacing: .4px;
  color: var(--gold);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tick.danger { color: var(--red); }
.vs {
  align-self: center;
  padding: 4px 8px;
  border: 2px solid #000;
  border-radius: 10px;
  background: var(--red);
  font: 400 15px/1 var(--display);
  transform: rotate(-6deg);
  box-shadow: 0 3px 0 #000;
}

.arena {
  position: relative;
  aspect-ratio: 5 / 3;
  border: 3px solid #000;
  border-radius: 14px;
  overflow: hidden;
  background: #120c18 url("/media/clips/idle.jpg") center / cover;
}
.arena video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity .09s linear;
}
.arena video.on { opacity: 1; }
.arena .flash {
  position: absolute;
  inset: 0;
  background: #fff;
  opacity: 0;
  pointer-events: none;
}
.arena .flash.go { animation: flash .35s ease-out; }
@keyframes flash { from { opacity: .55; } to { opacity: 0; } }

/* callouts land here, under the ring, like the app's strip */
.strip { position: relative; height: 54px; margin: 2px 0; pointer-events: none; }
.strip .co {
  position: absolute;
  left: 50%;
  top: 50%;
  white-space: nowrap;
  font: 400 var(--fs, 30px)/1 var(--display);
  color: var(--c, var(--gold));
  -webkit-text-stroke: 2px #000;
  paint-order: stroke fill;
  text-shadow: 0 4px 0 #000;
  transform: translate(-50%, -50%) rotate(-3deg);
  animation: co var(--dur, 1.1s) ease-out forwards;
}
@keyframes co {
  0% { opacity: 0; transform: translate(-50%, -50%) rotate(-3deg) scale(1.9); }
  12% { opacity: 1; transform: translate(-50%, -50%) rotate(-3deg) scale(1); }
  75% { opacity: 1; }
  100% { opacity: 0; transform: translate(-50%, -54%) rotate(-3deg) scale(1); }
}

.word { min-height: 46px; text-align: center; }
.word b {
  display: block;
  min-height: 30px;
  font: 400 26px/30px var(--display);
  letter-spacing: 1px;
  color: var(--ink);
}
.word span { display: block; font: 700 13px/16px var(--body); letter-spacing: 1.4px; text-transform: uppercase; color: var(--mute); }
.word span.good { color: var(--gold); }
.word span.bad { color: #ff7a70; }

.board { position: relative; margin: 4px 2px 0; touch-action: none; }
.grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.tile {
  position: relative;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border: 3px solid #000;
  border-radius: 14px;
  background: linear-gradient(var(--tile-top), var(--tile));
  box-shadow: inset 0 -5px 0 rgba(0, 0, 0, .12), 0 4px 0 #000;
  color: var(--tile-ink);
  font: 400 clamp(26px, 8.4vw, 38px)/1 var(--display);
  transition: transform .08s, background .12s;
}
.tile.sel { background: linear-gradient(#fff2b3, var(--gold)); transform: scale(.93); }
.tile.ok { background: linear-gradient(#d9ffd0, var(--green)); }
.tile.no { background: linear-gradient(#ffd0cc, #ff6a5e); }
.tile.fin { animation: glow .7s ease-in-out infinite alternate; }
@keyframes glow {
  from { box-shadow: inset 0 -5px 0 rgba(0, 0, 0, .12), 0 4px 0 #000, 0 0 0 0 rgba(255, 201, 60, 0); }
  to { box-shadow: inset 0 -5px 0 rgba(0, 0, 0, .12), 0 4px 0 #000, 0 0 22px 6px rgba(255, 201, 60, .9); background: linear-gradient(#fff6c8, #ffd96a); }
}
.board.wiggle .grid { animation: shake .3s linear; }
.trace { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; }
.trace polyline {
  fill: none;
  stroke: var(--gold);
  stroke-opacity: .8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.finger {
  position: absolute;
  left: 0;
  top: 0;
  font-size: 40px;
  line-height: 1;
  pointer-events: none;
  opacity: 0;
  filter: drop-shadow(0 4px 4px rgba(0, 0, 0, .6));
  transition: transform .11s linear, opacity .2s;
}
.finger.on { opacity: 1; }
.coach {
  position: absolute;
  left: 50%;
  bottom: -14px;
  z-index: 3;
  width: max-content;
  padding: 8px 14px;
  border: 3px solid #000;
  border-radius: 14px;
  background: var(--gold);
  color: var(--tile-ink);
  font: 400 15px/1.1 var(--display);
  white-space: nowrap;
  box-shadow: 0 4px 0 #000;
  transform: translateX(-50%);
  animation: bob 1s ease-in-out infinite alternate;
  pointer-events: none;
  transition: opacity .3s;
}
.coach.gone { opacity: 0; }
@keyframes bob { to { transform: translate(-50%, -6px); } }

.found { display: flex; gap: 6px; min-height: 32px; margin-top: 22px; overflow: hidden; }
.found span {
  flex: none;
  padding: 5px 10px;
  border: 2px solid var(--line);
  border-radius: 99px;
  background: var(--panel);
  font: 800 12px/1 var(--body);
  letter-spacing: .8px;
  text-transform: uppercase;
  animation: pop .3s cubic-bezier(.2, 1.6, .4, 1);
}
@keyframes pop { from { transform: scale(.3); opacity: 0; } }

.over {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: grid;
  place-items: center;
  padding: 20px;
  border-radius: 21px;
  background: rgba(12, 10, 18, .78);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  text-align: center;
}
.over[hidden] { display: none; }
.over .card { animation: pop .45s cubic-bezier(.2, 1.6, .4, 1); }
.over h3 {
  margin: 0;
  font: 400 clamp(44px, 13vw, 64px)/.95 var(--display);
  color: var(--gold);
  -webkit-text-stroke: 2px #000;
  paint-order: stroke fill;
  text-shadow: 0 6px 0 #000;
  transform: rotate(-4deg);
}
.over h3.lose { color: var(--red); }
.over p { margin: 14px 0 20px; font-size: 18px; color: var(--ink); }
.over .row { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }

/* ── sections ────────────────────────────────────────────────────────── */
.sec { max-width: 1120px; margin: 0 auto; padding: 56px 16px; }
.sec + .sec { border-top: 1px solid rgba(255, 255, 255, .05); }
.h2 {
  margin: 0;
  text-align: center;
  font: 400 clamp(34px, 8.5vw, 58px)/1 var(--display);
  color: var(--gold);
  text-transform: uppercase;
  text-shadow: 0 4px 0 var(--red-deep);
  transform: rotate(-2deg);
}
.sub { max-width: 32em; margin: 14px auto 30px; text-align: center; color: var(--mute); font-size: 18px; }

.reveal { opacity: 0; transform: translateY(30px) scale(.96); transition: opacity .5s, transform .6s cubic-bezier(.2, 1.4, .4, 1); }
.reveal.in { opacity: 1; transform: none; }

/* letter tiles as type */
.tiles { display: flex; justify-content: center; gap: 5px; }
.tiles b {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 2.5px solid #000;
  border-radius: 9px;
  background: linear-gradient(var(--tile-top), var(--tile));
  box-shadow: 0 3px 0 #000;
  color: var(--tile-ink);
  font: 400 22px/1 var(--display);
}
.in .tiles b { animation: hop .5s cubic-bezier(.2, 1.6, .4, 1) both; animation-delay: calc(var(--i) * 70ms + .15s); }
@keyframes hop {
  0% { transform: translateY(0); }
  40% { transform: translateY(-14px) rotate(-6deg); background: linear-gradient(#fff2b3, var(--gold)); }
  100% { transform: none; }
}

/* longer word, bigger hit */
.rungs {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr));
  gap: 18px;
  margin: 0;
  padding: 0;
}
.rung {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 14px;
  border: 3px solid #000;
  border-radius: 20px;
  background: var(--panel);
  box-shadow: 0 6px 0 #000;
  transition: transform .15s;
}
.rung:hover { transform: rotate(-1deg) translateY(-4px); }
.rung .len {
  align-self: flex-start;
  padding: 4px 10px;
  border: 2px solid #000;
  border-radius: 99px;
  background: var(--gold);
  color: var(--tile-ink);
  font: 400 13px/1 var(--display);
  text-transform: uppercase;
}
.rung .tiles { justify-content: flex-start; gap: 4px; }
.rung .tiles b { width: 34px; height: 34px; font-size: 18px; border-radius: 8px; }
.rung video {
  width: 100%;
  aspect-ratio: 5 / 3;
  border: 3px solid #000;
  border-radius: 12px;
  object-fit: cover;
  background: #120c18;
}
.rung .meter { display: flex; align-items: center; gap: 10px; }
.rung h3 { flex: none; margin: 0; font: 400 20px/1 var(--display); color: var(--gold); text-transform: uppercase; }
.bar { position: relative; flex: 1; height: 16px; border: 2px solid #000; border-radius: 99px; background: #2a1f33; overflow: hidden; }
.bar i {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0;
  background: linear-gradient(90deg, var(--gold), var(--red));
  transition: width 1s cubic-bezier(.2, 1.3, .4, 1) .3s;
}
.in .bar i { width: var(--w); }
.rung .dmg { flex: none; font: 400 20px/1 var(--display); color: var(--red); }
.rung .which { margin: 0; color: var(--mute); font-size: 15px; }
.rung .which b { color: var(--ink); font-weight: 700; transition: color .2s; }
.rung .which b.now { color: var(--gold); }
.rules {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr));
  gap: 18px;
  margin-top: 26px;
}
.rule {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px;
  border: 3px solid #000;
  border-radius: 20px;
  background: var(--panel);
  box-shadow: 0 6px 0 #000;
  transition: transform .15s;
}
.rule:hover { transform: rotate(1deg) translateY(-4px); }
.rule video { width: 100%; aspect-ratio: 5 / 3; border: 3px solid #000; border-radius: 12px; object-fit: cover; background: #120c18; }
.rule h3 { margin: 4px 0 0; font: 400 20px/1 var(--display); color: var(--gold); text-transform: uppercase; }
.rule p { margin: 0; color: var(--mute); }
.rule p b { color: var(--ink); font-weight: 700; }

/* the little loops under each rule's clip */
.mini { position: relative; display: flex; align-items: center; justify-content: center; gap: 6px; height: 44px; }
.mini > b {
  padding: 6px 9px;
  border: 2.5px solid #000;
  border-radius: 9px;
  background: linear-gradient(var(--tile-top), var(--tile));
  box-shadow: 0 3px 0 #000;
  color: var(--tile-ink);
  font: 400 15px/1 var(--display);
}
.mini .tiles { gap: 4px; }
.mini .tiles b { width: 30px; height: 30px; font-size: 16px; border-radius: 7px; }
.mini i {
  position: absolute;
  left: 50%;
  top: 50%;
  font: 400 24px/1 var(--display);
  font-style: normal;
  color: var(--red);
  -webkit-text-stroke: 1.5px #000;
  paint-order: stroke fill;
  text-shadow: 0 3px 0 #000;
  white-space: nowrap;
  opacity: 0;
  transform: translate(-50%, -50%) rotate(-6deg);
  pointer-events: none;
}
.mini.typo i, .mini.block i { color: var(--blue); }
.in .mini.combo > b { animation: chip 3.2s ease-out infinite both; }
.in .mini.combo > b:nth-child(2) { animation-delay: .45s; }
.in .mini.combo > b:nth-child(3) { animation-delay: .9s; }
@keyframes chip {
  0% { opacity: 0; transform: scale(.3); }
  6% { opacity: 1; transform: scale(1.15) rotate(-4deg); background: linear-gradient(#fff2b3, var(--gold)); }
  12% { transform: none; background: linear-gradient(var(--tile-top), var(--tile)); }
  70% { opacity: 1; }
  80%, 100% { opacity: 0; }
}
.in .mini i { animation: stamp 3.2s ease-out infinite; }
.in .mini.combo i { animation-delay: .1s; }
@keyframes stamp {
  0%, 40% { opacity: 0; transform: translate(-50%, -50%) rotate(-6deg) scale(2.2); }
  46% { opacity: 1; transform: translate(-50%, -50%) rotate(-6deg) scale(1); }
  72% { opacity: 1; }
  80%, 100% { opacity: 0; transform: translate(-50%, -50%) rotate(-6deg) scale(1); }
}
.in .mini.typo .tiles b { animation: oops 3.2s linear infinite; }
@keyframes oops {
  0%, 30% { transform: none; }
  34% { transform: translateX(-4px); background: linear-gradient(#ffd0cc, #ff6a5e); }
  38% { transform: translateX(4px); background: linear-gradient(#ffd0cc, #ff6a5e); }
  42% { transform: translateX(-3px); background: linear-gradient(#ffd0cc, #ff6a5e); }
  46%, 70% { transform: none; background: linear-gradient(#ffd0cc, #ff6a5e); }
  76%, 100% { transform: none; }
}
.mini.block .shield { font-size: 30px; }
.in .mini.block > b { animation: bounce 3.2s ease-in-out infinite; }
.in .mini.block .shield { animation: guard 3.2s ease-out infinite; }
@keyframes bounce {
  0% { transform: translateX(-60px); opacity: 0; }
  10% { opacity: 1; }
  34% { transform: translateX(4px); }
  44% { transform: translateX(-44px) rotate(-14deg); text-decoration: line-through; }
  70% { transform: translateX(-44px) rotate(-14deg); opacity: 1; text-decoration: line-through; }
  80%, 100% { transform: translateX(-44px) rotate(-14deg); opacity: 0; }
}
@keyframes guard {
  0%, 32% { transform: none; }
  36% { transform: scale(1.4) rotate(10deg); }
  44%, 100% { transform: none; }
}
.in .mini.fin .tiles b { animation: lit 3.2s ease-in-out infinite; animation-delay: calc(var(--i) * 90ms); }
@keyframes lit {
  0%, 8% { background: linear-gradient(var(--tile-top), var(--tile)); box-shadow: 0 3px 0 #000; }
  18%, 60% { background: linear-gradient(#fff6c8, #ffd96a); box-shadow: 0 3px 0 #000, 0 0 14px 3px rgba(255, 201, 60, .9); }
  72%, 100% { background: linear-gradient(var(--tile-top), var(--tile)); box-shadow: 0 3px 0 #000; }
}

/* legendary finishers */
.legends .cards {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: min(78vw, 340px);
  gap: 16px;
  margin: 0 -16px;
  padding: 6px 16px 18px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}
.legends .cards::-webkit-scrollbar { display: none; }
.legend {
  position: relative;
  scroll-snap-align: center;
  padding: 12px;
  border: 3px solid #000;
  border-radius: 20px;
  background: linear-gradient(160deg, #3a2a10, var(--panel) 45%);
  box-shadow: 0 0 0 2px var(--gold), 0 6px 0 #000, 0 0 30px rgba(255, 201, 60, .15);
  overflow: hidden;
}
.legend .rib {
  position: absolute;
  top: 18px;
  right: -36px;
  z-index: 2;
  width: 150px;
  padding: 4px 0;
  border: 2px solid #000;
  background: var(--gold);
  color: var(--tile-ink);
  font: 400 11px/1 var(--display);
  text-align: center;
  transform: rotate(35deg);
}
.legend video { width: 100%; aspect-ratio: 5 / 3; border: 3px solid #000; border-radius: 12px; object-fit: cover; background: #120c18; }
.legend h3 { margin: 12px 0 2px; font: 400 22px/1.1 var(--display); color: var(--gold); }
.legend p { margin: 0; color: var(--mute); }
.legend p b { color: var(--ink); font-family: var(--display); font-weight: 400; }
.swipe-hint { margin: 4px 0 0; text-align: center; color: var(--mute); font-size: 14px; }

/* modes */
.modes-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 20px; }
.mode {
  padding: 14px 14px 18px;
  border: 3px solid #000;
  border-radius: 20px;
  background: var(--panel);
  box-shadow: 0 6px 0 #000;
  text-align: center;
}
.mode h3 { margin: 16px 0 6px; font: 400 22px/1.1 var(--display); color: var(--gold); text-transform: uppercase; }
.mode p { max-width: 20em; margin: 0 auto; color: var(--mute); }
.screen {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  height: 130px;
  border: 3px solid #000;
  border-radius: 14px;
  background: radial-gradient(70% 90% at 50% 0%, #2b1d3c, #120c18);
  overflow: hidden;
}
.screen.friend { flex-direction: column; gap: 8px; }
.screen .label { font: 700 11px/1 var(--body); letter-spacing: 1.6px; text-transform: uppercase; color: var(--mute); }
.code { gap: 4px; }
.code b { width: 34px; height: 40px; font-size: 20px; }
.code .dash { align-self: center; font: 400 22px/1 var(--display); color: var(--mute); }
.in .code b { animation: wave 3s ease-in-out infinite; animation-delay: calc(var(--i) * 90ms); }
@keyframes wave {
  0%, 30%, 100% { transform: none; background: linear-gradient(var(--tile-top), var(--tile)); }
  8% { transform: translateY(-12px) rotate(-6deg); background: linear-gradient(#fff2b3, var(--gold)); }
  16% { transform: none; }
}
.screen .bell { position: absolute; top: 10px; right: 12px; font-size: 26px; }
.in .screen .bell { animation: ring 3s ease-in-out infinite; transform-origin: 50% 10%; }
@keyframes ring {
  0%, 55%, 100% { transform: none; }
  60% { transform: rotate(24deg); }
  65% { transform: rotate(-22deg); }
  70% { transform: rotate(16deg); }
  75% { transform: rotate(-10deg); }
  80% { transform: none; }
}
.screen.match .face, .slot { font-size: 48px; line-height: 1; }
.screen.match .vs {
  padding: 4px 8px;
  border: 2px solid #000;
  border-radius: 10px;
  background: var(--red);
  font: 400 16px/1 var(--display);
  transform: rotate(-6deg);
  box-shadow: 0 3px 0 #000;
}
.slot {
  position: relative;
  width: 64px;
  height: 64px;
  border: 3px solid #000;
  border-radius: 14px;
  background: #0c0912;
  overflow: hidden;
}
.reel { position: absolute; left: 0; right: 0; top: 0; display: flex; flex-direction: column; }
.reel span { display: grid; place-items: center; height: 58px; }
.in .reel { animation: spin 3.6s cubic-bezier(.25, .8, .3, 1) infinite; }
@keyframes spin {
  0%, 8% { transform: translateY(0); }
  55%, 92% { transform: translateY(-406px); }
  100% { transform: translateY(0); }
}
.screen.practice { flex-direction: column; gap: 10px; }
.bots3 { position: relative; width: 52px; height: 52px; font-size: 46px; line-height: 52px; }
.bots3 span { position: absolute; inset: 0; text-align: center; opacity: 0; }
.bots3 span:first-child { opacity: 1; }
.lvls { display: flex; gap: 6px; }
.lvls span {
  padding: 5px 9px;
  border: 2px solid var(--line);
  border-radius: 99px;
  background: var(--panel2);
  color: var(--mute);
  font: 800 12px/1 var(--body);
}
.in .bots3 span { animation: turn 3.6s steps(1) infinite; }
.in .lvls span { animation: pick 3.6s steps(1) infinite; }
.in .bots3 span:nth-child(2), .in .lvls span:nth-child(2) { animation-delay: 1.2s; }
.in .bots3 span:nth-child(3), .in .lvls span:nth-child(3) { animation-delay: 2.4s; }
.in .bots3 span:first-child { opacity: 0; }
@keyframes turn { 0% { opacity: 1; } 33.33%, 100% { opacity: 0; } }
@keyframes pick {
  0% { background: var(--gold); border-color: #000; color: var(--tile-ink); }
  33.33%, 100% { background: var(--panel2); border-color: var(--line); color: var(--mute); }
}

/* bots with attitude */
.bots { margin-top: 46px; }
.bots h3 { margin: 0 0 16px; text-align: center; font: 400 26px/1 var(--display); text-transform: uppercase; }
.marquee { position: relative; overflow: hidden; margin: 0 -16px; padding: 8px 0; mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.marquee .track { display: flex; gap: 14px; width: max-content; animation: slide 46s linear infinite; }
.marquee:hover .track { animation-play-state: paused; }
@keyframes slide { to { transform: translateX(-50%); } }
.bubble {
  flex: none;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px 10px 10px;
  border: 3px solid #000;
  border-radius: 18px 18px 18px 4px;
  background: var(--ink);
  color: var(--tile-ink);
  box-shadow: 0 4px 0 #000;
}
.bubble .f { font-size: 30px; }
.bubble b { display: block; font: 400 13px/1.1 var(--display); color: var(--red); text-transform: uppercase; }
.bubble span { font-weight: 700; font-size: 15px; }

/* free */
.badges { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.badge {
  padding: 12px 18px;
  border: 3px solid #000;
  border-radius: 99px;
  background: var(--panel2);
  box-shadow: 0 4px 0 #000;
  font: 700 17px/1 var(--body);
}
.in .badge { animation: pop .45s cubic-bezier(.2, 1.6, .4, 1) both; animation-delay: calc(var(--i) * 90ms); }

/* final call */
.final { text-align: center; padding-bottom: 80px; }
.final .h2 { font-size: clamp(42px, 12vw, 92px); }
.final .gloves { font-size: 64px; margin: 18px 0 8px; }
.final .gloves span { display: inline-block; margin: 0 14px; }
.final.in .gloves span { display: inline-block; animation: punchL .8s ease-in-out infinite alternate; }
.final.in .gloves span + span { animation-name: punchR; }
@keyframes punchL { 0%, 60% { transform: translateX(0) rotate(0); } 80% { transform: translateX(24px) rotate(18deg); } 100% { transform: translateX(0); } }
@keyframes punchR { 0%, 30% { transform: translateX(0) scaleX(-1); } 50% { transform: translateX(-24px) scaleX(-1) rotate(18deg); } 100% { transform: translateX(0) scaleX(-1); } }

footer { padding: 28px 16px 44px; border-top: 1px solid rgba(255, 255, 255, .06); text-align: center; color: var(--mute); font-size: 14px; }
footer nav { display: flex; flex-wrap: wrap; gap: 6px 18px; justify-content: center; margin-bottom: 10px; }
footer a { font-weight: 700; text-decoration: none; }

/* emoji rain (knockouts) */
.rain { position: fixed; inset: 0; z-index: 60; overflow: hidden; pointer-events: none; }
.rain span {
  position: absolute;
  top: -60px;
  font-size: var(--s, 34px);
  animation: fall var(--d, 2.4s) cubic-bezier(.4, .1, .7, 1) forwards;
  animation-delay: var(--w, 0s);
}
@keyframes fall { to { transform: translateY(calc(100vh + 120px)) rotate(var(--r, 360deg)); } }

/* ── wide screens: copy left, fight right ────────────────────────────── */
@media (min-width: 960px) {
  .hero {
    grid-template-columns: 1fr 400px;
    grid-template-areas: "copy game" "more game";
    gap: 0 56px;
    padding-top: 28px;
  }
  .game { max-width: 400px; }
  .grid { gap: 7px; }
  .tile { font-size: 32px; }
  .strip { height: 46px; }
  .hero-copy { align-self: end; text-align: left; }
  .hero-more { align-self: start; text-align: left; }
  .lede { margin-left: 0; }
  .ctas { justify-content: flex-start; }
  .rules { grid-template-columns: repeat(4, 1fr); }
  .legends .cards { grid-auto-flow: row; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); margin: 0; padding: 6px 0 0; overflow: visible; }
  .swipe-hint { display: none; }
}

@media (max-width: 380px) {
  .grid { gap: 6px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .reveal { opacity: 1; transform: none; }
  .marquee .track { animation: none; flex-wrap: wrap; width: auto; justify-content: center; }
  .mini *, .screen * { animation: none !important; }
}
