/* tokens.css — the design brief, compiled.
   D & I Repair, Inc. (Manhattan, KS). Source: brief.md (approved C3 round 2,
   2026-10-03), family editorial-modern, archetype manifest-stack. Every
   value below is the brief's — nothing improvised (house-tech-spec §3). */

:root {

  /* --- Colour — brief §2 -------------------------------------------------
     Derivation: dossier §4.5 confirms no real-world colour to echo, no
     brand_color recorded; local character (Manhattan, KS) carries no
     institutional colour to echo either; family norms (editorial-modern) +
     playbook §6.1's own named utility-accent register ("the orange of a
     pencil or a cordless drill") give shellac-amber, distinct from that
     neighbourhood as its own named hue. */

  --scheme: light;

  --color-bg:            #FBF7EF;  /* paper-white ground */
  --color-surface:       #F1EADC;  /* card/field ground — raised panels only, never under accent text */
  --color-ink:           #211F1C;  /* graphite-ink — body + heading text */
  --color-ink-muted:     #504B43;  /* secondary text AND the two small-print markers (C2 fix #2) */
  --color-accent:        #B07A1E;  /* shellac-amber — the one-shot tick mark only, never text */
  --color-accent-ink:    #FBF7EF;  /* unused as a fill-ink pairing on this site; kept for token-contract completeness */

  --color-border:        #D6CAB0;  /* decorative hairlines — manifest row dividers, section rules */
  --color-border-strong: #8C8575;  /* control boundaries — >=3:1 vs bg AND surface */

  --color-focus: #B07A1E;          /* :focus-visible ring — 3.48:1 vs bg (1.4.11 floor is 3:1) */

  /* No dark band anywhere on this site (single light editorial ground
     throughout), so --color-focus-on-band is not declared. */

  --color-selection-bg: #211F1C;
  --color-selection-ink: #FBF7EF;

  /* BINDING (brief §2, C2 fix #2): the accent colour never appears as TEXT,
     at any size, anywhere on this site. It is used exactly once, as the
     stroke colour of the one-shot tick-mark SVG path (a non-text graphical
     object, WCAG 1.4.11's 3:1 floor, 3.48:1 measured) in the hero manifest
     and nowhere else. The eyebrow's "— " prefix and the facts list's "✓ "
     prefix render in --color-ink-muted (8.09:1) instead. */

  /* --- Typography — brief §3 ---------------------------------------------
     Newsreader (display: Regular 500 upright for h1/h2/h3 and manifest
     items; Italic 500 for the hero H1 only — a true italic master, not
     synthesized) / Public Sans (body: Regular 400; Bold 700 on the primary
     CTA label only). 4 woff2 files total, at the house ≤4-file ceiling. */

  --font-display:         'Newsreader', 'Newsreader Fallback', 'Times New Roman', 'Liberation Serif', Georgia, serif;
  --font-display-italic:  'Newsreader Italic', 'Newsreader Italic Fallback', 'Times New Roman', 'Liberation Serif', Georgia, serif;
  --font-body:            'Public Sans', 'Public Sans Fallback', 'Helvetica Neue', Arial, sans-serif;

  --font-weight-body:        400;
  --font-weight-body-strong: 700;  /* Public Sans Bold — the primary CTA label only */
  --font-weight-display:     500;  /* both Newsreader instances load at 500 (brief §3 AD decision) */

  /* font-variation-settings is NOT used by either face — both ship as
     static single-weight instances (brief §3), so the wght-vs-font-weight
     trap (house-tech-spec §8) has no call site here. */

  /* --- Type scale — brief §3, computed at every declared breakpoint
     (375/640/768/1024/1440) in the brief's own table. */

  --text-hero:  clamp(2.5rem, 1.8rem + 4vw, 4.75rem);
  --text-h2:    clamp(1.5rem, 1.1rem + 1.6vw, 2.25rem);
  --text-h3:    clamp(1.125rem, 1.02rem + 0.5vw, 1.375rem);
  --text-lead:  clamp(1.0625rem, 1rem + 0.35vw, 1.1875rem);
  --text-body:  clamp(1rem, 0.95rem + 0.3vw, 1.125rem);
  --text-small: clamp(0.8125rem, 0.8rem + 0.1vw, 0.875rem);
  /* No separate --text-eyebrow token (brief §3): the eyebrow reuses
     --text-small directly, rather than inventing a redundant slot. */

  --leading-tight: 1.05;
  --leading-snug:  1.25;
  --leading-body:  1.6;

  --tracking-tight:  -0.02em;
  --tracking-normal: 0em;
  --tracking-wide:   0.08em;

  /* --- 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 §4.1: 64px, fixed at every breakpoint. */
  --section-gap: var(--space-xl);

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

  --layout-container: 72rem;   /* 1152px, brief §4.6 */
  --layout-measure:   62ch;
  --layout-gutter:    clamp(1.25rem, 5vw, 3rem);
  --layout-tap-min:   44px;

  /* Per-section text measures, brief §4.6's own table — tokenised so
     site.css carries no raw ch literal (spec §3). */
  --measure-hero-text:  34ch;
  --measure-hero-field: 58ch;
  --measure-trust:      28ch;
  --measure-form:       40ch;
  --measure-service:    50ch;
  --measure-process:    24ch;
  --measure-reviews:    38ch;
  --measure-hours:      30ch;

  /* Sticky header — the brief's own target (§4.4/§4.6): <=56px at every
     breakpoint, single-line wordmark + phone, no distinct desktop height
     stated. One value, every width. */
  --bar-height: 3.5rem;   /* 56px */

  /* Desktop hero split, brief §4.6: 46% text column / 54% manifest column.
     fr units rather than literal percentages so the stated --space-xl
     column-gap is subtracted before the 46/54 ratio is applied, which is
     what a % pair would not do. */
  --hero-columns-lg: 46fr 54fr;

  /* Eyebrow wrap width, in ch (self-scaling to whichever face is currently
     painted). Measured so the two-line break lands on the same word in both
     the metrics-matched fallback and the real webfont (27ch verified against
     both at 375px) — a fixed px measure here would let the font swap move
     the line count by one, which is the CLS lighthouse actually caught. */
  --measure-eyebrow: 27ch;

  /* --- Radius / shadow / border -------------------------------------------
     editorial-modern, near-zero radius throughout — the brief's register.
     No --shadow-* group: separation is hairlines, nothing on this site
     casts a drop shadow. */

  --radius-none: 0;
  --radius-sm:   2px;
  --radius-pill: 999px;

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

  /* --- Motion — brief §6: unmodified house reveal defaults. ---------------- */

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

  /* The one living-hero moment (brief §4.3/§6): the tick settles once, two
     independently-looping tool marks sway, and the atmosphere breathes.
     Durations named in the brief, tokenised rather than inlined. */
  --tick-draw-duration: 1.1s;
  --satellite-screw:    7.4s;
  --satellite-hinge:    6.2s;
  --atmos-duration:     10s;
  --drift-sm:           0.1875rem;

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

/* Brief §6: motion tokens collapse at their source under reduced motion;
   base.css already collapses --duration-* and --reveal-shift. This site's
   own tick-draw/satellite/atmosphere tokens are stopped the same way, at
   matching specificity, so everything freezes with no !important
   (house-tech-spec §12). */
@media (prefers-reduced-motion: reduce) {
  :root {
    --drift-sm: 0;
  }
}

/* --------------------------------------------------------------------------
   @font-face — two families, four static files, SIL OFL 1.1 (assets/fonts/
   OFL-Newsreader.txt, OFL-PublicSans.txt). Subset to the house declared
   safe range (spec §8), unicode-range identical on every face. Self-hosted.

   Metrics-matched fallbacks (spec §7/§8), MEASURED with scripts/font-
   metrics.mjs against the real shipped woff2 post-subset, never guessed.
   DONOR DISCLOSURE (shedhorn-plumbing-helena-mt precedent): this build
   env has no Times New Roman/Helvetica Neue — fc-match substitutes
   Liberation Serif/Sans, measured against those; local() still targets
   the real system faces a visitor's browser resolves.

   COVERAGE GAP (spec §8 pattern): of U+2010/2011/2012/2015, Newsreader
   carries 2010, Public Sans none — no live call site (the rendered census
   of every page uses only ASCII U+002D hyphens); re-check on a copy
   amendment. */

@font-face {
  font-family: 'Newsreader Fallback';
  src: local('Times New Roman'), local('Liberation Serif'), local('Georgia');
  size-adjust: 107.78%;
  ascent-override: 68.19%;
  descent-override: 24.59%;
  line-gap-override: 0%;
}

@font-face {
  font-family: 'Newsreader Italic Fallback';
  src: local('Times New Roman Italic'), local('Liberation Serif Italic'), local('Georgia Italic');
  font-style: italic;
  size-adjust: 101.82%;
  ascent-override: 72.19%;
  descent-override: 26.03%;
  line-gap-override: 0%;
}

@font-face {
  font-family: 'Public Sans Fallback';
  src: local('Helvetica Neue'), local('Arial'), local('Liberation Sans');
  font-weight: 400;
  size-adjust: 105.21%;
  ascent-override: 90.3%;
  descent-override: 21.39%;
  line-gap-override: 0%;
}

@font-face {
  font-family: 'Public Sans Fallback';
  src: local('Helvetica Neue'), local('Arial'), local('Liberation Sans');
  font-weight: 700;
  size-adjust: 99.41%;
  ascent-override: 95.57%;
  descent-override: 22.63%;
  line-gap-override: 0%;
}

@font-face {
  font-family: 'Newsreader';
  src: url('../assets/fonts/newsreader-500-latin.woff2') format('woff2');
  font-weight: 500;
  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: 'Newsreader Italic';
  src: url('../assets/fonts/newsreader-italic-500-latin.woff2') format('woff2');
  font-weight: 500;
  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;
}

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

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