/* Catch Them Cats — marketing hero.
   One page, one background, panels slide over it. The page itself never scrolls. */

:root {
  --void: #04010f;
  --deep: #150a37;
  --cyan: #29e7ff;
  --pink: #ff2d95;
  --gold: #ffd76a;
  --text: #e8e4ff;
  --dim: #9a92c4;

  --panel-in: 620ms cubic-bezier(.16, 1, .3, 1);
  --panel-out: 320ms cubic-bezier(.6, 0, .8, .2);
}

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

html, body {
  height: 100%;
  /* The whole conceit: nothing scrolls, so it reads as a poster. */
  overflow: hidden;
  background: var(--void);
}

body {
  font-family: 'Jersey 25', ui-monospace, 'Courier New', monospace;
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  overscroll-behavior: none;
}

/* ── Background layers (persist across every view) ───────────── */

#starfield {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  /* A radial wash under the stars gives the void some depth. */
  background:
    radial-gradient(120% 90% at 50% 8%, #2a1160 0%, var(--deep) 34%, #090420 68%, var(--void) 100%);
}

.vignette {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(75% 60% at 50% 45%, transparent 40%, rgba(2, 0, 8, .78) 100%);
}

/* ── The escapees: boss UFOs drifting behind everything ──────── */

.drifters {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.drift-lane {
  position: absolute;
  will-change: transform;
}

.ufo {
  display: block;
  filter: saturate(.9) brightness(.9) drop-shadow(0 6px 18px rgba(0, 0, 0, .5));
  animation: ufo-bob 3.2s ease-in-out infinite;
}

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

/* Three depths: nearer = bigger, faster, sharper. All cross the whole screen. */
.lane-1 { top: 12%; animation: cross-r 46s linear infinite; }
.lane-1 .ufo { width: clamp(70px, 8vw, 110px); }

.lane-2 { top: 84%; animation: cross-l 64s linear infinite; animation-delay: -22s; }
.lane-2 .ufo { width: clamp(52px, 6vw, 84px); opacity: .75; filter: saturate(.8) brightness(.75) blur(.6px); animation-duration: 4.1s; }

.lane-3 { top: 34%; animation: cross-r 92s linear infinite; animation-delay: -50s; }
.lane-3 .ufo { width: clamp(38px, 4.5vw, 60px); opacity: .5; filter: saturate(.7) brightness(.6) blur(1.1px); animation-duration: 5s; }

@keyframes cross-r {
  from { transform: translateX(-140px); }
  to   { transform: translateX(calc(100vw + 140px)); }
}

@keyframes cross-l {
  from { transform: translateX(calc(100vw + 140px)) scaleX(-1); }
  to   { transform: translateX(-140px) scaleX(-1); }
}

.scanlines {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .16;
  background: repeating-linear-gradient(
    to bottom,
    rgba(255, 255, 255, .05) 0 1px,
    transparent 1px 3px
  );
  mix-blend-mode: overlay;
}

/* ── Stage / panels ──────────────────────────────────────────── */

#stage {
  position: relative;
  height: 100dvh;
  display: grid;
  place-items: center;
  padding: max(20px, env(safe-area-inset-top)) 20px max(20px, env(safe-area-inset-bottom));
}

.panel {
  grid-area: 1 / 1;                 /* all panels stack, only one is visible */
  width: min(720px, 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: clamp(14px, 2.4vh, 26px);
}

.panel[hidden] { display: none; }

/* Content slides; the background behind it never moves, so it reads as one
   continuous place rather than a page navigation. */
.panel.enter { animation: slide-in var(--panel-in) both; }
.panel.leave { animation: slide-out var(--panel-out) both; }

/* Children cascade in a beat apart — one orchestrated arrival, not a pop. */
.panel.enter > * { animation: slide-in 560ms cubic-bezier(.16, 1, .3, 1) both; }
.panel.enter > *:nth-child(2) { animation-delay: 70ms; }
.panel.enter > *:nth-child(3) { animation-delay: 140ms; }
.panel.enter > *:nth-child(4) { animation-delay: 210ms; }
.panel.enter > *:nth-child(5) { animation-delay: 280ms; }
.panel.enter > *:nth-child(6) { animation-delay: 350ms; }

@keyframes slide-in {
  from { opacity: 0; transform: translateY(26px) scale(.985); filter: blur(6px); }
  to   { opacity: 1; transform: none; filter: none; }
}

@keyframes slide-out {
  from { opacity: 1; transform: none; filter: none; }
  to   { opacity: 0; transform: translateY(-22px) scale(.985); filter: blur(6px); }
}

/* ── Hero ────────────────────────────────────────────────────── */

/* ── Hero cat: the star of the poster, and catchable ─────────── */

.hero-stage {
  position: relative;
  /* Room for the cat to dodge without shoving the layout around. */
  width: min(420px, 90vw);
  height: clamp(120px, 20vh, 190px);
  display: grid;
  place-items: center;
}

.hero-cat-hit {
  position: relative;
  border: 0;
  padding: 0;
  background: none;
  cursor: pointer;
  /* JS sets --dx/--dy when he dodges; the spring makes it feel alive. */
  transform: translate(var(--dx, 0px), var(--dy, 0px));
  transition: transform 380ms cubic-bezier(.22, 1.6, .36, 1);
  -webkit-tap-highlight-color: transparent;
}

.hero-cat {
  display: block;
  width: clamp(110px, 18vh, 170px);
  image-rendering: pixelated;     /* keep the pixel art crisp at any scale */
  filter: drop-shadow(0 0 24px rgba(41, 231, 255, .45))
          drop-shadow(0 10px 20px rgba(0, 0, 0, .5));
  animation: cat-fly 3.8s ease-in-out infinite;
}

@keyframes cat-fly {
  0%, 100% { transform: translateY(0) rotate(-2deg); }
  50%      { transform: translateY(-12px) rotate(2.5deg); }
}

/* Pop ring when he slips through your fingers. */
.hero-cat-hit::after {
  content: '';
  position: absolute;
  inset: 12%;
  border-radius: 50%;
  border: 2px solid var(--cyan);
  opacity: 0;
  pointer-events: none;
}

.hero-cat-hit.dodged::after { animation: pop-ring 480ms ease-out; }

@keyframes pop-ring {
  from { opacity: .9; transform: scale(.5); }
  to   { opacity: 0; transform: scale(1.5); }
}

.catch-chip {
  position: absolute;
  top: 4px;
  right: 4px;
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid var(--gold);
  background: rgba(20, 10, 40, .85);
  color: var(--gold);
  font-size: .82rem;
  letter-spacing: .12em;
  box-shadow: 0 0 18px rgba(255, 215, 106, .35);
  animation: chip-in 320ms cubic-bezier(.22, 1.6, .36, 1);
}

@keyframes chip-in {
  from { opacity: 0; transform: scale(.6); }
  to   { opacity: 1; transform: none; }
}

.title {
  font-weight: 400;
  line-height: .92;
  letter-spacing: .02em;
  font-size: clamp(2.9rem, 11.5vw, 7.2rem);
  text-transform: uppercase;
}

.title-line { display: block; }

.title-line:first-child {
  color: #fff;
  text-shadow:
    0 0 12px rgba(41, 231, 255, .9),
    0 0 42px rgba(41, 231, 255, .55),
    0 0 90px rgba(41, 231, 255, .3);
}

.title-line:last-child {
  background: linear-gradient(100deg, var(--cyan), var(--pink) 55%, var(--gold));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 26px rgba(255, 45, 149, .5));
}

.tagline {
  min-height: 2.4em;                /* reserve space so rotating text can't jog the layout */
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: clamp(1.05rem, 3.6vw, 1.6rem);
  color: var(--dim);
  letter-spacing: .04em;
  padding: 0 8px;
  max-width: 22ch;
  transition: opacity 260ms ease, transform 260ms ease;
}

.tagline.swap { opacity: 0; transform: translateY(8px); }

/* ── Buttons ─────────────────────────────────────────────────── */

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  padding: 12px 22px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, .16);
  background: rgba(255, 255, 255, .05);
  color: var(--text);
  font: inherit;
  text-decoration: none;
  cursor: pointer;
  backdrop-filter: blur(8px);
  transition: transform 180ms cubic-bezier(.2, .8, .2, 1), box-shadow 220ms ease,
              border-color 220ms ease, background 220ms ease;
}

.btn svg { width: 26px; height: 26px; fill: currentColor; flex: none; }
.btn span { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.15; }
.btn small { font-size: .62rem; letter-spacing: .16em; color: var(--dim); }
.btn strong { font-size: 1.22rem; font-weight: 400; letter-spacing: .02em; }

.btn-play {
  border-color: rgba(41, 231, 255, .5);
  background: linear-gradient(135deg, rgba(41, 231, 255, .18), rgba(255, 45, 149, .16));
  box-shadow: 0 0 0 rgba(41, 231, 255, 0), 0 8px 30px rgba(41, 231, 255, .18);
  animation: beckon 2.8s ease-in-out infinite;
}

/* A slow breathing glow — the one thing on the page that asks to be pressed. */
@keyframes beckon {
  0%, 100% { box-shadow: 0 0 12px rgba(41, 231, 255, .25), 0 8px 30px rgba(255, 45, 149, .12); }
  50%      { box-shadow: 0 0 30px rgba(41, 231, 255, .55), 0 8px 36px rgba(255, 45, 149, .3); }
}

.btn-play:hover,
.btn-play:focus-visible {
  transform: translateY(-3px);
  border-color: var(--cyan);
  box-shadow: 0 0 26px rgba(41, 231, 255, .5), 0 14px 40px rgba(255, 45, 149, .25);
}

.btn-play:active { transform: translateY(-1px) scale(.98); }

/* Locked, but still shaped like a real button so the hero stays balanced. */
.btn-ios { opacity: .55; }

.btn-ios:hover,
.btn-ios:focus-visible {
  opacity: .8;
  border-color: rgba(255, 255, 255, .38);
  transform: translateY(-2px);
}

/* ── Chips ───────────────────────────────────────────────────── */

.chips {
  list-style: none;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}

.chips li {
  padding: 5px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .14);
  color: var(--dim);
  font-size: .78rem;
  letter-spacing: .18em;
  background: rgba(255, 255, 255, .03);
}

.chips li:last-child { border-color: rgba(255, 215, 106, .4); color: var(--gold); }

/* ── Sub-nav ─────────────────────────────────────────────────── */

.sub-nav {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: .92rem;
  letter-spacing: .16em;
}

.sub-nav a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--dim);
  text-decoration: none;
  padding: 6px 4px;
  border-bottom: 1px solid transparent;
  transition: color 200ms ease, border-color 200ms ease, text-shadow 200ms ease;
}

.nav-ic {
  width: 20px;
  height: 20px;
  image-rendering: pixelated;
  filter: grayscale(.35) brightness(.9);
  transition: filter 200ms ease, transform 200ms ease;
}

.sub-nav a:hover .nav-ic,
.sub-nav a:focus-visible .nav-ic {
  filter: none;
  transform: scale(1.18) rotate(-6deg);
}

.sub-nav a:hover,
.sub-nav a:focus-visible {
  color: var(--cyan);
  border-bottom-color: var(--cyan);
  text-shadow: 0 0 14px rgba(41, 231, 255, .8);
}

.sub-nav .dot { color: #4b4470; }

/* ── Scores ──────────────────────────────────────────────────── */

.panel-title {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  font-weight: 400;
  font-size: clamp(1.9rem, 6.5vw, 3.1rem);
  letter-spacing: .06em;
  color: #fff;
  text-shadow: 0 0 16px rgba(41, 231, 255, .75), 0 0 46px rgba(41, 231, 255, .35);
}

.title-ic {
  width: .95em;
  height: .95em;
  image-rendering: pixelated;
  filter: drop-shadow(0 0 12px rgba(41, 231, 255, .5));
  animation: cat-fly 3.8s ease-in-out infinite;
}

.panel-sub {
  margin-top: -8px;
  color: var(--dim);
  font-size: .98rem;
  letter-spacing: .03em;
}

.tabs { display: flex; gap: 8px; }

.tabs button {
  font: inherit;
  font-size: .92rem;
  letter-spacing: .14em;
  color: var(--dim);
  background: rgba(255, 255, 255, .04);
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 10px;
  padding: 8px 18px;
  cursor: pointer;
  transition: all 200ms ease;
}

.tabs button:hover { color: var(--text); border-color: rgba(255, 255, 255, .3); }

.tabs button.active {
  color: #06121a;
  background: linear-gradient(120deg, var(--cyan), var(--pink));
  border-color: transparent;
  box-shadow: 0 0 22px rgba(41, 231, 255, .45);
}

.board {
  list-style: none;
  width: min(460px, 100%);
  display: flex;
  flex-direction: column;
  gap: 6px;
  /* The only scroll on the site, and only if a board somehow overflows. */
  max-height: 46vh;
  overflow-y: auto;
  padding-right: 2px;
}

.board li {
  display: grid;
  grid-template-columns: 2.2em 1fr auto;
  align-items: center;
  gap: 10px;
  text-align: left;
  padding: 10px 14px;
  border-radius: 10px;
  background: rgba(255, 255, 255, .04);
  border: 1px solid rgba(255, 255, 255, .08);
  animation: row-in 420ms cubic-bezier(.16, 1, .3, 1) both;
  animation-delay: calc(var(--i, 0) * 45ms);
}

@keyframes row-in {
  from { opacity: 0; transform: translateX(-14px); }
  to   { opacity: 1; transform: none; }
}

.board .rank { color: var(--dim); font-size: 1.05rem; }
.board .who  { color: var(--text); font-size: 1.15rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.board .pts  { color: var(--cyan); font-size: 1.25rem; text-shadow: 0 0 12px rgba(41, 231, 255, .6); }

.board li:nth-child(1) { border-color: rgba(255, 215, 106, .5); background: rgba(255, 215, 106, .08); }
.board li:nth-child(1) .rank, .board li:nth-child(1) .pts { color: var(--gold); text-shadow: 0 0 14px rgba(255, 215, 106, .6); }
.board li:nth-child(2) { border-color: rgba(255, 255, 255, .24); }
.board li:nth-child(3) { border-color: rgba(255, 45, 149, .35); }

.board .crown { color: var(--gold); font-size: .8rem; }

.board-msg {
  display: block !important;
  text-align: center !important;
  color: var(--dim);
  border-style: dashed !important;
  padding: 22px !important;
}

/* ── Privacy ─────────────────────────────────────────────────── */

.panel-doc { gap: 14px; }

.doc-scroll {
  width: min(680px, 100%);
  max-height: 62vh;
  overflow-y: auto;
  text-align: left;
  padding: 22px 24px;
  border-radius: 14px;
  background: rgba(8, 4, 26, .55);
  border: 1px solid rgba(255, 255, 255, .1);
  backdrop-filter: blur(10px);
  font-family: ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: .95rem;
  line-height: 1.62;
  color: #cfc9ea;
}

.doc-scroll h3 {
  margin: 22px 0 8px;
  font-family: 'Jersey 25', monospace;
  font-weight: 400;
  font-size: 1.35rem;
  letter-spacing: .05em;
  color: var(--cyan);
  text-shadow: 0 0 14px rgba(41, 231, 255, .45);
}

.doc-scroll p + p { margin-top: 12px; }
.doc-scroll ul { margin: 10px 0 0 20px; }
.doc-scroll li { margin-bottom: 6px; }
.doc-scroll a { color: var(--pink); }
.doc-scroll code { font-size: .85em; color: var(--gold); }

.doc-meta {
  color: var(--dim);
  font-size: .82rem;
  padding-bottom: 12px;
  margin-bottom: 6px;
  border-bottom: 1px solid rgba(255, 255, 255, .09);
}

/* ── Toast ───────────────────────────────────────────────────── */

.toast {
  position: fixed;
  left: 50%;
  bottom: 34px;
  transform: translate(-50%, 20px);
  padding: 11px 20px;
  border-radius: 999px;
  background: rgba(10, 5, 30, .9);
  border: 1px solid var(--pink);
  box-shadow: 0 0 26px rgba(255, 45, 149, .4);
  color: var(--text);
  letter-spacing: .06em;
  opacity: 0;
  pointer-events: none;
  transition: opacity 260ms ease, transform 260ms cubic-bezier(.16, 1, .3, 1);
  z-index: 10;
}

.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ── Motion / small screens ──────────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  /* Frozen at their keyframe start the UFOs would sit offscreen — just drop them. */
  .drifters { display: none; }
}

@media (max-height: 640px) {
  .hero-stage { height: 96px; }
  .hero-cat { width: 86px; }
  .chips { display: none; }
  .board { max-height: 38vh; }
  .doc-scroll { max-height: 56vh; }
}

@media (max-width: 380px) {
  .cta-row { flex-direction: column; width: 100%; }
  .btn { width: 100%; justify-content: center; }
}
