/* ------------------------------------------------------------------
   PREEN bay kiosk · design tokens
   One source of truth for colour, type, space, radius, shadow, motion.
   Screens pick a theme (light / dark) on <body data-theme>; components
   only ever read the semantic tokens below (--k-fg, --k-surface, …).
   ------------------------------------------------------------------ */

:root {
  /* Brand palette (matches the phone app Theme.kt) */
  --p-ink: #0b1c2b;
  --p-navy: #14324a;
  --p-blue: #1677ff;
  --p-blue-deep: #0f5fd6;
  --p-sky: #3aa6ff;
  --p-ice: #f4f8ff;
  --p-foam: #dff0ff;
  --p-mist: #eef4fa;
  --p-line: #d5e3f0;
  --p-muted: #4b6580;
  --p-white: #ffffff;

  --p-success: #0e9f6e;
  --p-success-soft: #d3f9d8;
  /* Success fills that carry white text (ticks, the waiting-code badge): white on it is 5.3:1. */
  --p-success-strong: #0a7a54;
  --p-danger: #c81e1e;
  --p-danger-soft: #ffe3e3;
  /* Not in Theme.kt. --p-gold keeps its old name but is now the copper accent (#C45A18, the
     default brand accent). chrome.applySite overrides --k-accent and --p-again with the owner's colours. */
  --p-again: #c45a18;
  --p-warn: #c2410c;
  --p-warn-soft: #ffe9d6;
  --p-gold: #c45a18;
  --p-gold-soft: #f4d3be;

  /* Programme tones — used for card accents and hero tints */
  --tone-speedy: #c45a18;
  --tone-speedy-soft: #f4d3be;
  --tone-regular: #1677ff;
  --tone-regular-soft: #dbeaff;
  --tone-thorough: #14324a;
  --tone-thorough-soft: #dbe6f0;

  /* Type */
  --font-display: "Fraunces", "Iowan Old Style", Palatino, Georgia, serif;
  --font-ui: "Nunito", ui-rounded, "Avenir Next", "Segoe UI", system-ui, sans-serif;

  --fs-display: clamp(46px, 5.6vw, 84px);
  --fs-h1: clamp(34px, 3.8vw, 56px);
  --fs-h2: clamp(26px, 2.6vw, 38px);
  --fs-h3: clamp(22px, 2vw, 30px);
  --fs-lg: clamp(19px, 1.5vw, 23px);
  --fs-md: clamp(17px, 1.3vw, 20px);
  --fs-sm: 16px;
  /* The smallest text a driver reads at arm's length (eyebrows, labels, captions). */
  --fs-xs: 15px;
  --fs-price: clamp(30px, 3vw, 44px);

  /* Space (8pt grid, kiosk scale) */
  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-5: 24px;
  --sp-6: 32px;
  --sp-7: 40px;
  --sp-8: 56px;
  --sp-9: 72px;
  --page-x: clamp(24px, 3.4vw, 56px);
  --page-y: clamp(16px, 2.4vh, 32px);

  /* Radius */
  --r-sm: 14px;
  --r-md: 22px;
  --r-lg: 30px;
  --r-xl: 40px;
  --r-pill: 999px;

  /* Elevation */
  --sh-1: 0 8px 22px rgba(20, 50, 74, 0.10);
  --sh-2: 0 20px 48px rgba(20, 50, 74, 0.14);
  --sh-3: 0 34px 80px rgba(11, 28, 43, 0.22);
  --sh-blue: 0 16px 34px rgba(22, 119, 255, 0.32);
  --sh-again: 0 12px 28px rgba(196, 90, 24, 0.32);

  /* Motion */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-emph: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --dur-fast: 160ms;
  --dur-base: 280ms;
  --dur-slow: 520ms;

  /* Hit targets — gloves and arm's length */
  --hit-min: 72px;
  --hit-cta: 92px;

  /* ---------- semantic (light default) ---------- */
  --k-bg: #edf3f9;
  --k-fg: var(--p-ink);
  --k-fg-muted: var(--p-muted);
  --k-fg-soft: #7b90a6;
  --k-surface: rgba(255, 255, 255, 0.92);
  --k-surface-solid: #ffffff;
  --k-surface-2: var(--p-ice);
  --k-line: var(--p-line);
  --k-accent: var(--p-blue);
  /* Accent for text, and for fills that carry white text: the bright blue is 4.1:1 on white, this 5.8:1. */
  --k-accent-text: var(--p-blue-deep);
  --k-accent-fg: #ffffff;
  --k-chrome-fg: var(--p-navy);
  --k-chrome-surface: rgba(255, 255, 255, 0.82);
  --k-chrome-line: rgba(20, 50, 74, 0.10);
  --k-scrim: linear-gradient(180deg, rgba(237, 243, 249, 0.72) 0%, rgba(237, 243, 249, 0.88) 45%, rgba(237, 243, 249, 0.96) 100%);
}

body[data-theme="dark"] {
  --k-bg: #0b1c2b;
  --k-fg: #ffffff;
  --k-fg-muted: rgba(255, 255, 255, 0.76);
  --k-fg-soft: rgba(255, 255, 255, 0.56);
  --k-surface: rgba(255, 255, 255, 0.10);
  --k-surface-solid: #12283b;
  --k-surface-2: rgba(255, 255, 255, 0.06);
  --k-line: rgba(255, 255, 255, 0.16);
  --k-accent: var(--p-sky);
  --k-accent-text: var(--p-sky);
  --k-accent-fg: var(--p-ink);
  --k-chrome-fg: #ffffff;
  --k-chrome-surface: rgba(255, 255, 255, 0.10);
  --k-chrome-line: rgba(255, 255, 255, 0.14);
  /* The top stop was 0.62: light photo areas showed through behind the top bar and the eyebrows. */
  --k-scrim: linear-gradient(180deg, rgba(11, 28, 43, 0.74) 0%, rgba(11, 28, 43, 0.78) 50%, rgba(11, 28, 43, 0.90) 100%);
}
