/* ==========================================================================
   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;
}

/* ==========================================================================
   GREEN GUY LAWN SERVICE — brief components (confirmation-rail,
   clean-clinical). Everything below extends the shell above.
   ========================================================================== */

/* Anchor targets clear the sticky stack: 44px preview bar + 52px header MIN
   + 1px border = the 97px §5.3 computes the fold against. */
[id] {
  scroll-margin-block-start: calc(var(--layout-tap-min) + var(--layout-header-height) + var(--border-hairline));
}

/* --- Header additions: the persistent phone link (brief §6 "Sticky bar") --
   Wordmark left, phone right, outside the collapsible nav so the phone never
   disappears behind the toggle — only the two anchor links collapse.

   ONE LINE AT EVERY WIDTH. Measured at 375px: brand+phone+toggle do not fit
   335px under the skeleton's flex-wrap default, doubling the header's height
   — a real defect the brief's 52px-MIN single-line spec (§6, §5.3) does not
   tolerate. Phone and toggle are fixed-size; the wordmark (no fixed length)
   is the one that shrinks, via ellipsis — house precedent for a long name in
   a fixed-height header. */
.site-header__inner {
  flex-wrap: nowrap;
}

.site-header__brand {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.site-header__phone {
  flex: 0 0 auto;
  font-weight: var(--font-weight-body-strong);
  color: var(--color-accent);
  text-decoration: none;
}

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

/* Icon-only, per the ellipsis note above: the toggle's own label carries no
   information the icon can't, so it is the one that gives up its visible
   text (visually-hidden data-nav-toggle-label, still updated by main.js). */
.nav-toggle {
  flex: 0 0 auto;
  width: var(--layout-tap-min);
  padding: 0;
  justify-content: center;
}

.nav-toggle__icon {
  stroke: var(--color-ink);
  stroke-width: 1.5;
}

/* Eyebrow: natural-case copy, uppercased via text-transform (spec §8). */

.eyebrow {
  display: block;
  text-transform: uppercase;
  letter-spacing: var(--tracking-wide);
  font-size: var(--text-eyebrow);
  font-weight: var(--font-weight-body-strong);
  color: var(--color-accent);
}

.section-head {
  margin-block-end: var(--space-md);
}

.section-head h2 {
  margin-block: var(--space-2xs) 0;
}

.section-head .measure {
  margin-block-start: var(--space-2xs);
  color: var(--color-ink-muted);
}

/* The one accent word: colour only, no italic (Sora has no italic — §1/§2). */
h1 em,
h2 em {
  font-style: normal;
  color: var(--color-accent);
}

/* Hero — confirmation-rail (brief §5, §8, §8.1). Single column below 64rem;
   46/54 split at/above. DOM order fixed at every width: eyebrow, h1, CTA,
   field, lead, facts (§5.1 rule 4). */

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

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

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

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

.hero__cta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-sm);
  margin-block-end: var(--space-md);
}

.hero__tel {
  font-weight: var(--font-weight-body-strong);
}

/* The living-hero field — the one spectacular moment (design-rules §0).
   Fixed height per breakpoint, the LCP image, the rail SVG on top. Rail and
   ambient marks are aria-hidden: the same words are accessible text one
   scroll down, in how-it-works (brief §4.3). */
.hero__field {
  position: relative;
  overflow: hidden;
  height: var(--field-height);
  margin-block: var(--space-sm);
}

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

/* Ambient satellite motion (brief §8, ref-001): two independent, non-synced
   loops, held at rest under reduced motion (below). Percentage geometry. */
.hero__glint {
  position: absolute;
  top: 14%;
  left: -12%;
  width: 12%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, var(--color-halo-sky) 0%, transparent 72%);
  opacity: 0.4;
  filter: blur(var(--ambient-blur));
  animation: hero-glint-drift var(--loop-glint) linear infinite;
}

.hero__blade {
  position: absolute;
  bottom: 3%;
  width: 1.1%;
  height: 9%;
  background-color: var(--color-halo-sky);
  opacity: 0.55;
  border-radius: 50%;
  transform-origin: bottom center;
  animation: hero-blade-sway var(--loop-blade) ease-in-out infinite alternate;
}

.hero__blade--a { left: 22%; }
.hero__blade--b {
  left: 33%;
  animation-delay: calc(var(--loop-blade) * -0.5);
}

@keyframes hero-glint-drift {
  from { transform: translateX(0%); }
  to   { transform: translateX(650%); }
}

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

/* The rail itself. Inset 8% each side (84% of the field, by construction),
   bottom 14% of the field's height — both scale with the field. Height is
   the one number that never scales (brief §8.1). */
.hero__rail {
  position: absolute;
  left: 8%;
  right: 8%;
  bottom: 14%;
  height: var(--rail-height);
}

.hero__rail svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.rail-line {
  fill: none;
  stroke: var(--color-halo-sky);
  stroke-width: 2;
  stroke-linecap: round;
  /* pathLength="1" on the element lets the draw-once animation below work in
     unitless fractions rather than a measured pixel length. */
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  animation: rail-draw var(--duration-rail-draw) var(--ease-out) forwards;
}

.rail-node {
  fill: var(--color-halo-sky);
}

.rail-marker {
  fill: var(--color-accent);
  opacity: 0;
  transform-origin: center;
  transform-box: fill-box;
  transform: scale(0.4);
  animation: rail-marker-settle var(--duration-marker-settle) var(--ease-out) forwards;
  animation-delay: calc(var(--duration-rail-draw) * 0.55);
}

.rail-label {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: var(--text-rail-label);
  fill: var(--color-ink);
}

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

@keyframes rail-marker-settle {
  to { opacity: 1; transform: scale(1); }
}

.hero__lead {
  max-width: var(--layout-measure);
  color: var(--color-ink-muted);
  margin-block-end: var(--space-xs);
}

.hero__facts {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2xs) var(--space-sm);
  font-size: var(--text-small);
  color: var(--color-ink-muted);
}

@media (min-width: 64rem) {
  .hero {
    padding-block-start: var(--space-lg);
  }

  /* Explicit named areas — NOT bare grid-auto-flow. Column tracks alone let
     implicit row-by-row placement deal the six DOM children alternately into
     column 1/2 (eyebrow, cta, lead in col 1; h1, field, facts in col 2) — a
     real defect only measuring the rendered page catches. Each text child
     gets its own named row, stacking normally in DOM order; "field" repeats
     down every row of column 2 so grid merges it into one spanning cell,
     independent of where "field" sits in the DOM order (brief §5.1 rule 4's
     order is unchanged — this affects visual placement only). */
  .hero__grid {
    grid-template-columns: 46% 54%;
    grid-template-areas:
      "eyebrow field"
      "h1      field"
      "cta     field"
      "lead    field"
      "facts   field";
    align-items: start;
    gap: var(--space-lg);
  }

  .hero__eyebrow  { grid-area: eyebrow; }
  .hero__h1       { grid-area: h1; }
  .hero__cta-row  { grid-area: cta; }
  .hero__lead     { grid-area: lead; }
  .hero__facts    { grid-area: facts; }

  .hero__field {
    grid-area: field;
    height: var(--field-height-desktop);
    margin-block: 0;
  }

  .hero__cta-row {
    flex-wrap: nowrap;
  }
}

/* Services index (brief §II, ref-011): plain ruled/numbered — never a card
   grid (design-rules §4). */

.services-list {
  display: grid;
  gap: 0;
}

.service-row {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--space-sm);
  align-items: baseline;
  padding-block: var(--space-sm);
  border-block-end: var(--border-hairline) var(--border-style) var(--color-border);
}

.services-list .service-row:first-child {
  border-block-start: var(--border-hairline) var(--border-style) var(--color-border);
}

.service-row__num {
  font-family: var(--font-display);
  font-weight: var(--font-weight-display);
  font-size: var(--text-h3);
  color: var(--color-accent);
}

.service-row__name {
  margin: 0;
  font-size: var(--text-lead);
}

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

.services-media img {
  width: 100%;
  height: auto;
  object-fit: cover;
}

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

@media (min-width: 48em) {
  .services-body {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: var(--space-lg);
    align-items: start;
  }

  .services-media {
    margin-block-start: 0;
  }
}

/* How it works (brief §III, §6.11): the rail's settled shape, recurring
   STATICALLY — never re-animated. */

.how-steps {
  position: relative;
  display: grid;
  gap: var(--space-lg);
}

.how-step {
  position: relative;
  padding-inline-start: var(--space-xl);
}

.how-step__node {
  position: absolute;
  inset-inline-start: 0;
  inset-block-start: var(--space-3xs);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--space-lg);
  height: var(--space-lg);
  border-radius: 50%;
  border: var(--border-thick) var(--border-style) var(--color-accent);
  font-family: var(--font-display);
  font-weight: var(--font-weight-display);
  font-size: var(--text-small);
  color: var(--color-accent);
}

.how-step__label {
  display: block;
  text-transform: uppercase;
  letter-spacing: var(--tracking-wide);
  font-size: var(--text-rail-label);
  font-weight: var(--font-weight-body-strong);
  color: var(--color-accent);
  margin-block-end: var(--space-3xs);
}

.how-step__title {
  margin: 0 0 var(--space-3xs);
}

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

@media (min-width: 64rem) {
  .how-steps {
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-md);
  }

  /* The rail's shape, static: a hairline threading the four node centres. */
  .how-steps::before {
    content: '';
    position: absolute;
    inset-inline: calc(var(--space-lg) / 2);
    inset-block-start: calc(var(--space-lg) / 2 - var(--border-hairline) / 2);
    border-block-start: var(--border-hairline) var(--border-style) var(--color-border-strong);
  }

  .how-step__node {
    background-color: var(--color-bg);
  }
}

/* Trust strip (brief §IV): a plain ruled row, never a "Why choose us" card
   grid (design-rules §4). */

.trust-list {
  display: grid;
  gap: var(--space-lg);
}

.trust-item {
  padding-block-start: var(--space-sm);
  border-block-start: var(--border-thick) var(--border-style) var(--color-accent);
}

.trust-item__title {
  margin: 0 0 var(--space-3xs);
}

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

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

/* --- Reviews (brief §V) ----------------------------------------------------- */

.reviews-list {
  display: grid;
  gap: var(--space-lg);
}

.review {
  padding-inline-start: var(--space-md);
  border-inline-start: var(--border-thick) var(--border-style) var(--color-border-strong);
}

.review__quote {
  margin: 0 0 var(--space-2xs);
  font-size: var(--text-lead);
}

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

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

/* --- Service area (brief §VI) ------------------------------------------------ */

.service-area-body {
  display: grid;
  gap: var(--space-lg);
  align-items: start;
}

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

.service-area__media img {
  width: 100%;
  height: auto;
  object-fit: cover;
}

@media (min-width: 48em) {
  .service-area-body {
    grid-template-columns: 2fr 1fr;
  }
}

/* --- FAQ (brief §VII) --------------------------------------------------------
   Native <details>/<summary>. Zero JS. */

.faq-list {
  display: grid;
  gap: 0;
}

.faq-item {
  padding-block: var(--space-sm);
  border-block-end: var(--border-hairline) var(--border-style) var(--color-border);
}

.faq-list .faq-item:first-child {
  border-block-start: var(--border-hairline) var(--border-style) var(--color-border);
}

.faq-item__q {
  display: block;
  margin: 0;
  font-size: var(--text-lead);
  cursor: pointer;
}

.faq-item p {
  margin: var(--space-2xs) 0 0;
  color: var(--color-ink-muted);
}

/* --- Estimate CTA / contact (brief §VIII) ------------------------------------ */

.contact-cta {
  margin-block-end: var(--space-md);
}

/* Reduced motion (spec §8; brief §8): every loop and the rail draw disable
   without exception. The rail renders fully drawn; ambient marks hold rest. */

@media (prefers-reduced-motion: reduce) {
  .hero__glint {
    animation: none;
    transform: translateX(325%);
  }

  .hero__blade {
    animation: none;
    transform: rotate(-1deg);
  }

  .rail-line {
    animation: none;
    stroke-dashoffset: 0;
  }

  .rail-marker {
    animation: none;
    opacity: 1;
    transform: scale(1);
  }
}

/* At the 320px floor the label size yields first (brief §6.11's minimum),
   never the node count or the rail shape. */
@media (max-width: 320px) {
  .how-step__label {
    font-size: var(--text-rail-label-min);
  }
}
