/* The Ride — design tokens and shared components, taken from the Google Stitch export
   (design/stitch/…/the_ride_design_system.md). Every colour, size, radius and duration on the three
   screens comes from here. Fonts are bundled locally (SIL OFL): Playfair, Poppins, Red Hat Mono. */
@font-face { font-family: "Playfair"; src: url("../fonts/playfair-latin-var.woff2") format("woff2"); font-weight: 300 900; font-style: normal; font-display: block; }
@font-face { font-family: "Poppins"; src: url("../fonts/poppins-latin-400.woff2") format("woff2"); font-weight: 400; font-display: block; }
@font-face { font-family: "Poppins"; src: url("../fonts/poppins-latin-500.woff2") format("woff2"); font-weight: 500; font-display: block; }
@font-face { font-family: "Poppins"; src: url("../fonts/poppins-latin-600.woff2") format("woff2"); font-weight: 600; font-display: block; }
@font-face { font-family: "Poppins"; src: url("../fonts/poppins-latin-700.woff2") format("woff2"); font-weight: 700; font-display: block; }
@font-face { font-family: "Red Hat Mono"; src: url("../fonts/red-hat-mono-latin-var.woff2") format("woff2"); font-weight: 300 700; font-display: block; }

:root {
  /* Personas: base on light surfaces and as badges, bright on the dark projector */
  --crew: #0F766E;    --crew-bright: #2DD4BF;
  --meera: #15803D;   --meera-bright: #4ADE80;
  --lakshmi: #D97706; --lakshmi-bright: #FBBF24;
  --arif: #4338CA;    --arif-bright: #818CF8;
  --ravi: #C2410C;    --ravi-bright: #FB923C;
  --warning: #D97706;
  --success: #15803D;

  /* Light (phone, moderator) */
  --l-primary: #005C55; --l-on-primary: #FFFFFF; --l-primary-container: #0F766E;
  --l-secondary: #904D00; --l-secondary-container: #FE932C; --l-on-secondary-container: #663500;
  --l-error: #BA1A1A; --l-error-container: #FFDAD6; --l-on-error-container: #93000A;
  --l-surface: #FFF8F4;
  --l-surface-lowest: #FFFFFF; --l-surface-low: #FAF2ED; --l-surface-container: #F4ECE7; --l-surface-high: #EEE7E1; --l-surface-highest: #E9E1DC;
  --l-on-surface: #1E1B18; --l-on-surface-variant: #3E4947;
  --l-outline: #6E7977; --l-outline-variant: #BDC9C6;

  /* Dark (projector) */
  --d-primary: #80D5CB;
  --d-surface: #161310;
  --d-surface-lowest: #100E0B; --d-surface-low: #1E1B18; --d-surface-container: #221F1C; --d-surface-high: #2D2926; --d-surface-highest: #383431;
  --d-on-surface: #E9E1DC; --d-on-surface-variant: #BDC9C6;
  --d-outline: #889391; --d-outline-variant: #3E4947;
  --d-inverse-on-surface: #33302C;

  /* Spacing */
  --g-xs: 4px; --g-sm: 8px; --g-md: 16px; --g-lg: 24px; --g-xl: 32px; --section: 48px; --page: 24px;
  /* Radii */
  --r-sm: 6px; --r: 10px; --r-md: 12px; --r-lg: 16px; --r-xl: 24px; --r-full: 9999px;
  /* Motion */
  --state: 120ms ease-out;
  --enter: 300ms cubic-bezier(0.2, 0, 0, 1);
  --glide: 450ms cubic-bezier(0.22, 1, 0.36, 1);
  --glide-ease: cubic-bezier(0.22, 1, 0.36, 1);

  --f-display: "Playfair", Georgia, serif;
  --f-ui: "Poppins", system-ui, sans-serif;
  --f-mono: "Red Hat Mono", ui-monospace, monospace;
}

/* The persona colour on any element: set data-p="meera" and use var(--pc) / var(--pc-bright) / var(--pc-on).
   --pc-ink is the persona colour for text on light surfaces (saffron is too light to read, so it darkens). */
[data-p] { --pc-ink: var(--pc); }
[data-p="crew"]    { --pc: var(--crew);    --pc-bright: var(--crew-bright);    --pc-on: #FFFFFF; }
[data-p="meera"]   { --pc: var(--meera);   --pc-bright: var(--meera-bright);   --pc-on: #FFFFFF; }
[data-p="lakshmi"] { --pc: var(--lakshmi); --pc-bright: var(--lakshmi-bright); --pc-on: var(--d-surface); --pc-ink: var(--l-secondary); }
[data-p="arif"]    { --pc: var(--arif);    --pc-bright: var(--arif-bright);    --pc-on: #FFFFFF; }
[data-p="ravi"]    { --pc: var(--ravi);    --pc-bright: var(--ravi-bright);    --pc-on: #FFFFFF; }

/* Type scale (Stitch tokens) */
.display-lg { font: 700 56px/64px var(--f-display); letter-spacing: -0.5px; }
.display-md { font: 700 44px/52px var(--f-display); letter-spacing: -0.25px; }
.display-lg-m { font: 700 32px/38px var(--f-display); letter-spacing: -0.25px; }
.display-md-m { font: 700 28px/34px var(--f-display); }
.headline-lg { font: 600 36px/44px var(--f-display); }
.headline-lg-m { font: 600 24px/30px var(--f-display); }
.headline-md { font: 600 26px/34px var(--f-ui); }
.title-lg { font: 600 20px/28px var(--f-ui); }
.title-md { font: 600 16px/24px var(--f-ui); letter-spacing: 0.1px; }
.body-lg { font: 400 18px/28px var(--f-ui); }
.body-md { font: 400 15px/22px var(--f-ui); }
.label-lg { font: 600 14px/20px var(--f-ui); letter-spacing: 0.2px; }
.label-sm { font: 500 12px/16px var(--f-ui); letter-spacing: 0.3px; }
.mono-lg { font: 600 24px/30px var(--f-mono); font-variant-numeric: tabular-nums; }
.mono-md { font: 500 14px/20px var(--f-mono); letter-spacing: 0.2px; font-variant-numeric: tabular-nums; }
.caps { text-transform: uppercase; }
.balance { text-wrap: balance; }
.pretty { text-wrap: pretty; }

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body { font-family: var(--f-ui); -webkit-font-smoothing: antialiased; }
h1, h2, h3, p, ul, ol, dl, dd { margin: 0; }
ul, ol { padding: 0; list-style: none; }
button, input, select, textarea { font: inherit; color: inherit; margin: 0; }
button { appearance: none; -webkit-appearance: none; background: none; border: 0; padding: 0; cursor: pointer; }
input { appearance: none; -webkit-appearance: none; }
a { color: inherit; }
.hidden { display: none !important; }
.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; }
:focus { outline: none; }
:focus-visible { outline: 3px solid var(--crew-bright); outline-offset: 3px; }

/* Icons: inline Material Symbols, 1em square, current colour */
.ic { width: 1em; height: 1em; fill: currentColor; flex: none; display: inline-block; vertical-align: middle; }

/* Pill badge: persona name with its icon (Stitch "badge-status") */
.pill { display: inline-flex; align-items: center; gap: var(--g-sm); padding: var(--g-xs) var(--g-md); border-radius: var(--r-full); white-space: nowrap; }
.pill.persona { background: var(--pc); color: var(--pc-on); }
.pill .ic { font-size: 16px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
}
