/* =====================================================================================
   Interface tokens — "Telemetry" direction (docs/design/direcao-A.html). It is the ONLY place with color, font,
   spacing, size, chamfer, line and duration: hud.css only uses these variables.
   Signal color = color of the gates on the track: green = next / action, amber = the following / selected option.
   Contrast (WCAG) measured over --bg / --raise: --ink 16.3 / 14.3, --dim 7.5 / 6.6, --go 15.0 / 13.2, --warn 11.2 / 9.9,
   --hot 6.4 / 5.6; text over the green button 14.4, over amber 10.7. Everything above 4.5 (AA). --line-hi (2.5) is stroke only.
   ===================================================================================== */
:root {
  /* ---- cor ---- */
  --bg: #080b0a;                       /* almost greenish black: the goggles' background */
  --panel: rgba(8, 12, 11, 0.88);      /* panel over the scene (no blur: fits on a Chromebook) */
  --panel-solid: #0e1412;              /* dialogs */
  --raise: #141c19;                    /* selected row, field */
  --line: #22312d;                     /* thin ruler */
  --line-hi: #3c5850;                  /* highlight ruler, outline */
  --ink: #e2ebe7;
  --dim: #8fa49c;
  --go: #35ff9e;                       /* next gate: main action, selection, record */
  --on-go: #03140b;
  --warn: #ffb547;                     /* following gate: selected option, focus, time difference */
  --on-warn: #1a1003;
  --hot: #ff5a3c;                      /* error, destructive action */
  --medal-bronze: #e09a62;             /* track medals (3-lap time): bronze, silver, gold */
  --medal-prata: #cfdbe0;
  --medal-ouro: #ffd34d;
  --scrim: linear-gradient(90deg, rgba(8, 11, 10, 0.95) 0%, rgba(8, 11, 10, 0.76) 40%, rgba(8, 11, 10, 0.32) 72%, rgba(8, 11, 10, 0.6) 100%);
  --scrim-full: radial-gradient(ellipse at 50% 45%, rgba(8, 11, 10, 0.74), rgba(8, 11, 10, 0.92) 70%);

  /* ---- fonte ---- */
  --f-title: 'Chakra Petch', 'Arial Narrow', sans-serif;   /* titles: OSD character geometry, cut corners */
  --f-num: 'JetBrains Mono', ui-monospace, monospace;       /* numbers, times and running text: slashed zero, tabular */

  /* ---- scale: 1 --u = 1% of the width of a 16:9 frame that fits on the screen (12.8 px at 1280×720) ---- */
  --u: min(1vw, 1.7778vh);
  --fs-hero: clamp(30px, calc(var(--u) * 5), 92px);        /* QUICK PLAY, FLY */
  --fs-h1: clamp(20px, calc(var(--u) * 3.1), 56px);        /* brand, screen title */
  --fs-h2: clamp(16px, calc(var(--u) * 2), 36px);          /* list item, track name */
  --fs-h3: clamp(11px, calc(var(--u) * 1.05), 18px);       /* section label (spaced uppercase) */
  --fs-body: clamp(11px, calc(var(--u) * 1.02), 17px);
  --fs-small: clamp(10.5px, calc(var(--u) * 0.92), 15px);
  --fs-num-big: clamp(20px, calc(var(--u) * 2.6), 46px);   /* best lap, position */

  /* ---- spacing ---- */
  --s1: clamp(2px, calc(var(--u) * 0.31), 6px);
  --s2: clamp(4px, calc(var(--u) * 0.62), 12px);
  --s3: clamp(6px, calc(var(--u) * 0.94), 18px);
  --s4: clamp(8px, calc(var(--u) * 1.25), 24px);
  --s5: clamp(10px, calc(var(--u) * 1.88), 36px);
  --s6: clamp(12px, calc(var(--u) * 2.5), 48px);
  --edge-x: clamp(12px, calc(var(--u) * 3.75), 72px);       /* screen margin */
  --edge-y: clamp(10px, calc(var(--u) * 3.1), 60px);

  /* ---- forma ---- */
  --cut: clamp(8px, calc(var(--u) * 1.6), 30px);            /* chamfered corner of action items */
  --cut-sm: clamp(5px, calc(var(--u) * 0.8), 14px);
  --rule: 1px;
  --rule-hi: 2px;
  --chamfer: polygon(0 0, calc(100% - var(--cut)) 0, 100% var(--cut), 100% 100%, var(--cut) 100%, 0 calc(100% - var(--cut)));
  --chamfer-sm: polygon(0 0, calc(100% - var(--cut-sm)) 0, 100% var(--cut-sm), 100% 100%, 0 100%);
  --ticks-x: repeating-linear-gradient(90deg, var(--line-hi) 0 1px, transparent 1px 8px);
  --ticks-y: repeating-linear-gradient(180deg, var(--line-hi) 0 1px, transparent 1px 24px);

  /* ---- touch and proportion (Hangar and what comes after) ---- */
  --touch: 44px;                       /* minimum touch target */
  --ratio-preview: 2 / 1;              /* 3D preview of the drone */
  --ratio-thumb: 4 / 3;                /* card thumbnail */
  --ls-label: .14em;                   /* letter spacing: uppercase label */
  --ls-title: .06em;                   /* letter spacing: name, title */
  --w-bar-label: 8em;                  /* column of the Hangar bar labels */
  --icon: 1em;                         /* inline icon with the text (padlock) */
  --shade-locked: var(--line-hi);      /* background of the locked card's dark silhouette */

  /* ---- movimento ---- */
  --dur: 140ms;
  --dur-slow: 200ms;
  --ease: cubic-bezier(.2, .7, .2, 1);

  /* ---- flight OSD (osd.css) and old names: remain valid ---- */
  --mono: 'IBM Plex Mono', ui-monospace, monospace;
  --cond: 'Barlow Condensed', 'Arial Narrow', sans-serif;
  --mint: #7ef0c8;
  --amber: var(--warn);
  --red: #ff5a4f;
  --orange: #ff7a2e;
}
@media (prefers-reduced-motion: reduce) {
  :root { --dur: 0ms; --dur-slow: 0ms; }
}
