/* ==========================================================================
   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.              */

/* Sticky beneath the expiry bar (brief §4.2/§4.5, css/preview.css's own
   documented override path). --header-height is this site's own fixed flow
   height, measured against the real render (README.md), not assumed. */
.site-header {
  position: sticky;
  inset-block-start: var(--expiry-height);
  z-index: var(--z-header);
  padding-block: var(--space-3xs);
  border-bottom: var(--border-hairline) var(--border-style) var(--color-border);
  background-color: var(--color-bg);
}

/* Anchor targets need clearance for the sticky expiry+header stack. */
[id] {
  scroll-margin-block-start: calc(var(--expiry-height) + var(--header-height));
}

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

/* Two-way split (brand | controls), not three-way space-between — keeps the
   call CTA next to the nav rather than floating mid-row at wide viewports. */
.site-header__controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-3xs);
}

/* Reduced size (brief §4.2: "wordmark in Ultra at reduced size") — measured
   against the real render so the brand + always-on call CTA + nav-toggle
   fit one row at 375px and the sticky chrome stays close to the brief's own
   estimate, rather than wrapping to two rows and pushing the earth-band
   anchor image (brief §5.1) below the fold. */
.site-header__brand {
  font-family: var(--font-display);
  font-size: var(--text-small);
  font-weight: var(--font-weight-display);
  text-decoration: none;
  letter-spacing: var(--tracking-tight);
}

/* Always-on header phone CTA (brief §4.5) — compact padding so a single-line
   header stays plausible at 375px alongside the wordmark; still a `.btn`, so
   the 44px tap-target floor (spec §8) is intact via [data-tap]. */
/* .btn.site-header__call (not the class alone): .btn's own `padding`
   shorthand sits later in this file at equal specificity and would
   otherwise win the cascade tie and overwrite padding-inline below. */
.btn.site-header__call {
  padding-inline: var(--space-3xs);
  font-size: var(--text-small);
}

/* Icon-only (a standard hamburger glyph, not new copy — the accessible name
   stays the Copywriter's "Menu"/"Close" on the visually-hidden span main.js
   already updates). Square footprint keeps the header to one row at 375px
   alongside the wordmark and always-on call CTA (README.md measurement). */
.nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: var(--layout-tap-min);
  padding: var(--space-2xs);
  /* 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);
}

.nav-toggle__icon {
  width: var(--space-md);
  height: var(--space-sm);
  fill: var(--color-ink);
}

.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;
}

/* ==========================================================================
   poop-busters-clarksville-tn — brief.md components, archetype `poster-hero`.
   ========================================================================== */

/* --- Running section eyebrow (brief §4.5) ----------------------------------
   ink-muted, never accent: brief §2.4 restricts accent-as-text to two
   contexts only (the badge's line; the ledger's mark, a fill not text) —
   every other eyebrow stays ink-muted, passing 4.5:1 on bg and surface. */
.eyebrow {
  margin: 0;
  font-size: var(--text-eyebrow);
  font-weight: var(--font-weight-body-strong);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--color-ink-muted);
}

.eyebrow + h2,
.eyebrow + h1 {
  margin-block-start: var(--space-2xs);
}

/* --- Section-boundary hairline (brief §4.6): 1px dotted, spans
   --layout-measure, top of every .section after the hero (.hero is a
   different class, so this selector never reaches it). */
.section > .container {
  position: relative;
}

.section > .container::before {
  content: '';
  display: block;
  max-width: var(--layout-measure);
  margin-inline: auto;
  margin-block-end: var(--space-lg);
  border-top: var(--border-hairline) dotted var(--color-border);
}

/* --- Hero (archetype poster-hero, brief §4) --------------------------------
   DOM order per brief §4.1: eyebrow -> badge (H1+field, fused) -> primary CTA
   (+secondary) -> lead -> facts -> hero-foot earth band (full-bleed, outside
   .container). LCP-critical; never carries data-reveal (spec §7).

   QA round-2 FIX (lensA/imagery, clarity/dissonance): every margin-block-start
   in this stack below the badge is tightened one token step (sm->xs, xs->2xs)
   from round 1, and the earth-band image is recropped to a true band aspect
   (README) -- together this gets the anchor image fully inside the fold at
   375 and 1440 without touching the badge or copy.md wording. */

.hero {
  position: relative;
  overflow: clip;
  /* --section-gap here lands the padding AFTER the earth band, not between
     the facts row and the image. */
  padding-block-end: var(--section-gap);
  /* Atmosphere (brief §2.3): two soft radial stops, 0.15 top-right / 0.10
     bottom-left. */
  background-image:
    radial-gradient(75% 50% at 88% 8%, var(--color-accent-wash-hi), transparent 62%),
    radial-gradient(65% 45% at 8% 94%, var(--color-accent-wash-lo), transparent 62%);
  background-color: var(--color-bg);
}

.hero__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-block-start: var(--space-sm);
  text-align: center;
}

.hero__eyebrow {
  margin: 0;
  font-size: var(--text-eyebrow);
  font-weight: var(--font-weight-body-strong);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--color-ink);
}

/* --- The badge: real HTML text over a decorative shield (brief §3.3/§4.7) -- */

.hero__badge {
  position: relative;
  width: var(--badge-width);
  aspect-ratio: 230 / 210;
  margin-block-start: var(--space-xs);
  animation: badge-press var(--duration-badge-press) var(--ease-badge-press) 1 both;
}

.hero__badge-shield {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.hero__badge-shield-outer {
  fill: var(--color-surface);
  stroke: var(--color-ink);
  stroke-width: 4;
}

.hero__badge-shield-inner {
  fill: none;
  stroke: var(--color-accent);
  stroke-width: 2;
}

/* Real H1 (brief §4.7), not baked SVG text. Weight/family/line-height come
   from base.css's shared h1-h4 rule; this adds position, size, colour. */
.hero__badge-text {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-3xs);
  margin: 0;
  padding-inline: var(--space-sm);
  font-size: var(--text-hero);
  text-transform: uppercase;
  color: var(--color-ink);
}

.hero__badge-line {
  display: block;
}

/* Accent-as-text (brief §2.4, one of two authorised contexts): set at
   --text-hero, >=27.5px — clears the 24px large-text floor, so rows 7/10's
   4.48-4.72:1 pairings are the correct AA class. */
.hero__badge-line--accent {
  color: var(--color-accent);
}

/* QA r2 FIX, brief §3.3: measured vs. the rendered SVG path, not the flat
   rectangle the brief's example uses; auto-wrap crossed the outer stroke
   at 375/768/1440px. <br> below (spaces kept) clears both, >=19px spare. */

/* Satellites (brief §4.6): fixed size, positioned just beyond the shield's
   own corners — "beside the badge". */
.hero__badge-compass,
.hero__badge-watch {
  position: absolute;
  display: block;
}

.hero__badge-compass {
  width: var(--compass-size);
  height: var(--compass-size);
  top: -3%;
  right: -1%;
}

.hero__badge-watch {
  width: var(--watch-size);
  height: var(--watch-size);
  bottom: -3%;
  left: -1%;
}

/* On the NEEDLE group, not the whole compass SVG — the ring stays still. */
.hero__badge-needle {
  transform-origin: 50% 50%;
  animation: compass-settle var(--duration-compass) var(--ease-compass) infinite;
}

/* fill="var(--x)" as a bare SVG attribute does not resolve custom
   properties — every fill/stroke here is a CSS class instead, as above. */
.hero__badge-compass-ring,
.hero__badge-watch-ring {
  fill: none;
  stroke: var(--color-ink);
  stroke-width: 2;
}

.hero__badge-needle-mark {
  fill: var(--color-accent);
}

.hero__badge-second-hand-mark {
  stroke: var(--color-accent);
  stroke-width: 2;
}

.hero__badge-second-hand {
  transform-origin: 50% 50%;
  animation: watch-tick var(--duration-watch) linear infinite;
}

/* One-shot press-in (brief §6, correcting Tile C's own infinite loop):
   iteration-count 1, holds via `both` fill mode above — one beat, no loop. */
@keyframes badge-press {
  0% {
    transform: scale(0.94) translateY(var(--badge-press-shift));
    opacity: 0;
  }
  45% {
    opacity: 1;
  }
  73% {
    transform: scale(1.03) translateY(0);
  }
  100% {
    transform: scale(1) translateY(0);
    opacity: 1;
  }
}

/* Ambient satellites (brief §6, ref-001) — never synchronised with each
   other or the badge's press. */
@keyframes compass-settle {
  0% { transform: rotate(38deg); }
  22% { transform: rotate(-4deg); }
  30% { transform: rotate(0deg); }
  100% { transform: rotate(0deg); }
}

@keyframes watch-tick {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Reduced motion (brief §6, spec §8 — no exceptions): badge in its final
   settled pose (no press-in plays), needle at rotate(0deg), watch stopped.
   base.css only collapses the house --duration-* tokens; this site's own
   custom durations need their own rule. */
@media (prefers-reduced-motion: reduce) {
  .hero__badge {
    animation: none;
    transform: none;
    opacity: 1;
  }

  .hero__badge-needle,
  .hero__badge-second-hand {
    animation: none;
    transform: rotate(0deg);
  }
}

.hero__ctas {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-2xs);
  margin: 0;
  margin-block-start: var(--space-xs);
}

.hero__lead {
  margin: 0;
  margin-block-start: var(--space-xs);
  margin-inline: auto;
  font-size: var(--text-body);
  line-height: var(--leading-body);
  color: var(--color-ink-muted);
}

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

/* Hero-foot earth band (brief §5.1) — full-bleed, breaks out of .container.
   The badge's own opaque shield means no text sits translucently over it. */
.hero__earth-band {
  width: 100%;
  margin-block-start: var(--space-xs);
}

.hero__earth-band img {
  width: 100%;
  height: auto;
}

/* --- Services (brief §4.5 row 2) ------------------------------------------- */

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

.services__divider img {
  width: 100%;
  height: auto;
  border-radius: var(--radius-none);
}

/* Ultra numerals, olive accent (brief §4.5/§4.6) — distinct from the
   review ledger's compass-rose marks below. */
.index-list {
  display: grid;
  gap: var(--space-sm);
  margin-block-start: var(--space-md);
  padding: 0;
}

.index-list__row {
  display: flex;
  align-items: flex-start;
  gap: var(--space-sm);
  padding-block: var(--space-2xs);
}

.index-list__num {
  flex: 0 0 var(--index-num-width);
  min-width: var(--index-num-width);
  font-family: var(--font-display);
  font-size: var(--text-h3);
  color: var(--color-accent);
  line-height: var(--leading-tight);
}

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

/* --- How it works (brief §4.5 row 3) — compact 3-step inline strip. No
   numeral badge of its own (brief §4.6 names only three ornaments, and this
   isn't one) — plain flowing text with a connector mark. */

.steps {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-lg);
  margin-block-start: var(--space-md);
  padding: 0;
}

.steps__item {
  flex: 1 1 var(--steps-item-basis);
  position: relative;
}

.steps__item h3 {
  margin: 0;
}

.steps__item p {
  margin: 0;
  margin-block-start: var(--space-3xs);
  color: var(--color-ink-muted);
  font-size: var(--text-body);
}

@media (min-width: 48em) {
  .steps__item:not(:first-child)::before {
    content: '\2192';
    position: absolute;
    inset-inline-start: calc(-1 * var(--space-lg));
    color: var(--color-accent);
  }
}

/* --- Review-theme ledger (brief §4.5 row 4) — exactly three rows (§8).
   Compass-rose mark is a fill, not text, so it's WCAG 1.4.11's 3:1, not the
   4.5:1 body floor (brief §2.4). */

.ledger {
  display: grid;
  margin-block-start: var(--space-md);
  padding: 0;
}

.ledger__row {
  display: flex;
  align-items: flex-start;
  gap: var(--space-sm);
  padding-block: var(--space-md);
  border-top: var(--border-hairline) dotted var(--color-border);
}

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

.ledger__mark {
  flex: 0 0 var(--ledger-mark-size);
  width: var(--ledger-mark-size);
  height: var(--ledger-mark-size);
  margin-block-start: var(--space-3xs);
  fill: var(--color-accent);
}

.ledger__row h3 {
  margin: 0;
  font-family: var(--font-body);
  font-weight: var(--font-weight-body-strong);
  font-size: var(--text-body);
  text-transform: none;
}

.ledger__row blockquote {
  margin: 0;
  margin-block-start: var(--space-2xs);
  color: var(--color-ink-muted);
}

.ledger__row blockquote p {
  margin: 0;
}

.ledger__attr {
  margin: 0;
  margin-block-start: var(--space-2xs);
  font-size: var(--text-small);
  font-weight: var(--font-weight-body-strong);
}

/* --- Final CTA band (brief §4.5 row 6) -------------------------------------- */

.contact__accent {
  margin-block: var(--space-md);
  max-width: var(--layout-measure);
}

.contact__accent img {
  width: 100%;
  height: auto;
  border-radius: var(--radius-none);
}
