/* ==========================================================================
   tokens.css — brief.md v1 (approved 2026-08-30), family `bold-industrial`,
   archetype `split-hero`, signature "fuel breaks clear". Values copied from
   brief.md §3.3/§2.5/§2.6/§5/§7. Builder-fill supplements, each a direct
   restatement of a brief-stated exact outcome:
     --header-height (56px, brief §5.4), --control-height (52px, §5.7 ③),
     --control-min-width (260px, §5.1 rule 2)
   ========================================================================== */

:root {

  /* --- Colour (brief §3.3). Derivation: step 1 CONFIRMED EMPTY (no brand
     colour at any tier) -> step 2 local-character (Boulder wildland-urban
     interface, controlled ember, never active flame) -> step 3 family
     norms (bold-industrial's heavy, no-nonsense register). */

  --scheme: light;

  --color-bg:            #ECE8E0;   /* limestone / granite-grey */
  --color-surface:       #E2DCCF;   /* alternating band ground */
  --color-ink:            #221E1A;
  --color-ink-muted:      #57503F;

  --color-accent:         #C15A2A;   /* controlled-ember rust — DOMINANT, large/decorative-scale text only */
  --color-accent-strong:  #8C3E17;   /* body-safe ember shade — every body-scale accent word + CTA fill */
  --color-accent-tint:    #E8A87A;   /* light ember tint — display-scale (>=24px) accent words on the hero gradient ONLY */
  --color-accent-ink:     #F5F0E8;   /* cream — text on accent-strong fills, and all hero copy */

  --color-hero-dark: #1A1613;   /* hero atmosphere gradient — darkest stop */
  --color-hero-glow: #8C3E17;   /* = accent-strong — the gradient's lightest stop, kept body-AA-safe on purpose */

  --color-border:  #57503F;   /* functional UI edges — form fields — reuses ink-muted */
  --color-rule:    #cfc7b3;   /* DECORATIVE hairlines ONLY */

  --color-focus:         #8C3E17;
  --color-selection-bg:  #8C3E17;
  --color-selection-ink: #F5F0E8;

  /* Dark-band-safe focus ring. The Capability band is a dark, inverted
     ground; --color-focus is a dark ink there and invisible. accent-tint is
     already brief-verified at 8.18:1 against ink fill (brief §4.1). */
  --color-focus-on-band: var(--color-accent-tint);

  /* Token-contract completeness: reserved radius/shadow steps resolve to
     the site's one argued radius/shadow (brief §3.3). */
  --radius-none: 0;
  --radius-md:   var(--radius-sm);
  --radius-lg:   var(--radius-sm);
  --radius-pill: var(--radius-sm);
  --shadow-sm:   var(--shadow-none);
  --shadow-md:   var(--shadow-none);
  --shadow-lg:   var(--shadow-none);

  /* --- Typography (brief §2). Two families, four static woff2 instances —
     at design-rules §5's ceiling of four (brief §2.2's own re-derivation).
     Archivo: SIL OFL 1.1, Omnibus-Type. Barlow: SIL OFL 1.1, Jost Bartell /
     Barlow Type. assets/fonts/OFL.txt carries both copyright notices. No
     font-variation-settings anywhere (brief §2.2/§2.5): four static
     instances, no variable axes — weight is set with font-weight/font-stretch
     and nothing else. Barlow Italic is DROPPED as a fourth Barlow file (brief
     §2.2): emphasis_font is null; testimonial quotes and the hero lead use
     upright Barlow with a left rule instead of a synthetic italic. */

  --font-display:      'Archivo', 'Archivo Fallback', 'Arial Narrow', sans-serif;
  --font-body:          'Barlow', 'Barlow Fallback', 'Helvetica Neue', sans-serif;
  --font-body-strong:   'Barlow', 'Barlow Bold Fallback', 'Helvetica Neue', sans-serif;
  --font-weight-display-head: 700;   /* section-head h2, header wordmark */
  --font-weight-display-h1:   800;   /* the H1 */
  --font-weight-body:         400;
  --font-weight-body-strong:  700;
  --font-stretch-display: 120%;      /* Archivo's wdth axis, Expanded, per design-rules §5 pool */

  /* base.css's shared h1-h4 rule reads --font-weight-display / --tracking-tight;
     this site's h2 uses the head weight (700), and the hero's own h1 rule in
     site.css overrides to the h1 weight (800) — both are display type. */
  --font-weight-display: var(--font-weight-display-head);

  /* --- Type scale — computed across its full range, brief §2.6 ----------- */

  --text-eyebrow: clamp(0.72rem, 0.6rem + 0.4vw, 0.85rem);
  --text-h1:      clamp(2.2rem, 1.5rem + 3.3vw, 4.1rem);
  --text-h2:      clamp(1.5rem, 1.2rem + 1.4vw, 2.1rem);
  --text-lead:    clamp(1.0625rem, 1rem + 0.35vw, 1.1875rem);
  --text-body:    clamp(1rem, 0.94rem + 0.3vw, 1.0625rem);
  --text-small:   clamp(0.85rem, 0.8rem + 0.2vw, 0.95rem);

  --leading-tight: 1.02;  --leading-snug: 1.28;  --leading-body: 1.5;  --leading-caps: 1.3;

  --tracking-display: 0.005em;  --tracking-normal: 0em;  --tracking-caps: 0.14em;
  /* base.css's shared h1-h4 rule reads --tracking-tight; every element that
     rule reaches on this site IS display type, so this is a direct alias
     rather than a repurposed role. */
  --tracking-tight: var(--tracking-display);

  /* --- Space — house scale, brief §3.3. --space-3xl is used by the form's
     textarea min-height default in site.css (skeleton pattern), kept at its
     house value since the brief states no override. */

  --space-3xs: 0.25rem;  --space-2xs: 0.5rem;  --space-xs: 0.75rem;
  --space-sm:  1rem;     --space-md:  1.5rem;  --space-lg: 2.5rem;
  --space-xl:  4rem;     --space-2xl: 6rem;    --space-3xl: 9rem;

  --section-gap:      var(--space-2xl);  /* = 96px FIXED at every declared width — brief §5.3 */
  --layout-container: 72rem;             /* 1152px outer box */
  --layout-gutter:    1rem;              /* 16px <48rem -> 2.5rem (40px) >=48rem */
  --layout-measure:   36rem;             /* 576px prose cap */
  --h1-max:           42rem;             /* 672px — the hero text column at >=64rem */
  --layout-tap-min:   44px;
  --hero-field-ratio: 16 / 9;

  /* Sticky stack = expiry 44 + header 56 + 1px border = 101px (brief §5.4).
     --expiry-height lives once, in css/preview.css (= --layout-tap-min) —
     not redeclared here. */
  --header-height:     3.5rem;    /* 56px */
  --control-height:    3.25rem;   /* 52px — brief §5.7 hero slot ③ "52px tall" */
  --control-min-width: 16.25rem;  /* 260px — brief §5.1 rule 2, inline-block floor at >=64rem */

  /* Brief §4.1's pre-computed dark-ground pairing, named by hex in the
     contrast table: #C9BBAA on ink fill, 8.86:1 (Capability band body copy). */
  --color-tint-on-dark: #C9BBAA;

  --mark-size: 26px;    /* the ember corner mark -> 34px at >=48rem, brief §5.2 */
  --radius-sm: 2px;     /* the ONE radius on this site */
  --shadow-none: none;  /* the ONE shadow token */
  --border-hairline: 1px;  --border-frame: 2px;  --border-style: solid;
  --border-thick: var(--border-frame);   /* house focus-ring weight */

  --duration-fast: 160ms;  --duration-base: 300ms;  --duration-slow: 520ms;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --reveal-shift: 0.75rem;  --reveal-stagger: 70ms;

  /* Signature motion, hero field only (brief §7.2): three independent,
     non-synchronised loops. 5.2s / 7.4s / 9.1s (offset -1.6s) share no small
     common period. */
  --duration-ember:   5.2s;
  --duration-canopy1: 7.4s;
  --duration-canopy2: 9.1s;
  --delay-canopy2:    -1.6s;

  --z-base: 0; --z-header: 100; --z-nav-panel: 200; --z-skip-link: 300;
}

/* Two declared breakpoints — brief §2.6: 48rem (768px) for type-adjacent
   rhythm, and a hero-specific 64rem (1024px) for the split-hero column
   switch (brief §5.1 rule 2). No other breakpoint appears in site.css. */

@media (min-width: 48rem) {
  :root {
    --layout-gutter: 2.5rem;
    --mark-size: 34px;
  }
}

/* --------------------------------------------------------------------------
   @font-face — self-hosted woff2, static instances only (brief §2.2: two
   Archivo instances at wdth-120/700/800; Barlow 400/700 upright). Subset to
   the house declared range, identical on all four faces (house-tech-spec §8;
   brief §2.4). Archivo instanced from Google's variable font with fontTools;
   Barlow is genuinely static already. Re-subset locally with pyftsubset — no
   remote font request ships. See README.md.
   -------------------------------------------------------------------------- */

@font-face {
  font-family: 'Archivo';
  src: url('../assets/fonts/archivo-700-expanded-latin.woff2') format('woff2');
  font-weight: 700;
  font-stretch: 120%;
  font-style: normal;
  font-display: swap;
  unicode-range:
    U+0020-007E, U+00A0, U+00A9, U+00AE, U+2122, U+00B0, U+00B7,
    U+2010-2015, U+2018-201A, U+201C-201E, U+2026, U+2032-2033;
}

@font-face {
  font-family: 'Archivo';
  src: url('../assets/fonts/archivo-800-expanded-latin.woff2') format('woff2');
  font-weight: 800;
  font-stretch: 120%;
  font-style: normal;
  font-display: swap;
  unicode-range:
    U+0020-007E, U+00A0, U+00A9, U+00AE, U+2122, U+00B0, U+00B7,
    U+2010-2015, U+2018-201A, U+201C-201E, U+2026, U+2032-2033;
}

@font-face {
  font-family: 'Barlow';
  src: url('../assets/fonts/barlow-400-latin.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  unicode-range:
    U+0020-007E, U+00A0, U+00A9, U+00AE, U+2122, U+00B0, U+00B7,
    U+2010-2015, U+2018-201A, U+201C-201E, U+2026, U+2032-2033;
}

@font-face {
  font-family: 'Barlow';
  src: url('../assets/fonts/barlow-700-latin.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
  unicode-range:
    U+0020-007E, U+00A0, U+00A9, U+00AE, U+2122, U+00B0, U+00B7,
    U+2010-2015, U+2018-201A, U+201C-201E, U+2026, U+2032-2033;
}

/* --- Metrics-matched fallbacks (house-tech-spec §8, brief §2.3). Donor:
   Liberation Sans (Arial's open-source clone, installed locally) — the
   measurement proxy for both fallback families. Computed by
   scripts/font-metrics.mjs (the `fontaine` algorithm). See README.md.
   Brief §2.3's own two names lead every stack; 'Liberation Sans' is an
   ADDED third-choice local(), never a replacement — it is the exact face
   the override numbers were measured against, so a machine carrying none of
   the brief's two named fonts (this build/QA container included) still
   swaps to a measured proxy instead of an unmeasured generic-sans
   substitution. Real visitor devices resolve the brief's own names first,
   unaffected. */

@font-face {
  font-family: 'Archivo Fallback';
  src: local('Arial Narrow'), local('Arial'), local('Liberation Sans');
  size-adjust: 128.85%;
  ascent-override: 68.14%;
  descent-override: 16.30%;
  line-gap-override: 0%;
}

@font-face {
  font-family: 'Barlow Fallback';
  src: local('Helvetica Neue'), local('Arial'), local('Liberation Sans');
  size-adjust: 96.96%;
  ascent-override: 103.14%;
  descent-override: 20.63%;
  line-gap-override: 0%;
}

@font-face {
  font-family: 'Barlow Bold Fallback';
  src: local('Helvetica Neue Bold'), local('Arial Bold'), local('Arial'), local('Liberation Sans Bold'), local('Liberation Sans');
  font-weight: 700;
  size-adjust: 92.39%;
  ascent-override: 108.23%;
  descent-override: 21.65%;
  line-gap-override: 0%;
}
