/* base.css — tokens, type, buttons and the home screen. */

/* Anton (SIL Open Font License 1.1, see /fonts/OFL.txt), self-hosted: no third-party loads. */
@font-face {
  font-family: 'Anton';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/fonts/anton-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Anton';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/fonts/anton-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --space: #070a16;
  --space2: #0d1226;
  --panel: #141a33;
  --panel2: #1d2546;
  --line: #2e3a66;
  --ink: #eaf2ff;
  --ink-dim: #9fb0d6;
  --ink-faint: #64749c;
  --amber: #ffb627;
  --red: #ff4b3e;
  --shield: #3fd8ff;
  --weapon: #ff5ea8;
  --ok: #58e07a;
  --ice: #9ae6ff;
  --heat: #ff7a2f;
  --radius: 16px;
  --font-display: 'Anton', 'Impact', 'Haettenschweiler', 'Arial Narrow Bold', 'Arial Black', sans-serif;
  --font-body: system-ui, -apple-system, 'Segoe UI', Roboto, Ubuntu, sans-serif;
  --font-mono: ui-monospace, 'SFMono-Regular', Menlo, Consolas, 'DejaVu Sans Mono', monospace;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--space);
  background-image:
    radial-gradient(1px 1px at 20% 30%, rgba(255, 255, 255, 0.7), transparent 60%),
    radial-gradient(1px 1px at 70% 80%, rgba(255, 255, 255, 0.5), transparent 60%),
    radial-gradient(1.5px 1.5px at 85% 20%, rgba(255, 255, 255, 0.6), transparent 60%),
    radial-gradient(1px 1px at 40% 65%, rgba(255, 255, 255, 0.4), transparent 60%),
    radial-gradient(ellipse at 50% 120%, rgba(63, 216, 255, 0.10), transparent 60%),
    radial-gradient(ellipse at 10% -10%, rgba(255, 94, 168, 0.08), transparent 50%);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.4;
  overflow-x: hidden;
  -webkit-tap-highlight-color: transparent;
  -webkit-text-size-adjust: 100%;
}
button, input, select { font: inherit; color: inherit; }
a { color: var(--shield); }

#app { min-height: 100%; display: flex; flex-direction: column; }
.screen {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 640px;
  margin: 0 auto;
  padding: calc(18px + var(--safe-t)) 16px calc(22px + var(--safe-b));
  gap: 14px;
}
.center { justify-content: center; text-align: center; }
.grow { flex: 1; }
.row { display: flex; gap: 10px; align-items: center; justify-content: center; flex-wrap: wrap; }
.col { display: flex; flex-direction: column; gap: 10px; align-items: center; }
.hidden { display: none !important; }

.display, h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  margin: 0;
  line-height: 0.95;
}
h1 { font-size: clamp(40px, 11vw, 96px); }
h2 { font-size: clamp(26px, 7vw, 50px); }
h3 { font-size: clamp(20px, 5vw, 30px); }
.muted { color: var(--ink-dim); }
.faint { color: var(--ink-faint); font-size: 14px; }
.mono { font-family: var(--font-mono); }

.logo {
  text-align: center;
  line-height: 0.86;
  filter: drop-shadow(0 6px 0 rgba(0, 0, 0, 0.6));
}
.logo .l1 { display: block; color: var(--ink); font-size: clamp(34px, 9vw, 80px); }
.logo .l2 { display: block; color: var(--red); font-size: clamp(56px, 16vw, 150px); letter-spacing: 0.01em; }
.logo .l3 { display: block; color: var(--amber); font-size: clamp(34px, 9vw, 80px); }
.tagline { font-size: clamp(16px, 4vw, 22px); color: var(--ink-dim); text-align: center; max-width: 30ch; }

/* ── buttons ─────────────────────────────────────────────────────────────── */
.btn {
  appearance: none;
  border: 0;
  border-radius: var(--radius);
  background: var(--amber);
  color: #1f1300;
  font-family: var(--font-display);
  font-size: 24px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 12px 22px;
  min-height: 58px;
  box-shadow: 0 6px 0 #8a5a00, 0 10px 18px rgba(0, 0, 0, 0.5);
  cursor: pointer;
  user-select: none;
  touch-action: manipulation;
  transition: transform 0.06s, box-shadow 0.06s, filter 0.2s;
}
.btn:active { transform: translateY(5px); box-shadow: 0 1px 0 #8a5a00, 0 4px 8px rgba(0, 0, 0, 0.5); }
.btn:disabled { filter: grayscale(1) brightness(0.6); cursor: default; transform: none; }
.btn.red { background: var(--red); color: #1d0200; box-shadow: 0 6px 0 #8c1a12, 0 10px 18px rgba(0, 0, 0, 0.5); }
.btn.cyan { background: var(--shield); color: #00202a; box-shadow: 0 6px 0 #147089, 0 10px 18px rgba(0, 0, 0, 0.5); }
.btn.dark { background: var(--panel2); color: var(--ink); box-shadow: 0 6px 0 #070a16, 0 10px 18px rgba(0, 0, 0, 0.5); }
.btn.small { font-size: 18px; min-height: 42px; padding: 6px 14px; box-shadow: 0 4px 0 #8a5a00; }
.btn.dark.small { box-shadow: 0 4px 0 #070a16; }
.btn.block { width: 100%; }
.btn.huge { font-size: 36px; min-height: 84px; padding: 14px 34px; }

.input {
  width: 100%;
  border: 3px solid var(--line);
  border-radius: var(--radius);
  background: #050814;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 30px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 10px 16px;
  text-align: center;
  outline: none;
}
.input:focus { border-color: var(--shield); }
.input::placeholder { color: #3b4770; }

.panel {
  background: linear-gradient(180deg, var(--panel2), var(--panel));
  border: 2px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  padding: 16px;
  width: 100%;
}
.label {
  font-family: var(--font-display);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-faint);
  font-size: 15px;
}

/* ── toast ─────────────────────────────────────────────────────────────── */
#toast {
  position: fixed;
  left: 50%;
  top: calc(12px + var(--safe-t));
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 100;
  pointer-events: none;
  width: min(92vw, 520px);
}
.toast {
  background: var(--panel2);
  border: 2px solid var(--shield);
  border-radius: 12px;
  padding: 10px 14px;
  font-family: var(--font-display);
  letter-spacing: 0.05em;
  text-align: center;
  font-size: 20px;
  animation: toast-in 0.25s ease-out;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
}
.toast.bad { border-color: var(--red); color: #ffd9d4; }
@keyframes toast-in { from { transform: translateY(-14px); opacity: 0; } }

/* ── home ─────────────────────────────────────────────────────────────── */
.home { gap: 22px; }
.home .cards { display: grid; gap: 16px; width: 100%; }
.home .card { display: flex; flex-direction: column; gap: 12px; align-items: stretch; text-align: center; }
.home .card h3 { color: var(--ink); }
.home .card p { margin: 0; color: var(--ink-dim); font-size: 15px; }
.home .demo-btn { width: 150px; height: 150px; margin: 4px auto 0; }
.promise {
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 18px;
  color: var(--ink-dim);
  text-align: center;
  line-height: 1.35;
}
.promise b { color: var(--amber); font-weight: 400; }
.legal { font-size: 13px; color: var(--ink-faint); text-align: center; }
.legal a { color: var(--ink-faint); }

.spinner {
  width: 46px; height: 46px; border-radius: 50%;
  border: 5px solid var(--panel2); border-top-color: var(--amber);
  animation: spin 0.9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* The big red button (home decoration, phone test button). */
.redbtn {
  position: relative;
  border-radius: 50%;
  border: 0;
  background: radial-gradient(circle at 35% 30%, #ff9a8a 0 12%, #ff3b3b 38%, #b3121b 75%);
  box-shadow: 0 12px 0 #5a0a0e, 0 18px 30px rgba(0, 0, 0, 0.6), inset 0 -6px 14px rgba(0, 0, 0, 0.35);
  cursor: pointer;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  transition: transform 0.05s, box-shadow 0.05s;
}
.redbtn.down, .redbtn:active { transform: translateY(10px); box-shadow: 0 2px 0 #5a0a0e, 0 6px 12px rgba(0, 0, 0, 0.6), inset 0 -3px 10px rgba(0, 0, 0, 0.35); }
