/* ========================================
   site.css — Leo's Towing & Recovery. band-rhythm archetype, "the hours
   sign" signature move (brief §3, §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.
   ======================================== */

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

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

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

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

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

/* Brief §4 inner max-widths: 680px prose bands, 960px ruled/card bands. */
.container--prose {
  max-width: var(--layout-prose);
}

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

/* band-rhythm's alternating left/right/centre register (brief §4): the
   narrower inner block hugs a side for a real direction change. */
.align-left {
  margin-inline: 0 auto;
  text-align: left;
}

.align-right {
  margin-inline: auto 0;
  text-align: left;
}

.align-center {
  margin-inline: auto;
  text-align: center;
}

.align-center .measure,
.align-center .lead {
  margin-inline: auto;
}

/* --- Header & navigation (house, unchanged) -------------------------------- */

.site-header {
  position: relative;
  z-index: var(--z-header);
  min-height: var(--header-height);
  padding-block: 0;
  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);
}

.site-header__brand {
  font-family: var(--font-display);
  font-size: var(--text-lead);
  font-weight: var(--font-weight-display);
  color: var(--color-ink);
  text-decoration: none;
}

.nav-toggle {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2xs);
  padding: var(--space-2xs) var(--space-xs);
  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);
  color: var(--color-ink);
}

.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;
  color: var(--color-ink);
  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);
}

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

.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-body);
  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 {
  border-color: var(--color-border-strong);
  color: var(--color-ink);
}

.link-strong {
  display: inline-flex;
  align-items: center;
  min-height: var(--layout-tap-min);
  color: var(--color-accent-text);
  font-weight: var(--font-weight-body-strong);
  text-decoration: underline;
  text-underline-offset: var(--space-3xs);
}

/* ========================================
   HERO — band-rhythm, bg ground, centred. 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
   >= 64em 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-lg);
}

.hero__head {
  display: grid;
}

.eyebrow {
  margin: 0 0 var(--space-3xs);
  color: var(--color-accent-text);
  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);
  color: var(--color-ink);
  font-size: var(--text-hero);
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-sm);
  margin: var(--space-xs) 0 0;
}

.hero__field {
  position: relative;
  aspect-ratio: 4 / 3;
  width: 100%;
  margin-block-start: var(--space-sm);
}

.hero__media,
.hero__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: var(--radius-none);
}

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

.hero__meta .lead {
  margin: 0;
  color: var(--color-ink);
  font-family: var(--font-body);
  font-style: italic;
  font-size: var(--text-lead);
  line-height: var(--leading-body);
}

.facts {
  margin: var(--space-sm) 0 0;
  color: var(--color-ink-muted);
  font-size: var(--text-small);
  line-height: var(--leading-body);
}

.facts b {
  color: var(--color-accent-text);
  font-family: var(--font-display);
  font-size: var(--text-numeral);
  font-weight: var(--font-weight-display);
  line-height: 1;
}

@media (min-width: 64em) {
  .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; }
  .hero__field { grid-area: field; align-self: center; margin-block-start: 0; }
  .hero__meta { grid-area: meta; }
}

/* --- "The hours sign" — the signature move (brief §6) ---------------------
   A hand-painted hours board settles once on load over the graded
   hook-and-vehicle field, then holds a slow ambient sway. The wrecker-hook
   icon and the pennant sway/flutter on two further independently-timed
   loops, never synchronised with the sign or each other. Pure CSS: it runs
   with JavaScript off (progressive enhancement, house-tech-spec §1). */

.hero__sign {
  position: absolute;
  inset-block-start: 4%;
  inset-inline-start: 50%;
  width: 54%;
  margin-inline-start: -27%;
  overflow: visible;
  animation:
    sign-settle var(--duration-sign-settle) var(--ease-overshoot) both,
    sign-sway var(--duration-sign-sway) var(--ease-ambient) var(--duration-sign-settle) infinite;
}

.hero__sign-board {
  fill: var(--color-bg);
  stroke: var(--color-ink);
  stroke-width: 3;
  stroke-dasharray: 7 5;
}

.hero__sign-nail {
  fill: var(--color-accent-text);
}

.hero__sign-open {
  font-family: var(--font-display);
  font-size: var(--text-h2);
  fill: var(--color-accent-text);
}

.hero__sign-line {
  font-family: var(--font-body);
  font-weight: var(--font-weight-body-strong);
  font-size: var(--text-small);
  fill: var(--color-ink);
}

@keyframes sign-settle {
  from { opacity: 0; transform: rotate(-11deg); }
  to   { opacity: 1; transform: rotate(0deg); }
}

@keyframes sign-sway {
  0%   { transform: rotate(0deg); }
  30%  { transform: rotate(2deg); }
  65%  { transform: rotate(-1.5deg); }
  100% { transform: rotate(0deg); }
}

.hero__hook {
  position: absolute;
  inset-block-end: 7%;
  inset-inline-end: 8%;
  width: 16%;
  transform-origin: 50% 0%;
  stroke: var(--color-accent-text);
  animation: hook-sway var(--duration-hook-sway) var(--ease-ambient) var(--hook-sway-offset) infinite backwards;
}

@keyframes hook-sway {
  0%, 100% { transform: rotate(-9deg); }
  50%      { transform: rotate(9deg); }
}

.hero__pennant {
  position: absolute;
  inset-block-start: 3%;
  inset-inline-end: 10%;
  width: 12%;
  transform-origin: 0% 50%;
  fill: var(--color-accent);
  animation: pennant-flutter var(--duration-pennant) var(--ease-ambient) infinite;
}

@keyframes pennant-flutter {
  0%, 100% { transform: scaleX(1); }
  50%      { transform: scaleX(0.8); }
}

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

  .hero__hook {
    animation: none;
    transform: rotate(3deg);
  }

  .hero__pennant {
    animation: none;
    transform: scaleX(1);
  }
}

/* ========================================
   RECURRING HEAD-MARK — the settled sign's corner nail-head, opening every
   band below (brief §6). 8px dot, never scaling down; the 24px hairline
   yields first if a label ever threatens the row (brief §4).
   ======================================== */

.band-mark {
  display: flex;
  align-items: center;
  gap: var(--space-2xs);
  margin: 0 0 var(--space-sm);
}

.band-mark--center {
  justify-content: center;
}

.band-mark__dot {
  flex: 0 0 auto;
  /* @allow-literal: the brief's fixed 8px minimum (§4), never scales */
  width: 8px;
  /* @allow-literal: the brief's fixed 8px minimum (§4), never scales */
  height: 8px;
  border-radius: var(--radius-sm);
  background-color: var(--color-accent-text);
}

.band-mark__line {
  /* @allow-literal: the brief's fixed 24px hairline (§4) */
  flex: 0 1 24px;
  /* @allow-literal: the brief's fixed 24px hairline (§4) */
  max-width: 24px;
  height: var(--border-hairline);
  background-color: var(--color-line);
}

/* Section titles share the display face at every band. */
.section h2 {
  margin: 0 0 var(--space-sm);
  color: var(--color-ink);
  font-size: var(--text-h2);
}

.lead {
  color: var(--color-ink-muted);
  font-style: italic;
  font-size: var(--text-lead);
  line-height: var(--leading-body);
}

.fine-print {
  margin-block-start: var(--space-md);
  color: var(--color-ink-muted);
  font-size: var(--text-small);
}

/* ========================================
   SERVICE ROSTER — a ledger, not a card grid (design-rules §4 bans the
   three-card default; retro-local reads as a run of shop-ledger lines).
   ======================================== */

.roster {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  margin: var(--space-md) 0 0;
  padding: 0;
  list-style: none;
  border-block-start: var(--border-hairline) var(--border-style-dashed) var(--color-line);
}

.roster li {
  padding: var(--space-xs) 0;
  border-block-end: var(--border-hairline) var(--border-style-dashed) var(--color-line);
  color: var(--color-ink);
  font-size: var(--text-body);
}

@media (min-width: 48em) {
  .roster {
    grid-template-columns: 1fr 1fr;
    column-gap: var(--space-lg);
  }
}

/* ========================================
   HOURS, RECONCILED — a plain ledger table, right-hugging band.
   ======================================== */

.hours-table {
  width: 100%;
  margin: var(--space-md) 0;
  border-collapse: collapse;
  font-size: var(--text-body);
}

.hours-table th,
.hours-table td {
  padding: var(--space-2xs) 0;
  border-block-end: var(--border-hairline) var(--border-style-dashed) var(--color-line);
  text-align: start;
}

.hours-table thead th {
  color: var(--color-ink-muted);
  font-size: var(--text-small);
  font-weight: var(--font-weight-body-strong);
  text-transform: uppercase;
  letter-spacing: var(--tracking-label);
}

.hours-table tbody th {
  color: var(--color-ink);
  font-weight: var(--font-weight-body-strong);
}

.hours-table td {
  color: var(--color-ink);
  text-align: end;
}

.quote {
  margin: var(--space-md) 0 0;
  padding-inline-start: var(--space-md);
  border-inline-start: var(--border-thick) var(--border-style) var(--color-line);
}

.quote p {
  margin: 0 0 var(--space-2xs);
  color: var(--color-ink);
  font-style: italic;
  font-size: var(--text-lead);
  line-height: var(--leading-body);
}

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

/* ========================================
   WHERE WE ANSWER — body + a quiet motif image.
   ======================================== */

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

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

.zip-list li {
  padding: var(--space-3xs) var(--space-xs);
  border: var(--border-hairline) var(--border-style-dashed) var(--color-border-strong);
  border-radius: var(--radius-none);
  color: var(--color-accent-text);
  font-weight: var(--font-weight-body-strong);
  font-size: var(--text-small);
}

.area-layout__motif img {
  width: 100%;
  height: auto;
}

@media (min-width: 64em) {
  .area-layout {
    grid-template-columns: 3fr 2fr;
    align-items: center;
  }
}

/* ========================================
   WHAT HAPPENS WHEN YOU CALL — unnumbered steps, centred.
   ======================================== */

.steps {
  display: grid;
  gap: var(--space-md);
  margin: var(--space-md) 0;
  padding: 0;
  list-style: none;
  text-align: start;
}

.steps li {
  padding-block-start: var(--space-sm);
  border-block-start: var(--border-hairline) var(--border-style-dashed) var(--color-line);
  color: var(--color-ink);
  font-size: var(--text-body);
  line-height: var(--leading-body);
}

.process__divider {
  display: block;
  margin: var(--space-lg) auto 0;
  max-width: var(--layout-cards);
}

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

/* ========================================
   THE CREW YOU ACTUALLY TALK TO — pinned, hand-lettered index cards
   (ref-010). ======================================== */

.crew-head {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-md);
  margin: 0 0 var(--space-lg);
  text-align: start;
}

.crew-head__spot img {
  display: block;
  width: 100%;
  height: auto;
}

.crew-head__spot {
  flex: 0 0 auto;
  /* @allow-literal: a small fixed spot-illustration frame, not a scale step */
  width: 64px;
}

.crew-cards {
  display: grid;
  gap: var(--space-lg);
  margin: 0;
  padding: 0;
  list-style: none;
  text-align: start;
}

/* The pinned-card tilt lives on .crew-card__inner, never on .crew-card
   itself: .crew-card is the [data-reveal] target, and a permanent rotation
   on a reveal target reads as "still offset" under prefers-reduced-motion
   (there is no way to tell a fixed decorative transform from an unfired
   reveal offset from the outside). Splitting the two keeps the reveal
   system's own transform the only one .crew-card ever carries. */
.crew-card {
  position: relative;
}

.crew-card__inner {
  position: relative;
  padding: var(--space-md);
  background-color: var(--color-bg);
  border: var(--border-hairline) var(--border-style) var(--color-line);
  border-radius: var(--radius-sm);
}

.crew-card:nth-child(odd) .crew-card__inner {
  /* @allow-literal: the pinned-card tilt is a fixed physical detail (a card
     pinned slightly askew), not a value on the fluid scale */
  transform: rotate(-1deg);
}

.crew-card:nth-child(even) .crew-card__inner {
  transform: rotate(1deg);
}

.crew-card__nail {
  position: absolute;
  inset-block-start: var(--space-2xs);
  inset-inline-start: var(--space-2xs);
  /* @allow-literal: the brief's recurring fixed 8px nail-head (§6), never scales */
  width: 8px;
  /* @allow-literal: the brief's recurring fixed 8px nail-head (§6), never scales */
  height: 8px;
  border-radius: var(--radius-sm);
  background-color: var(--color-accent-text);
}

.crew-card__name {
  margin: 0 0 var(--space-xs);
  color: var(--color-accent-text);
  font-family: var(--font-display);
  font-size: var(--text-lead);
}

.crew-card__quote p {
  margin: 0 0 var(--space-2xs);
  color: var(--color-ink);
  font-style: italic;
  font-size: var(--text-body);
  line-height: var(--leading-body);
}

.crew-card__quote cite {
  color: var(--color-ink-muted);
  font-style: normal;
  font-size: var(--text-small);
}

@media (min-width: 48em) {
  .crew-cards {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ========================================
   FAQ — plain ledger rows, unrounded (radius-none).
   ======================================== */

.faq {
  display: grid;
  gap: 0;
  margin: var(--space-md) 0 0;
  text-align: start;
  border-block-start: var(--border-hairline) var(--border-style-dashed) var(--color-line);
}

.faq__item {
  padding: var(--space-sm) 0;
  border-block-end: var(--border-hairline) var(--border-style-dashed) var(--color-line);
}

.faq__item summary {
  color: var(--color-ink);
  font-weight: var(--font-weight-body-strong);
  font-size: var(--text-body);
  cursor: pointer;
}

.faq__item p {
  margin: var(--space-2xs) 0 0;
  color: var(--color-ink-muted);
  font-size: var(--text-body);
  line-height: var(--leading-body);
}

/* ========================================
   FORM BAND — quote-request CTA, secondary path (never the hero).
   ======================================== */

.form-band {
  position: relative;
}

.form-band .container {
  position: relative;
  z-index: 1;
}

.form-band__motif {
  display: block;
  position: absolute;
  inset-block-end: 0;
  inset-inline-start: 0;
  width: 100%;
  /* @allow-literal: a quiet backdrop accent must sit low enough not to
     compete with the form fields (brief §5 slot 5) */
  height: 45%;
  overflow: hidden;
  opacity: 0.5;
  z-index: 0;
}

.form-band__motif img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.form {
  position: relative;
  display: grid;
  gap: var(--space-md);
  max-width: var(--layout-measure);
  margin-inline: auto;
  text-align: start;
}

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

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

.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);
  font-family: var(--font-body);
  border: var(--border-hairline) var(--border-style) var(--color-border-strong);
  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);
}

.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);
  background-color: var(--color-bg);
  color: var(--color-ink-muted);
  font-size: var(--text-small);
}

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

.site-footer__nap {
  margin: 0 0 var(--space-sm);
  font-style: normal;
  color: var(--color-ink);
}

.site-footer p {
  margin: 0 0 var(--space-2xs);
}
