/* ==========================================================================
   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);
  border-bottom: var(--border-hairline) var(--border-style) var(--color-border);
  background-color: var(--color-bg);
}

/* QA r1 FIX-2: block-size reads --layout-header-height directly (was
   padding-derived), so the shipped header matches brief §7's 56+1px
   assumption at every width. nowrap + the sizing below keep brand/phone on
   one line down to 320px. */
.site-header__inner {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2xs);
  block-size: var(--layout-header-height);
}

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

/* Brand+phone share the eyebrow step below 48em to fit one line at 320-375;
   desktop sizing restores at 48em where width is ample. */
.site-header__brand {
  font-family: var(--font-display);
  font-size: var(--text-eyebrow);
  font-weight: var(--font-weight-display);
  text-decoration: none;
  letter-spacing: var(--tracking-tight);
  white-space: nowrap;
}

@media (min-width: 48em) {
  .site-header__brand {
    font-size: var(--text-h3);
  }
}

/* No nav menu (copy.md, header section: "No nav menu. The brief specifies no
   header content beyond sticky chrome and the plank-1 eyebrow/H1/CTA
   sequence" — a one-pager this short reads end to end without one, the same
   reading duluth-lawn-care-duluth-mn's sibling brief made for its own
   header). The skeleton's .nav-toggle/.site-nav rules are dropped rather
   than left as dead CSS: index.html and thanks.html carry no nav-toggle
   button and no .site-nav class, so nothing on the page would ever match
   them. A bare, unclassed <nav aria-label="Contact"> wraps the phone
   control for the landmark (spec §8) — it carries no styling of its own and
   no menu items; the header stays a plain two-item row at every width:
   wordmark, phone. */

.site-header__phone {
  font-family: var(--font-body-strong);
  font-weight: var(--font-weight-body-strong);
  font-size: var(--text-eyebrow);
  color: var(--color-ink-muted);
  text-decoration: none;
  white-space: nowrap;
}

@media (min-width: 48em) {
  .site-header__phone {
    font-size: var(--text-small);
  }
}

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

/* --- 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 {
  /* --color-border aliases the brief's decorative-only --color-rule (R5); a
     button's own edge is a control boundary, so it uses --color-ink-muted
     instead — already contrast-verified at 5.76:1 against bg (brief §3.1
     F3), well past the 3:1 non-text floor. */
  border-color: var(--color-ink-muted);
  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);
  /* A form field's border is a real control boundary, not decoration — it
     uses --color-ink-muted (5.14:1 against surface, brief §3.1 F4), never
     --color-border/--color-rule, which R5 restricts to decorative use only. */
  border: var(--border-hairline) var(--border-style) var(--color-ink-muted);
  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;
}

.site-footer__services,
.site-footer__area {
  color: var(--color-ink-muted);
}

/* ============================================================================
   BRIEF COMPONENTS — runs/mueller-lawn-and-landscaping-llc-fountain-city-wi/brief.md
   family: warm-craft · archetype: ledger-stack (new)
   signature: "the ledger line is drawn" (brief §8)
   ============================================================================ */

/* --- Section eyebrow + title (brief §4.2) ----------------------------------
   Eyebrow: Body-strong 600, uppercase, ink-muted (§2.2's correction — never
   accent-2, R1). Section h2s carry no recurring icon of their own; the
   ledger-mark's whole point (§6.1 rule 2) is that it opens ENTRIES only
   (services rows, ledger entries), never a section head. */

.eyebrow {
  margin-block-end: var(--hero-gap-sm);
  font-family: var(--font-body-strong);
  font-weight: var(--font-weight-body-strong);
  font-size: var(--text-eyebrow);
  letter-spacing: var(--tracking-caps);
  text-transform: uppercase;
  color: var(--color-ink-muted);
}

.section__title {
  margin-block-end: var(--space-md);
  font-size: var(--text-h2);
  line-height: var(--leading-tight);
}

/* --- Hero (brief §7, §9.2) --------------------------------------------------
   DOM order: eyebrow -> h1 -> primary CTA -> field -> lead -> secondary CTA
   (plank 1), fixed at every width. Text sits on the flat gradient (brief
   §3.3), entirely in --color-ink — no accent-coloured word anywhere in the
   H1 or hero (R2). */

.hero {
  position: relative;
  padding-block-start: var(--hero-inset-top);
  padding-block-end: var(--section-gap);
  background: linear-gradient(165deg, var(--color-bg) 0%, var(--color-hero-gradient-end) 100%);
  color: var(--color-ink);
}

.hero__eyebrow {
  margin-block-end: var(--hero-gap-sm);
}

.hero__title {
  margin-block-end: var(--hero-gap-lg);
  font-size: var(--text-h1);
}

.hero__cta {
  margin-block-end: var(--hero-gap-lg);
  height: var(--cta-height);
  padding-block: 0;
  font-family: var(--font-display);
  font-weight: var(--font-weight-display);
}

.hero__lead {
  margin-block-start: var(--hero-gap-lg);
  font-size: var(--text-body);
}

.hero__cta-secondary {
  display: inline-block;
  margin-block-start: var(--space-xs);
  font-size: var(--text-small);
  color: var(--color-ink-muted);
  text-decoration: underline;
  text-underline-offset: var(--space-3xs);
}

/* DOM order stays fixed at every width (brief §7's plank-1 shape) — the
   two-column layout at >=48rem is CSS Grid's own item placement, never a
   reordering of the markup a screen reader or a JS-off visitor would see.
   Below 48em .hero__inner is plain block flow, so the grid rules simply do
   not apply and everything stacks in source order (brief §6.2's
   single-column case). */
@media (min-width: 48em) {
  .hero__inner {
    display: grid;
    grid-template-columns: 1fr var(--hero-field-inline-size);
    /* QA r1 FIX-1: without this, `.hero__field`'s `grid-row: 1 / -1` has no
       explicit grid to count -1 against, so the browser dumps the field's
       block-size into row 1 instead of spanning all five text rows. */
    grid-template-rows: auto auto auto auto auto;
    column-gap: var(--space-xl);
    align-items: start;
  }

  .hero__eyebrow,
  .hero__title,
  .hero__cta-row,
  .hero__lead,
  .hero__cta-secondary-row {
    grid-column: 1;
  }

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

/* --- The signature device: "the ledger line is drawn" (brief §8) ----------
   Paint order (R4), back to front: atmosphere plate (the field's own CSS
   background-image, --z-atmosphere) -> the hero's own gradient (painted by
   the parent .hero, showing nowhere inside the opaque field) -> the ledger
   page SVG (--z-ledger-page): page rect, ruled lines, drawn check, cedar/oak
   sprig, mulch-scoop. One shared viewBox at every breakpoint (0 0 375 220);
   the SVG's own default preserveAspectRatio (xMidYMid meet) scales it
   uniformly into the wider/taller field at >=48rem, so nothing in the
   composition distorts. */

.hero__field {
  position: relative;
  overflow: hidden;
  block-size: var(--field-height);
  background-color: var(--color-surface);
  background-image: url('../assets/img/hero-atmosphere-bluffs.webp');
  background-image: image-set(
    url('../assets/img/hero-atmosphere-bluffs.avif') type('image/avif'),
    url('../assets/img/hero-atmosphere-bluffs.webp') type('image/webp')
  );
  background-size: cover;
  background-position: center;
  border: var(--border-hairline) var(--border-style) var(--color-field-border);
}

@media (min-width: 48em) {
  .hero__field {
    block-size: var(--field-height-wide);
  }
}

.hero__ledger-svg {
  display: block;
  position: absolute;
  inset: 0;
  inline-size: 100%;
  block-size: 100%;
  z-index: var(--z-ledger-page);
}

/* base = SETTLED end-state (brief §8.4): the check path's default
   stroke-dashoffset (unset, 0) renders fully drawn; the sprig/scoop sit at
   rest (rotate(0), no inline transform needed — the keyframes' own 0%/100%
   states are the only place a non-zero angle is declared). */
.hero__sprig {
  transform-origin: bottom center;
}

.hero__scoop {
  transform-origin: 30% 80%;
}

@media (prefers-reduced-motion: no-preference) {
  .hero__ledger-check {
    animation: ledgerCheckDraw var(--duration-check-draw) var(--ease-check) forwards;
  }

  .hero__sprig {
    animation: ledgerSprigSway var(--duration-sprig-sway) ease-in-out infinite var(--delay-sprig-sway);
  }

  .hero__scoop {
    animation: ledgerScoopTip var(--duration-scoop-tip) ease-in-out infinite var(--delay-scoop-tip);
  }
}

@keyframes ledgerCheckDraw {
  from { stroke-dashoffset: 130; }
  to   { stroke-dashoffset: 0; }
}

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

@keyframes ledgerScoopTip {
  0%, 100% { transform: rotate(-2deg); }
  50%      { transform: rotate(4deg); }
}

/* --- The static ledger-mark (brief §8.6) — the settled device, reused ------
   20x20, border 2px solid accent, square corners; the check glyph is drawn
   with two short borders rotated -45deg (the tile's own .ledger-mark::after
   construction, reproduced exactly). Precedes every entry in the services
   list and the testimonial ledger; never shrinks below --ledger-mark-min and
   never moves — the text wraps beneath it instead (§5's ornament-minimum
   rule). */

.ledger-mark {
  display: inline-block;
  flex: 0 0 auto;
  inline-size: var(--ledger-mark-size);
  block-size: var(--ledger-mark-size);
  min-inline-size: var(--ledger-mark-min);
  min-block-size: var(--ledger-mark-min);
  border: var(--ledger-mark-border) var(--border-style) var(--color-accent);
  border-radius: var(--radius-none);
  position: relative;
  vertical-align: var(--ledger-mark-valign);
}

.ledger-mark::after {
  content: '';
  position: absolute;
  inset-inline-start: var(--ledger-mark-check-x);
  inset-block-start: var(--ledger-mark-check-y);
  inline-size: var(--ledger-mark-check-w);
  block-size: var(--ledger-mark-check-h);
  border-inline-start: var(--ledger-mark-border) var(--border-style) var(--color-accent);
  border-block-end: var(--ledger-mark-border) var(--border-style) var(--color-accent);
  transform: rotate(-45deg);
}

/* --- What we do (#services, brief §9.3) ------------------------------------
   A plain hairline-divided index, no cards, no icons (ref-008). Each row
   opens with the reused static ledger-mark — these five are unranked, so a
   numeral would be the wrong device (brief §6.1 rule 2). */

.services__list {
  border-block-start: var(--border-hairline) var(--border-style) var(--color-rule);
}

.services__row {
  display: flex;
  align-items: baseline;
  gap: var(--ledger-mark-gap);
  padding-block: var(--space-sm);
  border-block-end: var(--border-hairline) var(--border-style) var(--color-rule);
}

.services__body {
  display: block;
  min-width: 0;
}

.services__name {
  display: block;
  font-family: var(--font-body-strong);
  font-weight: var(--font-weight-body-strong);
  font-size: var(--text-body);
}

.services__desc {
  display: block;
  margin-block-start: var(--space-3xs);
  color: var(--color-ink-muted);
  font-size: var(--text-small);
}

/* --- Decorative divider bands (brief §10, slots 2-3) — aria-hidden, no alt
   (copy.md's ruling). width/height on the <img> holds the ratio for CLS. */

.section__divider {
  margin-block: var(--space-lg);
  overflow: hidden;
  border: var(--border-hairline) var(--border-style) var(--color-rule);
}

.section__divider img {
  width: 100%;
  height: auto;
}

/* --- What neighbours say (#ledger, brief §6.1, §9.4) -----------------------
   The archetype's own representative section: a single top-to-bottom stack
   of ledger entries, each opened by the reused static ledger-mark. Zero
   motion of its own (§0's "one spectacular moment" stays the hero's). */

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

.ledger-head {
  margin-block-end: var(--space-md);
  padding-block-end: var(--space-sm);
  border-block-end: var(--border-thick) var(--border-style) var(--color-ink);
}

.ledger-head .section__title {
  margin-block-end: 0;
}

.ledger-entries {
  display: block;
}

.ledger-entry {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: var(--ledger-mark-gap);
  padding-block: var(--space-md);
  border-block-start: var(--border-hairline) var(--border-style) var(--color-rule);
}

.ledger-entry:first-child {
  border-block-start: none;
  padding-block-start: 0;
}

.ledger-entry__body {
  flex: 1 1 auto;
  min-width: 0;
}

.ledger-quote {
  margin: 0;
  font-family: var(--font-display);
  font-weight: var(--font-weight-quote);
  font-size: var(--text-body);
  line-height: var(--leading-body);
}

.ledger-attr {
  display: block;
  margin-block-start: var(--space-2xs);
  font-family: var(--font-body-strong);
  font-weight: var(--font-weight-body-strong);
  font-size: var(--text-small);
  color: var(--color-ink-muted);
}

/* --- How it works (#how-it-works, brief §9.5) ------------------------------
   Plain Arabic circle badges — visually distinct from the services/ledger
   ledger-mark by numeral system, colour role AND shape (brief §6.1 rule 3,
   §9.8's nested-counter check). --radius-round is scoped to this badge
   alone (tokens.css). */

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

.process__step {
  display: flex;
  align-items: flex-start;
  gap: var(--space-md);
}

.process__badge {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  inline-size: var(--space-lg);
  block-size: var(--space-lg);
  border-radius: var(--radius-round);
  background-color: var(--color-ink-muted);
  color: var(--color-bg);
  font-family: var(--font-body-strong);
  font-weight: var(--font-weight-body-strong);
  font-size: var(--text-body);
}

.process__label {
  margin: 0 0 var(--space-3xs);
  font-family: var(--font-body-strong);
  font-weight: var(--font-weight-body-strong);
  font-size: var(--text-body);
}

.process__desc {
  margin: 0;
  color: var(--color-ink-muted);
  font-size: var(--text-small);
}

/* --- Get a Free Estimate (#quote, brief §9.6) — Name/Phone required,
   Email/Message optional (brief §12). The form has its own wrapper so an
   empty FORM_ENDPOINT would hide only the <form>, never the always-visible
   phone/email fallback beside it. */

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

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

.quote__fallback {
  margin-block-start: var(--space-lg);
  margin-block-end: var(--space-2xs);
  font-weight: var(--font-weight-body-strong);
}

.quote__contacts {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm) var(--space-md);
  margin: 0;
}

/* --- thanks.html (brief §7's three-answer table) ---------------------------
   A thin confirmation page: everything sits near the top, well clear of the
   full inter-section rhythm a content page uses. Reuses the hero's own
   tighter rhythm tokens instead of the section scale. */

.thanks {
  padding-block-start: var(--hero-inset-top);
  padding-block-end: var(--section-gap);
}

.thanks__title {
  margin-block-end: var(--hero-gap-sm);
  font-size: var(--text-h2);
}

.thanks__body {
  margin-block-end: var(--hero-gap-lg);
}

.thanks__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  align-items: center;
}
