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

/* ==========================================================================
   BRIEF-DRIVEN COMPONENTS — brief.md (C3 approved 2026-09-30). Archetype
   `route-stack` (§3.1): one living-hero moment, then a stack of full-bleed
   sections alternating bg/surface, each opened by the same 34x3px rule
   mark. Signature: the route-ticket, carried through exactly twice (§2.2).
   ========================================================================== */

/* Button/skip-link fill, overridden from the skeleton default: this brief's
   contrast table (§2.1) pairs accent-ink AS FILL with bg as its text
   ("primary CTA button fill + label", 6.81:1) — the reverse of the house
   example. Unoverridden, both inherit accent/accent-ink and measure 1.53:1. */
.skip-link,
.btn--primary {
  background-color: var(--color-accent-ink);
  color: var(--color-bg);
}

/* The recurring rule mark — the "ticket stub" (§3.1). Graphic role: accent
   is cleared for this exact use (§2.1). */
.rule {
  width: var(--rule-width);
  height: var(--border-thick);
  background-color: var(--color-accent);
  margin-block-end: var(--space-sm);
}

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

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

/* Hero (§3.1, §3.3). House DOM order (design-rules §7.2 rule 1): rule ->
   eyebrow -> h1 -> CTA -> field -> lead -> facts. Mobile: plain block flow
   IS the visual order. Desktop (>=900px): a grid re-flows the SAME markup
   into a 55/45 split via named areas — DOM order is unchanged either way. */

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

@media (min-width: 56.25em) {
  .hero {
    padding-block-start: var(--space-xl);
  }
}

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

/* Every section heading below the hero (§2.2's --text-h2 row). */
h2 {
  font-size: var(--text-h2);
  margin-block-end: var(--space-sm);
}

/* H1's single italic accent word (§2.2: "one accent word per H1, never
   body" — 700 italic is loaded for exactly this role, nowhere else). */
.hero__accent {
  font-style: italic;
  font-weight: 700;
  color: var(--color-accent);
}

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

.hero__lead {
  font-family: var(--font-body);
  font-size: var(--text-lead);
  color: var(--color-ink-muted);
  margin-block-start: var(--space-md);
}

/* Facts-row: lead-to-facts gap is a single --space-md (§3.1's own recorded
   largest intra-hero measurement, well under the 2x--section-gap floor). */
.facts-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm) var(--space-md);
  margin-block-start: var(--space-md);
}

.facts-row li {
  font-size: var(--text-small);
  font-weight: var(--font-weight-body-strong);
  color: var(--color-ink-muted);
  padding-inline-start: var(--space-md);
  border-inline-start: var(--border-hairline) var(--border-style) var(--color-border);
}

.facts-row li:first-child {
  padding-inline-start: 0;
  border-inline-start: 0;
}

/* Hero field: route-ticket + outdoor-vessel vignette (§3.1, §4.1). Fixed
   190px mobile min-height, no shrinking (§3.3 rule 4); a soft radial
   atmosphere behind it (ref-001, physics only). */
.hero__field {
  position: relative;
  isolation: isolate;
  min-height: var(--hero-field-height);
  margin-block-end: var(--space-md);
  background:
    radial-gradient(circle at 78% 22%, var(--color-hero-atmosphere), transparent 65%);
}

.hero__vignette {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.hero__vignette img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* Mobile crop (§4.2 slot 1: "~2:1 letterbox"): favours the coping/
     waterline band over the safe-crop canvas's sky/deck margin. */
  object-position: center 45%;
}

/* Skimmer pole — coded, not part of the raster (§4.1). Crosses from the
   coping down into the waterline band. */
.hero__pole {
  position: absolute;
  inset-block-start: 28%;
  inset-inline-end: 22%;
  width: var(--border-hairline);
  height: 40%;
  background-color: var(--color-ink);
  opacity: 0.55;
  transform-origin: top center;
  animation: hero-pole-sway var(--duration-pole-sway) var(--ease-in-out) infinite alternate;
}

/* Travelling sun-glint — coded, independent of the raster (§4.1, §5).
   QA r1 FIX: inset-block-start moved onto the regenerated raster's
   waterline band (measured ≈62% down the field at both 375 and 1440), off
   the coping highlight it sat on before. inset-inline-start starts at 50%
   here (not 8%) because the mobile ticket's height exceeds the field's
   fixed 190px and covers 8% entirely; 50% clears its 64%-capped width once
   the reduced-motion mid-travel offset is added. Desktop restores 8% below,
   where the shorter ticket already leaves that row clear. */
.hero__glint {
  position: absolute;
  inset-block-start: 62%;
  inset-inline-start: 50%;
  width: var(--space-2xl);
  height: var(--space-2xs);
  border-radius: var(--radius-pill);
  background: linear-gradient(90deg, transparent, var(--color-glint-core), var(--color-glint), transparent);
  /* @allow-literal: filter blur radius has no house scale equivalent, tuned visually */
  filter: blur(2px);
  animation: hero-glint-travel var(--duration-sun-glint) linear infinite;
}

/* Route ticket, floating over the vignette toward the upper-left, so what
   remains visible reads as the vignette filling the field's lower-right
   (§4.1). Its sway is the third, independently-timed loop (§5). */
.hero__ticket {
  position: absolute;
  inset-block-start: 0;
  inset-inline-start: 0;
  width: min(var(--ticket-width), 64%);
  z-index: 1;
  transform-origin: 50% 0%;
  animation: hero-sway var(--duration-ticket-sway) var(--ease-in-out) infinite alternate;
}

@media (min-width: 56.25em) {
  .hero__field {
    min-height: 0;
    aspect-ratio: 4 / 5;
  }

  .hero__vignette img {
    object-position: center center;
  }

  .hero__glint {
    inset-inline-start: 8%; /* desktop ticket is shorter than the field; clear already */
  }

  .hero__ticket {
    width: min(var(--ticket-width), 72%);
  }
}

/* Desktop hero split (§3.1: text column ~55%, field ~45%). Same DOM order
   as mobile — only visual placement changes, via named grid areas. */
@media (min-width: 56.25em) {
  .hero__inner {
    display: grid;
    grid-template-columns: 11fr 9fr;
    column-gap: var(--space-xl);
    align-items: start;
    grid-template-areas:
      "rule    field"
      "eyebrow field"
      "heading field"
      "cta     field"
      "lead    field"
      "facts   field";
  }

  .hero__inner > .rule { grid-area: rule; }
  .hero__inner > .eyebrow { grid-area: eyebrow; }
  .hero__heading { grid-area: heading; }
  .hero__cta-row { grid-area: cta; }
  .hero__field { grid-area: field; align-self: stretch; margin-block-end: 0; }
  .hero__lead { grid-area: lead; }
  .facts-row { grid-area: facts; }
}

/* Route ticket component (ref-010, ref-008; §2.2). Square corners
   (radius-none — a paper ticket's honest read), hairline border, small
   offset shadow (letterpress card craft), container query for its own
   260px comfortable floor. */
.ticket {
  container-type: inline-size;
  container-name: ticket;
  background-color: var(--color-surface);
  border: var(--border-hairline) var(--border-style) var(--color-border);
  border-radius: var(--radius-none);
  box-shadow: var(--shadow-sm);
  padding: var(--space-sm) var(--space-md);
}

.ticket--full {
  width: min(100%, var(--ticket-width-full));
  margin-block: var(--space-md);
}

.ticket__header {
  font-family: var(--font-body);
  font-size: var(--text-small);
  font-weight: var(--font-weight-body-strong);
  letter-spacing: var(--tracking-eyebrow);
  text-transform: uppercase;
  color: var(--color-ink-muted);
  margin-block-end: var(--space-xs);
}

.field-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--space-sm);
  padding-block: var(--space-xs);
}

.field-row + .field-row {
  border-block-start: var(--border-hairline) dashed var(--color-border);
}

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

.field-row__value {
  font-family: var(--font-body);
  font-size: var(--text-body);
  font-weight: var(--font-weight-body-strong);
  color: var(--color-accent-ink);
  white-space: nowrap;
}

/* Below 260px of the ticket's OWN inline-size, the field-row stacks (§2.2). */
@container ticket (max-width: 260px) {
  .field-row {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-3xs);
  }
}

/* weekly-plan-offer's two plan-labelled CTAs (§3.2 row 2) — never a bare
   "Contact Us". */
.plan-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

/* services-specific / visit-explained: list + object-study, single column
   at mobile, two from tablet up. No numeral index (§2.2). */
.split-layout {
  display: grid;
  gap: var(--space-lg);
}

@media (min-width: 48em) {
  .split-layout {
    grid-template-columns: 3fr 2fr;
    align-items: start;
  }
}

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

.services-list li {
  padding-block: var(--space-2xs);
  border-block-end: var(--border-hairline) var(--border-style) var(--color-border);
}

.services-list li:last-child {
  border-block-end: 0;
}

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

.object-study {
  margin: 0;
}

.object-study img {
  border: var(--border-hairline) var(--border-style) var(--color-border);
}

/* trust-line's pull-quote (§3.2 row 5). Fraunces roman, never italic (the
   italic face is reserved for the H1's one word, §2.2). Attribution stays
   natural case — never uppercased (house-tech-spec §8). */
.pull-quote {
  border-inline-start: var(--border-thick) var(--border-style) var(--color-accent);
  padding-inline-start: var(--space-md);
  margin: 0;
}

.pull-quote p {
  font-family: var(--font-display);
  font-weight: var(--font-weight-display);
  font-size: var(--text-h3);
  color: var(--color-ink);
  margin-block-end: var(--space-xs);
}

.pull-quote cite {
  display: block;
  font-style: normal;
  font-size: var(--text-small);
  color: var(--color-ink-muted);
}

/* FAQ: native <details>/<summary>, zero JS, no numeral index (§2.2, §3.2
   row 8). The question is the disclosure control's own accessible name. */
.faq-list {
  display: grid;
  gap: var(--space-sm);
}

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

.faq-item summary {
  font-family: var(--font-display);
  font-size: var(--text-h3);
  font-weight: var(--font-weight-display);
  cursor: pointer;
  padding-block: var(--space-xs);
}

.faq-item summary::-webkit-details-marker {
  color: var(--color-accent);
}

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

/* Motion: the one signature move (§5) — three independently-timed,
   non-synchronised loops (8.6s / 7.1s / 9.4s) that never fall into sync. */

@keyframes hero-sway {
  from { transform: rotate(calc(var(--rotate-ticket) * -1)); }
  to   { transform: rotate(var(--rotate-ticket)); }
}

@keyframes hero-pole-sway {
  from { transform: rotate(calc(var(--rotate-pole) * -1)); }
  to   { transform: rotate(var(--rotate-pole)); }
}

@keyframes hero-glint-travel {
  0%   { transform: translateX(0); opacity: 0; }
  10%  { opacity: 1; }
  90%  { opacity: 1; }
  100% { transform: translateX(var(--glint-travel)); opacity: 0; }
}

/* Reduced motion (§5, house-tech-spec §8): ticket and pole hold level, the
   glint holds a fixed mid-travel position — a still frame, not a freeze. */
@media (prefers-reduced-motion: reduce) {
  .hero__ticket,
  .hero__pole {
    animation: none;
    transform: rotate(0deg);
  }

  .hero__glint {
    animation: none;
    transform: translateX(var(--glint-mid));
    opacity: var(--glint-reduced-opacity);
  }
}
