/* ==========================================================================
   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);
  column-gap: var(--space-xs);
}

.site-header__brand {
  flex: 1 1 0;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: var(--font-display);
  font-size: var(--text-body);
  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;
  flex-basis: 100%;
  order: 1;
}

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

/* The header call control (W65): (0,2,0) beats .btn (0,1,0) wherever declared;
   this base rule stays BEFORE the 48em block, which restores padding at equal
   specificity by source order. */
.site-header .site-header__call {
  flex: none;
  padding: 0;
  min-inline-size: var(--layout-tap-min);
}

@media (min-width: 48em) {
  .site-header__inner {
    column-gap: var(--space-sm);
  }

  .site-nav {
    display: block;
    flex-basis: auto;
    order: 0;
    margin-inline-start: auto;
  }

  .site-header__brand {
    flex: none;
    font-size: var(--text-h3);
  }

  .site-header .site-header__call {
    padding: var(--space-xs) var(--space-md);
  }

  .site-header__call .visually-hidden:not(:focus):not(:active) {
    position: static;
    width: auto;
    height: auto;
    overflow: visible;
    clip-path: none;
  }

  [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-strong);
  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;
}

/* ==========================================================================
   Absolute Plumbing Solutions — brief.md v1, tile-a.html, warm-craft family,
   band-rhythm archetype. Every value below reads from tokens.css.
   ========================================================================== */

/* Container, brief §7: min(1180px, 100% - 96px), centred, desktop only.
   Below 64em the house default gutter-clamp .container is unchanged. */
@media (min-width: 64em) {
  .container {
    width: min(var(--layout-container), 100% - var(--space-2xl));
    max-width: none;
    padding-inline: 0;
  }

  /* buy.html / thanks.html's narrow single column (.container.measure)
     stays centred at desktop — brief §7 names no composition for either. */
  .container.measure {
    width: 100%;
    max-width: var(--layout-measure);
  }
}

/* Header, brief §6: two rows <480px (wordmark, place tag), one row ≥480px.
   The breakpoint is the brief's own, declared on the @media line itself —
   any @media line is exempt from the size-literal check. */
.site-header {
  padding-block: var(--space-header-padding);
}

/* Identity + toggle (JS-revealed) + call button must all fit one row — the
   house default wraps, stacking the call button once the toggle appears. */
.site-header__inner {
  flex-wrap: nowrap;
  column-gap: var(--space-2xs);
}

.nav-toggle,
.site-header .site-header__call {
  flex-shrink: 0;
}

/* Icon-only: the row has no room for a text label beside the call button's
   full text (copy.md §3) — "Menu"/"Close" survive as the accessible name. */
.nav-toggle {
  padding: var(--space-2xs);
  min-width: var(--layout-tap-min);
  justify-content: center;
}

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

.site-header__identity {
  display: flex;
  flex-direction: column;
  gap: var(--space-3xs);
  flex: 1 1 auto;
  min-width: 0;
}

.site-header__brand {
  flex: none;
  font-family: var(--font-body);
  font-size: var(--text-small);
  font-weight: var(--font-weight-body-strong);
  line-height: var(--leading-tight);
  text-decoration: none;
  letter-spacing: var(--tracking-normal);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.site-header__place {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: var(--font-body);
  font-size: var(--text-place);
  font-weight: var(--font-weight-place);
  color: var(--color-ink-muted);
  line-height: var(--leading-tight);
}

.site-header__sep {
  display: none;
}

/* The call control shows its own number as visible text, never icon-only
   (copy.md §3) — overrides the skeleton's icon+visually-hidden default. */
.site-header .site-header__call {
  padding-inline: var(--space-xs);
}

@media (min-width: 30em) {
  .site-header__identity {
    flex-direction: row;
    align-items: baseline;
    gap: var(--space-2xs);
  }

  .site-header__sep {
    display: inline;
    color: var(--color-ink-muted);
  }

  .site-header__place {
    font-size: var(--text-place);
  }
}

/* Section furniture — eyebrow + dashed head-rule, shared by every content
   section (brief §10: the hero's dashed seam, flattened to a static rule). */

.section__rule {
  margin: 0 0 var(--space-md);
  border: 0;
  border-top: var(--border-rule) dashed var(--color-accent);
}

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

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

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

/* Hero — "the line is crossed." DOM order (brief §6): eyebrow -> h1 ->
   CTA -> field (LCP image) -> lead -> facts. */

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

.hero__eyebrow {
  margin: 0;
}

.hero h1 {
  font-family: var(--font-display);
  font-size: var(--text-hero);
  font-weight: var(--font-weight-display);
  line-height: var(--leading-tight);
  color: var(--color-ink);
  margin-block: var(--text-hero-margin-top) var(--text-hero-margin-bottom);
}

.hero h1 em {
  font-family: var(--font-emphasis);
  font-style: italic;
  color: var(--color-accent);
}

.hero__cta {
  margin: 0 0 var(--layout-gutter);
}

.hero__field {
  position: relative;
  overflow: hidden;
  aspect-ratio: 8 / 5;
  width: 100%;
  margin: 0 0 var(--space-md);
  border: var(--border-hairline) var(--border-style) var(--color-border);
  border-radius: var(--radius-sm);
  background-image: radial-gradient(
    120% 90% at 20% 15%,
    var(--color-hero-atmos-near) 0%,
    var(--color-surface) 45%,
    var(--color-hero-atmos-far) 100%
  );
}

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

/* Two independent, non-synchronised satellites (brief §4/§9), the tile's
   own device. Plain top/left + its own transform (never nested, §7.3r7). */
.hero__satellite {
  position: absolute;
  border-radius: var(--radius-pill);
}

.hero__satellite--drip {
  width: var(--size-satellite-drip);
  height: var(--size-satellite-drip);
  left: 37%;
  top: 40%;
  background-color: var(--color-accent);
  opacity: 0.85;
  animation: hero-drip var(--duration-satellite-a) var(--ease-in-out) infinite;
}

.hero__satellite--glint {
  width: var(--size-satellite-glint);
  height: var(--size-satellite-glint);
  left: 58%;
  top: 30%;
  background-color: var(--color-accent-ink);
  box-shadow: 0 0 var(--space-2xs) var(--space-3xs) rgb(255 251 244 / 0.8);
  animation: hero-glint var(--duration-satellite-b) var(--ease-in-out) infinite;
}

@keyframes hero-drip {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(calc(var(--satellite-drip-travel) * -1)); }
}

@keyframes hero-glint {
  0%, 100% { transform: translateX(0); opacity: 0.5; }
  50% { transform: translateX(var(--satellite-glint-travel)); opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .hero__satellite--drip,
  .hero__satellite--glint {
    animation: none;
  }
}

.hero__lead {
  max-width: var(--measure-hero);
  font-size: var(--text-lead);
  color: var(--color-ink-muted);
  line-height: var(--leading-body);
  margin: 0 0 var(--space-sm);
}

.hero__facts {
  margin: 0;
  padding-top: var(--space-sm);
  border-top: var(--border-hairline) var(--border-style) var(--color-border);
  font-size: var(--text-small);
  color: var(--color-ink-muted);
  max-width: none;
}

@media (min-width: 64em) {
  .hero .container {
    display: grid;
    grid-template-columns: var(--layout-hero-text) 1fr;
    column-gap: var(--space-xl);
    align-items: center;
  }

  .hero__eyebrow,
  .hero h1,
  .hero__cta,
  .hero__lead,
  .hero__facts {
    grid-column: 1;
    max-width: var(--measure-hero);
  }

  .hero__field {
    grid-column: 2;
    grid-row: 1 / span 5;
  }

  .hero__satellite--drip {
    width: var(--size-satellite-drip-lg);
    height: var(--size-satellite-drip-lg);
  }

  .hero__satellite--glint {
    width: var(--size-satellite-glint-lg);
    height: var(--size-satellite-glint-lg);
  }
}

/* --- Services (#services) — brief §7 row 2: full-width banner above a
   2-up card grid at desktop. */

.services__banner {
  margin: 0 0 var(--space-lg);
  aspect-ratio: 2000 / 540;
  width: 100%;
  overflow: hidden;
  border-radius: var(--radius-sm);
}

.services__banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.services__list {
  display: grid;
  gap: var(--space-services-gap);
}

.services__item {
  max-width: var(--measure-card);
  padding-block: var(--space-sm);
  border-top: var(--border-hairline) var(--border-style) var(--color-border);
}

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

/* Trust strip (#trust), brief §7 row 3: 3-up at desktop, plain text, no
   graphic badge. Plain accent digits, no enclosing mark. */

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

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

.trust__cell {
  max-width: var(--measure-trust-cell);
}

.trust__cell p {
  margin: 0;
  max-width: none;
}

.trust__number {
  color: var(--color-accent);
  font-weight: var(--font-weight-body-strong);
}

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

/* --- Reviews (#reviews) — brief §7 row 4: one featured quote, one column
   of two supporting quotes, 1.4fr 1fr at desktop. */

.reviews__rating {
  margin: 0 0 var(--space-lg);
  color: var(--color-ink-muted);
}

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

.review {
  margin: 0;
}

.review blockquote {
  margin: 0 0 var(--space-xs);
  max-width: none;
}

.review--featured blockquote p {
  max-width: var(--measure-review-featured);
  font-size: var(--text-lead);
}

.reviews__supporting {
  display: grid;
  gap: var(--space-md);
  align-content: start;
}

.reviews__supporting blockquote p {
  max-width: var(--measure-review-support);
}

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

@media (min-width: 64em) {
  .reviews__grid {
    grid-template-columns: 1.4fr 1fr;
    align-items: start;
  }
}

/* Process (#process), brief §7 row 5: steps flexible, image fixed 320px at
   desktop. Numerals in an outlined circle — distinct from trust's plain
   digits (two counters, two costumes). */

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

.step {
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: var(--space-sm);
  align-items: start;
}

.step__num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--space-xl);
  height: var(--space-xl);
  border: var(--border-hairline) var(--border-style) var(--color-accent);
  border-radius: var(--radius-pill);
  font-family: var(--font-body);
  font-weight: var(--font-weight-body-strong);
  color: var(--color-accent);
}

.step__name {
  grid-column: 2;
  margin: 0 0 var(--space-3xs);
  font-family: var(--font-display);
  font-weight: var(--font-weight-display);
  font-size: var(--text-lead);
}

.step__line {
  grid-column: 2;
  max-width: var(--measure-step);
  margin: 0;
}

.process__image {
  aspect-ratio: 8 / 5;
  width: 100%;
  overflow: hidden;
  border-radius: var(--radius-sm);
}

.process__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@media (min-width: 64em) {
  #process .container {
    display: grid;
    grid-template-columns: 1fr var(--layout-process-image);
    column-gap: var(--space-lg);
    align-items: start;
  }

  #process .eyebrow,
  #process .section__head,
  .steps {
    grid-column: 1;
  }

  .process__image {
    grid-column: 2;
    grid-row: 1 / span 3;
    width: var(--layout-process-image);
  }
}

/* --- Service area (#service-area) — brief §7 row 6: single column,
   centred, max-width 640px. */

.service-area .container {
  max-width: var(--layout-narrow);
}

.service-area p {
  max-width: var(--measure-narrow);
}

/* --- FAQ (#faq) — brief §7 row 7: single column, centred, max-width
   760px. Native <details>/<summary>, works with JS off. */

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

.faq__list {
  display: grid;
  gap: var(--space-sm);
}

.faq__item {
  padding-block: var(--space-sm);
  border-top: var(--border-hairline) var(--border-style) var(--color-border);
}

.faq__q {
  cursor: pointer;
  font-family: var(--font-display);
  font-weight: var(--font-weight-display);
  font-size: var(--text-lead);
  color: var(--color-ink);
}

.faq__a {
  margin: var(--space-xs) 0 0;
  max-width: var(--measure-faq);
  color: var(--color-ink-muted);
}

/* Contact (#contact), brief §7 row 8 "Footer": 1fr 1fr at desktop, text
   left, form right (64px gap ≥90em/1440, 40px at 64–89.9em/1024). */

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

@media (min-width: 64em) {
  #contact .container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: var(--space-lg);
    align-items: start;
  }

  #contact .eyebrow,
  #contact .section__head,
  .contact__intro,
  .contact__phone {
    grid-column: 1;
    max-width: var(--measure-hero);
  }

  #contact .form {
    grid-column: 2;
    grid-row: 1 / span 4;
  }
}

@media (min-width: 90em) {
  #contact .container {
    column-gap: var(--space-xl);
  }
}

/* --- Footer hours — the one data-hours element on the page, paired with
   the page's openingHoursSpecification (house-tech-spec §4). */
.site-footer [data-hours] {
  max-width: none;
}
