/* Shared base for every page: reset, waitlist form, nav, footer, legal pages. Page themes live in night.css and realm.css. */

:root {
  --bg: #0a0a0c;
  --ink: #f4eee2;
  --soft: #b9b1a3;
  --line: rgba(244, 238, 226, 0.14);
  --accent: #ff7a1a;
  --accent-deep: #a83c00;
  --accent-ink: #160a02;
  --ok: #9ee37d;
  --bad: #ff6b5b;
  --pad: clamp(20px, 5vw, 72px);
  --display: "Anton", "Impact", "Arial Narrow", sans-serif;
  --label: "Barlow Condensed", "Arial Narrow", sans-serif;
  --body: "Barlow", system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  background: var(--bg); color: var(--ink);
  font: 400 17px/1.6 var(--body);
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
/* Film grain over everything; pointer-events off so it never blocks taps. */
body::after {
  content: ""; position: fixed; inset: 0; z-index: 60; pointer-events: none;
  background: url("img/tex/grain.webp"); opacity: 0.07; mix-blend-mode: overlay;
}
a { color: inherit; }
img { display: block; max-width: 100%; }
[hidden] { display: none !important; }
::selection { background: var(--accent); color: var(--accent-ink); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

h1, h2, h3 { font-family: var(--display); font-weight: 400; line-height: 0.95; letter-spacing: 0.005em; text-transform: uppercase; text-wrap: balance; }

.label { font: 700 14px/1.2 var(--label); letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent); }
.art-label {
  position: absolute; z-index: 2; right: var(--pad); bottom: 14px;
  font: 600 12px/1 var(--label); letter-spacing: 0.12em; text-transform: uppercase; color: rgba(244, 238, 226, 0.6);
}

/* ── Buttons and the waitlist form ─────────────────────── */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 54px; padding: 0 28px; border: 0; cursor: pointer; text-decoration: none; white-space: nowrap;
  font: 700 19px/1 var(--label); letter-spacing: 0.08em; text-transform: uppercase;
  clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
  transition: transform 0.12s, filter 0.2s;
}
.btn:hover { transform: translateY(-2px); filter: brightness(1.08); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.7; cursor: default; transform: none; }
.btn:focus-visible, input:focus-visible, a:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
.btn-primary { background: var(--accent); color: var(--accent-ink); box-shadow: inset 0 -5px 0 var(--accent-deep); }
.btn-ghost { background: rgba(10, 10, 12, 0.55); color: var(--ink); box-shadow: inset 0 0 0 2px rgba(244, 238, 226, 0.7); }
.btn-play::before { content: ""; border-style: solid; border-width: 7px 0 7px 11px; border-color: transparent transparent transparent currentColor; }

.wl { display: flex; gap: 10px; margin-top: 28px; max-width: 580px; }
.wl .hp { position: absolute; left: -10000px; width: 1px; height: 1px; opacity: 0; }
.wl input {
  flex: 1 1 auto; min-width: 0; min-height: 54px; padding: 0 18px;
  font: 500 17px/1 var(--body); color: var(--ink);
  background: rgba(10, 10, 12, 0.72); border: 2px solid rgba(244, 238, 226, 0.35); border-radius: 0;
}
.wl input::placeholder { color: #8f887c; }
.wl input:focus { border-color: var(--accent); outline: none; }
.wl-msg { margin-top: 12px; font: 700 17px/1.35 var(--label); letter-spacing: 0.03em; color: var(--ok); }
.wl-msg.err { color: var(--bad); }
.wl-msg:empty { margin-top: 0; }

/* ── Nav ─────────────────────────────────────────────── */

.nav {
  position: fixed; inset: 0 0 auto; z-index: 40;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: max(12px, env(safe-area-inset-top)) var(--pad) 12px;
  transition: background 0.3s;
}
.nav.scrolled { background: rgba(10, 10, 12, 0.92); box-shadow: 0 1px 0 var(--line); }
.nav nav { display: flex; align-items: center; gap: clamp(16px, 2.4vw, 32px); }
.nav nav a:not(.btn) { text-decoration: none; font: 700 15px/1 var(--label); letter-spacing: 0.12em; text-transform: uppercase; color: var(--soft); }
.nav nav a:not(.btn):hover { color: var(--ink); }
.nav .btn { min-height: 42px; padding: 0 16px; font-size: 15px; }

.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font: 400 28px/1 var(--display); letter-spacing: 0.02em; text-transform: uppercase; }
.brand-mark {
  position: relative; width: 24px; height: 22px; display: inline-block;
  background: var(--accent); border-radius: 46% 46% 42% 42%;
  box-shadow: inset -4px -3px 0 rgba(0, 0, 0, 0.25);
}
.brand-mark::before { content: ""; position: absolute; left: 50%; top: -6px; width: 4px; height: 7px; transform: translateX(-50%) rotate(10deg); background: #6fae4a; }
.brand-mark::after { content: ""; position: absolute; left: 5px; right: 5px; top: 9px; height: 4px; background: var(--accent-ink); clip-path: polygon(0 0, 20% 100%, 40% 0, 60% 100%, 80% 0, 100% 100%, 100% 0); }

/* ── Footer, toast, reveal ───────────────────────────── */

.footer {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px;
  padding: 36px var(--pad) max(36px, env(safe-area-inset-bottom)); border-top: 1px solid var(--line);
  color: var(--soft); font-size: 14px;
}
.footer .brand { font-size: 24px; color: var(--ink); }
.footer nav { display: flex; gap: 22px; font: 700 15px/1 var(--label); letter-spacing: 0.1em; text-transform: uppercase; }
.footer nav a { text-decoration: none; }
.footer nav a:hover { color: var(--ink); }

.toast {
  position: fixed; left: 50%; bottom: 28px; z-index: 50; transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  background: var(--ink); color: var(--bg); padding: 13px 22px; font: 700 16px/1 var(--label); transition: opacity 0.25s, transform 0.25s;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.visible { opacity: 1; transform: none; }

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

.legal { max-width: 760px; margin: 0 auto; padding: 140px var(--pad) 110px; }
.legal .eyebrow { font: 700 14px/1.2 var(--label); letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent); }
.legal h1 { font-size: clamp(56px, 9vw, 96px); margin-top: 10px; }
.legal .legal-date { margin-top: 16px; color: var(--soft); font: 600 15px/1.4 var(--label); letter-spacing: 0.06em; text-transform: uppercase; }
.legal .legal-tldr { margin: 40px 0 12px; padding: 24px 26px; border: 2px solid var(--line); background: #131316; }
.legal .legal-tldr p { margin-top: 0; color: var(--ink); }
.legal .legal-tldr ul { margin-top: 12px; }
.legal h2 { font-size: 34px; margin-top: 56px; }
.legal h3 { font: 700 18px/1.4 var(--body); text-transform: none; margin-top: 34px; }
.legal p, .legal li { color: var(--soft); font-size: 17px; }
.legal p { margin-top: 14px; }
.legal ul { margin-top: 14px; padding-left: 20px; }
.legal li + li { margin-top: 8px; }
.legal strong { color: var(--ink); font-weight: 600; }
.legal a { color: var(--accent); }
.legal table { width: 100%; margin-top: 18px; border-collapse: collapse; font-size: 15px; table-layout: fixed; }
.legal th:first-child, .legal td:first-child { width: 44%; }
.legal th, .legal td { text-align: left; vertical-align: top; padding: 12px 14px 12px 0; border-bottom: 1px solid var(--line); }
.legal th { color: var(--ink); font: 700 13px/1.4 var(--label); letter-spacing: 0.1em; text-transform: uppercase; }
.legal td { color: var(--soft); }
.legal .caps { font-size: 14px; letter-spacing: 0.01em; }

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

@media (max-width: 640px) {
  body { font-size: 16px; }
  .nav nav a:not(.btn) { display: none; }
  .brand { font-size: 24px; }
  .btn { width: 100%; }
  .nav .btn { width: auto; }
  .wl { flex-direction: column; margin-top: 20px; }
  .footer { flex-direction: column; align-items: flex-start; }
  .legal table, .legal thead, .legal tbody, .legal tr, .legal th, .legal td { display: block; }
  .legal thead { display: none; }
  .legal tr { padding: 10px 0; border-bottom: 1px solid var(--line); }
  .legal td { border: 0; padding: 2px 0; }
  .legal td:first-child { color: var(--ink); width: auto; }
}
