/* tokens.css — the design brief, compiled.
   Milhorn Appliance, Kingsport TN. Source: brief.md (approved C3 2026-09-21),
   family editorial-modern, archetype editorial-stack. Every value below is
   the brief's — nothing improvised (house-tech-spec §3). */

:root {

  /* --- Colour — brief §2.1 -------------------------------------------------
     Derivation: no real-world brand colour recorded (dossier §4.5 — no
     signage/van/uniform/logo signal; the business's own site CSS is
     "template evidence, not brand evidence", provenance ground 4). Palette
     lands on the trade's own unused native material (white enamel / brushed
     steel / porcelain) as the ground, with Ledger Crimson as a single
     ink-and-annotation accent. See brief §2.1/§8. */

  --scheme: light;

  --color-bg:            #F4F5F6;  /* Steel White — the trade's own unused neutral */
  --color-surface:       #FFFFFF;
  --color-ink:           #24272B;  /* Graphite */
  --color-ink-muted:     #5A5F66;
  --color-accent:        #8E2A22;  /* Ledger Crimson */
  --color-accent-ink:    #FFFFFF;

  --color-border:        #D7DADD;  /* decorative hairlines ONLY — no contrast floor */
  --color-border-strong: #7A7F85;  /* control boundaries — WCAG 1.4.11, >=3:1 vs bg AND surface */

  --color-focus: #8E2A22;          /* = accent; already >=3:1 vs bg and surface */

  /* No dark band anywhere on this site (single light editorial ground
     throughout — the hero's atmosphere layer is a radial tint on the light
     ground, never a dark band), so --color-focus-on-band is not declared. */

  --color-selection-bg: #8E2A22;
  --color-selection-ink: #FFFFFF;

  /* --- Typography — brief §2.3 -------------------------------------------
     Display: Prata (single static weight, 400, no italic master). Body:
     Work Sans (400/600). Emphasis (pull-quotes only, Act 03): Source Serif 4
     Italic (single static weight, 400 Italic — static instance, never the
     variable file, per house-tech-spec §8's font-variation-settings trap).
     All three subset to the house declared safe range, unicode-range
     identical on every face. */

  --font-display: 'Prata', 'Prata Fallback', 'Prata Fallback 2', Georgia, serif;
  --font-body:    'Work Sans', 'Work Sans Fallback', Arial, sans-serif;
  /* Emphasis face is called by its own family name directly where used
     (pull-quotes, Act 03 reviews) — the token contract's two required roles
     (display, body) are unchanged, per brief §2.3. */
  --font-emphasis: 'Source Serif 4 Italic', 'Source Serif 4 Italic Fallback', Georgia, serif;

  --font-weight-body:        400;  /* Work Sans Regular */
  --font-weight-body-strong: 600;  /* Work Sans SemiBold — eyebrows, CTA labels, emphasis-in-body */
  --font-weight-display:     400;  /* Prata ships ONLY Regular — never synthesize a bold instance */

  /* --- Type scale — brief §2.3, fluid via clamp(), computed at every
     stated breakpoint (375/768/1024/1440) in the brief's own table. */

  --text-hero:    clamp(2.2rem, 1.6rem + 4vw, 4.5rem);
  --text-h2:      clamp(1.7rem, 1.3rem + 2.4vw, 2.75rem);
  --text-h3:      clamp(1.25rem, 1.05rem + 1.2vw, 1.75rem);
  --text-lead:    clamp(1.05rem, 0.9rem + 1vw, 1.3rem);
  --text-body:    clamp(1rem, 0.92rem + 0.5vw, 1.0625rem);
  --text-small:   0.9375rem;  /* fixed — same value at every breakpoint */
  --text-eyebrow: 0.8125rem;  /* fixed — same value at every breakpoint */

  --leading-tight: 1.05;   /* H1 */
  --leading-snug:  1.25;   /* H2/H3 */
  --leading-body:  1.6;    /* body/lead */

  --tracking-tight:  -0.02em;
  --tracking-normal: 0em;
  --tracking-wide:   0.08em;  /* eyebrows only, via text-transform: uppercase
                                  on naturally-cased source copy — never typed
                                  in caps (house-tech-spec §8) */

  /* --- Space --------------------------------------------------------------
     House scale, unmodified. */

  --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;

  /* Inter-section rhythm — brief §3.3: 64px, fixed (not fluid) at every
     width, including 375 and 1440. Two call sites only: .section's
     padding-block and the hero's padding-block-end. */
  --section-gap: var(--space-xl);

  /* --- Layout -------------------------------------------------------------- */

  --layout-container: 72rem;
  --layout-measure:   62ch;
  --layout-gutter:    clamp(1.25rem, 5vw, 3rem);
  --layout-tap-min:   44px;

  /* Brief-specific — §3.2's own sticky-chrome budget, implemented as an
     explicit header block-size rather than left to derive from padding
     around a 44px control (which measured 77px, well past the 56px/72px
     targets the fold arithmetic is computed against). Fixed block-size +
     align-items: center hits the stated numbers exactly, at zero CLS cost
     (no post-load height change). */
  --bar-height:    56px;   /* site header, <64em (brief §3.2) */
  --bar-height-lg: 72px;   /* site header, >=64em — larger tap-to-call target */

  /* --- Radius / shadow / border -------------------------------------------
     editorial-modern, ruled-column register: sharp corners throughout, no
     drop shadows, hairline rules carry the structure (brief §1, ref-011). */

  --radius-none: 0;
  --radius-sm: 2px;
  --radius-md: 6px;
  --radius-lg: 16px;
  --radius-pill: 999px;

  --shadow-none: none;
  --shadow-sm: 0 1px 2px rgb(36 39 43 / 0.06);
  --shadow-md: 0 6px 24px rgb(36 39 43 / 0.09);
  --shadow-lg: 0 24px 60px rgb(36 39 43 / 0.14);

  --border-hairline: 1px;
  --border-thick: 3px;
  --border-style: solid;

  /* --- Motion --------------------------------------------------------------
     House reveal tokens, unmodified — reveal style is the standard fade +
     8px rise (brief §5). */

  --duration-fast: 140ms;
  --duration-base: 320ms;
  --duration-slow: 640ms;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);

  --reveal-shift: 1.25rem;
  --reveal-stagger: 90ms;

  /* Brief-specific tokens (brief §5) — the hero's one signature move, the
     diagnostic line-draw and the annotation dot's independent pulse. Two
     periods (2.4s / 5.4s) that are never synchronized. */
  --duration-diagnosis: 2400ms;   /* the line-draw, one-shot on load */
  --duration-pulse:     5400ms;   /* the annotation dot, looping */

  /* --- Z layers ----------------------------------------------------------- */
  --z-base: 0;
  --z-header: 100;
  --z-nav-panel: 200;
  --z-skip-link: 300;
}

/* Reduced motion also collapses the brief-specific signature-move tokens —
   base.css's kill switch already zeroes the house duration tokens; these two
   are additional and must be zeroed the same way, at the source, so
   js/main.js's diagnostic-device code (which reads them only for its CSS
   animation durations) needs no separate reduced-motion branch. */
@media (prefers-reduced-motion: reduce) {
  :root {
    /* @allow-literal: a duration token must resolve to a real time value */
    --duration-diagnosis: 0.01ms;
    --duration-pulse: 0.01ms;
  }
}

/* --------------------------------------------------------------------------
   @font-face — three families, four static files (Prata 400, Work Sans 400,
   Work Sans 600, Source Serif 4 Italic 400), all SIL OFL 1.1
   (assets/fonts/OFL-Prata.txt, OFL-WorkSans.txt, OFL-SourceSerif4.txt).
   Subset to the HOUSE declared safe range (house-tech-spec §8), unicode-range
   identical on every face. No CDN, self-hosted only.

   Metrics-matched fallbacks first (house-tech-spec §7/§8), MEASURED with
   scripts/font-metrics.mjs against the real shipped woff2 files (post-
   subset), never guessed. Method: size-adjust/ascent-override/
   descent-override/line-gap-override, standard Fontaine formula.

   PRATA and WORK SANS reuse the exact fallback measurements already taken
   for these same shipped font files on hky-services-hickory-nc (identical
   woff2 bytes — same Google Fonts static subset, same house declared range —
   so the metrics are the same real numbers, not a new guess). PRATA gets two
   fallback tiers: 'Prata Fallback' measured against Gelasio (Georgia's open
   metric twin) and tried first via local('Georgia'); 'Prata Fallback 2'
   measured against DejaVu Serif, for environments without Georgia. WORK SANS
   needs one tier, measured against Liberation Sans (this environment's
   local('Arial') resolution target).

   SOURCE SERIF 4 ITALIC is new to this site (the brief's emphasis face) and
   is measured fresh: webfont = the shipped 400-italic subset, fallback =
   Gelasio Italic (Georgia's open italic twin), via
   `node scripts/font-metrics.mjs --webfont assets/fonts/source-serif-4-latin-400-italic.woff2 --fallback <gelasio-italic.ttf>`.
   ------------------------------------------------------------------------ */

@font-face {
  font-family: 'Prata Fallback';
  src: local('Georgia'), local('Gelasio');
  size-adjust: 108.43%;
  ascent-override: 91.58%;
  descent-override: 33.39%;
  line-gap-override: 0%;
}

@font-face {
  font-family: 'Prata Fallback 2';
  src: local('DejaVu Serif');
  size-adjust: 92.91%;
  ascent-override: 106.87%;
  descent-override: 38.96%;
  line-gap-override: 0%;
}

@font-face {
  font-family: 'Work Sans Fallback';
  src: local('Arial'), local('Liberation Sans');
  font-weight: 400;
  size-adjust: 113.41%;
  ascent-override: 82%;
  descent-override: 21.43%;
  line-gap-override: 0%;
}

@font-face {
  font-family: 'Work Sans Fallback';
  src: local('Arial'), local('Liberation Sans');
  font-weight: 600;
  size-adjust: 113.25%;
  ascent-override: 82.12%;
  descent-override: 21.46%;
  line-gap-override: 0%;
}

/* Measured 2026-09-21: webfont = assets/fonts/source-serif-4-latin-400-italic.woff2
   (unitsPerEm 1000, ascent 1036, descent -335, lineGap 0, avgCharWidth 431.11);
   fallback = Gelasio Italic 400 (unitsPerEm 2048, avgCharWidth 909.98). */
@font-face {
  font-family: 'Source Serif 4 Italic Fallback';
  src: local('Georgia Italic'), local('Georgia');
  font-style: italic;
  size-adjust: 97.03%;
  ascent-override: 106.77%;
  descent-override: 34.53%;
  line-gap-override: 0%;
}

@font-face {
  font-family: 'Prata';
  src: url('../assets/fonts/prata-latin-400-normal.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+00BF, U+00C0-00FF, U+2010-2015, U+2018-201A, U+201C-201E, U+2026, U+2032-2033;
}

@font-face {
  font-family: 'Work Sans';
  src: url('../assets/fonts/work-sans-latin-400-normal.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+00BF, U+00C0-00FF, U+2010-2015, U+2018-201A, U+201C-201E, U+2026, U+2032-2033;
}

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

@font-face {
  font-family: 'Source Serif 4 Italic';
  src: url('../assets/fonts/source-serif-4-latin-400-italic.woff2') format('woff2');
  font-weight: 400;
  font-style: italic;
  font-display: swap;
  unicode-range: U+0020-007E, U+00A0, U+00A9, U+00AE, U+2122, U+00B0, U+00B7, U+00BF, U+00C0-00FF, U+2010-2015, U+2018-201A, U+201C-201E, U+2026, U+2032-2033;
}
