/* ═══════════════════════════════════════════════════════════════
   BFTB — DESIGN TOKENS
   ───────────────────────────────────────────────────────────────
   THIS IS THE ONLY FILE IN THE REPO ALLOWED TO CONTAIN A COLOUR
   VALUE. Any hex, rgb() or rgba() outside this file is a bug and
   will be caught by the Phase 4 sweep. See BRAND.md.

   Ported from the Instagram carousel system. Dark only — there is
   no light mode and none is to be built.
═══════════════════════════════════════════════════════════════ */

:root {

  /* ═══ COLOUR ════════════════════════════════════════════════ */

  /* ═══ LIGHT THEME ═══════════════════════════════════════════
     The app runs light. Everything below is the ground layer; nothing
     else in the codebase holds a colour, so this block is the whole
     theme and flipping it back to dark is one edit (the previous dark
     values are in git, commit 7f3f51c).

     Two names are now historical and mean roles, not colours:
       --bftb-black  = the page ground   (now white)
       --bftb-white  = primary text ink  (now near-black)
     --bftb-white is only ever used as a text colour, never as a
     background, so the flip is safe. */

  /* Ground. */
  --bftb-black:        #FFFFFF;   /* page background                      */
  --bftb-surface:      #F6F6F2;   /* card fill, one step off the page     */
  --bftb-surface-2:    #EBEBE4;   /* nested panel / input fill / pressed  */

  /* THE accent. Lime is a FILL on light: #CFFF04 on white measures about
     1.2:1, so it can never be text here. Anything that was lime type now
     uses --bftb-accent, the same hue dropped until it reads. */
  --bftb-lime:         #CFFF04;   /* fills, highlights, active blocks     */
  --bftb-lime-ink:     #080808;   /* text ON lime — always near-black     */
  --bftb-accent:       #4E5D00;   /* lime AS TEXT — 7.3:1 on white        */

  /* Type. */
  --bftb-white:        #0A0A0A;   /* primary text ink            19.6:1   */
  --bftb-mute:         rgba(0,0,0,0.58);   /* secondary text      5.3:1   */
  --bftb-faint:        rgba(0,0,0,0.16);   /* decorative hairline only
                                     NEVER for text or a border that
                                     carries meaning. Use --bftb-line. */
  --bftb-line:         rgba(0,0,0,0.88);   /* card outlines      16.4:1   */

  /* Result states, re-cut for a light ground. The dark set was tuned to
     sit on #080808 and is unreadable here. */
  --bftb-win-bg:       #E6F6EC;
  --bftb-win-bar:      #15803D;   /* 5.0:1 on white */
  --bftb-loss-bg:      #FBE9E9;
  --bftb-loss-bar:     #B91C1C;   /* 6.5:1 on white */
  --bftb-void-bg:      #F0F0EA;
  --bftb-void-bar:     rgba(0,0,0,0.55);
  --bftb-result-ink:   #FFFFFF;   /* type ON a win/loss fill — 5.0:1 / 6.5:1 */

  /* Modal backdrops stay dark — a scrim's job is to drop the page back,
     which a light scrim cannot do on a light page. */
  --bftb-scrim:        rgba(8,8,8,0.55);
  --bftb-scrim-light:  rgba(8,8,8,0.40);

  /* The light veil over the page-wide photo wash (styles.css .hero-bg).
     Paired with --hero-opacity in styles.css; BRAND.md "Decisions on record"
     has the contrast measurements. Re-measure before changing either. */
  --bftb-hero-scrim:   rgba(255,255,255,0.64);

  /* Secondary brand tokens. Sparing use, never as a lime substitute. */
  --bftb-yellow:       #F0FF00;   /* legacy brand yellow, logo lockup     */
  --bftb-gold:         #8A6D1F;   /* VIP / premium accents — darkened for light */


  /* ═══ TYPEFACE ══════════════════════════════════════════════ */

  --bftb-font-display: 'Anton', 'Arial Narrow', sans-serif;
  --bftb-font-head:    'Bebas Neue', 'Arial Narrow', sans-serif;
  --bftb-font-body:    'Barlow Semi Condensed', system-ui, sans-serif;
  /* Every label, eyebrow and meta line. Oswald won the condensed-sans role
     outright; Barlow Condensed is gone rather than left loading beside it.
     Variable 400-700, so any weight in that band is real, not synthesised.
     Default weight is 600: Oswald's cut is blacker than Barlow Condensed's,
     so a straight 700 swap would have thickened every label in the app. */
  --bftb-font-label:   'Oswald', 'Arial Narrow', sans-serif;
  --bftb-font-num:     'Bebas Neue', 'Arial Narrow', sans-serif;


  /* ═══ TYPE SCALE ════════════════════════════════════════════ */

  /* Display — Anton, uppercase, oversized and cropped-confident. */
  --bftb-display-xl:   clamp(48px, 14vw, 92px);
  --bftb-display:      clamp(38px, 11vw, 64px);
  --bftb-display-sm:   clamp(28px,  8vw, 42px);

  /* Hero numerals — StatTile. */
  --bftb-stat-xl:      clamp(72px, 26vw, 140px);
  --bftb-stat:         clamp(56px, 18vw, 96px);

  /* Headings — Bebas Neue. */
  --bftb-head-lg:      26px;
  --bftb-head:         20px;
  --bftb-head-sm:      17px;

  /* Body — Barlow Semi Condensed 600. Floor is 14px for accessibility. */
  --bftb-body-lg:      18px;
  --bftb-body:         16px;
  --bftb-body-sm:      15px;   /* hard floor — nothing smaller carries prose */

  /* Labels — the wide-tracked caps texture. THE signature of the system. */
  --bftb-label:        15px;
  --bftb-label-sm:     13px;
  --bftb-label-xs:     12px;   /* compliance footer, unit suffixes */

  /* The whole scale moved up one step. Every face in the system is condensed
     or semi-condensed, so a given px reads visibly smaller than it would in a
     normal-width grotesque — the old scale was tuned before that was true. */

  /* Numerals — Bebas Neue. Digits are uniform width, so they tabulate. */
  --bftb-num-lg:       30px;
  --bftb-num:          20px;
  --bftb-num-sm:       16px;


  /* ═══ TRACKING ══════════════════════════════════════════════ */

  --bftb-track-display: -0.01em;  /* Anton, tight */
  --bftb-track-head:     0.02em;  /* Bebas Neue */
  --bftb-track-label:    0.16em;  /* the wide caps texture — 0.14–0.18 band */
  --bftb-track-label-w:  0.18em;  /* widest, for short eyebrows */
  --bftb-track-label-n:  0.14em;  /* narrowest, for longer label runs */
  --bftb-track-body:     0;       /* sentence case, normal */


  /* ═══ LEADING ═══════════════════════════════════════════════ */

  /* Anton's caps measure 1760/2048 = 0.8594em and sit flat on the baseline
     with no overshoot, so this is exactly the line-height at which two lines
     of caps touch. The brief's 0.88 was a round number; this is the measured
     one. Outlines are allowed to overlap into each other — that is the look. */
  --bftb-lh-display:   0.8594;
  --bftb-lh-head:      1.1;
  --bftb-lh-body:      1.45;
  --bftb-lh-label:     1.2;


  /* ═══ SPACE — 4 / 8 / 12 / 16 / 20 / 24 / 32 / 40 / 56 ══════
     Nothing off-scale. If a gap needs a value not on this list,
     the layout is wrong, not the scale. */

  --bftb-space-1:       4px;
  --bftb-space-2:       8px;
  --bftb-space-3:      12px;
  --bftb-space-4:      16px;
  --bftb-space-5:      20px;
  --bftb-space-6:      24px;
  --bftb-space-7:      32px;
  --bftb-space-8:      40px;
  --bftb-space-9:      56px;

  /* Layout constants derived from the scale. */
  --bftb-gutter:       12px;   /* gap between stacked cards (10–12 band) */
  --bftb-edge:         16px;   /* page edge padding (16–20 band) */
  --bftb-edge-wide:    20px;
  --bftb-maxw:        560px;   /* single-column measure, matches /challenge */
  --bftb-shell:      1100px;   /* app shell — header, nav and main align to this */


  /* ═══ GEOMETRY ══════════════════════════════════════════════
     Radius is zero. Everywhere. The one exception is a deliberate
     50% on the round mascot lockup — that is --bftb-radius-mascot
     and it is the ONLY non-zero radius permitted in the system. */

  --bftb-radius:            0;
  --bftb-radius-mascot:     50%;

  --bftb-border:          2px;   /* card outline — the brand uses HARD borders */
  --bftb-hairline:        1px;   /* internal dividers inside a card */
  /* Display outline. In em, not px, so it stays proportional: a flat 3px is
     about 5% of a 64px cap and reads as a hairline, and thinner still on the
     96px challenge figure. 0.07em holds the same weight at every size. */
  --bftb-stroke:        0.07em;
  --bftb-spine:           5px;   /* the lime left spine on every row */
  --bftb-spine-pressed:   7px;   /* spine widens on press */
  --bftb-nav-indicator:   3px;   /* active nav top rule */
  --bftb-meter-track:     6px;   /* MeterBar height */
  --bftb-meter-fill:   rgba(0,0,0,0.10);  /* MeterBar unfilled track */
  --bftb-form-square:    30px;   /* FormLine W/L square */

  /* There is no elevation in this system. No shadow token exists
     because no shadow is permitted. Depth comes from the border. */


  /* ═══ MOTION ════════════════════════════════════════════════
     Minimal and mechanical. Opacity + 2–4px translate only.
     No springs, no bounce, no scale-in, no parallax. */

  --bftb-dur-fast:      120ms;
  --bftb-dur:           160ms;
  --bftb-ease:          ease-out;

  /* Reveal timing. Deliberately an order of magnitude slower than the
     interaction tokens above: --bftb-dur is for a control answering a tap,
     where anything over ~160ms feels laggy. A figure counting or a meter
     filling is a different job — it has to be slow enough to read as
     travelling to its value rather than snapping to it. */
  --bftb-dur-reveal:    1100ms;
  --bftb-dur-reveal-lg: 1500ms;   /* hero figures and the chart line */
  --bftb-lift:            2px;   /* translate distance, small */
  --bftb-lift-lg:         4px;   /* translate distance, max */


  /* ═══ FOCUS ═════════════════════════════════════════════════
     Visible always. Never remove an outline. */

  --bftb-focus-width:     2px;
  --bftb-focus-offset:    2px;


  /* ═══ TAP TARGET ════════════════════════════════════════════ */

  --bftb-tap:            44px;   /* minimum interactive dimension */
}
