/* ==========================================================================
   tokens.css — the design brief, compiled.

   forever-green-lawn-care-missoula-mt — brief.md v1, family `warm-craft`,
   archetype `editorial-stack`. Values cite brief.md §2/§3/§4/§5/§8. Full
   Builder-fill rationale (values the brief states but does not name) is
   recorded once in README.md rather than duplicated here.
   ========================================================================== */

:root {

  /* --- Colour. Derivation steps 1-4 and every contrast ratio: brief §3/§4. */

  --scheme: light;

  --color-bg:               #FAF3E9;  /* cream — hsl(37.9, 51.9%, 94.7%) */
  --color-surface:          #F0E4D0;  /* warm tan — raised bands, plates */

  --color-ink:               #241D16;  /* hsl(21.6, 33.9%, 11.4%) */
  --color-ink-muted:         #6B5C48;  /* 5.86:1 vs bg, 5.13:1 vs surface */

  --color-accent:            #89601A;  /* DOMINANT, larch-gold — 5.08:1 vs bg, tightest text/bg pair on site */
  --color-accent-ink:        #FFFFFF;  /* text/marks ON the accent fill — 5.60:1 */

  /* Anchor carrier (brief §3.1 step 3), hero grass blades ONLY — never text. */
  --color-moss:              #4B6B45;  /* 5.46:1 vs bg */

  /* --color-rule: decorative only (brief §3.2/§4.2). --color-border: field
     frame / focus-adjacent (brief §3.2) — 3.29:1 vs bg. */
  --color-rule:              #E4DACB;
  --color-border:            #8E8B85;
  --color-focus:              #241D16;  /* :focus-visible — 15.10:1 vs bg */
  --color-selection-bg:       #241D16;
  --color-selection-ink:      #FAF3E9;

  /* Hero atmosphere stops (brief §3.2/§0) — same values as bg/surface. */
  --color-atmo-1:            #FAF3E9;
  --color-atmo-3:            #F0E4D0;


  /* --- Typography (brief §2). Two families, 4 static woff2 — design-rules
     §5's ceiling, no headroom. SIL OFL 1.1, self-hosted, house-subset.
     font-weight only — no font-variation-settings (brief §2.2). */

  --font-display:        'EB Garamond', 'EB Garamond Fallback', 'EB Garamond Fallback Linux', Georgia, 'Times New Roman', serif;
  --font-display-italic: 'EB Garamond Italic', 'EB Garamond Italic Fallback', 'EB Garamond Italic Fallback Linux', Georgia, serif;
  --font-body:            'Karla', 'Karla Fallback', 'Karla Fallback Linux', 'Helvetica Neue', Arial, sans-serif;

  --font-weight-display:      500;   /* the only display weight on this site */
  --font-weight-emphasis:     500;   /* EB Garamond Italic, the accent word */
  --font-weight-body:         400;
  --font-weight-body-strong:  700;

  /* Type scale, fluid via clamp() across the brief's declared range
     (375/640/1024/1440, brief §2.8, copied verbatim). */

  --text-display: clamp(2.0625rem, 1.3rem + 3.1vw, 3.9rem);
  --text-h2:      clamp(1.375rem, 1.10rem + 1.17vw, 2.125rem);
  --text-h3:      1.25rem;   /* 20px fixed — brief §5.6's process-numeral size; also the header wordmark (Builder fill) */
  --text-lead:    clamp(1.0625rem, 1.0rem + 0.27vw, 1.375rem);
  --text-body:    1rem;
  --text-small:   0.8125rem;   /* 13px, fixed */
  --text-eyebrow: 0.75rem;     /* 12px, fixed */
  --text-micro:   0.6875rem;   /* 11px, fixed */

  --leading-display: 1.15;
  --leading-h2:      1.20;
  --leading-tight:   1.15;   /* house alias of --leading-display, for base.css's h1-h4 rule */
  --leading-lead:    1.50;
  --leading-body:    1.60;
  --leading-snug:    1.30;   /* Builder fill — kickers, eyebrow-adjacent labels */
  --leading-eyebrow: 1.6667;   /* 12 x 1.6667 = 20.00px */
  --leading-small:   1.55;     /* 13 x 1.55 = 20.15px */

  --tracking-tight:  -0.005em;  /* h1 */
  --tracking-normal:  0em;
  --tracking-wide:    0.16em;   /* eyebrow, kickers */


  /* --- Space — house scale, unchanged; brief §5.3/§5.5's arithmetic
     resolves entirely to these steps. */

  --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 rhythm (brief §5.5): fixed at every breakpoint. Only two call
     sites: .section's padding-block and the hero's padding-block-end. */
  --section-gap: var(--space-xl);   /* 64px, at every width */


  /* --- Layout. Brief §5.3's declared breakpoints (375/640/1024/1440) are
     NOT the house 48em/64em pair, so the gutter is its own stepped token. */

  --layout-container: 72rem;          /* house default; brief §5.3's 1120px content ceiling is --measure-page below */
  --layout-measure:   62ch;
  --layout-gutter:    1.25rem;        /* 20px, <640 — stepped at 40em/64em below */
  --layout-tap-min:   44px;

  --measure-page: 70rem;   /* 1120px — brief §5.3's own stated content ceiling at >=1024 */

  /* Sticky-chrome term brief §5.4's 101px arithmetic measures (44 + 56 + 1). */
  --header-height: 3.5rem; /* 56px, fixed */

  --hero-copy-max: 40rem; /* 640px, brief §5.3 — left-aligned column, >=1024 only */
  --hero-field-height: 20.625rem; /* 330px, brief §5.3 — fixed height, <640 */
  --control-height-primary: 3.25rem; /* 52px, brief §5.3 — fixed at every width */

  --section-head-rule-width: 6rem;   /* Builder fill — brief §5.1 states colour/weight, not length */


  /* --- Radius / shadow / border. Brief §3.2: the one hand-cut radius on
     this site; no shadow anywhere (ref-010's plate-craft hard edge). */

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

  --shadow-none: none;
  --shadow-sm:   none;
  --shadow-md:   none;
  --shadow-lg:   none;

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

  --border-trim: 2px;   /* the trim-line signature's stroke, and the process rows' static top rule (brief §8.2) */


  /* --- Motion (brief §8). Names verbatim from the brief's own token block. */

  --duration-fast:  140ms;   /* focus and hover */
  --duration-base:  320ms;   /* the scroll reveal */
  --duration-slow: 1100ms;   /* the trim-line draw — once */
  --delay-trim:     220ms;

  --ease-standard: cubic-bezier(.20, .60, .20, 1);
  --ease-draw:     cubic-bezier(.20, .72, .22, 1);
  --ease-out:      cubic-bezier(.20, .60, .20, 1);   /* house reveal-system alias */
  --ease-in-out:   cubic-bezier(.20, .60, .20, 1);   /* house reveal-system alias */

  --reveal-shift:   1.25rem;
  --reveal-stagger: 60ms;   /* brief §8.1 */

  --loop-blade-1: 6s;   /* ambient satellites, non-synchronised (brief §8.3) */
  --loop-blade-2: 7.5s;

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

/* Gutter step at the brief's own breakpoints (brief §5.3) — 40em = 640px,
   64em = 1024px, NOT the house 48em/64em pair. */
@media (min-width: 40em) {
  :root {
    --layout-gutter: 2rem; /* 32px */
  }
}

@media (min-width: 64em) {
  :root {
    --layout-gutter: 3rem; /* 48px */
  }
}

/* --------------------------------------------------------------------------
   @font-face — self-hosted woff2, latin subset, static instances. EB
   Garamond: SIL OFL 1.1 (Duffner/Pardo). Karla: SIL OFL 1.1 (Pinhorn).
   Licence: assets/fonts/OFL.txt. House declared range on all four faces
   (house-tech-spec §8; brief §2.4) — coverage check in README.md.
   -------------------------------------------------------------------------- */

@font-face {
  font-family: 'EB Garamond';
  src: url('../assets/fonts/eb-garamond-display-500.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: 'EB Garamond Italic';
  src: url('../assets/fonts/eb-garamond-italic-500.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: 'Karla';
  src: url('../assets/fonts/karla-400.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: 'Karla';
  src: url('../assets/fonts/karla-700.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;
}

/* --- Metrics-matched fallbacks (brief §2.3, house-tech-spec §8). Donors:
   Georgia, Georgia Italic, Helvetica Neue (Karla, both weights — brief
   §2.3's "share one measurement"). fontaine algorithm; targets read from
   the shipped woff2 (fontTools), donors from @capsizecss/metrics v4.2.0 —
   inputs and computation in README.md, not restated here. */

@font-face {
  font-family: 'EB Garamond Fallback';
  src: local('Georgia');
  font-weight: 500;
  font-style: normal;
  size-adjust: 128.76%;
  ascent-override: 78.21%;
  descent-override: 23.14%;
  line-gap-override: 0%;
}

@font-face {
  font-family: 'EB Garamond Italic Fallback';
  src: local('Georgia Italic'), local('Georgia');
  font-weight: 500;
  font-style: italic;
  size-adjust: 125.83%;
  ascent-override: 80.03%;
  descent-override: 23.68%;
  line-gap-override: 0%;
}

@font-face {
  font-family: 'Karla Fallback';
  src: local('Helvetica Neue'), local('Arial');
  font-weight: 400;
  font-style: normal;
  size-adjust: 116.78%;
  ascent-override: 78.53%;
  descent-override: 21.58%;
  line-gap-override: 0%;
}

@font-face {
  font-family: 'Karla Fallback';
  src: local('Helvetica Neue'), local('Arial');
  font-weight: 700;
  font-style: normal;
  size-adjust: 116.78%;
  ascent-override: 78.53%;
  descent-override: 21.58%;
  line-gap-override: 0%;
}

/* --- Second fallback tier, own donor (A-cf, owed-ledger.md — one tier per
   donor). Tier 1 matches nothing on Linux/Android (no Georgia/Helvetica
   Neue there); Liberation Serif/Sans do. Same method, README.md. */

@font-face {
  font-family: 'EB Garamond Fallback Linux';
  src: local('Liberation Serif');
  font-weight: 500;
  font-style: normal;
  size-adjust: 104.59%;
  ascent-override: 96.28%;
  descent-override: 28.49%;
  line-gap-override: 0%;
}

@font-face {
  font-family: 'EB Garamond Italic Fallback Linux';
  src: local('Liberation Serif Italic'), local('Liberation Serif');
  font-weight: 500;
  font-style: italic;
  size-adjust: 106.69%;
  ascent-override: 94.39%;
  descent-override: 27.93%;
  line-gap-override: 0%;
}

@font-face {
  font-family: 'Karla Fallback Linux';
  src: local('Liberation Sans');
  font-weight: 400;
  font-style: normal;
  size-adjust: 90.67%;
  ascent-override: 101.14%;
  descent-override: 27.79%;
  line-gap-override: 0%;
}

@font-face {
  font-family: 'Karla Fallback Linux';
  src: local('Liberation Sans Bold'), local('Liberation Sans');
  font-weight: 700;
  font-style: normal;
  size-adjust: 90.67%;
  ascent-override: 101.14%;
  descent-override: 27.79%;
  line-gap-override: 0%;
}
