/* ==========================================================================
   site.css — per-site layout & components, built FROM tokens.

   HARD RULE (house-tech-spec §3): no raw hex, no px/rem size literals, no
   font-name literals in this file. Tokens only. The Critic greps for it.
   The two escape hatches are the house breakpoints and an explicit
   `@allow-literal: reason` comment on the preceding line.

   WHAT THE SKELETON SHIPS HERE, AND WHY IT SHIPS SO LITTLE
   --------------------------------------------------------
   Only the shell: header/nav, the section rhythm hook, buttons, the form, the
   footer. That is everything a site needs structurally and nothing that
   decides how it looks.

   The skeleton deliberately ships NO hero, NO card grid, NO feature row, NO
   testimonial block and NO section-heading pattern. Those come from the
   approved brief's layout archetype (design-rules §7) and are written per
   site. A skeleton that shipped them would hand every business the same page
   with different colours — which is the exact failure the DNA registry
   exists to prevent, and it would collide head-on with the banned-defaults
   list (design-rules §4: three-card grids, four-stat rows, centred hero with
   two pill buttons, every section the same padding with a centred heading).

   And when a brief's archetype numbers its sections, its sub-lists take a
   visibly different mark — different numeral system, face and colour role —
   or no mark at all (design-rules §4, "two counters in one costume").

   Builder: extend this file with the brief's components. Do not "fill in" a
   hero here from memory — the brief is law (spec §12).
   ========================================================================== */

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

.container {
  width: 100%;
  max-width: var(--layout-container);
  margin-inline: auto;
  padding-inline: var(--layout-gutter);
}

/* Vertical rhythm hook. --section-gap is the only inter-section spacing value
   on a site (design-rules §7.1); the brief picks which scale step it is. */
.section {
  padding-block: var(--section-gap);
}

.measure {
  max-width: var(--layout-measure);
}

/* --- Header & navigation --------------------------------------------------
   Progressive enhancement: with JS off the nav list is a plain, always-visible
   list of links and the toggle stays [hidden] (it ships hidden in the HTML;
   main.js reveals it). With JS on, narrow viewports collapse the list behind
   the toggle. Nothing about navigation depends on JavaScript.              */

.site-header {
  position: relative;
  z-index: var(--z-header);
  padding-block: var(--space-sm);
  border-bottom: var(--border-hairline) var(--border-style) var(--color-border);
  background-color: var(--color-bg);
}

.site-header__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-sm);
}

.site-header__brand {
  font-family: var(--font-display);
  font-size: var(--text-h3);
  font-weight: var(--font-weight-display);
  text-decoration: none;
  letter-spacing: var(--tracking-tight);
}

.nav-toggle {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2xs);
  padding: var(--space-2xs) var(--space-xs);
  /* The nav-toggle's only shape is this hairline, so it is a CONTROL boundary
     (WCAG 1.4.11, >= 3:1), not a decorative one — use --color-border-strong. */
  border: var(--border-hairline) var(--border-style) var(--color-border-strong);
  border-radius: var(--radius-sm);
  font-size: var(--text-small);
  font-weight: var(--font-weight-body-strong);
}

.site-nav__list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-sm);
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-nav__link {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  font-size: var(--text-small);
  font-weight: var(--font-weight-body-strong);
}

.site-nav__link:hover,
.site-nav__link:focus-visible {
  text-decoration: underline;
  text-underline-offset: var(--space-3xs);
}

/* QA r3 FIX perf/cls (this skeleton-level defect was confirmed present,
   verbatim, on every site built from it -- see
   runs/3-elements-landscaping-asheville-nc/qa/critic-round-2.md): the
   collapsed state used to apply only once a deferred `type="module"`
   script called `initNav()` and set `[data-nav-ready]`, so the full nav
   list rendered open at first paint and then collapsed into the hamburger
   AFTER first contentful paint -- a timing race with no fixed outcome that
   shifted the whole header (and everything below it) and scored CLS
   0.066-0.094 in the majority of Lighthouse runs. Inverting the default
   removes the race entirely: closed is now the plain CSS default below
   48em, with no JS gate, so there is nothing left to collapse post-paint.
   The one visitor this would otherwise strand -- JS off, so
   `[data-nav-ready]` never lands -- gets the nav back via the <noscript>
   stylesheet override in `@shared:head-boilerplate` (index.html/buy.html/
   thanks.html), which ships last in source order and wins the
   display:block/display:none tie on cascade order alone, no
   `!important`. The nav-toggle button already ships `hidden` in the HTML
   and only JS ever clears that, so JS-off visitors never see a dead
   control -- nothing to change there. */
.site-nav {
  display: none;
}

[data-nav-ready] .site-nav[data-nav-open='true'] {
  display: block;
  flex-basis: 100%;
}

@media (min-width: 48em) {
  .site-nav {
    display: block;
  }

  [data-nav-ready] .nav-toggle {
    display: none;
  }
}

/* --- Buttons --------------------------------------------------------------
   Two roles, no more. Radius, weight and colour all come from the brief via
   tokens — including --radius-none, which is a legitimate answer.          */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2xs);
  padding: var(--space-xs) var(--space-md);
  border: var(--border-hairline) var(--border-style) transparent;
  border-radius: var(--radius-sm);
  font-weight: var(--font-weight-body-strong);
  line-height: var(--leading-snug);
  text-align: center;
  text-decoration: none;
  transition: background-color var(--duration-fast) var(--ease-out),
              color var(--duration-fast) var(--ease-out);
}

.btn--primary {
  background-color: var(--color-accent);
  color: var(--color-accent-ink);
}

.btn--quiet {
  /* Outline button: the border is the whole control, so it takes the 3:1
     control-boundary token, not the decorative hairline (WCAG 1.4.11). */
  border-color: var(--color-border-strong);
  color: var(--color-ink);
}

/* --- Form -----------------------------------------------------------------
   One form per site (spec §6). POSTs to the endpoint constant in main.js;
   works as a plain HTML POST with JS off; auto-hides when no endpoint is
   configured so a spec site never shows a dead form.                       */

.form {
  display: grid;
  gap: var(--space-md);
  max-width: var(--layout-measure);
}

.field {
  display: grid;
  gap: var(--space-3xs);
}

.field__label {
  font-size: var(--text-small);
  font-weight: var(--font-weight-body-strong);
}

.field__control {
  width: 100%;
  min-height: var(--layout-tap-min);
  padding: var(--space-2xs) var(--space-xs);
  background-color: var(--color-surface);
  color: var(--color-ink);
  border: var(--border-hairline) var(--border-style) var(--color-border);
  border-radius: var(--radius-sm);
}

textarea.field__control {
  min-height: var(--space-3xl);
  resize: vertical;
}

.field__hint {
  font-size: var(--text-small);
  color: var(--color-ink-muted);
}

/* Honeypot: present in the DOM for bots, unreachable for humans and assistive
   tech. Not display:none — some bots skip those. */
.form__trap {
  position: absolute;
  /* @allow-literal: off-canvas parking position, not a design value */
  left: -9999px;
  opacity: 0;
  pointer-events: none;
}

.form__status {
  font-size: var(--text-small);
  color: var(--color-ink-muted);
}

.form__status[data-state='error'] {
  color: var(--color-ink);
  font-weight: var(--font-weight-body-strong);
}

/* --- Footer ---------------------------------------------------------------- */

.site-footer {
  padding-block: var(--space-xl);
  border-top: var(--border-hairline) var(--border-style) var(--color-border);
  font-size: var(--text-small);
}

.site-footer a {
  text-underline-offset: var(--space-3xs);
}

.site-footer__nap {
  font-style: normal;
}

/* ============================================================================
   ============================================================================
   BRIEF-SPECIFIC — 4th-generations-doors-24-hour-door-repair-huntington-wv

   Archetype: band-rhythm (alternating --color-bg / --color-surface bands,
   both dark — brief §2, §6). Signature: "the coil takes the load" (brief
   §6.3). Tokens only — no raw hex/px/font literals below except inside the
   two house escape hatches (media-query conditions, and an explicit
   @allow-literal comment).
   ============================================================================
   ============================================================================ */

/* --- House overrides scoped to this brief ---------------------------------
   The skeleton's default nav item 2 destination is #contact; this brief has
   no contact band (copy.md §1.9) and instead routes NAV_ITEM_2 at the "Get
   an Estimate" band, id="estimate" (copy.md §6). That edit lives in the
   shared header markup itself (both index.html and thanks.html), not here.

   .site-header__brand normally sits at --text-h3 in the body face; this
   brief's wordmark reads in the display face instead, matching the tile's
   "oversized-wordmark" borrow (brief §1, ref-008). Same specificity as the
   house rule above (one class), later in source order, so it wins with no
   !important. */
.site-header__brand {
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wide);
}

/* --- Section head — the H2 underline (brief §3.4) --------------------------
   "border-bottom: 3px solid var(--color-accent) — an absolute px value
   spanning the heading's own box." inline-block makes the border span only
   the rendered text width, never the full container. */
.section__title {
  display: inline-block;
  font-size: var(--text-h2);
  text-transform: uppercase;
  padding-block-end: var(--space-2xs);
  border-bottom: var(--border-thick) var(--border-style) var(--color-accent);
  margin-block-end: var(--space-lg);
}

.section__intro {
  color: var(--color-ink-muted);
  font-size: var(--text-lead);
  line-height: var(--leading-lead);
  margin-block-end: var(--space-lg);
}

/* Band alternation: .section already carries padding-block from
   --section-gap (house). Background colour is the only thing that changes
   between bands (brief §5.2: "a colour-token swap between adjacent
   sections, zero extra bytes"). */
.band-a { background-color: var(--color-bg); }
.band-b { background-color: var(--color-surface); }

/* ============================================================================
   HERO — brief §4.3/§4.4. DOM order: eyebrow -> h1 -> primary CTA ->
   living-hero field -> lead -> facts (design-rules §7.2 rule 1).
   ============================================================================ */

.hero {
  background-color: var(--color-bg);
  padding-block-start: var(--space-md);
  /* brief §5.2: the hero's padding-block-end is one of the two --section-gap
     call sites, matching every other band boundary on the page. */
  padding-block-end: var(--section-gap);
}

/* Shared eyebrow treatment — the hero's own, and the one thanks.html repeats
   above its H1 so trade + place answer plank 1 there too (brief §4.3,
   design-rules §7.2 rule 5; copy.md §2's fold-check note). */
.eyebrow {
  font-size: var(--text-eyebrow);
  line-height: var(--leading-snug);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  font-weight: var(--font-weight-body-strong);
  color: var(--color-accent);
}

.hero__eyebrow {
  margin-block-end: var(--space-xs);
}

.thanks__eyebrow {
  margin-block-end: var(--space-sm);
}

.hero__heading {
  font-size: var(--text-hero);
  text-transform: uppercase;
  margin-block-end: var(--space-sm);
}

.hero__cta-row {
  margin-block-end: var(--space-md);
}

.hero .btn--primary {
  font-family: var(--font-display);
  font-weight: var(--font-weight-cta);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wide);
}

.hero__lead {
  font-size: var(--text-small);
  line-height: var(--leading-lead);
  color: var(--color-ink-muted);
  margin-block-start: var(--space-sm);
  max-width: var(--layout-measure);
}

.hero__facts {
  font-size: var(--text-small);
  line-height: var(--leading-snug);
  color: var(--color-ink-muted);
  margin-block-start: var(--space-2xs);
}

/* --- The living-hero field (brief §4.4) ------------------------------------
   Fixed 180px height at every breakpoint — the one spectacular moment
   (design-rules §0), the vehicle for the vertical anchor (brief §4.5). */

.field {
  position: relative;
  overflow: hidden;
  block-size: var(--hero-field-height);
  background-color: var(--color-surface);
}

.field img {
  position: absolute;
  inset: 0;
  inline-size: 100%;
  block-size: 100%;
  object-fit: cover;
  /* Biased toward the coil + roller, which is what a narrow mobile crop
     must keep in view; the panel-course sliver at the right edge is what a
     wide crop reveals in addition. */
  object-position: 30% 55%;
}

/* Atmosphere — brief §4.4, verbatim. Scoped to .field only, which carries no
   text content at all, so §3.2's contrast table stays exact rather than a
   claim (brief §3.2's closing note). */
.field::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(90% 120% at 80% 40%, rgba(232, 98, 42, .32) 0%, rgba(232, 98, 42, 0) 60%),
    radial-gradient(60% 40% at 15% 92%, rgba(232, 98, 42, .10), transparent 65%);
  pointer-events: none;
}

/* --- "The coil takes the load" (brief §6.3) --------------------------------
   Two independently-timed, non-synchronised, decorative-only loops over the
   generated image. Neither carries text; both are aria-hidden. */

.field__glint {
  position: absolute;
  inset-inline-start: 31%;
  inset-block-end: 30%;
  inline-size: var(--space-2xs);
  block-size: var(--space-lg);
  border-radius: var(--radius-pill);
  background: linear-gradient(
    to top,
    rgba(242, 237, 228, 0) 0%,
    rgba(242, 237, 228, .85) 50%,
    rgba(242, 237, 228, 0) 100%
  );
  pointer-events: none;
  animation: glint-climb var(--duration-glint) var(--ease-glint) both;
}

@keyframes glint-climb {
  from { transform: translateY(0); opacity: .9; }
  to   { transform: translateY(calc(-1 * var(--glint-travel))); opacity: .55; }
}

.field__roller {
  position: absolute;
  inset-inline-start: 33%;
  inset-block-start: 64%;
  inline-size: var(--space-lg);
  block-size: var(--space-lg);
  border-radius: var(--radius-pill);
  border: var(--border-hairline) var(--border-style) rgba(242, 237, 228, .55);
  pointer-events: none;
}

.field__roller::after {
  content: '';
  position: absolute;
  inset-inline-start: 50%;
  inset-block-start: 50%;
  inline-size: var(--border-thick);
  block-size: 40%;
  background-color: rgba(242, 237, 228, .75);
  transform-origin: 50% 100%;
  transform: translate(-50%, -100%);
  animation: roller-turn var(--duration-roller) var(--ease-roller) infinite;
}

@keyframes roller-turn {
  from { transform: translate(-50%, -100%) rotate(0deg); }
  to   { transform: translate(-50%, -100%) rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
  .field__glint {
    animation: none;
    transform: translateY(calc(-1 * var(--glint-travel)));
    opacity: .55;
  }
  .field__roller::after {
    animation: none;
  }
}

/* ============================================================================
   SERVICE LEDGER — "What We Fix" (brief §5 row 2, §5.1, §3.4). Heavy Chivo
   numerals in the accent, each row tagged Residential / Res . Comm.
   ============================================================================ */

.ledger {
  margin: 0;
  padding: 0;
}

.ledger__row {
  display: grid;
  grid-template-columns: minmax(var(--ledger-numeral-min), var(--ledger-numeral-max)) 1fr;
  gap: var(--space-sm);
  padding-block: var(--space-md);
  border-block-end: var(--border-hairline) var(--border-style) var(--color-border);
}

.ledger__row:first-child {
  padding-block-start: 0;
}

.ledger__num {
  font-family: var(--font-display);
  font-weight: var(--font-weight-display);
  font-size: var(--text-h2);
  line-height: 1;
  color: var(--color-accent);
}

.ledger__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--space-sm);
  margin-block-end: var(--space-2xs);
}

.ledger__name {
  font-family: var(--font-display);
  font-weight: var(--font-weight-display);
  font-size: var(--text-lead);
  text-transform: uppercase;
  letter-spacing: var(--tracking-tight);
  line-height: var(--leading-tight);
  margin: 0;
}

.ledger__tag {
  font-family: var(--font-body);
  font-weight: var(--font-weight-body-strong);
  font-size: var(--text-small);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wide);
  color: var(--color-ink-muted);
  border: var(--border-hairline) var(--border-style) var(--color-border);
  border-radius: var(--radius-sm);
  padding-inline: var(--space-2xs);
  padding-block: var(--space-3xs);
  white-space: nowrap;
}

.ledger__desc {
  color: var(--color-ink-muted);
  margin: 0;
  max-width: var(--layout-measure);
}

/* ============================================================================
   HOW WE FIX IT — process band (brief §5 row 3, §5.1). Distinct numeral
   system from the ledger: circled Unicode digits, Barlow 600 sentence case,
   ink-muted rather than accent-coloured.
   ============================================================================ */

.process {
  display: grid;
  gap: var(--space-lg);
  margin: 0;
  padding: 0;
  margin-block-end: var(--space-xl);
}

@media (min-width: 48em) {
  .process {
    grid-template-columns: repeat(3, 1fr);
  }
}

.process__title {
  font-family: var(--font-body);
  font-weight: var(--font-weight-body-strong);
  font-size: var(--text-h3);
  text-transform: none;
  letter-spacing: var(--tracking-normal);
  line-height: var(--leading-snug);
  margin-block-end: var(--space-2xs);
}

.process__num {
  color: var(--color-ink-muted);
}

.process__desc {
  color: var(--color-ink-muted);
  margin: 0;
}

.process__closing {
  color: var(--color-ink-muted);
  border-block-start: var(--border-hairline) var(--border-style) var(--color-border);
  padding-block-start: var(--space-lg);
}

/* ============================================================================
   REVIEWS — "What Huntington Says" (brief §5 row 5).
   ============================================================================ */

.reviews {
  display: grid;
  gap: var(--space-lg);
  margin: 0;
  padding: 0;
}

@media (min-width: 48em) {
  .reviews {
    grid-template-columns: repeat(2, 1fr);
  }
}

.review {
  margin: 0;
  padding-block-start: var(--space-md);
  border-block-start: var(--border-hairline) var(--border-style) var(--color-border);
}

.review__quote {
  margin: 0 0 var(--space-sm) 0;
}

.review__attribution {
  margin: 0;
  font-size: var(--text-small);
  color: var(--color-ink-muted);
}

/* ============================================================================
   SERVICE AREA — "Where We Work" (brief §5 row 6). Text list, no map.
   ============================================================================ */

.town-list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin: 0;
  padding: 0;
}

.town-chip {
  font-size: var(--text-small);
  font-weight: var(--font-weight-body-strong);
  color: var(--color-ink);
  border: var(--border-hairline) var(--border-style) var(--color-border);
  border-radius: var(--radius-sm);
  padding-inline: var(--space-sm);
  padding-block: var(--space-2xs);
}

/* ============================================================================
   GET AN ESTIMATE — secondary CTA band (brief §5 row 7).
   ============================================================================ */

.estimate__cta {
  margin-block-start: var(--space-md);
}

.btn--stacked {
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-3xs);
  line-height: var(--leading-snug);
}

.btn__label {
  font-family: var(--font-display);
  font-weight: var(--font-weight-cta);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wide);
}

.btn__subline {
  font-family: var(--font-body);
  font-weight: var(--font-weight-body);
  font-size: var(--text-small);
  text-transform: none;
  letter-spacing: var(--tracking-normal);
}

/* ============================================================================
   Decorative background washes — slots 2-4 (brief §6.1). Low-opacity,
   lazy-loaded, never the LCP element, never interactive, aria-hidden.
   ============================================================================ */

.section--wash {
  position: relative;
  isolation: isolate;
}

.section--wash .wash {
  position: absolute;
  inset: 0;
  z-index: var(--z-base);
  overflow: hidden;
  pointer-events: none;
}

.section--wash .wash img {
  inline-size: 100%;
  block-size: 100%;
  object-fit: cover;
  opacity: .16;
}

.section--wash .container {
  position: relative;
}
