/* ==========================================================================
   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-brand);
  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-family: var(--font-display);
  font-size: var(--text-small);
  font-weight: var(--font-weight-brand);
  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 COMPONENTS — grass-tenders-llc-pauline-sc, brief.md v1 (C3 approved
   2026-09-15). editorial-modern / survey-stack. Tokens only, per spec §3.
   ========================================================================== */

/* --- Shared label device (brief §2.2): eyebrows and cluster labels share
   one uppercase, tracked, accent-coloured treatment — the house pattern for
   every running label on the page. Natural case in the DOM, uppercased with
   text-transform (spec §8 — assistive tech and copy-paste both need the
   real casing). --------------------------------------------------------- */

.eyebrow,
.cluster-label {
  font-family: var(--font-display);
  font-size: var(--text-eyebrow);
  font-weight: var(--font-weight-brand);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--color-accent);
}

.cluster-label {
  margin-block: var(--space-md) var(--space-2xs);
}

.section__head {
  margin-block-end: var(--space-lg);
}

.section__head h2 {
  font-size: var(--text-h2);
  margin-block-start: var(--space-2xs);
}

.section__cta {
  margin-block-start: var(--space-lg);
}

/* Narrow text-bearing sections (brief §4: ~760px) vs. the house
   --layout-container default (~1040px, card-bordered sections). */
.container.container--narrow {
  max-width: var(--layout-measure);
}

/* The signature move's static half — "the plan draws true" (brief §6): the
   hero's one-shot plan-line settles into a hairline, and that same hairline
   is reused as the head-rule atop every section below it, unifying the
   hero's drafting device with the survey-stack index's own ruled structure. */
.section .section__head {
  border-block-start: var(--border-plan) var(--border-style) var(--color-accent);
  padding-block-start: var(--space-md);
}

/* --- Hero (brief §3/§4/§6) --------------------------------------------
   House order: nav-strip → eyebrow → h1 → primary CTA → field (living-hero)
   → lead → facts. CSS grid named areas keep that DOM order at every width;
   only the visual placement changes at the desktop breakpoint. --------- */

.hero {
  padding-block-end: var(--section-gap);
}

.hero__grid {
  display: grid;
  grid-template-areas:
    'eyebrow'
    'h1'
    'cta'
    'field'
    'lead'
    'facts';
  row-gap: var(--space-sm);
  padding-block-start: var(--space-md);
}

.hero__eyebrow {
  grid-area: eyebrow;
  margin-block-end: 0;
}

.hero__title {
  grid-area: h1;
  font-size: var(--text-hero);
  letter-spacing: var(--tracking-tight);
  margin-block-end: 0;
}

.hero__title em {
  font-family: var(--font-body-italic);
  font-style: italic;
  font-weight: var(--font-weight-emphasis);
  color: var(--color-accent);
}

.hero__act {
  grid-area: cta;
  margin-block-end: 0;
}

.hero__field {
  grid-area: field;
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-sm);
  background-color: var(--color-field-placeholder);
  aspect-ratio: 1600 / 950;
}

.hero__field picture,
.hero__field img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero__overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

/* Motion base state = the final resting frame (spec §8: reduced-motion is
   the default; animation is only added under no-preference). Matches Tile A
   exactly (brief §6): 1.3s / 0.15s draw, 7.4s / 9.8s ambient loops on two
   non-synchronised periods. */
.plan-line {
  stroke-dasharray: 260;
  stroke-dashoffset: 0;
}

.sprig-group {
  transform-origin: var(--sprig-origin);
}

.tick-group {
  transform-origin: var(--tick-origin);
}

@media (prefers-reduced-motion: no-preference) {
  .plan-line {
    stroke-dashoffset: 260;
    animation: draw-plan-line var(--duration-plan-draw) var(--ease-out) var(--delay-plan-draw) forwards;
  }

  .sprig-group {
    animation: sprig-sway var(--loop-sprig-sway) var(--ease-ambient) infinite alternate;
  }

  .tick-group {
    animation: tick-float var(--loop-tick-float) var(--ease-ambient) infinite alternate;
  }
}

@keyframes draw-plan-line {
  to {
    stroke-dashoffset: 0;
  }
}

@keyframes sprig-sway {
  from {
    transform: rotate(-3deg);
  }
  to {
    transform: rotate(4deg);
  }
}

@keyframes tick-float {
  from {
    transform: translateY(var(--tick-float-rest));
  }
  to {
    transform: translateY(var(--tick-float-peak));
  }
}

.hero__lead {
  grid-area: lead;
  font-family: var(--font-body);
  font-size: var(--text-lead);
  line-height: var(--leading-snug);
  max-width: var(--layout-measure);
  margin-block-end: 0;
}

.hero__facts {
  grid-area: facts;
  font-size: var(--text-small);
  color: var(--color-ink-muted);
  border-block-start: var(--border-hairline) var(--border-style) var(--color-border);
  padding-block-start: var(--space-xs);
  margin-block-end: 0;
}

@media (min-width: 64em) {
  .hero__grid {
    grid-template-columns: 55fr 45fr;
    column-gap: var(--space-xl);
    align-items: center;
    grid-template-areas:
      'eyebrow field'
      'h1      field'
      'cta     field'
      'lead    field'
      'facts   field';
  }
}

/* --- Services index — the survey-stack device (brief §3, LOAD-BEARING) -- */

.section--card {
  background-color: var(--color-bg);
}

.index-card {
  background-color: var(--color-card);
  border: var(--border-hairline) var(--border-style) var(--color-border);
  border-radius: var(--radius-sm);
  padding: var(--space-lg);
}

.index-rule {
  border-inline-start: var(--border-thick) var(--border-style) var(--color-accent);
  padding-inline-start: var(--space-md);
}

.index-item {
  display: flex;
  gap: var(--space-md);
  align-items: baseline;
  padding-block: var(--space-sm);
  border-block-end: var(--border-hairline) var(--border-style) var(--color-border);
}

.index-item:last-child {
  border-block-end: none;
}

.index-num {
  font-family: var(--font-body-italic);
  font-style: italic;
  font-weight: var(--font-weight-emphasis);
  font-size: var(--text-h3);
  color: var(--color-accent);
  flex: none;
  width: var(--index-num-width);
}

.index-name {
  font-family: var(--font-display);
  font-size: var(--text-body);
  font-weight: var(--font-weight-body-strong);
  margin-block-end: var(--space-3xs);
}

.index-body {
  color: var(--color-ink-muted);
  margin-block-end: 0;
}

.index-divider {
  margin-block: var(--space-lg);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.index-divider img {
  width: 100%;
  height: auto;
}

/* --- Process strip (brief §3, FLAVOR) — plain ruled rows, deliberately no
   numerals (the services index already owns the numeral system) and no
   per-item icon — never the banned three-card icon grid. ---------------- */

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

.process-step {
  padding-block-start: var(--space-sm);
  border-block-start: var(--border-hairline) var(--border-style) var(--color-border);
}

.process-step h3 {
  font-size: var(--text-h3);
  margin-block-end: var(--space-2xs);
}

.process-step p {
  color: var(--color-ink-muted);
  margin-block-end: 0;
}

.process-motif {
  max-width: var(--size-motif-sm);
  margin-block-start: var(--space-lg);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.process-motif img {
  width: 100%;
  height: auto;
}

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

/* --- Trust-strip (brief §3, LOAD-BEARING-adjacent) — ticket-plain rows, no
   badge, no chip decoration (ref-008): a fact stated once, plainly. ------ */

.trust-rows {
  background-color: var(--color-card);
  border: var(--border-hairline) var(--border-style) var(--color-border);
  border-radius: var(--radius-sm);
}

.trust-row {
  padding: var(--space-md) var(--space-lg);
  border-block-end: var(--border-hairline) var(--border-style) var(--color-border);
}

.trust-row:last-child {
  border-block-end: none;
}

.trust-row__item {
  font-family: var(--font-display);
  font-weight: var(--font-weight-body-strong);
  margin-block-end: var(--space-3xs);
}

.trust-row__body {
  color: var(--color-ink-muted);
  margin-block-end: 0;
}

/* --- Reviews (brief §3, LOAD-BEARING) — two verbatim testimonials, no
   aggregate rating or review count anywhere near this section. --------- */

.review-grid {
  display: grid;
  gap: var(--space-md);
}

.review-card {
  margin: 0;
  background-color: var(--color-card);
  border: var(--border-hairline) var(--border-style) var(--color-border);
  border-radius: var(--radius-chip);
  padding: var(--space-lg);
}

.review-card__quote {
  font-family: var(--font-body);
  font-size: var(--text-lead);
  line-height: var(--leading-snug);
  margin-block-end: var(--space-sm);
}

.review-card__attribution {
  display: block;
  font-family: var(--font-body-italic);
  font-style: italic;
  font-weight: var(--font-weight-emphasis);
  font-size: var(--text-small);
  color: var(--color-ink-muted);
}

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

/* --- Service area (brief §3, FLAVOR) — honestly thin, low visual weight. */

.service-area-motif {
  max-width: var(--size-motif-md);
  margin-block-start: var(--space-lg);
}

.service-area-motif img {
  width: 100%;
  height: auto;
}

/* --- Quote-form CTA (brief §3, LOAD-BEARING) --------------------------- */

.quote__secondary {
  margin-block-start: var(--space-md);
  color: var(--color-ink-muted);
}
