/* SpinIt public site. Wears the game's Aurora sky: violet horizon, indigo field,
 * teal-navy floor; Rubik display + Nunito text; keycap buttons. One committed look —
 * the sky is dark by design, so no light theme. */

:root {
  --font-display: 'Rubik', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-text: 'Nunito', system-ui, -apple-system, 'Segoe UI', sans-serif;

  --horizon: #4a2f9e;
  --backdrop: #1e2058;
  --ground: #16345a;
  --surface: #2f2d78;
  --surface-raised: #3b388e;
  --surface-sunken: #141640;
  --board: #171947;
  --ink: #ffffff;
  --ink-muted: #b4b8e8;
  --ink-soft: #d6d8f4;
  --outline: rgba(255, 255, 255, 0.24);
  --outline-faint: rgba(255, 255, 255, 0.12);
  --wash: rgba(255, 255, 255, 0.06);
  --accent: #33a1ff;
  --accent-lip: #1c66b8;
  --on-accent: #061226;
  --reward: #ffc933;
  --reward-lip: #b8860b;
  --on-reward: #3a2300;
  --danger: #ff4d6d;
  --success: #3cf06e;
  --goal: #a06bff;

  --radius: 18px;
  --radius-sm: 12px;
  --max: 1040px;
  --max-read: 720px;
}

* { box-sizing: border-box; }

html { color-scheme: dark; scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-text);
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--backdrop);
  background-image: linear-gradient(180deg, var(--horizon) 0%, var(--backdrop) 42%, var(--ground) 100%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.01em;
  margin: 0 0 0.5em;
}
h1 { font-size: clamp(2.1rem, 5.4vw, 3.25rem); font-weight: 900; }
h2 { font-size: clamp(1.6rem, 3.6vw, 2.2rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
strong { font-weight: 800; }
img { max-width: 100%; height: auto; display: block; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 22px; }

/* ── Top bar ── */
.top {
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  background: rgba(30, 32, 88, 0.72);
  border-bottom: 1px solid var(--outline-faint);
}
.top .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 66px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
}
.brand:hover { text-decoration: none; }
.brand img { width: 36px; height: 36px; border-radius: 9px; }
.brand em {
  font-style: normal;
  color: var(--on-accent);
  background: var(--accent);
  border-radius: 7px;
  padding: 0 6px;
  margin-left: 1px;
  box-shadow: 0 2px 0 var(--accent-lip);
}
.links { display: flex; align-items: center; gap: 22px; font-weight: 700; }
.links a { color: var(--ink-soft); }
.links a:hover { color: var(--ink); text-decoration: none; }
.links .key { color: var(--on-accent); }
@media (max-width: 640px) {
  .links a:not(.key) { display: none; }
}

/* ── Keycap buttons ── */
.key {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: 0.01em;
  color: var(--on-accent);
  background: var(--accent);
  border: 0;
  border-radius: 14px;
  padding: 14px 22px;
  box-shadow: 0 5px 0 var(--accent-lip), 0 10px 24px rgba(0, 0, 0, 0.25);
  transition: transform 90ms ease, box-shadow 90ms ease;
  cursor: pointer;
  white-space: nowrap;
}
.key:hover { text-decoration: none; filter: brightness(1.05); }
.key:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--accent-lip); }
.key.gold { background: var(--reward); color: var(--on-reward); box-shadow: 0 5px 0 var(--reward-lip), 0 10px 24px rgba(0, 0, 0, 0.25); }
.key.gold:active { box-shadow: 0 1px 0 var(--reward-lip); }
.key.ghost {
  background: var(--wash);
  color: var(--ink);
  box-shadow: inset 0 0 0 1.5px var(--outline);
}
.key.ghost:active { transform: none; }
.key.key-sm { padding: 9px 14px; font-size: 0.92rem; border-radius: 11px; box-shadow: 0 3px 0 var(--accent-lip); }
.key.key-sm:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--accent-lip); }
.key.soon { opacity: 0.55; cursor: default; pointer-events: none; }
.key svg { width: 22px; height: 22px; flex: none; }

/* ── Hero ── */
.hero {
  padding: clamp(48px, 9vw, 110px) 0 clamp(40px, 7vw, 80px);
}
.hero .wrap {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 48px;
  align-items: center;
}
.eyebrow {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--reward);
  margin-bottom: 14px;
}
.lede { font-size: 1.22rem; color: var(--ink-soft); max-width: 34em; }
.cta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 26px; }
.hero-art { position: relative; display: grid; place-items: center; }
.hero-art img {
  width: min(360px, 78vw);
  border-radius: 22.5%;
  filter: drop-shadow(0 30px 50px rgba(0, 0, 0, 0.45));
}
.hero-art::before {
  content: '';
  position: absolute;
  inset: 10%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(160, 107, 255, 0.45), rgba(51, 161, 255, 0.12) 55%, transparent 72%);
  filter: blur(18px);
  z-index: -1;
}
.fine { font-size: 0.9rem; color: var(--ink-muted); margin-top: 14px; }
@media (max-width: 820px) {
  .hero .wrap { grid-template-columns: 1fr; text-align: center; }
  .hero-art { order: -1; }
  .lede { margin-inline: auto; }
  .cta { justify-content: center; }
}

/* ── Sections ── */
section { padding: clamp(36px, 6vw, 72px) 0; }
.section-head { max-width: 40em; margin-bottom: 30px; }
.section-head p { color: var(--ink-soft); font-size: 1.08rem; }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.step {
  background: var(--surface);
  border: 1px solid var(--outline-faint);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: 0 6px 0 var(--surface-sunken);
}
.step .num {
  display: inline-grid;
  place-items: center;
  width: 38px; height: 38px;
  border-radius: 11px;
  background: var(--reward);
  color: var(--on-reward);
  font-family: var(--font-display);
  font-weight: 900;
  box-shadow: 0 3px 0 var(--reward-lip);
  margin-bottom: 14px;
}
.step p { color: var(--ink-soft); margin: 0; }
@media (max-width: 720px) { .steps { grid-template-columns: 1fr; } }

.board-demo { margin: 34px auto 0; max-width: 560px; }
.board-demo svg { width: 100%; height: auto; display: block; }

.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 900px) { .grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .grid { grid-template-columns: 1fr; } }
.card {
  background: var(--surface);
  border: 1px solid var(--outline-faint);
  border-radius: var(--radius);
  padding: 22px;
}
.card .ico {
  width: 40px; height: 40px;
  border-radius: 12px;
  background: var(--board);
  display: grid; place-items: center;
  margin-bottom: 14px;
  color: var(--accent);
}
.card .ico svg { width: 22px; height: 22px; }
.card h3 { margin-bottom: 6px; }
.card p { color: var(--ink-soft); margin: 0; font-size: 0.98rem; }

.worlds { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }
.pill {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.9rem;
  padding: 7px 13px;
  border-radius: 999px;
  background: var(--board);
  border: 1px solid var(--outline-faint);
  color: var(--ink-soft);
}
.pill b { color: var(--reward); font-weight: 800; margin-right: 6px; }

.band {
  background: var(--board);
  border-top: 1px solid var(--outline-faint);
  border-bottom: 1px solid var(--outline-faint);
}
.band .wrap { display: grid; grid-template-columns: 1fr auto; gap: 26px; align-items: center; }
@media (max-width: 720px) { .band .wrap { grid-template-columns: 1fr; } }

/* ── Footer ── */
.foot {
  padding: 40px 0 46px;
  border-top: 1px solid var(--outline-faint);
  color: var(--ink-muted);
  font-size: 0.95rem;
}
.foot .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px; }
.foot nav { display: flex; flex-wrap: wrap; gap: 20px; }
.foot nav a { color: var(--ink-soft); font-weight: 700; }
.foot p { margin: 0; width: 100%; }

/* ── Documents (privacy, terms, ...) ── */
.doc { max-width: var(--max-read); margin: 0 auto; padding: clamp(36px, 6vw, 72px) 22px 60px; }
.doc header { margin-bottom: 34px; }
.doc .updated { color: var(--ink-muted); font-size: 0.95rem; }
.doc h2 { font-size: 1.45rem; margin-top: 2.2em; padding-top: 0.6em; border-top: 1px solid var(--outline-faint); }
.doc h3 { font-size: 1.08rem; margin-top: 1.6em; }
.doc p, .doc li { color: var(--ink-soft); }
.doc li { margin-bottom: 0.45em; }
.doc ul, .doc ol { padding-left: 1.3em; }
.doc table { width: 100%; border-collapse: collapse; font-size: 0.95rem; margin: 1em 0 1.4em; }
.doc th, .doc td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--outline-faint); }
.doc th { font-family: var(--font-display); font-weight: 800; color: var(--ink); }
.doc .table-scroll { overflow-x: auto; }
.doc .summary {
  background: var(--surface);
  border: 1px solid var(--outline-faint);
  border-left: 4px solid var(--reward);
  border-radius: var(--radius-sm);
  padding: 18px 22px;
  margin: 0 0 1.4em;
}
.doc .summary h3 { margin-top: 0; }
.doc .summary ul { margin: 0; }
.doc .toc { display: flex; flex-wrap: wrap; gap: 8px 18px; padding: 0; margin: 0 0 1em; list-style: none; font-size: 0.95rem; }
.doc .toc a { font-weight: 700; }
.doc .steps-list li { margin-bottom: 0.8em; }
.doc .steps-list li b { color: var(--ink); }
.doc .callout {
  background: rgba(255, 77, 109, 0.14);
  border: 1px solid rgba(255, 77, 109, 0.4);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  color: #ffd2db;
}
.doc .callout p { color: inherit; margin: 0; }
.doc code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.92em; background: var(--board); padding: 2px 6px; border-radius: 6px; }

/* ── FAQ ── */
details {
  background: var(--surface);
  border: 1px solid var(--outline-faint);
  border-radius: var(--radius-sm);
  padding: 4px 18px;
  margin-bottom: 10px;
}
details summary {
  cursor: pointer;
  font-family: var(--font-display);
  font-weight: 800;
  padding: 12px 0;
  color: var(--ink);
  list-style: none;
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
}
details summary::-webkit-details-marker { display: none; }
details summary::after { content: '+'; color: var(--accent); font-size: 1.3rem; font-weight: 900; }
details[open] summary::after { content: '–'; }
details p { color: var(--ink-soft); margin: 0 0 14px; }

/* ── Small screens / motion ── */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .key { transition: none; }
}
.center { text-align: center; }
.mt { margin-top: 24px; }
