/* ==========================================================================
   tokens.css — the design brief, compiled. THE ONLY PLACE RAW VALUES LIVE
   (house-tech-spec §3). Every value below is brief.md §3.3; nothing here was
   chosen at build time. The one value the brief hands the Builder as a
   MEASUREMENT is --grade-knockout (§5.3.2), derived in README.md.
   ========================================================================== */

:root {

  /* --- Colour — design-rules §6's order, brief §3.1. Step 1 (the business's
     real-world colours) is EMPTY and stays empty: dossier §4.5 records no
     sighting, so schema §3.2's echo default has not attached. If G6 closes,
     this palette owes a re-derivation, not a defence. --- */

  --scheme: light;                        /* one deliberate mode — design-rules §6 */

  --color-bg:            #F5F3ED;         /* hsl(48, 24%, 95%)  chalk — the valley's dry silt */
  --color-surface:       #FFFDF8;         /* hsl(46, 78%, 99%)  form fields, the FAQ open state */
  --color-ink:           #1A1E17;         /* hsl(94, 13%, 11%)  basalt-green ink */
  --color-ink-muted:     #4F5449;         /* hsl(88,  8%, 31%) */
  --color-accent:        #2C5321;         /* hsl(107, 43%, 23%) DOMINANT — leaf green */
  --color-accent-ink:    #F5F3ED;         /* type and marks ON the accent fill */
  --color-soil:          #3A3129;         /* hsl(30, 17%, 20%)  the below-grade ground; the ONE dark band */
  --color-ink-onband:    #F5F3ED;         /* body/display type on soil */
  --color-ink-muted-onband: #B7B1A6;      /* secondary type on soil ONLY */

  /* House-required structural colours */
  --color-border:        #7E8375;         /* hsl(88,  6%, 49%)  EVERY rule, hairline and field border */
  --color-focus:         #2C5321;
  --color-focus-on-band: #A9D08C;         /* REQUIRED: this site has a dark band */
  --color-selection-bg:  #2C5321;
  --color-selection-ink: #F5F3ED;

  /* Hero atmosphere — three named stops, and NOTHING else on the site is a
     gradient (brief R2). Every hero ratio is measured at the darkest stop. */
  --color-atmos-1:       #FFFDF8;
  --color-atmos-2:       #F3EFE3;
  --color-atmos-3:       #E7E2D3;

  /* --- Typography (brief §2.6) — two families, three static instances.
     Neither face is hard-banned or watch-listed, so no font exception is owed
     (brief §2.1). no variable-axis declaration appears anywhere (brief R11). --- */

  --font-display:     'Young Serif', 'Young Serif Fallback', Georgia, 'Iowan Old Style', serif;
  --font-body:        'Epilogue', 'Epilogue Fallback', 'Segoe UI', Arial, sans-serif;
  --font-body-strong: 'Epilogue 600', 'Epilogue Strong Fallback', 'Segoe UI', Arial, sans-serif;

  --font-weight-body: 400;
  --font-weight-body-strong: 600;
  --font-weight-display: 400;

  /* --- Type scale (brief §2.8), computed there at 320/375/768/1024/1440. No
     clamp's floor binds on a supported width; the two fixed values are fixed
     because slot ①'s character budget needs a known advance. --- */

  --text-hero:    clamp(2.375rem, 1.4rem + 5.6vw, 5.5rem);
  --text-h2:      clamp(1.75rem, 1.36rem + 2.24vw, 2.75rem);
  --text-h3:      clamp(1.1875rem, 1.09rem + 0.56vw, 1.5rem);
  --text-lead:    clamp(1.0625rem, 1rem + 0.35vw, 1.3125rem);
  --text-body:    clamp(0.9375rem, 0.9rem + 0.21vw, 1.0625rem);
  --text-small:   0.875rem;
  --text-eyebrow: 0.6875rem;

  --leading-tight: 1.06;   /* h1 only — the grade split's geometry depends on it */
  --leading-snug:  1.24;   /* h2, h3, service names, town names, the §IV band sentence */
  --leading-body:  1.62;   /* body, lead, FAQ answers, process step text, both footer lists */
  --leading-caps:  1.36;   /* eyebrow, every caps label */

  --tracking-tight:  -0.012em;  /* h1 and h2 only */
  --tracking-normal:  0em;
  --tracking-caps:    0.12em;   /* every text-transform: uppercase string */

  /* --- Space — house scale, unchanged ------------------------------------ */

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

  /* The ONE inter-section value (brief §5.6). Two call sites: .section's
     padding-block and the hero's padding-block-end. 64px at every width. */
  --section-gap: var(--space-xl);

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

  --layout-container: 72rem;              /* 1152px */
  --layout-measure:   62ch;
  --layout-gutter:    clamp(1rem, 4.8vw, 2.5rem);   /* 16 / 18 / 36.86 / 40 / 40 px */
  --layout-tap-min:   44px;
  --header-height:    56px;               /* + 1px border-block-end — brief §5.5 */
  --field-ratio:      16 / 10;            /* the hero field, every width */
  --band-edge-ratio:  3 / 1;              /* §IV's top edge — brief §7.2 slot 4 */

  /* --- The signature (brief §5.3) ----------------------------------------
     MEASURED, not predicted. The brief shipped 0.306em as an estimate and
     required the Builder to replace it with k = L − B + 0.18·C read off the
     real face. Measured in Chromium at 375 with document.fonts.ready awaited:
     L 1.06em, B 0.8641em, C 0.7373em -> k = 0.3286em. The acceptance band is
     0.24em–0.38em (brief §5.3.2), so no escalation is owed. The derivation and
     the five-width verification are in README.md. */
  --grade-knockout:     0.3286em;
  --grade-knockout-min: 8px;              /* below this the device yields, brief §5.3.5 */

  /* --- Radius / shadow / border. Deliberately absent: --radius-md, -lg,
     -pill and --shadow-sm/md/lg — design-rules §4 bans uniform radius and a
     shadow on every card, and the cheapest way to obey is not to ship. --- */

  --radius-none: 0;
  --radius-sm:   2px;                     /* the quote control and form fields — nothing else */
  --shadow-none: none;                    /* NOTHING on this site casts a shadow */
  --border-hairline: 1px;
  --border-thick:    2px;                 /* the process step tick */
  --border-style:    solid;

  /* --- Motion (brief §8) -------------------------------------------------- */

  --duration-fast:   160ms;
  --duration-base:   320ms;
  --duration-reveal: 480ms;
  --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:   1rem;                 /* 16px */
  --reveal-stagger: 90ms;
  --rm-sweep-opacity: 0.30;               /* the reduced-motion still frame — brief §8.4 */

  /* --- Values the brief states in prose. No raw size literal may live outside
     this file (§3), so every number the brief names in a §5 or §6 sentence is
     declared here. None was chosen at build time. --- */

  --eyebrow-max:      30rem;   /* §5.4 — max-inline-size: min(100%, 30rem) */
  --row-pad-top:      10px;    /* §5.6 — index, process, town and FAQ rows */
  --row-pad-bottom:   9px;     /* §5.6 — the same rows */
  --tick-length:      12px;    /* §6.6 — the process step tick, 12×2px */
  --reserved-min:     120px;   /* §6.2 §VI/§VIII — the reserved frame's floor */
  --control-height:   52px;    /* §5.5 / §6.2 §I — the primary control below 768 */
  --control-height-lg: 56px;   /* §5.5 / §6.2 §I — the primary control at ≥768 */

  /* §6.6 — the tick indents are 0/6/12/18/24/30px and HALVE at ≤340px. Both
     endpoints are the brief's; the ramp is a clamp rather than a third
     breakpoint, because §5.1 rule 5 allows only 48rem and 64rem in site.css.
     Exactly 3px at 340 and 6px at 375, flat outside that interval. */
  --tick-step: clamp(3px, calc(8.5714vw - 26.143px), 6px);

  /* --- Ambient satellite motion (§8.3): four aria-hidden elements over the
     hero field on independent loops. 17/23/29/31 are prime, so the group never
     re-phases. Periods, phases, path and opacity range are §8.3's values.
     THE SIZES AND POSITIONS ARE STATED NOWHERE IN THE BRIEF and are flagged to
     the Art Director (§13 item 8); a ruling costs one edit here. --- */
  --float-period-1: 17s;
  --float-period-2: 23s;
  --float-period-3: 29s;
  --float-phase-2: -6s;
  --float-phase-3: -13s;
  --sweep-period: 31s;

  --mote-x1:  5px;   --mote-y1:  -9px;
  --mote-x2: -4px;   --mote-y2: -15px;
  --mote-x3: -7px;   --mote-y3:  -6px;

  --sweep-opacity-min: 0.16;
  --sweep-opacity-max: 0.42;

  --mote-size:  6px;           /* UNSTATED in the brief — flagged, §13 item 8 */
  --sweep-size: 46%;           /* UNSTATED in the brief — flagged, §13 item 8 */
  /* §8.3 calls the sweep warm and RADIAL and ref-001's borrowed technique is a
     SOFT radial atmosphere, but R2 allows exactly one gradient on the site and
     it is the hero ground. A blur is how a hard-edged element becomes a soft
     glow without one. The radius is UNSTATED — flagged, §13 item 8. */
  --sweep-blur: 72px;

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

/* --------------------------------------------------------------------------
   @font-face — self-hosted woff2 only, subset to house-tech-spec §8's DECLARED
   SAFE RANGE, font-display: swap. Three static instances, two families
   (brief §2.2). The unicode-range below is byte-identical on all three faces.
   The cross-family cmap read and its two findings are in README.md — reported,
   never fixed by narrowing this range.
   -------------------------------------------------------------------------- */

@font-face {
  font-family: 'Young Serif';
  src: url('../assets/fonts/young-serif-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: 'Epilogue';
  src: url('../assets/fonts/epilogue-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: 'Epilogue 600';
  src: url('../assets/fonts/epilogue-600-latin.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;
}

/* --- Metrics-matched fallbacks, one per instance, at zero bytes (brief §2.4).
   A MEASUREMENT, not a design decision; method, donors and the acceptance test
   (Lighthouse CLS 0.000) are in README.md. Each declares the font-weight of the
   instance it stands in for, or the browser synthesises the 600 and a synthetic
   weight is wider than the real one. Donors are Georgia and Arial (brief §2.4);
   their metric-compatible open twins are second local() candidates. --- */

@font-face {
  font-family: 'Young Serif Fallback';
  src: local('Georgia'), local('Gelasio');
  font-weight: 400;
  font-style: normal;
  size-adjust: 115.75%;
  ascent-override: 90.37%;
  descent-override: 31.62%;
  line-gap-override: 0%;
}

@font-face {
  font-family: 'Epilogue Fallback';
  src: local('Arial'), local('Liberation Sans');
  font-weight: 400;
  font-style: normal;
  size-adjust: 113.97%;
  ascent-override: 69.32%;
  descent-override: 20.62%;
  line-gap-override: 0%;
}

@font-face {
  font-family: 'Epilogue Strong Fallback';
  src: local('Arial'), local('Liberation Sans');
  font-weight: 600;
  font-style: normal;
  size-adjust: 117.45%;
  ascent-override: 67.26%;
  descent-override: 20.01%;
  line-gap-override: 0%;
}
