/* ==========================================================================
   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 components — professional-lawn-care-waterloo-ia
   brief.md §5-§9. Every value below reads a token; nothing here is a raw
   literal (house-tech-spec §3).
   ========================================================================== */

/* --- Eyebrow / section-head kicker -----------------------------------------
   Barlow 700, brief §2.7's role table. NEVER text-transform: uppercase on
   Barlow anywhere on this site (brief §2.7) — the natural-case string is
   what ships; letter-spacing carries the "eyebrow" register instead of a
   faked visual caps. Used for the hero eyebrow and every section's kicker
   label ("Two generations, one shop", "Grounds & Fleet", "Get a Quote"). */
.eyebrow {
  margin: 0;
  font-size: var(--text-eyebrow);
  font-weight: var(--font-weight-body-strong);
  letter-spacing: var(--tracking-eyebrow);
  color: var(--color-ink-muted);
}

/* h2 role, brief §2.7's role table — Bebas Neue Display, font-family/weight
   already set by base.css's h1-h4 rule; only the size is per-role. */
.section__title {
  margin-block-start: var(--space-2xs);
  font-size: var(--text-h2);
}

/* --- The settled-blade head-rule (brief §6.1) ------------------------------
   Reused as the static top rule of every section below the hero. One
   unbroken 1px line at any width >= 320px; it never re-triggers the settle
   animation, it is simply present, at rest. */
.section {
  border-block-start: var(--border-hairline) var(--border-style) var(--color-ink);
}

.band {
  background-color: var(--color-surface);
}

/* ==========================================================================
   §I Hero — "the thaw line" (brief §5.2, §7, §8.1)

   full-bleed-immersive: the SVG scene is the section's own background,
   coextensive with the whole hero, present at z-index 0 beneath the text
   from the first frame — never a separate boxed element competing with the
   content for vertical space (brief §7.2 rule 4).
   ========================================================================== */

.hero {
  position: relative;
  overflow: hidden;
  min-height: var(--hero-min-height-mobile);
  padding-block-end: var(--section-gap);
  color: var(--color-ink);
  /* Atmosphere gradient as the element's own CSS background — always
     full-bleed, never cropped (brief §8.1, R3). */
  background: linear-gradient(165deg, var(--color-bg) 0%, var(--color-atmosphere-end) 100%);
}

@media (min-width: 45rem) {
  .hero {
    min-height: var(--hero-min-height-desktop);
  }
}

/* The anchor — a plain full-width CSS band, independent of the decorative
   SVG's scaling (see the HTML comment at its markup: a portrait SVG scaled
   to COVER a wider/shorter desktop hero crops the atmosphere and inflates
   the shelf under the text, which R3 bars). 90/522 = 17.24% of the hero's
   height, matching brief §8.1's proportion at every width by construction. */
.hero__turf-shelf {
  position: absolute;
  z-index: var(--z-field);
  inset-inline: 0;
  inset-block-end: 0;
  height: 17.24%;
  background-color: var(--color-anchor);
  transform-origin: bottom;
  transform: scaleY(1);
}

.hero__field {
  position: absolute;
  inset: 0;
  z-index: var(--z-atmosphere);
}

.hero__svg {
  width: 100%;
  height: 100%;
  display: block;
}

.hero__content {
  position: relative;
  z-index: var(--z-hero-content);
  padding-block-start: var(--hero-content-pad-top);
  padding-inline: var(--hero-content-pad-x);
  padding-block-end: var(--hero-content-pad-bottom);
}

@media (min-width: 45rem) {
  .hero__content {
    max-width: var(--layout-measure);
    margin-inline: auto;
  }
}

.hero__eyebrow {
  min-height: var(--hero-eyebrow-height);
  margin-block-end: var(--hero-eyebrow-gap);
  display: flex;
  align-items: center;
}

.hero__title {
  display: flex;
  align-items: flex-end;
  min-height: var(--hero-h1-box);
  overflow: hidden;
  margin: 0 0 var(--hero-h1-gap);
  font-size: var(--text-h1);
}

.hero__cta-row {
  margin: 0 0 var(--space-2xs);
}

.hero__cta {
  min-height: var(--cta-height);
  width: 100%;
}

@media (min-width: 45rem) {
  .hero__cta {
    width: auto;
  }
}

.hero__cta-secondary-row {
  margin: 0;
}

.hero__cta-secondary {
  font-size: var(--text-small);
  font-weight: var(--font-weight-body-strong);
  color: var(--color-ink-muted);
}

/* --- The signature move — base state is the SETTLED end-state -------------
   Per design-rules §0's reduced-motion requirement: every animated
   element's base CSS (outside any media query) renders the final frame —
   blade at 0deg, turf shelf fully grown, tufts at neutral angle, beacon at
   full opacity. Only inside prefers-reduced-motion: no-preference do the
   start states and animation properties apply, overriding the base to
   begin the sequence (brief §7). */
.hero__blade {
  transform-origin: 30% 100%;
  transform: rotate(0deg);
}

.hero__tuft {
  transform-origin: 50% 100%;
}

.hero__beacon {
  opacity: 0.85;
}

@media (prefers-reduced-motion: no-preference) {
  .hero__blade {
    transform: rotate(-14deg);
    animation: hero-blade-settle var(--duration-settle) var(--ease-settle) forwards;
  }

  .hero__turf-shelf {
    transform: scaleY(0);
    animation: hero-turf-grow var(--duration-turf) var(--ease-settle) var(--turf-delay) forwards;
  }

  .hero__tuft--1 {
    animation: hero-tuft-sway var(--loop-tuft-1) ease-in-out infinite var(--loop-tuft-1-delay);
  }

  .hero__tuft--2 {
    animation: hero-tuft-sway var(--loop-tuft-2) ease-in-out infinite var(--loop-tuft-2-delay);
  }

  .hero__beacon {
    animation: hero-beacon-pulse var(--loop-beacon) ease-in-out infinite var(--loop-beacon-delay);
  }
}

@keyframes hero-blade-settle {
  from { transform: rotate(-14deg); }
  to   { transform: rotate(0deg); }
}

@keyframes hero-turf-grow {
  from { transform: scaleY(0); }
  to   { transform: scaleY(1); }
}

@keyframes hero-tuft-sway {
  0%, 100% { transform: rotate(-3deg); }
  50%      { transform: rotate(3deg); }
}

@keyframes hero-beacon-pulse {
  0%, 100% { opacity: 0.5; }
  50%      { opacity: 1; }
}

/* ==========================================================================
   §II Tenure/trust band (brief §6.2) — type-only, no photo/badge/seal shape.
   The tool-edge texture is a decorative accent beside the numeral, never a
   claim about a specific tool this business owns (brief §8.2 slot 3).
   ========================================================================== */

.tenure__row {
  display: grid;
  gap: var(--space-lg);
  margin-block-start: var(--space-md);
}

@media (min-width: 45rem) {
  .tenure__row {
    grid-template-columns: auto 1fr;
    align-items: center;
  }
}

.tenure__figure {
  display: grid;
  gap: var(--space-sm);
  justify-items: start;
}

.tenure__numeral {
  margin: 0;
  font-size: var(--text-h1);
  color: var(--color-accent-strong);
}

.tenure__texture {
  width: var(--texture-accent-size);
}

.tenure__texture img {
  border-radius: var(--radius-none);
}

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

.tenure__copy p {
  margin: 0;
}

/* ==========================================================================
   §III Grounds & Fleet (brief §6.2, §6.3) — the two-band index, never a
   card grid. ref-011's strict, unranked, single-column index, adapted.
   ========================================================================== */

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

.band-group {
  padding-block: var(--band-gap);
}

/* The divider sits BETWEEN the two bands only. `:first-of-type` matches by
   element tag, not by class -- `.band-head` is also a <div> and precedes
   `.band-group` in the DOM, so `.band-group:first-of-type` never matched
   the Grounds group at all and the divider rendered on the wrong band.
   An adjacent-sibling selector is exact regardless of what comes before
   the first `.band-group`. */
.band-group + .band-group {
  border-block-start: var(--border-hairline) var(--border-style) var(--color-border);
}

.band-group__label {
  margin: 0 0 var(--space-sm);
  font-size: var(--text-h2);
  letter-spacing: var(--tracking-band-label);
  color: var(--color-accent-strong);
}

.band-group__texture {
  display: block;
  margin-block-end: var(--space-sm);
}

.band-group__texture--fleet {
  width: var(--texture-accent-size);
  flex: 0 0 auto;
}

/* The Grounds/Fleet band-grid (brief §2.8's repeated ornament): at content
   widths <= ~340px only one 220px column fits and it collapses to a single
   column, every service name on its own full-width row — no truncation at
   any width. */
.band-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(var(--band-grid-col-min), 1fr));
  gap: var(--band-grid-gap) var(--space-lg);
}

.band-item {
  padding-block: var(--space-3xs);
}

.band-group__fleet-row {
  display: flex;
  flex-wrap: wrap-reverse;
  align-items: flex-start;
  gap: var(--space-md);
  margin-block-end: var(--space-sm);
}

.band-group__fleet-copy {
  flex: 1 1 var(--fleet-copy-basis);
  margin: 0;
  max-width: var(--layout-measure);
}

/* The one and only call-first control on the page (brief §6.3). */
.band-call {
  display: inline-flex;
  align-items: center;
  font-weight: var(--font-weight-body-strong);
  color: var(--color-accent-strong);
  min-height: var(--layout-tap-min);
}

.band-disclosure {
  margin-block-start: var(--space-md);
  font-size: var(--text-small);
  color: var(--color-ink-muted);
  max-width: var(--layout-measure);
}

/* ==========================================================================
   §IV Quote (brief §6.2) — the house form, extended with the brief's
   service-area select (shape 2, brief §6.5).
   ========================================================================== */

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

.quote-inversion {
  margin-block-start: var(--space-sm);
  font-weight: var(--font-weight-body-strong);
  color: var(--color-ink-muted);
}

/* Brief §5.3's 45rem/64rem breakpoints are consumed directly above (the hero
   and .tenure__row at 45rem; .rail/.band-grid settle into their widest
   column count under auto-fit at 64rem with no rule change needed — the
   grid already reflows continuously at every width). */
