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

   Below the house shell (unchanged from skeleton/css/site.css) is
   Dominguez Landscaping Service's own badge-board archetype (brief §3).
   ========================================================================== */

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

/* QA r1 FIX lensA/brief: the always-visible .site-header__row/__actions
   group (phone + CTA) beside .site-nav was never sized against the house
   48em reveal, so it wrapped 768-955px. Measured with the lensB/spacing fix
   below already applied: no wrap from 973px; 62em (992px) keeps margin.
   Re-verified 320-1440 in 8px steps, zero wraps. */
@media (min-width: 62em) {
  .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;
}


/* ==========================================================================
   Dominguez Landscaping Service, Tacoma WA — badge-board archetype (brief
   §3). Everything below this line is per-site; everything above is house
   shell, unchanged from skeleton/css/site.css.
   ========================================================================== */

/* --- Header additions (copy.md "Builder note") ----------------------------
   Phone link + primary CTA both visible without opening the nav toggle,
   down to 360px (brief §3.1 item 2), never wrapping at any width >=320px —
   so neither lives inside the collapsible .site-nav. Both sit in a new
   always-visible .site-header__actions group; .site-nav keeps only the
   five text anchors.

   CONFLICT: the business's 29-char legal name + full "(253) 592-1805" +
   full-text "Request a Quote" + a labelled toggle overrun the row before
   any tightening. Two deviations, both reversible if the brief changes:
     1. nav toggle text -> icon-only (accessible name unchanged: screen
        readers still get "Menu"/"Close menu" via .visually-hidden);
     2. phone digits hide below 360px only (brief's own floor) — the tel:
        link, tap target and aria-label are unchanged at every width.

   TOKEN FIX (decision-critic follow-up, superseding an earlier over-broad
   version of deviation 2 that hid the digits up to 767px): tightening
   .site-header__actions' gap 8px->0, .site-header__phone's internal gap
   4px->0 and .site-header__cta's padding-inline 4px->0 (all pre-existing
   house tokens, no new literal) keeps the brand link at or above the 44x44
   floor through the 360-379px band where restoring the digits would
   otherwise have narrowed it below 44px (spec §8, a11y/touch). At 320px the
   brand wordmark renders at 89 of 211px ("Dominguez…", legible) — the best
   achievable without a shorter lockup, an Art Director call.

   QA r1 FIX lensB/spacing: those tightened values shipped unscoped, so the
   phone ran into the CTA at every width, not just 360-379px. Scoped below
   to that band (22.5em-23.6875em); every other width restores the
   pre-tightening --space-2xs/--space-3xs gap and padding. */

.site-header__row {
  display: flex;
  flex: 1 1 auto;
  align-items: center;
  justify-content: space-between;
  /* space-between makes this gap inert with only two children — left at 0. */
  gap: 0;
  min-width: 0;
}

.site-header__brand {
  min-width: 0;
  overflow: hidden;
  font-size: var(--text-wordmark);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.site-header__actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: var(--space-2xs);
}

.site-header__phone {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  gap: var(--space-3xs);
  min-width: var(--layout-tap-min);
  min-height: var(--layout-tap-min);
  font-size: var(--text-small);
  font-weight: var(--font-weight-body-strong);
  text-decoration: none;
  color: var(--color-ink);
}

.site-header__phone:hover,
.site-header__phone:focus-visible {
  color: var(--color-accent);
}

.site-header__phone-icon {
  flex: 0 0 auto;
  inline-size: var(--icon-size);
  block-size: var(--icon-size);
  fill: currentColor;
}

.site-header__cta {
  padding-inline: var(--space-3xs);
  font-size: var(--text-eyebrow);
}

.nav-toggle__icon {
  inline-size: var(--icon-size);
  block-size: var(--icon-size);
}

/* QA r1 FIX lensB/spacing: scoped to the 360-379px band only; other widths
   (incl. 768-955px, 1440px — both confirmed run-on before this fix) keep
   normal spacing via the unscoped rules above. */
@media (min-width: 22.5em) and (max-width: 23.6875em) {
  .site-header__actions {
    gap: 0;
  }

  .site-header__phone {
    gap: 0;
  }

  .site-header__cta {
    padding-inline: 0;
  }
}

@media (max-width: 22.4375em) {
  /* Below 360px only (brief §3.1 item 2's own floor) — 22.4375em = 359px,
     so digits are visible at 360px and above. */
  .site-header__phone-text {
    /* base.css's own .visually-hidden clip box, repeated rather than
       shared because it must apply only below this width. */
    position: absolute;
    /* @allow-literal: visually-hidden clip box, house pattern, this axis */
    width: 1px;
    /* @allow-literal: visually-hidden clip box, house pattern, this axis */
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }
}


/* --- Hero (badge-board living-hero, brief §3.1 item 3, §3.3, §4) ---------- */

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

.eyebrow {
  display: inline-flex;
  margin: 0 0 var(--space-2xs);
  color: var(--color-accent);
  font-size: var(--text-eyebrow);
  font-weight: var(--font-weight-body-semi);
  letter-spacing: var(--tracking-wide);
  line-height: var(--leading-eyebrow);
  text-transform: uppercase;
}

.hero__headline {
  margin: 0 0 var(--space-xs);
}

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

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

/* The living-hero field: the board-and-turf photograph, the three swinging
   badge medallions and the light-glint sweep (brief §4, §5). No copy lives
   here — the whole field is aria-hidden and decorative furniture around the
   real content stack above it. */

.hero__field {
  position: relative;
  overflow: hidden;
  block-size: var(--hero-field-height);
  border-radius: var(--radius-md);
  background-color: var(--color-surface);
}

.hero__photo,
.hero__photo img {
  inline-size: 100%;
  block-size: 100%;
}

.hero__photo img {
  object-fit: cover;
  object-position: center 38%;
}

/* Badge medallions — generic, unlabelled circular tags (copy.md: never a
   reproduction of the business's own badge artwork). Each hangs from a small
   nail mark and swings on its own independent loop (brief §5). */

.badge {
  position: absolute;
  inset-block-start: 14%;
  inline-size: var(--badge-size);
  block-size: var(--badge-size);
  border-radius: var(--radius-pill);
  background-color: var(--color-accent);
  box-shadow: var(--shadow-md);
  transform-origin: 50% 0%;
  z-index: var(--z-hero-badges);
}

.badge::before {
  content: '';
  position: absolute;
  inset-inline-start: 50%;
  inset-block-start: var(--badge-nail-offset);
  inline-size: var(--border-hairline);
  block-size: var(--badge-nail-length);
  background-color: var(--color-ink);
  transform: translateX(-50%);
}

.badge--1 { inset-inline-start: 8%; animation: badge-swing-a var(--duration-swing-1) var(--ease-in-out) infinite; }
.badge--2 { inset-inline-start: 41%; inset-block-start: 8%; animation: badge-swing-b var(--duration-swing-2) var(--ease-in-out) infinite; }
.badge--3 { inset-inline-start: 74%; animation: badge-swing-a var(--duration-swing-1) var(--ease-in-out) infinite; animation-delay: var(--swing-offset-3); }

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

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

/* The light-glint sweep — a soft diagonal band, opacity only ramping between
   0 and 0.15 (brief §5); the transparency itself lives in the gradient
   stops (transparent/token/transparent) so no raw rgba literal is needed. */

.hero__glint {
  position: absolute;
  inset-block: 0;
  inset-inline-start: -40%;
  inline-size: 40%;
  background-image: linear-gradient(75deg, transparent, var(--color-accent-ink), transparent);
  opacity: 0;
  z-index: var(--z-hero-glint);
  pointer-events: none;
  animation: hero-glint-sweep var(--duration-glint) var(--ease-in-out) infinite;
}

@keyframes hero-glint-sweep {
  0%   { transform: translateX(0%); opacity: 0; }
  45%  { opacity: 0.15; }
  55%  { opacity: 0.15; }
  100% { transform: translateX(340%); opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  /* brief §5: frozen end-state, badges at a slight varied tilt, glint gone
     entirely. base.css's kill switch handles the reveal system; the
     signature move's own @keyframes need their own stop here. */
  .badge--1,
  .badge--3 {
    animation: none;
    transform: rotate(-1deg);
  }

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

  .hero__glint {
    animation: none;
    opacity: 0;
  }
}


/* --- Season strip (brief §3.1 item 4) --------------------------------------
   A slim band, not a section — its own small padding, never --section-gap,
   so it shares the hero's/next section's rhythm rather than adding one. */

.season-strip {
  border-block: var(--border-hairline) var(--border-style) var(--color-border);
  background-color: var(--color-surface);
  padding-block: var(--space-sm);
}

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


/* --- Board-list (Services, brief §3.1 item 5, §3.5) ------------------------
   Numbered index rows, dashed-rule dividers, digit tags. */

.board-list {
  display: grid;
  margin: var(--space-md) 0 0;
  border: var(--border-hairline) var(--border-style) var(--color-border);
  border-radius: var(--radius-md);
  background-color: var(--color-surface);
}

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

.board-list__row:last-child {
  border-block-end: none;
}

.board-list__tag {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  inline-size: var(--tag-size);
  block-size: var(--tag-size);
  border-radius: var(--radius-pill);
  background-color: var(--color-accent);
  color: var(--color-accent-ink);
  font-size: var(--text-small);
  font-weight: var(--font-weight-body-semi);
}

.board-list__text {
  margin: 0;
}


/* --- The Crew's Own Board (proof, brief §3.1 item 6, §3.5) -----------------
   Mnemonic-glyph tags, distinguished from the services list's plain digits
   by a second axis (a thin border-strong ring), per the nested-counter rule. */

.proof-board {
  display: grid;
  gap: var(--space-md);
  margin: var(--space-md) 0 0;
  padding: var(--space-md);
  border: var(--border-hairline) var(--border-style) var(--color-border);
  border-radius: var(--radius-md);
  background-color: var(--color-surface);
}

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

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

.proof-board__tag {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  inline-size: var(--tag-size);
  block-size: var(--tag-size);
  border-radius: var(--radius-pill);
  background-color: var(--color-accent);
  color: var(--color-accent-ink);
  font-size: var(--text-small);
  font-weight: var(--font-weight-body-semi);
  outline: var(--border-hairline) var(--border-style) var(--color-border-strong);
  outline-offset: var(--space-3xs);
}

.proof-board__tag svg {
  inline-size: var(--icon-size);
  block-size: var(--icon-size);
  fill: currentColor;
}

.proof-board__text {
  margin: 0;
}


/* --- Reviews (brief §3.1 item 7) ------------------------------------------- */

.reviews__rating {
  margin: 0 0 var(--space-md);
  color: var(--color-ink-muted);
  font-weight: var(--font-weight-body-strong);
}

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

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

.review {
  padding: var(--space-md);
  border: var(--border-hairline) var(--border-style) var(--color-border);
  border-radius: var(--radius-md);
  background-color: var(--color-surface);
}

.review__quote p {
  margin: 0;
}

.review__attribution {
  margin: var(--space-sm) 0 0;
  color: var(--color-ink-muted);
  font-size: var(--text-small);
  font-style: normal;
}

.reviews__cta {
  margin: var(--space-lg) 0 0;
}


/* --- Process (brief §3.1 item 8) -------------------------------------------
   A separate enumeration from both the services list and the proof board;
   native <ol> markers keep it visually distinct from either tag system
   without adding a third tag costume (design-rules §4). */

.process-list {
  display: grid;
  gap: var(--space-md);
  margin: var(--space-md) 0 0;
  padding-inline-start: var(--process-list-indent);
}

@media (min-width: 48em) {
  .process-list {
    grid-template-columns: repeat(4, 1fr);
    padding-inline-start: var(--process-list-indent-wide);
  }
}

.process-list li {
  padding-inline-start: var(--space-2xs);
  color: var(--color-ink);
}

.process-list li::marker {
  color: var(--color-accent);
  font-family: var(--font-display);
  font-size: var(--text-h3);
}


/* --- Service area (brief §3.1 item 9) -------------------------------------- */

.area-list {
  margin: var(--space-md) 0 0;
  color: var(--color-ink-muted);
  font-size: var(--text-small);
  letter-spacing: var(--tracking-wide);
}


/* --- Contact (brief §3.1 item 10) ------------------------------------------ */

.contact-nap {
  margin: var(--space-lg) 0 0;
  padding: var(--space-md);
  border: var(--border-hairline) var(--border-style) var(--color-border);
  border-radius: var(--radius-md);
  background-color: var(--color-surface);
  font-style: normal;
  line-height: var(--leading-body);
}
