/* ============================================================
   GameRot — site styles
   Dark arcade palette lifted from the app's welcome screen.
   ============================================================ */

:root {
  --ink: #0b0616;
  --ink-2: #150a26;
  --surface: rgba(255, 255, 255, 0.045);
  --surface-2: rgba(255, 255, 255, 0.075);
  --border: rgba(255, 255, 255, 0.11);
  --border-lit: rgba(168, 85, 247, 0.45);

  --text: #f5f2fb;
  --muted: #a99ec4;

  --accent: #a855f7;
  --accent-2: #7c3aed;
  --pink: #ec4899;
  --amber: #f59e0b;
  --mint: #10b981;
  --sky: #22a7c4;
  --red: #e0344a;

  --radius: 20px;
  --radius-lg: 28px;
  --shadow: 0 24px 60px -20px rgba(0, 0, 0, 0.9);
  --glow: 0 0 60px -12px rgba(168, 85, 247, 0.55);

  --display: ui-rounded, "SF Pro Rounded", "Hiragino Maru Gothic ProN",
    "Avenir Next", Avenir, "Segoe UI", system-ui, sans-serif;
  --body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, system-ui, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--ink);
  color: var(--text);
  font: 16px/1.65 var(--body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

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

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

/* ── Layout ─────────────────────────────────────────────── */

.shell { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 24px; }
.shell-narrow { max-width: 760px; }

section { position: relative; }

/* ── Site chrome ────────────────────────────────────────── */

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(11, 6, 22, 0.82);
  backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease;
}
.topbar.stuck { border-bottom-color: var(--border); }

.topbar-inner {
  display: flex;
  align-items: center;
  gap: 20px;
  height: 66px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
  font-family: var(--display);
  font-weight: 800;
  font-size: 19px;
  letter-spacing: -0.4px;
  margin-right: auto;
}
.brand-mark {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  object-fit: cover;
  box-shadow: 0 6px 18px -8px rgba(0, 0, 0, 0.9);
}

.topnav { display: flex; align-items: center; gap: 26px; }
.topnav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 14.5px;
  font-weight: 600;
}
.topnav a:hover, .topnav a.active { color: var(--text); }

@media (max-width: 720px) {
  .topnav { display: none; }
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 15px 28px;
  border-radius: 999px;
  font-family: var(--display);
  font-weight: 800;
  font-size: 16px;
  letter-spacing: -0.2px;
  text-decoration: none;
  border: 0;
  cursor: pointer;
  transition: transform 0.16s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.2s ease, background 0.2s ease;
}
.btn-primary {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%);
  color: #fff;
  box-shadow: 0 10px 30px -10px rgba(168, 85, 247, 0.85);
}
.btn-primary:hover { transform: translateY(-2px) scale(1.02); box-shadow: 0 16px 40px -12px rgba(168, 85, 247, 0.95); }
.btn-ghost {
  background: var(--surface-2);
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-ghost:hover { transform: translateY(-2px); background: rgba(255, 255, 255, 0.11); }
.btn-sm { padding: 10px 20px; font-size: 14.5px; }

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

.hero {
  padding: 72px 0 40px;
  text-align: center;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  top: -320px;
  left: 50%;
  transform: translateX(-50%);
  width: 900px;
  height: 700px;
  background: radial-gradient(closest-side, rgba(124, 58, 237, 0.5), transparent 70%);
  pointer-events: none;
  z-index: -1;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 7px 8px 7px 8px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  font-size: 13.5px;
  color: var(--muted);
  text-decoration: none;
  margin-bottom: 26px;
}
.pill b {
  background: rgba(168, 85, 247, 0.18);
  color: #d8b4fe;
  border-radius: 999px;
  padding: 3px 10px;
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.7px;
  text-transform: uppercase;
}
.pill span { padding-right: 10px; }

h1 {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(40px, 8.2vw, 82px);
  line-height: 0.98;
  letter-spacing: -2.6px;
  margin: 0 0 18px;
}
h1 em {
  font-style: normal;
  background: linear-gradient(120deg, #c084fc, var(--pink) 70%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.lede {
  font-size: clamp(17px, 2.2vw, 20px);
  color: var(--muted);
  max-width: 610px;
  margin: 0 auto 30px;
  line-height: 1.6;
}

.cta-row {
  display: flex;
  gap: 14px;
  justify-content: center;
  align-items: flex-start;
  flex-wrap: wrap;
}
.cta-note { margin-top: 16px; font-size: 13.5px; color: var(--muted); }

/* Jumping to #waitlist must clear the sticky header, and land with the
   headline above the form still in view rather than the form flush at the
   very top of the window. */
#waitlist { scroll-margin-top: 180px; }

/* ── Waitlist form ──────────────────────────────────────── */

.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;
}

.waitlist {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
  position: relative;
}
.waitlist-input {
  width: 260px;
  padding: 15px 22px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  font: 600 16px/1 var(--body);
  transition: border-color 0.16s ease, background 0.16s ease;
}
.waitlist-input::placeholder { color: var(--muted); font-weight: 500; }
.waitlist-input:hover { border-color: var(--border-lit); }
.waitlist-input:focus { outline: none; border-color: var(--accent); background: rgba(255, 255, 255, 0.1); }
.waitlist-input[aria-invalid="true"] { border-color: var(--red); }
.waitlist button[disabled] { opacity: 0.6; cursor: default; transform: none; }

/* The honeypot: a real field, hidden from people, catnip for bots. */
.waitlist-trap {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.waitlist-msg {
  flex-basis: 100%;
  margin: 0;
  min-height: 20px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--mint);
}
.waitlist-msg[data-state="error"] { color: #fca5a5; }

@media (max-width: 470px) {
  .waitlist { width: 100%; }
  .waitlist-input { width: 100%; }
  .waitlist .btn { width: 100%; }
}

/* ── Phone mock ─────────────────────────────────────────── */

.stage {
  margin-top: 52px;
  display: flex;
  justify-content: center;
}

.phone {
  position: relative;
  width: 300px;
  flex: none;
  padding: 11px;
  border-radius: 46px;
  background: linear-gradient(160deg, #3b2a55, #16101f);
  box-shadow: var(--shadow), var(--glow);
}
.phone::after {
  content: "";
  position: absolute;
  top: 22px;
  left: 50%;
  transform: translateX(-50%);
  width: 92px;
  height: 24px;
  background: #05030a;
  border-radius: 999px;
  z-index: 3;
}
.screen {
  position: relative;
  height: 620px;
  border-radius: 36px;
  overflow: hidden;
  background: #0d0618;
}
.reel { animation: reel 15s cubic-bezier(0.7, 0, 0.2, 1) infinite; }
.reel img { width: 100%; height: 620px; object-fit: cover; object-position: top; }

@keyframes reel {
  0%, 26%    { transform: translateY(0); }
  33%, 59%   { transform: translateY(-620px); }
  66%, 92%   { transform: translateY(-1240px); }
  100%       { transform: translateY(-1860px); }
}

.swipe-hint {
  position: absolute;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  border-radius: 999px;
  background: rgba(10, 5, 18, 0.72);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border);
  font-size: 12.5px;
  font-weight: 700;
  color: #e9d5ff;
  white-space: nowrap;
}
.swipe-hint::before {
  content: "↑";
  animation: nudge 1.6s ease-in-out infinite;
}
@keyframes nudge {
  0%, 100% { transform: translateY(2px); opacity: 0.55; }
  50% { transform: translateY(-3px); opacity: 1; }
}

/* ── Feature rows ───────────────────────────────────────── */

.feature {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 64px;
  padding: 96px 0;
}
.feature + .feature { border-top: 1px solid var(--border); }
.feature.flip .feature-art { order: -1; }

.eyebrow {
  font-size: 12.5px;
  font-weight: 800;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 14px;
}

h2 {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(28px, 4vw, 40px);
  line-height: 1.08;
  letter-spacing: -1.2px;
  margin: 0 0 16px;
}

.feature p { color: var(--muted); font-size: 17px; margin: 0 0 14px; }

.ticks { list-style: none; padding: 0; margin: 22px 0 0; }
.ticks li {
  position: relative;
  padding-left: 30px;
  margin-bottom: 12px;
  color: var(--muted);
}
.ticks li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 7px;
  width: 16px;
  height: 16px;
  border-radius: 6px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
}
.ticks li strong { color: var(--text); }

@media (max-width: 860px) {
  .feature { grid-template-columns: 1fr; gap: 40px; padding: 64px 0; }
  .feature.flip .feature-art { order: 0; }
}

/* Art panels inside feature rows */
.panel {
  background: linear-gradient(165deg, var(--ink-2), #0d0719);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow);
}

/* score card */
.scorecard { display: grid; gap: 10px; }
.scorecard .row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 13px 16px;
  border-radius: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
}
.scorecard .row span { font-weight: 600; }
.scorecard .row b { margin-left: auto; font-family: var(--display); font-size: 16px; color: #d8b4fe; }
.scorecard .row.top { border-color: var(--border-lit); background: rgba(168, 85, 247, 0.11); }

/* ── Games grid ─────────────────────────────────────────── */

.games { padding: 96px 0; border-top: 1px solid var(--border); }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 40px; }
.section-head p { color: var(--muted); font-size: 17px; margin: 0; }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(158px, 1fr));
  gap: 14px;
}
.tile {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 15px;
  border-radius: 17px;
  background: var(--surface);
  border: 1px solid var(--border);
  transition: transform 0.16s cubic-bezier(0.34, 1.56, 0.64, 1), border-color 0.16s ease, background 0.16s ease;
}
.tile:hover {
  transform: translateY(-3px) rotate(-1deg);
  border-color: var(--border-lit);
  background: var(--surface-2);
}
.tile .ico {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex: none;
  border-radius: 12px;
  font-family: var(--display);
  font-size: 17px;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(140deg, var(--c1), var(--c2));
}
.tile .name {
  font-family: var(--display);
  font-weight: 700;
  font-size: 14.5px;
  letter-spacing: -0.2px;
  line-height: 1.25;
}
.tile[hidden] { display: none; }

.grid-note { text-align: center; color: var(--muted); font-size: 15px; margin-top: 22px; }
.grid-note strong { color: var(--text); font-family: var(--display); font-size: 17px; }

/* Only a couple of rows are shown; the rest of the line-up fades out. */
.grid-peek { position: relative; }
.grid-fade {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 130px;
  pointer-events: none;
  background: linear-gradient(to bottom, transparent, var(--ink) 88%);
}

/* ── Photo panel ────────────────────────────────────────── */

.photo {
  margin: 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}
.photo img { width: 100%; height: auto; }

.soon {
  display: inline-block;
  margin-left: 4px;
  padding: 2px 9px;
  border-radius: 999px;
  background: rgba(168, 85, 247, 0.16);
  border: 1px solid var(--border-lit);
  color: #d8b4fe;
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.4px;
  text-transform: uppercase;
}

.scorecard .row.dim { opacity: 0.55; }
.scorecard .row.dim b { color: var(--muted); font-size: 13px; }

/* Two columns rather than one long ribbon of 77 on a phone. */
@media (max-width: 470px) {
  .grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  /* Two columns means the same peek is three rows, not two. */
  .grid .tile:nth-child(n + 7) { display: none; }
  .grid-fade { height: 96px; }
  .tile { padding: 11px 12px; gap: 9px; }
  .tile .ico { width: 32px; height: 32px; font-size: 16px; border-radius: 10px; }
  .tile .name { font-size: 13px; }
}

/* ── FAQ ────────────────────────────────────────────────── */

.faq { padding: 96px 0; border-top: 1px solid var(--border); }
.faq-list { max-width: 760px; margin: 36px auto 0; }
details {
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface);
  margin-bottom: 12px;
  overflow: hidden;
}
details[open] { border-color: var(--border-lit); }
summary {
  cursor: pointer;
  list-style: none;
  padding: 19px 22px;
  font-family: var(--display);
  font-weight: 700;
  font-size: 16.5px;
  display: flex;
  align-items: center;
  gap: 14px;
}
summary::-webkit-details-marker { display: none; }
summary::after {
  content: "+";
  margin-left: auto;
  font-size: 22px;
  color: var(--accent);
  line-height: 1;
  transition: transform 0.2s ease;
}
details[open] summary::after { transform: rotate(45deg); }
details p { margin: 0; padding: 0 22px 20px; color: var(--muted); }

/* ── Closing CTA ────────────────────────────────────────── */

.closer {
  margin: 96px 0;
  padding: 76px 32px;
  text-align: center;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-lit);
  background:
    radial-gradient(120% 140% at 50% 0%, rgba(168, 85, 247, 0.3), transparent 62%),
    linear-gradient(180deg, var(--ink-2), #0c0618);
}
.closer h2 { margin-bottom: 12px; }
.closer p { color: var(--muted); max-width: 480px; margin: 0 auto 28px; }

/* ── Footer ─────────────────────────────────────────────── */

.site-footer {
  border-top: 1px solid var(--border);
  padding: 44px 0 60px;
  color: var(--muted);
  font-size: 14px;
}
.footer-inner { display: flex; flex-wrap: wrap; gap: 20px; align-items: center; }
.footer-links { display: flex; flex-wrap: wrap; gap: 22px; margin-left: auto; }
.site-footer a { color: var(--muted); text-decoration: none; }
.site-footer a:hover { color: var(--text); }

/* ── Legal / content pages ──────────────────────────────── */

.doc { padding: 56px 0 40px; }
.doc h1 { font-size: clamp(30px, 5vw, 42px); letter-spacing: -1.4px; margin-bottom: 10px; }
.doc h2 { font-size: 21px; margin: 38px 0 12px; letter-spacing: -0.4px; }
.doc h3 { font-size: 16px; margin: 26px 0 8px; color: var(--accent); font-family: var(--display); }
.doc p, .doc li { color: #cdd3e1; }
.doc a { text-decoration: underline; text-underline-offset: 3px; }
.updated { color: var(--muted); font-size: 14px; margin: 0 0 32px; }

table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
  font-size: 14px;
  display: block;
  overflow-x: auto;
}
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--border); vertical-align: top; }
th { color: var(--muted); font-weight: 600; white-space: nowrap; }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin: 24px 0;
}
.card.warn { border-color: rgba(224, 52, 74, 0.4); background: rgba(224, 52, 74, 0.09); }

code { background: rgba(255, 255, 255, 0.08); padding: 2px 6px; border-radius: 5px; font-size: 13px; }
ol li, ul li { margin-bottom: 8px; }

/* ── Scroll reveal ──────────────────────────────────────── */

/* Hidden only once the script has confirmed it is running, so a blocked or
   broken script can never leave a section permanently invisible. */
.reveal { transition: opacity 0.6s ease, transform 0.6s ease; }
.js .reveal { opacity: 0; transform: translateY(24px); }
.js .reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001s !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001s !important;
  }
  .reveal { opacity: 1; transform: none; }
  .reel { animation: none; }
}
