/* arxor.io: the waitlist page. Colours and type come from the app's Night Arcade theme (Theme.Color, Bungee). */

@font-face {
  font-family: "Bungee";
  src: url("/fonts/Bungee-Regular.ttf") format("truetype");
  font-display: swap;
}

:root {
  color-scheme: dark;
  --ink: #0B0E1A;
  --surface: #151A2E;
  --raised: #1E2440;
  --line: #2A3256;
  --line-strong: #3A4470;
  --text: #F4F6FF;
  --dim: #A9B1D6;
  --muted: #6B7499;
  /* P1–P4, as on the TV and the phones. */
  --cyan: #2EE6D6;
  --blaze: #FF5A36;
  --gold: #FFC83D;
  --violet: #9B7BFF;
  /* The games' own colours. */
  --pigeon: #FF8A3D;
  --zombie: #7CE84A;
  --danger: #FF3D5A;

  --display: "Bungee", "Arial Black", sans-serif;
  --body: ui-rounded, "SF Pro Rounded", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --gutter: clamp(20px, 4vw, 40px);
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--ink);
  color: var(--text);
  font: 400 1.0625rem/1.55 var(--body);
  -webkit-font-smoothing: antialiased;
}

img, video { display: block; max-width: 100%; }

/* `hidden` wins over any display set below (the form is display: flex). */
[hidden] { display: none !important; }

a { color: var(--cyan); }

:focus-visible { outline: 3px solid var(--cyan); outline-offset: 3px; border-radius: 6px; }

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

.skip {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--text); color: var(--ink); padding: 10px 16px; border-radius: 10px; font-weight: 700;
}
.skip:focus { top: 12px; }

.no-wrap { white-space: nowrap; }

h1, h2, h3 { font-family: var(--display); font-weight: 400; margin: 0; letter-spacing: 0.01em; }

/* ---------- Hero: the living room, with the game live on its TV ---------- */

.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  overflow: hidden;
  isolation: isolate;
}

.room { position: absolute; inset: 0; z-index: -2; background: #07080f; }

/* The room in its own pixels, scaled (by site.js) to cover the hero, cropping the bottom first so the TV stays. */
.stage {
  position: absolute;
  left: 50%;
  top: 0;
  transform-origin: top center;
  transform: translateX(-50%) scale(var(--s, 1.2));
}
.stage-wide { width: 1280px; height: 720px; }
/* The TV sits right of centre in the portrait room, so that room is anchored right and crops from the left. */
.stage-tall { width: 720px; height: 1280px; display: none; left: auto; right: 0; transform-origin: top right; transform: scale(var(--s, 0.66)); }
@media (max-aspect-ratio: 1/1) {
  .stage-wide { display: none; }
  .stage-tall { display: block; }
}

.stage .tv {
  position: absolute; left: 0; top: 0;
  width: 1920px; height: 1080px; max-width: none;
  transform-origin: 0 0;
  object-fit: cover;
  background: #000;
}
.stage img { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; }

/* Behind each keyed phone screen: that player's colour, as if their controller were lit. */
.glow {
  position: absolute;
  border-radius: 5px;
  background: linear-gradient(170deg, color-mix(in srgb, var(--c) 70%, #fff) 0%, var(--c) 45%, color-mix(in srgb, var(--c) 40%, #000) 100%);
  box-shadow: 0 0 14px var(--c);
}

.hero-shade {
  position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(to top, var(--ink) 2%, rgb(11 14 26 / 0.9) 26%, rgb(11 14 26 / 0.35) 52%, rgb(11 14 26 / 0) 66%),
    linear-gradient(to bottom, rgb(11 14 26 / 0.55), rgb(11 14 26 / 0) 18%);
}

.topbar {
  position: absolute; top: 0; left: 0; right: 0;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: max(18px, env(safe-area-inset-top)) var(--gutter) 0;
}

.brand {
  display: inline-flex; align-items: center; gap: 10px;
  color: var(--text); text-decoration: none;
  font: 1.35rem/1 var(--display);
  text-shadow: 0 2px 12px rgb(0 0 0 / 0.6);
}

.hero-copy {
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  padding: 0 var(--gutter) max(40px, env(safe-area-inset-bottom));
  text-align: center;
}

h1 {
  font-size: clamp(1.85rem, 7.3vw, 4.4rem);
  line-height: 0.98;
  text-shadow: 0 4px 0 rgb(11 14 26 / 0.8), 0 0 40px rgb(0 0 0 / 0.6);
}

/* Bungee draws lowercase as capitals; "iPhone" keeps Apple's spelling in the rounded face. */
h1 .product, .joined-title .product {
  font-family: var(--body);
  font-weight: 900;
  font-size: 1.08em;
  letter-spacing: -0.01em;
  color: var(--cyan);
}

.lede {
  margin: 18px auto 26px;
  max-width: 34em;
  font-size: clamp(1.05rem, 2.2vw, 1.25rem);
  color: var(--text);
  text-shadow: 0 1px 10px rgb(0 0 0 / 0.7);
}
.lede strong { color: var(--cyan); font-weight: 700; }

/* ---------- The sign-up ---------- */

.join { max-width: 560px; margin: 0 auto; }

.join-form { display: flex; gap: 10px; }

.join-form input {
  flex: 1; min-width: 0;
  height: 60px;
  padding: 0 20px;
  border-radius: 16px;
  border: 2px solid var(--line-strong);
  background: rgb(21 26 46 / 0.92);
  color: var(--text);
  font: 600 1.0625rem var(--body);
}
.join-form input::placeholder { color: var(--muted); }
.join-form input:focus { outline: none; border-color: var(--cyan); box-shadow: 0 0 0 4px rgb(46 230 214 / 0.2); }
.join-form input[aria-invalid="true"] { border-color: var(--danger); }

/* The arcade button from the ads' end card. */
.cta {
  height: 60px;
  padding: 0 26px;
  border: 0;
  border-radius: 999px;
  background: var(--blaze);
  color: var(--ink);
  font: 1.05rem/1 var(--display);
  letter-spacing: 0.02em;
  cursor: pointer;
  box-shadow: 0 6px 0 #9A2A12, 0 0 34px rgb(255 90 54 / 0.45);
  transition: transform 0.08s ease, box-shadow 0.08s ease;
  white-space: nowrap;
}
.cta:hover { filter: brightness(1.06); }
.cta:active { transform: translateY(4px); box-shadow: 0 2px 0 #9A2A12, 0 0 24px rgb(255 90 54 / 0.4); }
.cta[aria-busy="true"] { opacity: 0.75; cursor: progress; }

.trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.status { min-height: 1.5em; margin: 10px 0 0; font-weight: 600; color: var(--gold); }
.status:empty { margin: 0; min-height: 0; }

.note { margin: 12px 0 0; font-size: 0.9rem; color: var(--dim); }

.joined { text-align: center; }
.joined:focus { outline: none; }
.joined-title {
  margin: 0;
  font: clamp(2rem, 6vw, 2.75rem)/1 var(--display);
  color: var(--cyan);
  text-shadow: 0 0 30px rgb(46 230 214 / 0.45);
}
.joined-body { margin: 10px 0 18px; }

/* The Multiplayer hub's seats: P1 is you, the rest are open for friends. */
.seats { list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 0 0 18px; padding: 0; }
.seat {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 10px 4px;
  border-radius: 14px;
  border: 2px dashed var(--line-strong);
  color: var(--muted);
}
.seat-id { font: 1.25rem/1 var(--display); }
.seat-role { font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; }
.seat.taken {
  border: 2px solid var(--c);
  color: var(--c);
  background: color-mix(in srgb, var(--c) 12%, transparent);
  box-shadow: 0 0 18px color-mix(in srgb, var(--c) 35%, transparent);
}

.share-row { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.share-row button {
  height: 46px; padding: 0 20px; border-radius: 999px; cursor: pointer;
  font: 700 0.95rem var(--body);
  border: 2px solid var(--line-strong); background: var(--raised); color: var(--text);
}
.share-row .share { border-color: var(--cyan); }
.follow { margin: 16px 0 0; font-size: 0.9rem; color: var(--dim); }
.follow a { color: var(--cyan); font-weight: 700; text-underline-offset: 3px; }

/* ---------- Sections ---------- */

.section {
  max-width: 1160px;
  margin: 0 auto;
  padding: clamp(64px, 11vw, 128px) var(--gutter) 0;
}

h2 { font-size: clamp(1.9rem, 4.6vw, 3.1rem); line-height: 1.02; margin-bottom: clamp(28px, 4vw, 44px); }

.clip {
  position: relative;
  aspect-ratio: 1;
  border-radius: 20px;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
}
.clip.wide { aspect-ratio: 16 / 9; }
.clip video { width: 100%; height: 100%; object-fit: cover; }

/* How it plays: a real sequence, so the steps are numbered, in the app's calibration-step badges. */
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: clamp(36px, 4vw, 28px); grid-template-columns: repeat(3, 1fr); }
.step { position: relative; }
.badge {
  position: absolute; top: 14px; left: 14px;
  width: 44px; height: 44px;
  display: grid; place-items: center;
  border-radius: 50%;
  border: 3px solid var(--cyan);
  background: var(--raised);
  color: var(--cyan);
  font: 1.1rem/1 var(--display);
}
.step h3 { margin: 18px 0 8px; font-size: 1.3rem; }
.step p { margin: 0; color: var(--dim); }

.cards { display: grid; gap: 20px; grid-template-columns: repeat(3, 1fr); }
.card {
  padding: 12px 12px 22px;
  border-radius: 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: inset 0 3px 0 var(--c);
}
.card .clip { border-radius: 16px; border: 0; }
.card h3 { margin: 18px 10px 6px; font-size: 1.35rem; color: var(--c); }
.card p { margin: 0 10px; color: var(--dim); }

.player { position: relative; border-radius: 24px; overflow: hidden; border: 1px solid var(--line); background: #000; }
.player video { width: 100%; aspect-ratio: 16 / 9; }
.play {
  position: absolute; inset: 0; margin: auto;
  width: 96px; height: 96px; border-radius: 50%;
  border: 0; cursor: pointer;
  background: var(--blaze);
  box-shadow: 0 6px 0 #9A2A12, 0 0 50px rgb(255 90 54 / 0.5);
}
.play span {
  display: block; width: 0; height: 0; margin: 0 auto;
  border-style: solid; border-width: 18px 0 18px 30px;
  border-color: transparent transparent transparent var(--ink);
  transform: translateX(4px);   /* optical centre of the triangle */
}
.player.playing .play { display: none; }

.faq details { border-top: 1px solid var(--line); }
.faq details:last-of-type { border-bottom: 1px solid var(--line); }
.faq summary {
  list-style: none;
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 22px 4px;
  font-size: 1.15rem; font-weight: 700;
  cursor: pointer;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  flex: none;
  font: 1.6rem/1 var(--display);
  color: var(--cyan);
  transition: transform 0.2s ease;
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin: 0 4px 24px; max-width: 46em; color: var(--dim); }

.last { padding-bottom: clamp(64px, 10vw, 112px); }
.last-card {
  padding: clamp(36px, 6vw, 64px) var(--gutter);
  border-radius: 32px;
  text-align: center;
  border: 1px solid var(--line);
  background:
    radial-gradient(60% 80% at 100% 0%, rgb(255 90 54 / 0.22), transparent 70%),
    radial-gradient(60% 80% at 0% 100%, rgb(46 230 214 / 0.16), transparent 70%),
    var(--surface);
}
.last-card h2 { margin-bottom: 10px; }
.last-card > p { margin: 0 0 26px; color: var(--dim); }

.footer {
  max-width: 1160px; margin: 0 auto;
  padding: 36px var(--gutter) max(40px, env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  display: grid; gap: 14px;
}
.footer .brand { font-size: 1.1rem; text-shadow: none; }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.footer-links a, .link {
  color: var(--dim); text-decoration: underline; text-underline-offset: 3px;
  background: none; border: 0; padding: 0; font: inherit; cursor: pointer;
}
.fine { margin: 0; font-size: 0.8rem; color: var(--muted); max-width: 60em; }

/* ---------- Consent (EU, UK and on request) ---------- */

.consent {
  position: fixed; z-index: 50;
  left: 50%; bottom: max(16px, env(safe-area-inset-bottom));
  transform: translateX(-50%);
  width: min(560px, calc(100% - 24px));
  padding: 20px 22px;
  border-radius: 20px;
  background: var(--raised);
  border: 1px solid var(--line-strong);
  box-shadow: 0 20px 60px rgb(0 0 0 / 0.6);
}
.consent p { margin: 0 0 14px; color: var(--dim); font-size: 0.95rem; }
.consent .consent-title { margin-bottom: 6px; color: var(--text); font-weight: 700; font-size: 1.05rem; }
.consent-actions { display: flex; gap: 10px; }
.consent-actions button {
  flex: 1; height: 46px; border-radius: 999px; cursor: pointer;
  font: 700 1rem var(--body);
  border: 2px solid var(--line-strong); background: var(--surface); color: var(--text);
}
.consent-actions .allow { background: var(--text); color: var(--ink); border-color: var(--text); }

/* ---------- Small screens ---------- */

@media (max-width: 820px) {
  .steps, .cards { grid-template-columns: 1fr; }
  .steps { gap: 44px; }
  .clip { max-width: 520px; }
}

@media (max-width: 560px) {
  .join-form { flex-direction: column; }
  .cta { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .cta, .faq summary::after { transition: none; }
}
