/* ==========================================================================
   site.css — Victor's Pool Service. poster-hero archetype, the living-hero
   sign+saguaro signature move (brief §5/§6). Tokens only — no raw hex/px/
   font literals below (house-tech-spec §3); the two escape hatches are the
   house breakpoints and an explicit @allow-literal comment.
   ========================================================================== */

/* base.css's .skip-link fills with --color-accent (the house default) —
   this brief's --color-accent is decorative/rule-work ONLY (2.92:1, fails
   3:1) and --color-accent-ink on it measures 3.16:1, failing AA's 4.5:1.
   Same fix as .btn--primary: the brief's own text-bearing role. */
.skip-link {
  background-color: var(--color-accent-deep);
}

/* --- Layout primitives (house, unchanged from skeleton) ------------------- */

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

/* Fixed height (design-rules §7.2 rule 3's house shape: 101px sticky-stack
   with the 44px expiry bar). min-height so the row resolves to
   --header-height regardless of the 44px CTA button (house precedent:
   anderson-landscape-green-bay-wi). */
.site-header {
  position: relative;
  z-index: var(--z-header);
  padding-block: 0;
  min-height: var(--header-height);
  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);
  min-height: var(--header-height);
}

/* --text-brand, not the generic --text-h3 (board headings, larger). */
.site-header__brand {
  overflow: hidden;
  min-width: 0;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-family: var(--font-display);
  font-size: var(--text-brand);
  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);
}

/* Closed by CSS default below 48em (QA r3 perf/cls precedent) — the
   <noscript> override in @shared:head-boilerplate restores it for JS-off. */
.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);
}

/* --color-accent-deep, NOT --color-accent (skeleton default) — brief §3:
   --color-accent is decorative/rule-work ONLY (2.92:1, fails 3:1);
   --color-accent-deep is the text-bearing role, 5.91:1 vs accent-ink. */
.btn--primary {
  background-color: var(--color-accent-deep);
  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;
}

/* Extra NAP lines beyond the skeleton's single-line default (copy.md's
   fuller footer: address, phone, email, service area, licence, copyright —
   all stacked blocks that base.css's reset leaves flush against each other
   otherwise). Same adjacency pattern the house already uses for exactly
   this relationship (preview.css's buy-page rhythm fix). */
.site-footer .container > * + * {
  margin-block-start: var(--space-sm);
}

/* ==========================================================================
   HERO — poster-hero archetype (brief §5/§6). House order at every width
   (design-rules §7.2 rule 1): eyebrow -> h1 -> primary CTA -> field -> lead
   -> facts. DOM order carries this on mobile; the grid below re-flows it at
   >= 56.25em (900px, brief §6's own stated breakpoint) without reordering
   the document.
   ========================================================================== */

.hero {
  padding-block-start: var(--space-sm);
  padding-block-end: var(--section-gap);
  background-color: var(--color-bg);
  overflow: hidden;
}

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

.hero__head {
  display: grid;
}

.eyebrow {
  margin: 0 0 var(--space-3xs);
  color: var(--color-ink-muted);
  font-family: var(--font-body);
  font-size: var(--text-eyebrow);
  font-weight: var(--font-weight-body-strong);
  line-height: var(--leading-snug);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
}

.hero h1 {
  margin: 0 0 var(--space-2xs);
  font-size: var(--text-display);
}

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

/* The living-hero field. NO TEXT SITS OVER IT (brief §3) — every text
   element (eyebrow, H1, CTA, lead, facts) sits in normal document flow
   above or below the field, never overlaid on it. */
.hero__field {
  position: relative;
  overflow: hidden;
  height: var(--hero-field-height);
  margin-inline: calc(var(--layout-gutter) * -1);
  margin-block-start: var(--space-sm);
}

.hero__atmosphere {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(120% 90% at 50% 0%, var(--color-atmosphere-accent), transparent 62%),
    radial-gradient(90% 70% at 15% 100%, var(--color-atmosphere-teal), transparent 55%),
    linear-gradient(180deg, var(--color-atmosphere-ground-top) 0%, var(--color-atmosphere-ground-mid) 55%, var(--color-atmosphere-ground-bottom) 100%);
}

/* Background layer — the saguaro, standing left of the sign, independent
   sway loop. object-fit: contain so it scales rather than crops if the
   field's own height ever drops below --hero-band-min (brief §6). */
.hero__saguaro {
  position: absolute;
  inset-inline-start: 2%;
  inset-block-end: 0;
  width: 26%;
  max-height: 92%;
  object-fit: contain;
  object-position: bottom;
  transform-origin: 50% 100%;   /* base of the plant */
  animation: saguaroSway var(--duration-saguaro-sway) var(--ease-ambient) infinite;
}

/* Foreground layer — the hung sign, the LCP element and the §6.1 anchor
   (brief §6: "the horizontal centre-right of the field, roughly 35-75%
   across and 20-80% down its height"). */
.hero__sign {
  position: absolute;
  inset-inline-start: 35%;
  inset-block-start: 20%;
  width: 40%;
  height: 60%;
  object-fit: contain;
  object-position: center top;
  transform-origin: 50% 0%;   /* the chain-bracket point, top-centre of the sign */
  animation: signSwing var(--duration-sign-swing) var(--ease-ambient) infinite;
}

/* The sun-glint — a soft travelling highlight between the sign and the
   saguaro, ambient only, aria-hidden (it is inside the already aria-hidden
   field). */
.hero__glint {
  position: absolute;
  inset-block-start: 10%;
  inset-inline-start: 58%;
  width: 16%;
  aspect-ratio: 1;
  background-image: radial-gradient(circle, var(--color-atmosphere-ground-top), transparent 70%);
  opacity: 0;
  animation: sunGlint var(--duration-sun-glint) var(--ease-linear) infinite;
}

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

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

@keyframes sunGlint {
  0%   { transform: translateX(calc(var(--motion-glint-travel) * -1)); opacity: 0; }
  50%  { opacity: .6; }
  100% { transform: translateX(var(--motion-glint-travel)); opacity: 0; }
}

/* Reduced motion (house-tech-spec §8, absolute, no exception — brief §6).
   base.css's kill switch already collapses the duration tokens to ~0.01ms
   at :root (tokens.css); these explicit end-states are the belt to that
   brace, matching the brief's own reduced-motion block exactly. */
@media (prefers-reduced-motion: reduce) {
  .hero__sign,
  .hero__saguaro,
  .hero__glint {
    animation: none;
  }
  .hero__sign {
    transform: rotate(0deg);
  }
  .hero__glint {
    opacity: 0;
  }
}

.hero__meta {
  margin-block-start: var(--space-sm);
}

.hero__lead {
  margin: 0;
  font-size: var(--text-body);
  line-height: var(--leading-body);
}

.facts {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2xs);
  margin: var(--space-sm) 0 0;
  padding: 0;
  list-style: none;
}

.facts li {
  padding: var(--space-3xs) var(--space-xs);
  background-color: var(--color-surface);
  border-radius: var(--radius-sm);
  font-size: var(--text-small);
  font-weight: var(--font-weight-body-strong);
  color: var(--color-accent-deep);
}

@media (min-width: 56.25em) {
  .hero__grid {
    grid-template-columns: 1fr 1fr;
    grid-template-areas: "head field" "meta field";
    align-items: start;
    gap: var(--space-xl) var(--space-lg);
  }

  .hero__head {
    grid-area: head;
    max-width: var(--hero-text-max);
  }

  .hero__field {
    grid-area: field;
    align-self: center;
    height: auto;
    min-height: var(--hero-band-min);
    margin-inline: 0;
    margin-block-start: 0;
  }

  .hero__meta {
    grid-area: meta;
    max-width: var(--hero-text-max);
  }
}

/* ==========================================================================
   WHAT A WEEKLY VISIT INCLUDES — a ledger, not a card grid. A simple ruled
   checklist matches the plain, custodial register (dossier §4.4) and
   introduces no competing counter or icon set (design-rules §4). Imagery
   slot 3 (brief §7): a below-fold, lazy still life, paired with the text
   body in the same two-column grid convention already used for the
   About & Trust section (imagery slot 5) further down this page — same
   breakpoint, same space tokens, no new values introduced.
   ========================================================================== */

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

@media (min-width: 56.25em) {
  .visit-grid {
    grid-template-columns: 3fr 2fr;
    align-items: start;
    gap: var(--space-xl);
  }
}

.visit-grid__image img {
  width: 100%;
  height: auto;
  border-radius: var(--radius-sm);
}

.visit-list {
  margin: var(--space-md) 0 0;
  padding: 0;
  list-style: none;
  border-block-start: var(--border-hairline) var(--border-style) var(--color-border);
}

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

/* ==========================================================================
   DIVIDER STRIP — imagery slot 4 (brief §6.2): 96px full-bleed, decorative,
   no text overlay. 96px = --space-2xl, so no new token is needed.
   ========================================================================== */

.divider-strip {
  height: var(--space-2xl);
  overflow: hidden;
}

/* <picture> has no intrinsic height of its own, so the img's height: 100%
   below has nothing definite to resolve against without this — found on
   render: without it, object-fit never engages and the strip simply
   clips the image's natural size from the top-left, ignoring
   object-position entirely. */
.divider-strip picture {
  display: block;
  height: 100%;
}

.divider-strip img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 60%;
}

/* ==========================================================================
   THREE KINDS OF WORK — brief §6.2. Explicitly licensed as an exception to
   design-rules §4's three-card-grid default: no generic icon set (a single
   flat colour dot, a structural ornament, not a concept icon) and every
   board's copy is dossier §4.1's own verbatim service list, not a generic
   benefit sentence.
   ========================================================================== */

.board-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-md);
  margin-block-start: var(--space-lg);
}

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

@media (min-width: 56.25em) {
  .board-row {
    grid-template-columns: repeat(3, 1fr);
  }
}

.board {
  background-color: var(--color-surface);
  padding: var(--space-md);
  border-radius: var(--radius-sm);
}

.board__dot {
  display: block;
  width: var(--board-dot-size);
  height: var(--board-dot-size);
  border-radius: 50%;
  background-color: var(--color-accent-deep);
  margin-block-end: var(--space-sm);
}

.board__title {
  margin: 0 0 var(--space-2xs);
  font-size: var(--text-h3);
}

.board p {
  margin: 0 0 var(--space-sm);
  font-size: var(--text-body);
}

.board p:last-child {
  margin-block-end: 0;
}

.board ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: var(--space-3xs);
}

.board li {
  font-size: var(--text-small);
  font-weight: var(--font-weight-body-strong);
  color: var(--color-ink-muted);
}

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

.automation-note {
  margin-block-start: var(--space-lg);
  font-size: var(--text-small);
  color: var(--color-ink-muted);
}

/* ==========================================================================
   ABOUT & TRUST — combined section (brief §5: the proof inventory is thin
   by design, and two full sections would pad). Imagery slot 5, secondary
   and below the fold, never competing with the hero's lead-image trade.
   ========================================================================== */

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

@media (min-width: 56.25em) {
  .about-grid {
    grid-template-columns: 3fr 2fr;
    align-items: start;
    gap: var(--space-xl);
  }
}

.about-grid__image img {
  width: 100%;
  height: auto;
  border-radius: var(--radius-sm);
}

.service-area {
  margin-block-start: var(--space-sm);
  font-weight: var(--font-weight-body-strong);
}

.trust-lines {
  margin: var(--space-md) 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: var(--space-2xs);
  font-size: var(--text-small);
  color: var(--color-ink-muted);
}

.phone-repeat {
  margin-block-start: var(--space-sm);
}

.phone-repeat a {
  color: var(--color-accent-deep);
  font-weight: var(--font-weight-body-strong);
}
