/* rule-ok(brand): both registers are the same dark navy-and-gold identity — docs/adr/1015
   (the-console-goes-navy-and-gold-too), superseding adr/1008's light console in full (which had
   itself superseded adr/1004's console half). Contrast is NOT waived: both registers are
   re-verified by tests/unit/test_contrast_budget.py on every gate run, computed rather than
   eyeballed. */
/* ---------------------------------------------------------------------------
 * The token layer — TOKEN_CONTRACT="booking".
 *
 * This is the ONLY file in the product where a colour literal is legal
 * (CLAUDE.md §7). Every role declared here is one of the eighteen names in
 * app/static/css/tokens.json, and every value is the one docs/DESIGN.md §2
 * records. Nothing else may be added: a role not in tokens.json fails
 * check-token-contract.sh, and a role in tokens.json that is absent here fails
 * it from the other side.
 *
 * The property is named for the role and nothing else — `--bg-deep`, not
 * `--color-bg-deep`. app.src.css's `@theme inline` block maps each one up into
 * Tailwind's `--color-*` namespace so the utilities compile; naming both sides
 * identically makes that mapping circular, which CSS accepts silently and then
 * paints nothing.
 *
 * The product is dark-canvas on both registers by design (SPEC.md §5.3) —
 * there is no light theme, so there is no second block to keep in step.
 *
 * The self-hosted faces are declared here too, because the @font-face src is
 * the one other place a literal (a URL) belongs beside the values it serves.
 * requirement.md §11.6 forbids any third-party request at runtime, so these
 * are vendored files under app/static/fonts/ and there is no CDN link
 * anywhere in the templates.
 * --------------------------------------------------------------------------- */

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900; /* variable file — one request covers 400/500/600 */
  font-display: swap;
  src: url('/static/fonts/inter-var-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;
}

/* The reference product's own body face (measured live from its running site), SIL Open Font
   License, self-hosted per §4.1 like every other face here — `--font-body` below. `--font-meta`
   keeps Inter: the admin/console tables it serves have no reference-product equivalent to match,
   and Inter's tabular figures are the reason that token exists at all. */
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 200 800; /* variable file — one request covers 400/500/600/700 */
  font-display: swap;
  src: url('/static/fonts/manrope-var-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;
}

@font-face {
  font-family: 'Playfair Display';
  font-style: normal;
  font-weight: 400 900; /* variable file — one request covers 600/700 */
  font-display: swap;
  src: url('/static/fonts/playfair-display-var-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;
}

/* M29 (adr/1013) — the reference product's own display face, SIL Open Font License, self-hosted
   per §4.1 like every other face here. Two static weights rather than a variable file: Cinzel
   ships no variable axis, and headings only ever need the two `--font-display` callers already
   use (regular prose-weight headings, and the bold hero/price treatment). */
@font-face {
  font-family: 'Cinzel';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/static/fonts/cinzel-400-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;
}
@font-face {
  font-family: 'Cinzel';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/static/fonts/cinzel-700-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 {
  /* --- Stage register — the public funnel (docs/DESIGN.md §2, adr/1013) ---
     Sampled from the operator-supplied reference (golden-batch-gate.lovable.app), the same way
     adr/1007 sampled the palette this one replaces: read out of the reference's own CSS custom
     properties via a canvas pixel readback (oklch has no lossless CSS-string hex form), not
     eyeballed off a screenshot. */
  --bg-deep: #050d27; /* page base — reference's --background */
  --bg-panel: #0d1a37; /* cards and elevated surfaces — reference's --card */
  --bg-frame: #25375c; /* frame and accent blocks — reference's --accent (the neutral one, not the gold) */
  --accent: #f0c13e; /* links, focus rings, progress — reference's --primary gold */
  --display: #f6dd90; /* display headings, price numerals — reference's --accent-foreground */
  --text: #eef2f7; /* body — reference's --foreground */
  --muted: #9facbd; /* secondary prose ≥16px; below that only as a tracked label — §9 Q55 */
  --danger: #ff8a72; /* errors, declined payments — unchanged; the reference names no failure colour */
  --success: #63d6a6; /* confirmations, valid scans — unchanged, for the same reason */
  --border: #303d58; /* hairlines — reference's own --border, a solid navy-grey rather than an
                         alpha-derived one; contrast ratios re-verified against both backgrounds
                         (tests/unit/test_contrast_budget.py) rather than assumed from the old rule */

  /* --- Console register — /scan and /admin (docs/DESIGN.md §2, adr/1015) --
     Same values as the stage register's own `--bg-deep`/`--bg-panel`/`--text`/`--muted`/`--border`
     — one dark palette, read by both sets of role names, rather than a second set of literals
     that happens to match (adr/1015 point 1). `--console-muted` at this value clears 8.33:1 on
     `--console-bg`, well past what the console's own 14px table heads need — re-verified, not
     assumed (tests/unit/test_contrast_budget.py). */
  --console-bg: #050d27;
  --console-panel: #0d1a37;
  --console-text: #eef2f7;
  --console-muted: #9facbd;
  --console-border: #303d58;

  /* --- Status vocabulary — shared, and never colour alone (AC-013.5) ------ */
  --status-valid: #58e1a5; /* valid — admitted */
  --status-warn: #f2c14e; /* already_used, outside_window */
  --status-fail: #ff6b6b; /* invalid, wrong_event, void */

  /* AC-056.6 — the one colour distinction the operator asked for, on a female attendee's ticket
     card and keepsake PDF. A rose sampled from the same velvet-and-gold family (docs/DESIGN.md
     §2) rather than a generic pink, so it reads as this product's own accent, not a bolted-on
     UI-kit colour. A male attendee's ticket carries no override — this is the ONE new role, not
     a two-value vocabulary, because only one side of it was ever asked for. */
  --tone-female: #e8a3c0;

  /* --- Typography (docs/DESIGN.md §3, adr/1013) --------------------------- */
  --font-display: 'Cinzel', 'Playfair Display', 'Iowan Old Style', 'Palatino Linotype',
    Palatino, Georgia, 'Times New Roman', serif;
  --font-body: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
    'Helvetica Neue', Arial, sans-serif;
  /* Metadata register — ids, short codes, timestamps, counts, money in tables.
     Same family, tabular figures; the console shows all five. */
  --font-meta: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
    'Helvetica Neue', Arial, sans-serif;
  --font-feature-meta: 'tnum' 1, 'lnum' 1;

  --text-body-size: 16px; /* §11.1 asks for 15–17px */
  --text-body-leading: 1.65;
  --text-body-tracking: 0.01em;
  /* Button label geometry, §11.1: uppercase 12px, tracking 0.18em */
  --text-label-size: 0.75rem;
  --text-label-tracking: 0.18em;

  /* --- Geometry (docs/DESIGN.md §4) --------------------------------------- */
  --radius-pill: 9999px;
  /* Matched live against the reference's own computed radii (M34, `§9 Q124`): its cards measure
     `rounded-lg` (8px), its buttons and inputs `rounded-md` (6px) — both tighter than this
     product's own prior 14px/10px. */
  --radius-card: 8px;
  --radius-field: 6px;
  /* Oval / arch blob mask, §11.1 — no image editing required */
  --radius-blob: 50% 50% 50% 50% / 60% 60% 40% 40%;
  --tap-min: 44px; /* every interactive target ≥ 44×44px (§11.4) */
  --focus-ring-width: 2px;
  --focus-ring-offset: 2px;

  /* --- Motion (docs/DESIGN.md §4, §11.1) ---------------------------------- */
  --motion-reveal: 400ms; /* fade-and-rise on scroll into view */
  --motion-ui: 200ms; /* button and field transitions */
  --motion-ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --motion-reveal-rise: 18px;
  --motion-parallax: 1; /* hero blob drift multiplier; 0 under reduced motion */
}

/* adr/1015 (superseding adr/1008 in full): the console no longer overrides the generic roles —
   `--text`, `--muted`, `--accent`, `--display`, `--danger`, `--success`, the three `--status-*`
   roles, `--tone-female`, `--bg-deep` and `--bg-panel` resolve to exactly the `:root` values above
   for BOTH registers now, so a second block restating them here would be dead code the moment it
   was written. Only the five `--console-*`-prefixed roles remain register-specific (declared in
   `:root` above), because `.console-bar`, `.btn--console`, `.card--console` and similar read those
   names directly rather than the generic ones — this is layout-density styling, not a colour
   fork, and stays exactly as it was under adr/1008. */

/* The single kill switch. Every animated property in app.css reads one of the
 * duration or distance variables above, so zeroing them here disables the whole
 * motion budget — the 400ms reveal, the 200ms transitions and the parallax —
 * rather than each rule needing its own guard. (docs/DESIGN.md §4) */
@media (prefers-reduced-motion: reduce) {
  :root {
    --motion-reveal: 1ms;
    --motion-ui: 1ms;
    --motion-reveal-rise: 0px;
    --motion-parallax: 0;
  }
}
