/* site.css — South Point Pool Service, Naples FL. band-rhythm archetype,
   "The Dispatch Plate", built FROM tokens. No raw hex/size/font literal
   outside tokens.css; no !important (house-tech-spec §3, §12).

   Alternating ivory/navy bands carry the page's rhythm; the hero's plate
   settles once, its corner rivet recurring as a static head-mark opening
   every band below — one running instrument (design-rules §0). */

/* Family register: only eyebrow/kicker is uppercase-tracked — the tile's
   own specimen, which does NOT uppercase h1/h2/index names/buttons.
   copy.md's natural-case strings pass through unmodified (spec §8). */

.eyebrow,
.plate__sub {
  text-transform: uppercase;
}

/* --- Layout primitives ---------------------------------------------------- */

.container {
  width: 100%;
  max-width: var(--layout-container);
  margin-inline: auto;
  padding-inline: var(--layout-gutter);
}

.section {
  padding-block: var(--section-gap);
}

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

/* Brief §4: the ruled/bordered ledger bands (service index, trust band,
   proof strip) carry the wider figure; every other below-hero band uses
   .measure (720px) instead. */
.container--ledger {
  max-width: var(--layout-ledger);
}

/* A navy full-bleed band. Two call sites: the trust band and the
   request-form band (brief §3 steps 5 and 10). Text roles switch to the
   band-ink set; the focus ring re-points at --color-focus-on-band (WCAG
   1.4.11 — house-tech-spec §8, base.css's own documented trap). */
.band {
  background-color: var(--color-ink);
  color: var(--color-band-ink);
}

.band :focus-visible {
  outline-color: var(--color-focus-on-band);
}

/* --- Recurring corner-rivet head-mark (brief §4/§6) ------------------------
   The settled hero plate's top-left rivet recurs as a small, static
   head-mark opening every band below the hero. Fixed 8px dot, never scales
   down; the 24px hairline yields first if a section label ever runs long
   enough to threaten the row (brief §4's own stated minimum). */

.section-head-mark {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  margin-block-end: var(--space-sm);
}

.section-head-mark__dot {
  flex: 0 0 auto;
  width: var(--size-headmark-dot);
  height: var(--size-headmark-dot);
  background-color: var(--color-accent);
  border-radius: var(--radius-none);
}

.section-head-mark__rule {
  flex: 0 0 auto;
  width: var(--size-headmark-rule);
  height: var(--border-hairline);
  background-color: var(--color-border-strong);
}

.band .section-head-mark__rule {
  background-color: var(--color-band-ink-soft);
}

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

.section__head h2 {
  font-size: var(--text-h2);
  font-family: var(--font-display);
  font-weight: var(--font-weight-display);
  margin: 0;
}

/* --- Header & navigation (house shell + brief's sticky stack, brief §4).
   Both the expiry bar and the header are sticky on this site — see
   css/preview.css for the stack override; this file stays untouched by it. */

.site-header {
  position: relative;
  z-index: var(--z-header);
  min-height: var(--size-header-height);
  display: flex;
  align-items: center;
  border-bottom: var(--border-hairline) var(--border-style) var(--color-border);
  background-color: var(--color-bg);
}

.site-header__inner {
  width: 100%;
  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. */
  border: var(--border-hairline) var(--border-style) var(--color-border-strong);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-weight: var(--font-weight-body-strong);
  font-size: var(--text-small);
}

.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-family: var(--font-body);
  font-weight: var(--font-weight-body-strong);
  font-size: var(--text-small);
}

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

.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. --radius-sm, Archivo 800 labels, natural case (the tile's own
   specimen does not uppercase button text). */

.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-family: var(--font-display);
  font-weight: var(--font-weight-display);
  font-size: var(--text-small);
  letter-spacing: var(--tracking-normal);
  line-height: 1;
  text-align: center;
  text-decoration: none;
  transition: background-color var(--duration-fast) var(--ease-out),
              color var(--duration-fast) var(--ease-out),
              border-color var(--duration-fast) var(--ease-out);
}

.btn--primary {
  background-color: var(--color-accent);
  color: var(--color-accent-ink);
}

.btn--primary:hover {
  background-color: var(--color-accent-text);
  color: var(--color-band-ink);
}

.btn--quiet {
  border-color: var(--color-ink);
  color: var(--color-ink);
}

.band .btn--quiet {
  border-color: var(--color-band-ink);
  color: var(--color-band-ink);
}

/* HERO — band-rhythm archetype (brief §3/§4). House order: eyebrow -> h1 -> primary CTA -> field (living-hero) -> lead -> facts. Desktop (>=64em): two columns, text ~52% / field ~48%, vertically centered. */

.hero {
  position: relative;
  padding-block-start: var(--space-md);
  padding-block-end: var(--section-gap);
  background-color: var(--color-bg);
}

.hero__grid {
  display: grid;
  grid-template-areas:
    'eyebrow'
    'title'
    'cta'
    'field'
    'lead'
    'facts';
  row-gap: var(--space-sm);
}

.hero__eyebrow {
  grid-area: eyebrow;
  margin: 0;
  font-family: var(--font-body);
  font-weight: var(--font-weight-body-strong);
  font-size: var(--text-eyebrow);
  letter-spacing: var(--tracking-wide);
  color: var(--color-accent-text);
}

.hero__title {
  grid-area: title;
  font-family: var(--font-display);
  font-size: var(--text-hero);
  font-weight: var(--font-weight-display-heavy);
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-tight);
  margin: 0;
}

.hero__cta { grid-area: cta; margin: 0; }
.hero__field { grid-area: field; }

.hero__lead {
  grid-area: lead;
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--text-lead);
  color: var(--color-ink);
  max-width: var(--layout-measure);
}

.hero__facts {
  grid-area: facts;
  margin: 0;
  font-family: var(--font-body);
  font-weight: var(--font-weight-body-strong);
  font-size: var(--text-small);
  color: var(--color-ink-muted);
}

@media (min-width: 64em) {
  .hero__grid {
    grid-template-columns: 52fr 48fr;
    grid-template-areas:
      'eyebrow field'
      'title   field'
      'cta     field'
      'lead    field'
      'facts   field';
    column-gap: var(--space-xl);
    align-items: center;
  }

  .hero__field {
    align-self: center;
  }
}

/* --- The living-hero field: a graded equipment-pad macro with a stamped,
   rivet-cornered dispatch plate settled over it, and a small outdoor
   waterline strip at its foot (brief §5/§6/§6.1). <picture> is the LCP
   element — fetchpriority high, no lazy load. The plate carries real,
   accessible text (design-rules §8: no baked-in text) and the rivet/
   needle physics; the waterline strip is markup, not image (0 KB image
   cost). ------------------------------------------------------------- */

.hero__field {
  position: relative;
  aspect-ratio: 4 / 3.1;
  overflow: hidden;
  border-radius: var(--radius-sm);
  background-color: var(--color-ink-deep);
}

.hero__field picture,
.hero__field img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero__field picture {
  position: absolute;
  inset: 0;
}

.plate {
  position: absolute;
  inset: 14% 12%;
  border: var(--border-thick) var(--border-style) var(--color-accent);
  border-radius: var(--radius-sm);
  background-color: var(--color-plate-panel);
}

.rivet {
  position: absolute;
  width: var(--size-rivet);
  height: var(--size-rivet);
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, var(--color-accent), var(--color-ink-deep) 75%);
  animation-timing-function: var(--ease-ambient);
  animation-iteration-count: infinite;
}

.rivet--tl { top: 8%; left: 6%; animation-name: glint; animation-duration: var(--duration-rivet-tl); }
.rivet--tr { top: 8%; right: 6%; animation-name: glint; animation-duration: var(--duration-rivet-tr); animation-delay: var(--delay-rivet-tr); }
.rivet--bl { bottom: 8%; left: 6%; animation-name: glint; animation-duration: var(--duration-rivet-bl); animation-delay: var(--delay-rivet-bl); }
.rivet--br { bottom: 8%; right: 6%; animation-name: glint; animation-duration: var(--duration-rivet-br); animation-delay: var(--delay-rivet-br); }

@keyframes glint {
  0%, 100% { opacity: .55; transform: scale(1); }
  50%      { opacity: 1;   transform: scale(1.25); }
}

/* The gauge needle: rests, overshoots, settles, on a periodic 9s cycle. */
.gauge-needle {
  position: absolute;
  left: 50%;
  top: 48%;
  width: var(--size-needle-width);
  height: 30%;
  background-color: var(--color-accent);
  transform-origin: bottom center;
  transform: translateX(-50%) rotate(-18deg);
  animation: needle-settle var(--duration-needle) var(--ease-overshoot) infinite;
}

@keyframes needle-settle {
  0%      { transform: translateX(-50%) rotate(-18deg); }
  8%      { transform: translateX(-50%) rotate(22deg); }
  14%, 100% { transform: translateX(-50%) rotate(6deg); }
}

.plate__label {
  position: absolute;
  left: 12%;
  bottom: 30%;
  width: fit-content;
  max-width: 76%;
  background-color: var(--color-ink-deep);
  padding-inline: var(--space-2xs);
  font-family: var(--font-display);
  font-weight: var(--font-weight-display);
  font-size: var(--text-small);
  letter-spacing: var(--tracking-wide);
  color: var(--color-band-ink);
  margin: 0;
}

.plate__sub {
  position: absolute;
  left: 12%;
  bottom: 23%;
  width: fit-content;
  max-width: 76%;
  background-color: var(--color-ink-deep);
  padding-inline: var(--space-2xs);
  font-family: var(--font-body);
  font-weight: var(--font-weight-body-strong);
  font-size: var(--text-eyebrow);
  letter-spacing: var(--tracking-wide);
  color: var(--color-accent);
  margin: 0;
}

/* Waterline strip (brief §6.1 anchor) — markup, not image. */
.waterline {
  position: absolute;
  left: 8%;
  right: 8%;
  bottom: 6%;
  height: 10%;
  border-radius: var(--radius-sm);
  border-block-start: var(--border-hairline) var(--border-style) var(--color-band-ink-muted);
  overflow: hidden;
  background-image: linear-gradient(180deg, var(--color-aqua) 0%, var(--color-ink-deep) 100%);
}

.waterline::before {
  content: '';
  position: absolute;
  top: 0;
  left: -30%;
  width: 30%;
  height: 100%;
  background-image: linear-gradient(100deg, transparent, var(--color-band-ink), transparent);
  animation: sweep var(--duration-sweep) linear infinite;
}

@keyframes sweep {
  0%   { left: -30%; }
  100% { left: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .rivet {
    animation: none;
    opacity: .55;
    transform: scale(1);
  }

  .gauge-needle {
    animation: none;
    transform: translateX(-50%) rotate(6deg);
  }

  .waterline::before {
    animation: none;
    opacity: .35;
    left: 35%;
  }
}

/* SERVICE INDEX — brief §3 step 3 (LOAD-BEARING). Plain four-row ruled ledger, dossier's own verbatim order, on the surface band. */

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

.index-list {
  margin-block-start: var(--space-md);
  border-block-start: var(--border-hairline) var(--border-style) var(--color-border);
}

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

.index-row__num {
  flex: 0 0 auto;
  min-width: var(--size-index-num-width);
  font-family: var(--font-display);
  font-weight: var(--font-weight-display-heavy);
  font-size: var(--text-numeral);
  color: var(--color-accent-text);
  line-height: 1;
}

.index-row__body { flex: 1; }

.index-row__name {
  display: block;
  font-family: var(--font-display);
  font-weight: var(--font-weight-display);
  font-size: var(--text-h3);
  color: var(--color-ink);
}

.index-row__desc {
  display: block;
  margin-block-start: var(--space-3xs);
  font-family: var(--font-body);
  font-size: var(--text-body);
  color: var(--color-ink-muted);
}

/* DIVIDER STRIPS — brief §5 imagery slots 2-4. Decorative, lazy-loaded, alt="". Sit between bands, on the page ground, never inside the navy band (brief §5's own low-visual-weight framing for slots 3 and 4). */

.divider {
  display: block;
  width: 100%;
  background-color: var(--color-bg);
  overflow: hidden;
}

.divider--square {
  max-width: var(--size-divider-square-max);
  margin-inline: auto;
  aspect-ratio: 1 / 1;
}

.divider--wide {
  aspect-ratio: 21 / 9;
}

.divider img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* WEEKLY ROUTE — brief §3 step 4 (LOAD-BEARING-adjacent). Compact, its own anchored moment. */

.route-band {
  background-color: var(--color-bg);
}

.route-band .btn { margin-block-start: var(--space-sm); }

/* ON THE RECORD — trust band, brief §3 step 5. Navy full-bleed band; the proof strip carries the dossier's single most-differentiated finding. */

.trust-band .section__head p {
  margin: 0;
  font-family: var(--font-body);
  font-weight: var(--font-weight-body-strong);
  font-size: var(--text-lead);
  color: var(--color-band-ink);
}

.proof-strip {
  margin-block-start: var(--space-lg);
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-lg) var(--space-xl);
  padding-block-start: var(--space-md);
  border-block-start: var(--border-hairline) var(--border-style) rgb(255 255 255 / 0.16);
}

.proof-strip__item {
  min-width: var(--size-proof-num-width);
}

.proof-strip__figure {
  display: block;
  font-family: var(--font-display);
  font-weight: var(--font-weight-display-heavy);
  font-size: var(--text-numeral);
  color: var(--color-accent);
  line-height: 1;
  margin: 0;
}

.proof-strip__caption {
  display: block;
  margin-block-start: var(--space-3xs);
  font-family: var(--font-body);
  font-weight: var(--font-weight-body-strong);
  font-size: var(--text-small);
  color: var(--color-band-ink-muted);
}

/* ABOUT — brief §3 step 6 (LOAD-BEARING by frequency). */

.about-band {
  background-color: var(--color-bg);
}

/* SERVICE AREA — brief §3 step 7 (FLAVOR, near-unoccupied). */

.service-area-band {
  background-color: var(--color-surface);
}

/* IN THEIR OWN WORDS — brief §3 step 8 (FLAVOR). One verbatim review. */

.review-band {
  background-color: var(--color-bg);
}

.review-card {
  margin: var(--space-md) 0 0;
  padding-inline-start: var(--space-md);
  border-inline-start: var(--border-thick) var(--border-style) var(--color-accent-text);
  max-width: var(--layout-measure);
}

.review-card__quote {
  font-family: var(--font-display);
  font-weight: var(--font-weight-body);
  font-size: var(--text-lead);
  font-style: italic;
  color: var(--color-ink);
  margin: 0 0 var(--space-2xs);
}

.review-card__attribution {
  display: block;
  font-style: normal;
  font-family: var(--font-body);
  font-weight: var(--font-weight-body-strong);
  font-size: var(--text-small);
  color: var(--color-ink-muted);
}

/* FAQ — brief §3 step 9 (FLAVOR, unoccupied). Native <details>/<summary>. */

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

.faq-list {
  margin-block-start: var(--space-md);
  display: grid;
  gap: 0;
}

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

.faq-item:first-child {
  border-block-start: var(--border-hairline) var(--border-style) var(--color-border);
}

.faq-item summary {
  display: flex;
  align-items: baseline;
  gap: var(--space-sm);
  padding-block: var(--space-sm);
  font-family: var(--font-display);
  font-weight: var(--font-weight-display);
  font-size: var(--text-h3);
  color: var(--color-ink);
  cursor: pointer;
  list-style: none;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::before {
  content: '+';
  flex: 0 0 auto;
  inline-size: var(--size-faq-marker-width);
  color: var(--color-accent-text);
  font-weight: var(--font-weight-display-heavy);
}

.faq-item[open] summary::before {
  content: '\2212';
}

.faq-item p {
  padding-block-end: var(--space-sm);
  margin: 0;
  font-family: var(--font-body);
  color: var(--color-ink-muted);
  max-width: var(--layout-measure);
}

/* START WEEKLY SERVICE — brief §3 step 10 (LOAD-BEARING). House form contract (spec §6), on the navy band. */

.contact-band .contact__cta { margin-block: var(--space-md) 0; }

.form {
  display: grid;
  gap: var(--space-md);
  max-width: var(--layout-measure);
  margin-block-start: var(--space-md);
}

.field {
  display: grid;
  gap: var(--space-3xs);
}

.field__label {
  font-family: var(--font-body);
  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-bg);
  color: var(--color-ink);
  border: var(--border-hairline) var(--border-style) var(--color-bg);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: var(--text-body);
}

textarea.field__control {
  min-height: var(--space-3xl);
  resize: vertical;
}

.field__hint {
  font-family: var(--font-body);
  font-size: var(--text-small);
  color: var(--color-band-ink-muted);
}

.form__trap {
  position: absolute;
  /* @allow-literal: off-canvas parking position, not a design value */
  left: -9999px;
  opacity: 0;
  pointer-events: none;
}

.form__status {
  font-family: var(--font-body);
  font-size: var(--text-small);
  color: var(--color-band-ink-muted);
}

.form__status[data-state='error'] {
  color: var(--color-band-ink);
  font-weight: var(--font-weight-body-strong);
}

/* --- Footer (house shell). ------------------------------------------------ */

.site-footer {
  padding-block: var(--space-xl);
  border-block-start: var(--border-hairline) var(--border-style) var(--color-border);
  font-family: var(--font-body);
  font-size: var(--text-small);
  background-color: var(--color-bg);
}

.site-footer a {
  text-underline-offset: var(--space-3xs);
}

.site-footer__nap {
  font-style: normal;
}

.site-footer__nap strong {
  font-family: var(--font-display);
  font-weight: var(--font-weight-display);
  font-size: var(--text-h3);
}

/* --- thanks.html vertical rhythm -------------------------------------------
   base.css zeroes the margin on every block element; thanks.html's prose is
   bare <p> inside .container.measure. Same house answer as every other
   bare-paragraph page: one step of the space scale. */
[aria-labelledby='thanks-title'] .measure > * + * {
  margin-block-start: var(--space-md);
}
