/* ==========================================================================
   tokens.css — brief.md v1 (approved 2026-08-31), family `retro-local`,
   palette burnt-marigold/parchment-cream/light, display Rye, body Karla,
   archetype `full-bleed-immersive`, signature "the card punches in". Every
   value below is copied from brief.md §2-§6. Builder-fill supplements are
   each a direct restatement of a brief-stated value or an unoverridden house
   default (noted inline).
   ========================================================================== */

:root {

  /* Colour (brief §3.4). Derivation: step 1 CONFIRMED EMPTY (c1-gate item 7 /
     dossier §4.5) -> step 2 local character (dossier §4.5, none found) ->
     step 3 family norms (retro-local's Americana signage register, §3.1). */

  --scheme: light;

  --color-bg:            #F5ECD9;   /* parchment cream — page ground */
  --color-surface:       #FFFFFF;   /* card/chip ground */
  --color-ink:           #241A0F;   /* near-black warm brown */
  --color-ink-muted:     #6B5A44;   /* muted brown — secondary text */

  --color-accent:        #7A4D09;   /* DOMINANT — burnt-marigold, hsl(36°, 86%, 26%) */
  --color-accent-ink:    #F5ECD9;   /* text on accent fills — = bg, warm-on-warm */
  --color-accent-tint:   #F6D98A;   /* light marigold tint — H1 accent word, hero gradient ONLY */

  --color-atmos-dark:    #3A2408;   /* hero gradient — darkest named stop */
  --color-atmos-deep:    #1A1006;   /* hero gradient — darkest EXTREME beneath overlaid type */
  --color-atmos-mid:     #7A4D09;   /* hero gradient — lightest stop beneath the h1's own band, = --color-accent */
  --color-atmos-glow:    #C99A3F;   /* hero gradient — brief §3.6's own fourth stop, 72% */

  --color-border:        #6B5A44;   /* functional UI edges — form fields — reuses ink-muted */
  --color-rule:          #E6D9BC;   /* DECORATIVE hairlines only — trust-index row dividers */

  --color-focus:         #7A4D09;
  --color-selection-bg:  #7A4D09;
  --color-selection-ink: #F5ECD9;

  /* Dark-band-safe focus ring: §I services ships on --color-ink ground
     (brief §4.6 §I). --color-accent-tint measures 12.37:1 against ink —
     clears the 3:1 floor with no new hue. Scoped to the band in site.css. */
  --color-focus-on-band: var(--color-accent-tint);

  /* Typography (brief §2). Two families, three static woff2 — inside
     design-rules §5's <=4-file/<=2-family ceiling. Rye: SIL OFL 1.1, Sorkin
     Type Co, argued exception to retro-local's starter pool (§2.1). Karla:
     SIL OFL 1.1, family's own starter pool. assets/fonts/OFL.txt carries
     both notices. No italic anywhere: emphasis_font is null (front matter);
     the only emphasis device is the H1 accent word (--color-accent-tint). */

  --font-display: 'Rye', 'Rye Fallback', Rockwell, Georgia, serif;
  --font-body:     'Karla', 'Karla Fallback', 'Trebuchet MS', Verdana, sans-serif;

  --font-weight-body:        400;   /* Karla — body, captions */
  --font-weight-body-strong: 700;   /* Karla — CTA labels, trust-index/services headings */
  --font-weight-display:     400;   /* Rye ships exactly one weight */

  /* Type scale — computed across its full range, brief §2.5. */

  --text-display: clamp(2.0rem, 1.3rem + 3.0vw, 4.2rem);
  --text-h2:      clamp(1.375rem, 1.10rem + 1.0vw, 2.0rem);
  --text-lead:    clamp(1.0625rem, 1.0rem + 0.25vw, 1.3125rem);
  --text-body:    1rem;       /* fixed — 16px at every width */
  --text-eyebrow: 0.75rem;    /* fixed — 12px at every width */
  --text-micro:   0.6875rem;  /* fixed — 11px at every width */

  --leading-tight: 1.05;  /* h1 */
  --leading-snug:  1.30;  /* h2, eyebrow, all-caps labels */
  --leading-body:  1.60;  /* body, lead */
  --tracking-eyebrow: 0.16em;
  --tracking-normal:  0em;
  /* base.css's shared h1-h4 rule reads --tracking-tight; the brief states no
     tracking for Rye headings, so this aliases the neutral value rather
     than inventing a negative figure for a sign-painter slab face. */
  --tracking-tight: var(--tracking-normal);

  /* Space — house scale, brief §3.4. --space-3xl is an unused house rung,
     kept for token-contract completeness (skeleton's textarea pattern). */

  --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.3): two call sites, .section's
     padding-block and the hero's padding-block-end. 64px FIXED; the section
     boundary (2x this) is the largest vertical gap in the document. */
  --section-gap: var(--space-xl);

  /* Layout (brief §4.1/§4.2). full-bleed-immersive: single column at every
     width, no column-switch breakpoint. One declared breakpoint, 48rem. */

  --layout-container: 72rem;   /* 1152px outer box for overlaid content */
  --layout-gutter:    1rem;    /* 16px <48rem -> 2.5rem (40px) >=48rem, media query below */
  --layout-measure:   34rem;   /* 544px prose cap */
  --layout-tap-min:   44px;

  /* Sticky stack = expiry 44 + header 56 + 1px border = 101px (brief §4.4/
     §4.5, design-rules §7.2 rule 3; Nic's placement ruling, house-tech-spec
     §2). --expiry-height lives once, in css/preview.css. */
  --header-height:  3.5rem;   /* 56px */
  --control-height: 3.25rem;  /* 52px — brief §4.6 hero slot ③ "52px tall" */

  /* Radius/shadow/border (brief §3.4). radius-sm is the ONE radius (CTA,
     chips, image frame); shadow-none is the ONE shadow. Reserved steps
     resolve to those two for token-contract completeness. */

  --radius-none: 0;
  --radius-sm: 3px;
  --radius-md: var(--radius-sm);
  --radius-lg: var(--radius-sm);
  --radius-pill: var(--radius-sm);

  --shadow-none: none;
  --shadow-sm: var(--shadow-none);
  --shadow-md: var(--shadow-none);
  --shadow-lg: var(--shadow-none);

  --border-hairline: 1px;
  --border-frame: 2px;   /* brief §4.6: "2px --color-ink frame" around the living field */
  --border-thick: 3px;   /* house focus-ring weight; brief states no override */
  --border-style: solid;

  /* Motion (brief §6.1/§3.4). Reveal system: IntersectionObserver, rootMargin
     -12%, opacity+rise over --duration-slow with --ease-out, rows stagger by
     --reveal-stagger. The signature move (card/stamp/steam/handle) uses its
     own named animations in site.css since its 5.4s/8.6s/7.1s timings are
     not house reveal steps; it gets its own reduced-motion override there. */

  --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 §6.2): one one-shot 5.4s
     sequence (card 0-42%, stamp 44-56%, never repeats) plus two independent
     loops sharing no small common period (steam 8.6s, handle 7.1s). Easings
     copied from the approved tile (tiles/tile-b.html). */
  --duration-signature: 5.4s;
  --duration-steam: 8.6s;
  --duration-handle: 7.1s;
  --ease-card: cubic-bezier(0.2, 0.7, 0.2, 1);
  --ease-stamp: cubic-bezier(0.3, 0.6, 0.2, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);

  /* Signature element geometry, sized off the approved tile's own px values. */
  --card-w: 2.75rem;    /* 44px */
  --card-h: 3.75rem;    /* 60px */
  --stamp-w: 1.875rem;  /* 30px */
  --stamp-h: 1rem;      /* 16px */
  --steam-w: 0.3125rem; /* 5px */
  --steam-h: 1.375rem;  /* 22px */
  --handle-w: 0.1875rem; /* 3px */
  --handle-h: 2.125rem;  /* 34px */
  --card-travel: 4.375rem; /* 70px — card's off-screen start offset, tile precedent */
  --steam-lift: -0.375rem; /* 6px rise at the drift loop's midpoint, tile precedent */

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

/* One declared breakpoint (brief §2.5/§4.2): 48rem widens the gutter and the
   hero-inner top padding only — no column-switch breakpoint. */
@media (min-width: 48rem) {
  :root {
    --layout-gutter: 2.5rem;
  }
}

/* --------------------------------------------------------------------------
   @font-face — self-hosted woff2, static instances (brief §2.1: Rye 400
   only; Karla 400+700). Subset to the house declared safe range, byte-
   identical on both faces (house-tech-spec §8; brief §2.3). Rye subset via
   fontTools/pyftsubset from the Google Fonts release; Karla subset reused
   byte-for-byte from an existing house build subset to the same range
   (eastview-landscaping-huntsville-al).

   MEASURED post-subset: rye-400 19,748 B, karla-400 10,136 B, karla-700
   10,280 B — 40,164 B total, largest face 19,748 B (<=100 KB/<=60 KB budget).

   COVERAGE GAP (house-tech-spec §8): U+2032-2033 are in the declared range
   and absent from both faces' source files; both lack the same two
   codepoints, so this is a shared gap, never a mid-sentence split.
   -------------------------------------------------------------------------- */

@font-face {
  font-family: 'Rye';
  src: url('../assets/fonts/rye-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: 'Karla';
  src: url('../assets/fonts/karla-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: 'Karla';
  src: url('../assets/fonts/karla-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;
}

/* Metrics-matched fallbacks (house-tech-spec §8, brief §2.4). MEASURED with
   scripts/font-metrics.mjs (fontaine algorithm), not invented. Donor:
   Liberation Serif/Sans (proxy — neither brief-named font is installed here
   under its own name; the shipped src lists still name the brief's fonts
   first). Full table + CLS caveat: README.md. */

@font-face {
  font-family: 'Rye Fallback';
  src: local('Rockwell'), local('Georgia'), local('Liberation Serif');
  size-adjust: 130.81%;
  ascent-override: 75.40%;
  descent-override: 20.16%;
  line-gap-override: 0%;
}

@font-face {
  font-family: 'Karla Fallback';
  src: local('Trebuchet MS'), local('Verdana'), local('Liberation Sans');
  size-adjust: 103.53%;
  ascent-override: 88.57%;
  descent-override: 24.34%;
  line-gap-override: 0%;
}
