/* ============================================================================
   Kismet — Let Fate Decide
   tokens.css — the ONE shared stylesheet (brand tokens §12 + component library)
   Phase 0, pre-code static mockups. No build step, no CDNs, system fonts only.
   DARK-ONLY (decided 2026-07-19): the site ships the dark palette as the one
   and only :root set — no toggle, no media query, no [data-theme].
   ============================================================================ */

/* ---------------------------------------------------------------------------
   1. TOKENS  (§12.1 palette + derived semantic tokens)
   --------------------------------------------------------------------------- */
:root {
  --ember: #e3582c;
  --ember-pressed: #c24a22;
  --ember-text: #f2764a;
  --on-ember: #241c17;
  --ember-tint: rgba(227,88,44,0.16);
  --ember-tint-2: rgba(227,88,44,0.24);
  --ember-glow: rgba(227,88,44,0.42);
  --indigo: #4150a8;
  --indigo-text: #a3aee6;
  --indigo-tint: #262e5c;
  --on-indigo: #ffffff;
  --bg: #16110d;
  --card: #211a15;
  --surface-2: #2a221b;
  --hairline: rgba(243,236,225,0.11);
  --ink: #f3ece1;
  --muted: #9b8d7e;
  --success: #1f7a52;
  --success-text: #4fb488;
  --success-tint: rgba(31,122,82,0.22);
  --danger: #c0392b;
  --danger-text: #e8836f;
  --danger-tint: rgba(192,57,43,0.24);
  --shadow-sm: 0 1px 2px rgba(0,0,0,.30), 0 1px 3px rgba(0,0,0,.34);
  --shadow-md: 0 6px 18px rgba(0,0,0,.40);
  --shadow-lg: 0 16px 40px rgba(0,0,0,.50);
  --shadow-phone: 0 30px 70px rgba(0,0,0,.60), 0 8px 20px rgba(0,0,0,.4);
  --r-xs: 8px;
  --r-sm: 12px;
  --r-md: 16px;
  --r-lg: 22px;
  --r-xl: 28px;
  --r-phone: 46px;
  --r-pill: 999px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, Roboto, "Helvetica Neue", Arial, "Apple Color Emoji", sans-serif;
  --canvas-glow-1: rgba(227,88,44,0.10);
  --canvas-glow-2: rgba(65,80,168,0.12);
}

/* Dark tokens — applied when the OS prefers dark AND the user hasn't forced light */


/* Explicit dark override (toggle) — wins in both directions */


/* ---------------------------------------------------------------------------
   2. BASE / RESET
   --------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--bg);
  background-image:
    radial-gradient(60% 50% at 12% 0%, var(--canvas-glow-1), transparent 70%),
    radial-gradient(55% 45% at 100% 12%, var(--canvas-glow-2), transparent 70%);
  background-repeat: no-repeat;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background-color .3s ease, color .3s ease;
}
img { max-width: 100%; display: block; }
a { color: var(--indigo-text); text-decoration: none; }
button { font-family: inherit; }
h1,h2,h3,h4 { margin: 0; font-weight: 800; letter-spacing: -0.02em; line-height: 1.15; }
p { margin: 0; }
:focus-visible { outline: 3px solid var(--indigo); outline-offset: 2px; border-radius: 6px; }
.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;
}
.tnum { font-variant-numeric: tabular-nums; font-feature-settings: "tnum" 1; }

/* ---------------------------------------------------------------------------
   3. K-UTILITIES — the guest web's shared primitives (backend resources/css/
   app.css), mapped onto this sheet's token names so marketing + guest web match.
   Only these utility classes ship to the theme; the mockup-only component
   classes (rail/step/phone/chip/deck/reveal…) live in mockups/tokens.css alone.
   --------------------------------------------------------------------------- */

.k-btn {
  appearance: none;
  border: 0;
  border-radius: 14px;
  background: var(--ember);
  color: var(--on-ember);
  font-weight: 700;
  font-size: 1rem;
  padding: 0.85rem 1.1rem;
  width: 100%;
  cursor: pointer;
  transition: transform 0.06s ease, background 0.15s ease;
}
.k-btn:hover { background: var(--ember-pressed); }
.k-btn:active { transform: translateY(1px); }
.k-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.k-btn--ghost { background: transparent; color: var(--ember-text); border: 1px solid var(--hairline); }

.k-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--indigo-tint);
  color: var(--indigo-text);
  border-radius: 999px;
  padding: 0.3rem 0.7rem;
  font-size: 0.8rem;
  font-weight: 600;
}

.k-input {
  width: 100%;
  background: var(--surface-2);
  border: 1px solid var(--hairline);
  border-radius: 12px;
  color: var(--ink);
  padding: 0.8rem 0.9rem;
  font-size: 1rem;
}
.k-input:focus { outline: 2px solid var(--ember); outline-offset: 1px; }

.k-label { display: block; font-weight: 600; font-size: 0.85rem; margin-bottom: 0.35rem; color: var(--muted); }
.k-muted { color: var(--muted); }
.k-error { color: var(--danger-text); font-size: 0.85rem; margin-top: 0.35rem; }
