/* Riddlewick — shared stylesheet for the studio site.
   Dark "desk lamp in a dark room" theme: ink-blue surfaces, one warm amber
   accent for anything the visitor should act on, cyan for links inside text. */

:root {
  --ink: #080d17;
  --ink-2: #0e1524;
  --ink-3: #141d2f;
  --line: rgba(255, 255, 255, 0.1);
  --line-strong: rgba(255, 255, 255, 0.18);
  --text: #e9eef8;
  --muted: #98a4bb;
  --amber: #f5b942;
  --amber-ink: #1a1204;
  --amber-soft: rgba(245, 185, 66, 0.13);
  --cyan: #5cd8f0;
  --green: #5ddc9b;
  --shell: 1080px;
  --radius: 16px;
  --radius-sm: 11px;
  font-synthesis-weight: none;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background:
    radial-gradient(1100px 620px at 50% -280px, rgba(245, 185, 66, 0.16), transparent 70%),
    var(--ink);
  color: var(--text);
  font-family: "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.62;
  min-height: 100%;
}

h1, h2, h3 { line-height: 1.2; letter-spacing: -0.02em; margin: 0; }
p { margin: 0; }
img { max-width: 100%; display: block; }

a { color: var(--cyan); text-underline-offset: 3px; }
a:hover { color: #9fe9fa; }

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

.shell {
  width: 100%;
  max-width: var(--shell);
  margin: 0 auto;
  padding: 0 20px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 8px;
  background: var(--amber);
  color: var(--amber-ink);
  padding: 10px 16px;
  border-radius: 999px;
  font-weight: 700;
  z-index: 20;
}
.skip-link:focus { left: 16px; }

/* ── Header ─────────────────────────────────────────────────────────────── */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(8, 13, 23, 0.82);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 62px;
  flex-wrap: wrap;
  padding-top: 8px;
  padding-bottom: 8px;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
  font-size: 17px;
  letter-spacing: 0.01em;
}
.wordmark .flame { width: 22px; height: 22px; flex: none; }
.wordmark:hover { color: var(--text); }

.site-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}
.site-nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  padding: 7px 11px;
  border-radius: 999px;
}
.site-nav a:hover { color: var(--text); background: rgba(255, 255, 255, 0.05); }
.site-nav a[aria-current] { color: var(--amber); background: var(--amber-soft); }

/* ── Buttons and pills ──────────────────────────────────────────────────── */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 20px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font: inherit;
  font-weight: 650;
  font-size: 15px;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.12s ease, background 0.16s ease, border-color 0.16s ease;
}
.button:hover { background: rgba(255, 255, 255, 0.08); color: var(--text); transform: translateY(-1px); }
.button:active { transform: translateY(0); }
.button.primary {
  background: var(--amber);
  border-color: var(--amber);
  color: var(--amber-ink);
}
.button.primary:hover { background: #ffcd63; border-color: #ffcd63; color: var(--amber-ink); }
.button[disabled] { opacity: 0.55; cursor: not-allowed; transform: none; }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--muted);
}
.pill.live { color: var(--green); border-color: rgba(93, 220, 155, 0.42); background: rgba(93, 220, 155, 0.1); }
.pill.soon { color: var(--amber); border-color: rgba(245, 185, 66, 0.42); background: var(--amber-soft); }

.kicker {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--amber);
  margin: 0 0 10px;
}

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

.hero { padding: 76px 0 56px; }
.hero h1 {
  font-size: clamp(34px, 7vw, 58px);
  max-width: 15ch;
  margin-bottom: 18px;
}
.hero .lead {
  font-size: clamp(16px, 2.3vw, 19px);
  color: var(--muted);
  max-width: 60ch;
}
.hero .actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }

/* ── Sections ───────────────────────────────────────────────────────────── */

.section { padding: 44px 0; }
.section-head { margin-bottom: 26px; }
.section-head h2 { font-size: clamp(22px, 3.6vw, 30px); }
.section-head p { color: var(--muted); margin-top: 8px; max-width: 62ch; }

.games {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(272px, 1fr));
}

.game-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 20px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: linear-gradient(180deg, var(--ink-3), var(--ink-2));
}
.game-card-top { display: flex; align-items: center; gap: 14px; }
.game-card img {
  width: 58px;
  height: 58px;
  border-radius: 14px;
  border: 1px solid var(--line-strong);
  flex: none;
}
.game-card h3 { font-size: 19px; margin-bottom: 5px; }
.game-card p { color: var(--muted); font-size: 14.5px; }
.game-card .card-links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: auto; padding-top: 6px; }
.game-card .card-links a { font-size: 14px; font-weight: 600; }

.value-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}
.value-card {
  padding: 20px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--ink-2);
}
.value-card h3 { font-size: 16px; margin-bottom: 7px; }
.value-card p { color: var(--muted); font-size: 14.5px; }

.cta-panel {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 26px;
  border-radius: var(--radius);
  border: 1px solid rgba(245, 185, 66, 0.3);
  background: var(--amber-soft);
  margin: 20px 0 8px;
}
.cta-panel h2 { font-size: 21px; margin-bottom: 6px; }
.cta-panel p { color: var(--muted); font-size: 15px; max-width: 52ch; }

/* ── Document pages (privacy, terms) ────────────────────────────────────── */

.doc-head { padding: 52px 0 26px; border-bottom: 1px solid var(--line); }
.doc-head h1 { font-size: clamp(28px, 5.4vw, 42px); margin-bottom: 12px; }
.doc-head .updated { color: var(--muted); font-size: 14px; }
.doc-head .summary { color: var(--muted); margin-top: 14px; max-width: 68ch; }

.doc-layout {
  display: grid;
  gap: 36px;
  grid-template-columns: 1fr;
  padding: 34px 0 20px;
}

.toc {
  align-self: start;
  padding: 18px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--ink-2);
}
.toc h2 {
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 10px;
}
.toc ol { margin: 0; padding-left: 20px; display: grid; gap: 6px; }
.toc a { font-size: 14px; text-decoration: none; }
.toc a:hover { text-decoration: underline; }

/* Grid children default to min-width:auto, which lets the wide per-game table
   push the whole page sideways instead of scrolling inside its own wrapper. */
.doc-layout > *, .support-layout > * { min-width: 0; }

.doc section { margin-bottom: 30px; scroll-margin-top: 84px; }
.doc h2 { font-size: 20px; margin-bottom: 10px; }
.doc h3 { font-size: 16px; margin: 18px 0 6px; }
.doc p, .doc li { color: #ccd6e8; }
.doc p + p { margin-top: 10px; }
.doc ul { margin: 10px 0 0; padding-left: 22px; display: grid; gap: 7px; }
.doc strong { color: var(--text); }

.table-scroll { overflow-x: auto; margin-top: 14px; }
table {
  border-collapse: collapse;
  width: 100%;
  min-width: 540px;
  font-size: 14.5px;
}
caption {
  text-align: left;
  color: var(--muted);
  font-size: 13.5px;
  padding-bottom: 8px;
}
th, td {
  border: 1px solid var(--line);
  padding: 10px 12px;
  text-align: left;
  vertical-align: top;
}
th { background: var(--ink-3); font-size: 13px; letter-spacing: 0.04em; }
td { color: #ccd6e8; }

/* ── Support page ───────────────────────────────────────────────────────── */

.support-layout {
  display: grid;
  gap: 30px;
  grid-template-columns: 1fr;
  padding: 30px 0 10px;
}

.panel {
  padding: 22px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--ink-2);
}
.panel h2 { font-size: 18px; margin-bottom: 6px; }
.panel > p { color: var(--muted); font-size: 14.5px; }

fieldset { border: 0; margin: 0; padding: 0; }
legend {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 0 0 10px;
}

.game-choices { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.game-choice { position: relative; display: block; cursor: pointer; }
.game-choice input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}
.game-choice .choice-body {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--ink-3);
  transition: border-color 0.16s ease, background 0.16s ease;
}
.game-choice img { width: 38px; height: 38px; border-radius: 10px; flex: none; }
.game-choice span { font-weight: 650; font-size: 14.5px; }
.game-choice:hover .choice-body { border-color: var(--line-strong); }
.game-choice input:checked + .choice-body {
  border-color: var(--amber);
  background: var(--amber-soft);
}
.game-choice input:focus-visible + .choice-body {
  outline: 2px solid var(--amber);
  outline-offset: 3px;
}

.field { display: grid; gap: 7px; margin-top: 18px; }
.field label { font-size: 14px; font-weight: 650; }
.field .hint { color: var(--muted); font-size: 13px; }

input[type="text"], input[type="email"], select, textarea {
  width: 100%;
  padding: 11px 13px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line-strong);
  background: var(--ink-3);
  color: var(--text);
  font: inherit;
  font-size: 15px;
}
textarea { resize: vertical; min-height: 140px; }
input::placeholder, textarea::placeholder { color: #6f7c94; }
input:focus, select:focus, textarea:focus { border-color: var(--amber); outline: none; }
select { appearance: none; background-image: none; }

.form-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-top: 22px; }
.form-note { color: var(--muted); font-size: 13.5px; margin-top: 12px; }
.form-status { font-size: 14px; font-weight: 600; min-height: 20px; margin-top: 12px; }
.form-status.ok { color: var(--green); }
.form-status.warn { color: var(--amber); }

.side-list { display: grid; gap: 10px; margin-top: 14px; }
.side-list a { font-size: 14.5px; font-weight: 600; }

details {
  border-top: 1px solid var(--line);
  padding: 12px 0;
}
details:last-of-type { border-bottom: 1px solid var(--line); }
summary {
  cursor: pointer;
  font-weight: 650;
  font-size: 15px;
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 12px;
}
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; color: var(--amber); font-size: 19px; line-height: 1; }
details[open] summary::after { content: "−"; }
details p { color: var(--muted); font-size: 14.5px; margin-top: 9px; }

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

.site-footer {
  border-top: 1px solid var(--line);
  margin-top: 44px;
  padding: 26px 0 40px;
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
  font-size: 14px;
}
.footer-links { display: flex; flex-wrap: wrap; gap: 16px; }
.footer-links a { text-decoration: none; font-weight: 600; }
.footer-links a:hover { text-decoration: underline; }

@media (min-width: 900px) {
  .doc-layout { grid-template-columns: 250px 1fr; gap: 44px; }
  .toc { position: sticky; top: 84px; }
  .support-layout { grid-template-columns: 1.6fr 1fr; align-items: start; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
  .button:hover { transform: none; }
}
