/* ==========================================================================
   site.css — Milhorn Appliance (Kingsport, TN). editorial-modern family,
   editorial-stack archetype (brief.md, approved C3 2026-09-21).

   HARD RULE (house-tech-spec §3): no raw hex, no px/rem size literals, no
   font-name literals in this file. Tokens only, except the house breakpoints
   (48em/64em) and an explicit @allow-literal comment.

   Single ruled column throughout, at every width (brief §3: editorial-stack
   does NOT split into a two-column hero here — a deliberate distance from
   Mr. Appliance's photo-beside-text hero, dossier §4.6).
   ========================================================================== */

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

/* Site-level running index — the ref-011 device, house-wide (brief §3).
   Prata, --text-h3, Ledger Crimson. Decorative wayfinding only: the real
   section meaning lives in each section's own <h2>, so this is aria-hidden. */
.act-index {
  font-family: var(--font-display);
  font-size: var(--text-h3);
  font-weight: var(--font-weight-display);
  color: var(--color-accent);
  margin: 0;
}

.act-index--section {
  max-width: var(--layout-container);
  margin-inline: auto;
  padding-inline: var(--layout-gutter);
  padding-block-start: var(--section-gap);
}

/* --- Header & navigation ---------------------------------------------------
   Static flow, house default (not sticky — no brief instruction to make it
   so). Progressive enhancement: JS off shows the plain link list; JS on
   collapses it behind the toggle below 48em. */

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

@media (min-width: 64em) {
  .site-header {
    block-size: var(--bar-height-lg);
  }
}

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

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

.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 ----------------------------------------------------------------
   Near-zero radius throughout, editorial-modern register. Accent-coloured
   TEXT never sits on --color-surface (brief §2 binding constraint) — only
   on --color-bg or as accent-ink white on an opaque accent fill; buttons
   below never place accent text on a surface ground. */

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

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

.btn--quiet:hover {
  background-color: var(--color-ink);
  color: var(--color-bg);
}

/* --- Hero — the living-hero moment -----------------------------------------
   Single column at every width (brief §3). Atmosphere layer geometry is
   REPRODUCED VERBATIM from brief §2.2's re-derived, contrast-verified
   values — the centre relocated to the bottom of the hero (over the field),
   never the tile's original placement. */

.hero {
  position: relative;
  overflow: clip;
  padding-block-start: var(--space-md);
  padding-block-end: var(--section-gap);
  background:
    radial-gradient(115% 70% at 76% 74%, rgba(142, 42, 34, 0.16) 0%, transparent 52%),
    var(--color-bg);
}

.hero__eyebrow-row {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: var(--space-2xs) var(--space-sm);
  margin-block-end: var(--space-sm);
  padding-block-end: var(--space-xs);
  border-block-end: var(--border-hairline) var(--border-style) var(--color-border);
}

.hero__place {
  font-size: var(--text-eyebrow);
  font-weight: var(--font-weight-body-strong);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--color-ink-muted);
  margin: 0;
}

.hero__title {
  font-size: var(--text-hero);
  line-height: var(--leading-tight);
  margin: 0;
}

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

/* --- The field: the diagnostic device --------------------------------------
   Image is the hero's LCP element (fetchpriority=high, no reveal, no lazy
   load). The SVG overlay is pure line ornament: a one-shot line-draw to an
   annotation tag whose dot pulses on its own, independent loop (brief §5). */

.hero__field {
  position: relative;
  margin-block-start: var(--space-md);
  max-width: var(--layout-measure);
}

.hero__field-img {
  width: 100%;
  border: var(--border-hairline) var(--border-style) var(--color-border);
}

.hero__diagnosis {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.hero__diagnosis-path {
  stroke-dasharray: 100;
  stroke-dashoffset: 100;
  animation: milhorn-diagnosis var(--duration-diagnosis) var(--ease-out) forwards;
}

@keyframes milhorn-diagnosis {
  to {
    stroke-dashoffset: 0;
  }
}

.hero__diagnosis-tag {
  opacity: 0;
  animation: milhorn-tag-in var(--duration-fast) var(--ease-out) forwards;
  animation-delay: var(--duration-diagnosis);
}

@keyframes milhorn-tag-in {
  to {
    opacity: 1;
  }
}

.hero__diagnosis-dot {
  transform-box: fill-box;
  transform-origin: center;
  animation: milhorn-pulse var(--duration-pulse) var(--ease-in-out) infinite;
  animation-delay: var(--duration-diagnosis);
}

@keyframes milhorn-pulse {
  0%, 100% {
    opacity: 0.55;
    transform: scale(0.85);
  }
  50% {
    opacity: 1;
    transform: scale(1.15);
  }
}

.hero__lead {
  margin-block-start: var(--space-md);
  font-size: var(--text-body);
  line-height: var(--leading-body);
}

/* --- Appliances We Service — 5 bespoke icons, never a generic pack -------- */

.appliance-grid {
  display: grid;
  gap: var(--space-lg) var(--space-md);
  grid-template-columns: repeat(2, 1fr);
  margin: var(--space-lg) 0 0;
  padding: 0;
  list-style: none;
}

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

.appliance-grid__icon {
  width: var(--space-2xl);
  height: var(--space-2xl);
  margin-block-end: var(--space-2xs);
}

.appliance-grid__label {
  font-weight: var(--font-weight-body-strong);
  color: var(--color-ink);
  margin: 0;
}

.appliance-grid__note {
  font-size: var(--text-small);
  color: var(--color-ink-muted);
  margin-block-start: var(--space-3xs);
}

/* --- Process — own numeral costume, distinct from the Act index ----------
   Work Sans SemiBold, ink colour, tabular digits — differs from the Act
   index on BOTH face and colour role (design-rules §5's two-of-three test). */

.process__standfirst {
  color: var(--color-ink-muted);
}

.process-list {
  display: grid;
  gap: var(--space-lg);
  margin: var(--space-lg) 0 0;
  padding: 0;
  list-style: none;
}

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

.process-list li {
  display: flex;
  flex-direction: column;
  gap: var(--space-2xs);
}

.process-list .process-n {
  font-family: var(--font-body);
  font-variant-numeric: tabular-nums;
  font-weight: var(--font-weight-body-strong);
  font-size: var(--text-h3);
  color: var(--color-ink);
}

.process-list h3 {
  font-family: var(--font-body);
  font-size: var(--text-body);
  font-weight: var(--font-weight-body-strong);
  color: var(--color-ink);
  margin: 0;
}

.process-list p {
  color: var(--color-ink-muted);
  margin: 0;
}

.process-list a {
  color: var(--color-ink);
}

/* --- Trust — narrow low-contrast backdrop band (brief §4 slot 2) ---------- */

.trust {
  position: relative;
}

.trust__backdrop {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  overflow: clip;
  opacity: 0.14;
}

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

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

/* --- Reviews — pull-quote band, ref-006's register in Source Serif Italic - */

.reviews {
  position: relative;
}

/* Decorative atmosphere only — never at full opacity. Full-strength this
   image's ruled hairlines (including the single Ledger Crimson rule) crossed
   directly through the pull-quote text and broke legibility; low opacity is
   what makes a "backdrop" a backdrop rather than a second content layer
   (same principle as the Trust section's low-value-contrast instruction,
   brief §4, and the hero field texture's opacity treatment). */
.reviews__backdrop {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  overflow: clip;
  opacity: 0.14;
}

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

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

.pullquote-list {
  display: grid;
  gap: var(--space-lg);
  margin: var(--space-lg) 0 0;
  padding: 0;
  list-style: none;
}

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

.pullquote p {
  font-family: var(--font-emphasis);
  font-style: italic;
  font-size: var(--text-lead);
  line-height: var(--leading-snug);
  color: var(--color-ink);
  margin: 0;
}

.pullquote footer {
  margin-block-start: var(--space-2xs);
  font-size: var(--text-small);
  font-weight: var(--font-weight-body-strong);
  color: var(--color-ink-muted);
}

/* --- FAQ — native <details>/<summary>, chevron only, no numeral ----------- */

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

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

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

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

.faq-item__chevron {
  flex: none;
  width: var(--space-md);
  height: var(--space-md);
  color: var(--color-accent);
  transition: transform var(--duration-fast) var(--ease-out);
}

.faq-item[open] .faq-item__chevron {
  transform: rotate(180deg);
}

.faq-item__a {
  color: var(--color-ink-muted);
  margin: 0 0 var(--space-sm);
}

/* --- Shared media figure (closing companion image) ------------------------ */

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

.media-figure img {
  width: 100%;
  border: var(--border-hairline) var(--border-style) var(--color-border);
}

/* --- Contact --------------------------------------------------------------- */

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

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

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

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

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

/* --- Reduced motion: this site's own keyframe-driven diagnostic device ----
   base.css already collapses --duration-* and --reveal-shift for the shared
   reveal system, and tokens.css already zeroes --duration-diagnosis /
   --duration-pulse — but a near-zero infinite loop is still an animation
   under prefers-reduced-motion's intent (brief §5: "the pulse dot's opacity
   to its peak value with the animation removed"), so both get an explicit,
   same-specificity stop here (hky-services precedent). The line-draw is
   fully drawn (stroke-dashoffset: 0), the tag is shown, and the dot holds
   its peak opacity/scale with no animation — a complete, legible, static
   annotated illustration, never a half-drawn or dim one. */
@media (prefers-reduced-motion: reduce) {
  .hero__diagnosis-path {
    animation: none;
    stroke-dashoffset: 0;
  }

  .hero__diagnosis-tag {
    animation: none;
    opacity: 1;
  }

  .hero__diagnosis-dot {
    animation: none;
    opacity: 1;
    transform: scale(1.15);
  }
}
