/* Antelope Valley Garage Door — "spec plate". See DESIGN.md; that file is the spec and
   this one implements it. No gradients, no shadows, no rounded cards: the shell is a data
   plate and a data plate has square corners.

   Class and token vocabulary is deliberately disjoint from both sibling sites —
   check_footprint.py fails the build on any overlap. */

:root {
  --bleach: #F7F7F5;
  --bleach-deep: #ECECE8;
  --alum: #C9CCCE;
  --alum-dk: #5E6469;
  --graphite: #191C1F;
  --graphite-soft: #3A4046;
  --anodize: #0E6B63;
  --anodize-dk: #0A544E;
  --rust: #8A3F1C;

  --span: 68rem;
  --step-1: 0.35rem;
  --step-2: 0.75rem;
  --step-3: 1.4rem;
  --step-4: 2.4rem;
  --step-5: 4rem;

  --face-display: "Saira Condensed", "Arial Narrow", "Helvetica Neue Condensed", sans-serif;
  --face-body: "Source Sans 3", "Segoe UI", system-ui, sans-serif;
  --face-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
}

@font-face { font-family: "Saira Condensed"; src: url("/assets/type/saira-condensed-700.woff2") format("woff2");
  font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Saira Condensed"; src: url("/assets/type/saira-condensed-600.woff2") format("woff2");
  font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Source Sans 3"; src: url("/assets/type/source-sans-3-400.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Source Sans 3"; src: url("/assets/type/source-sans-3-600.woff2") format("woff2");
  font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url("/assets/type/jetbrains-mono-400.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap; }

*, *::before, *::after { box-sizing: border-box; }

/* One focus treatment for the whole site: a 3px ring in the brand colour with a light
   halo, so it stays visible on bleach, on bleach-deep and on graphite alike. */
:where(a, button, input, textarea, summary, [tabindex]):focus-visible {
  outline: 3px solid var(--anodize);
  outline-offset: 2px;
  border-radius: 1px;
}
.sheet--graphite :focus-visible, .sheet--lead :focus-visible, .colophon :focus-visible,
.railing :focus-visible, .dock:focus-visible {
  outline-color: var(--bleach);
}

body {
  margin: 0;
  background: var(--bleach);
  color: var(--graphite);
  font: 400 1.0625rem/1.65 var(--face-body);
  -webkit-text-size-adjust: 100%;
  padding-bottom: 4.5rem;          /* room for the fixed dock */
}

h1, h2, h3 { font-family: var(--face-display); font-weight: 700; line-height: 1.08;
  letter-spacing: 0.005em; margin: 0; text-wrap: balance; }
h1 { font-size: clamp(2rem, 5.4vw, 3.4rem); text-transform: uppercase; }
h2 { font-size: clamp(1.45rem, 3vw, 2.05rem); text-transform: uppercase; }
h3 { font-size: 1.2rem; font-weight: 600; }
p { margin: 0 0 var(--step-3); max-width: 62ch; }
a { color: var(--anodize); text-underline-offset: 0.16em; }
a:hover { color: var(--anodize-dk); }
strong { font-weight: 600; }
code { font-family: var(--face-mono); font-size: 0.92em; }

.jump { position: absolute; left: -9999px; }
.jump:focus { left: var(--step-3); top: var(--step-2); z-index: 20; background: var(--graphite);
  color: var(--bleach); padding: var(--step-2) var(--step-3); }

.gauge { width: min(100% - 2.5rem, var(--span)); margin-inline: auto; }

/* ---- annotation: mono labels beside a figure, the Teenage Engineering borrowing ---- */
.dim { font-family: var(--face-mono); font-size: 0.72rem; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--alum-dk); display: block; }
.dim-tick { display: inline-block; width: 0.9rem; border-top: 2px solid var(--alum);
  margin-right: 0.45rem; vertical-align: 0.28em; }

/* ---- the datum line: the one structural device on the site ---- */
.datum { border-top: 1px solid var(--alum); padding-top: var(--step-2);
  margin-bottom: var(--step-3); position: relative; }
.datum::before { content: ""; position: absolute; top: -1px; left: 0; width: 3.5rem;
  height: 3px; background: var(--anodize); }
@media (prefers-reduced-motion: no-preference) {
  .datum::before { animation: draw 0.28s ease-out both; }
  @keyframes draw { from { width: 0; } to { width: 3.5rem; } }
}

/* ---- sheets ---- */
.sheet { padding: var(--step-5) 0; }
.sheet--deep { background: var(--bleach-deep); }
.sheet--graphite { background: var(--graphite); color: var(--bleach); }
.sheet--graphite h2, .sheet--graphite h3 { color: var(--bleach); }
.sheet--graphite a { color: var(--bleach); }
.sheet--graphite .datum { border-top-color: var(--graphite-soft); }
.sheet--hero { padding-top: var(--step-4); }
.lede { font-size: 1.22rem; line-height: 1.5; max-width: 56ch; }

/* ---- lead: image ground, plate, rule, actions, meta strip ---- */
.sheet--lead { position: relative; isolation: isolate; background: var(--graphite);
  color: var(--bleach); padding: var(--step-5) 0; overflow: hidden;
  display: flex; align-items: center; }
/* On a wide screen the lead was only as tall as its text, and cover-cropping a 16:9 frame
   into a short wide box lands in the middle of the door — the darkest part of the picture,
   which read as a flat black band. Give it room and bias the crop upward. */
@media (min-width: 58rem) { .sheet--lead { min-height: 58vh; } }
/* The ground is a real <img> so it keeps its alt text and its srcset, and so the preload
   scanner can find the LCP element. The scrim is a pseudo-element over it. */
.lead-ground { position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: center 35%; z-index: -2; }
/* Scrim is directional, not flat: heaviest under the text column, thinnest on the far
   side so the image is actually legible. A flat .82 read as solid black once the section
   got tall on a phone. */
.sheet--lead::before { content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(90deg, rgba(25,28,31,.94) 0%, rgba(25,28,31,.9) 45%,
    rgba(25,28,31,.6) 62%, rgba(25,28,31,.3) 100%); }
@media (max-width: 47rem) {
  .sheet--lead::before { background: linear-gradient(rgba(25,28,31,.68) 0%,
    rgba(25,28,31,.9) 38%, rgba(25,28,31,.95) 100%); }
  .sheet--lead { padding-top: 9rem; }
}
.sheet--lead h1 { color: var(--bleach); }
.sheet--lead .lede { color: var(--bleach); }
.sheet--lead .crumbtrail ol { color: var(--alum); }
.sheet--lead .crumbtrail a { color: var(--alum); }
.lead-plate { max-width: var(--span); }
.lead-tick { width: 4.5rem; height: 4px; background: var(--anodize);
  margin: var(--step-3) 0; }
.meta-strip { font-family: var(--face-mono); font-size: 0.72rem; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--alum); margin: var(--step-4) 0 0; max-width: none; }
.sheet--lead .dial--quiet { border-color: var(--alum); color: var(--bleach); }
.sheet--lead .dial--quiet:hover { border-color: var(--bleach); }

/* ---- cards: image, heading, one sentence, a way in ---- */
.slab-set { display: grid; gap: var(--step-3);
  grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr)); margin-top: var(--step-3); }
.slab { background: var(--graphite-soft); border: 1px solid var(--graphite-soft);
  display: flex; flex-direction: column; }
.slab-shot { width: 100%; height: auto; display: block; aspect-ratio: 3 / 2;
  object-fit: cover; }
.slab h3 { padding: var(--step-3) var(--step-3) var(--step-1); color: var(--bleach); }
.slab p { padding: 0 var(--step-3); color: var(--alum); flex: 1; font-size: 0.97rem; }
.slab-go { display: block; padding: var(--step-2) var(--step-3) var(--step-3);
  font-family: var(--face-mono); font-size: 0.74rem; text-transform: uppercase;
  letter-spacing: 0.06em; color: var(--bleach); text-decoration: none; }
.slab-go:hover { color: var(--bleach); text-decoration: underline; }

/* ---- the call order ---- */
.callorder { counter-reset: step; list-style: none; padding: 0; margin: var(--step-3) 0 0;
  display: grid; gap: var(--step-3); grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); }
.callorder li { counter-increment: step; border-top: 1px solid var(--alum);
  padding-top: var(--step-2); max-width: 34ch; }
.callorder li::before { content: counter(step, decimal-leading-zero);
  font-family: var(--face-mono); font-size: 0.72rem; color: var(--anodize);
  display: block; margin-bottom: var(--step-1); letter-spacing: 0.08em; }
.callorder strong { display: block; font-family: var(--face-display); font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.02em; font-size: 1.05rem; }

/* ---- towns, set inline the way a service area reads out loud ---- */
.town-run { font-size: 1.15rem; line-height: 2; max-width: none; }
.town-run a { color: var(--bleach); }
.sheet--graphite .zip-run { color: var(--alum); }

/* ---- railing: the mono annotation strip, lifted off the masthead ---- */
/* The masthead was carrying a two-line logo block, a nav and a two-line call block all
   competing on one row. The standing facts — hours and coverage — belong in the site's
   own annotation vernacular, not beside the wordmark. */
.railing { background: var(--graphite); color: var(--alum); }
.railing-in { display: flex; justify-content: space-between; gap: var(--step-3);
  padding: 0.45rem 0; font-family: var(--face-mono); font-size: 0.68rem;
  letter-spacing: 0.07em; text-transform: uppercase; }
.railing-geo { color: var(--alum); opacity: 0.75; }

/* ---- masthead ---- */
.masthead { border-bottom: 1px solid var(--alum); background: var(--bleach);
  position: sticky; top: 0; z-index: 10; }
.masthead-in { display: flex; align-items: center; gap: var(--step-4);
  padding: var(--step-2) 0; flex-wrap: wrap; }
.plate { display: flex; align-items: center; gap: var(--step-2); text-decoration: none;
  color: inherit; margin-right: auto; }
.plate-mark { flex: none; }
.plate-name { font-family: var(--face-display); font-weight: 700; font-size: 1.2rem;
  text-transform: uppercase; letter-spacing: 0.02em; line-height: 1; }
.nav-list { display: flex; gap: var(--step-4); list-style: none; margin: 0; padding: 0;
  font-family: var(--face-display); font-size: 1.02rem; text-transform: uppercase;
  letter-spacing: 0.05em; }
.nav-list a { color: var(--graphite); text-decoration: none; display: block;
  padding-bottom: 3px; border-bottom: 3px solid transparent; }
/* Hover is the datum line again — the one structural device — not a colour swap. */
.nav-list a:hover, .nav-list a:focus-visible { color: var(--graphite);
  border-bottom-color: var(--anodize); }
.nav-label { display: none; }
.panel-switch { position: absolute; width: 1px; height: 1px; margin: -1px;
  padding: 0; border: 0; clip-path: inset(50%); overflow: hidden; white-space: nowrap; }
.panel-switch:focus-visible ~ .nav-label { outline: 3px solid var(--anodize);
  outline-offset: 2px; }

/* ---- call actions ---- */
.dial { display: inline-block; font-family: var(--face-display); text-transform: uppercase;
  letter-spacing: 0.03em; text-decoration: none; padding: 0.85rem 1.4rem; border-radius: 2px;
  min-height: 44px; }
.dial--go { background: var(--anodize); color: var(--bleach); font-weight: 700; }
.dial--go:hover { background: var(--anodize-dk); color: var(--bleach); }
.dial--quiet { border: 1px solid var(--alum-dk); color: var(--graphite); }
.dial--quiet:hover { border-color: var(--graphite); color: var(--graphite); }
/* The call was naked text on the masthead: the primary action reading as a label. */
.dial--top { background: var(--anodize); color: var(--bleach); font-weight: 700;
  font-size: 1.05rem; padding: 0.62rem 1.1rem; white-space: nowrap; }
.dial--top:hover { background: var(--anodize-dk); color: var(--bleach); }
.dial-set { display: flex; gap: var(--step-2); flex-wrap: wrap; margin-top: var(--step-3); }
.sheet--graphite .dial--quiet { border-color: var(--alum); color: var(--bleach); }

.dock { position: fixed; left: 0; right: 0; bottom: 0; z-index: 15; display: block;
  background: var(--anodize); color: var(--bleach); text-align: center;
  font-family: var(--face-display); text-transform: uppercase; letter-spacing: 0.04em;
  padding: 1rem; text-decoration: none; font-size: 1.05rem; }
.dock:hover { background: var(--anodize-dk); color: var(--bleach); }

/* ---- the symptom table: the signature element ---- */
.spec-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.spec-wrap:focus-visible { outline: 3px solid var(--anodize); outline-offset: 2px; }
.spec-table { width: 100%; border-collapse: collapse; font-size: 0.98rem; }
.spec-note { margin-top: var(--step-2); font-family: var(--face-mono);
  font-size: 0.72rem; line-height: 1.55; text-transform: uppercase;
  letter-spacing: 0.04em; color: var(--alum-dk); max-width: 60ch; }
.spec-table th, .spec-table td { text-align: left; padding: 0.7rem 0.6rem;
  border-bottom: 1px solid var(--alum); vertical-align: top; }
.spec-table thead th { font-family: var(--face-mono); font-size: 0.7rem;
  text-transform: uppercase; letter-spacing: 0.06em; color: var(--alum-dk);
  border-bottom: 2px solid var(--graphite); font-weight: 400; }
.spec-symptom { font-weight: 600; }
.spec-cause { color: var(--rust); }
.spec-range { font-family: var(--face-mono); white-space: nowrap; }

/* ---- lists of things ---- */
.unit-set { list-style: none; margin: 0; padding: 0; display: grid; gap: 1px;
  background: var(--alum); border-block: 1px solid var(--alum);
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); }
.unit-set li { background: var(--bleach); }
.sheet--deep .unit-set li { background: var(--bleach-deep); }
.unit-set a { display: block; padding: var(--step-3); text-decoration: none;
  font-family: var(--face-display); text-transform: uppercase; font-size: 1.1rem;
  color: var(--graphite); }
.unit-set a:hover { background: var(--graphite); color: var(--bleach); }

.crumbtrail ol { list-style: none; display: flex; flex-wrap: wrap; gap: 0.5rem; padding: 0;
  margin: 0 0 var(--step-3); font-family: var(--face-mono); font-size: 0.72rem;
  text-transform: uppercase; letter-spacing: 0.05em; color: var(--alum-dk); }
.crumbtrail li + li::before { content: "/ "; color: var(--alum); }

.ask { border-top: 1px solid var(--alum); padding-top: var(--step-2);
  margin-bottom: var(--step-3); }
.ask h3 { margin-bottom: var(--step-1); }

.zip-run { font-family: var(--face-mono); font-size: 0.75rem; color: var(--alum-dk);
  letter-spacing: 0.04em; max-width: none; }

/* ---- form ---- */
.req { color: var(--rust); font-weight: 600; }
.form label { font-family: var(--face-mono); font-size: 0.72rem; text-transform: uppercase;
  letter-spacing: 0.05em; color: var(--alum-dk); display: block; margin-bottom: var(--step-1); }
.form input, .form textarea { width: 100%; max-width: 34rem; font: inherit;
  padding: 0.7rem; border: 1px solid var(--alum-dk); border-radius: 2px;
  background: var(--bleach); color: var(--graphite); min-height: 44px; }
.form input:focus, .form textarea:focus { outline: 3px solid var(--anodize);
  outline-offset: 1px; }
.form button { border: 0; cursor: pointer; font-size: 1rem; }
.hp { position: absolute; left: -9999px; }

/* ---- colophon ---- */
.colophon { background: var(--graphite); color: var(--bleach); padding: var(--step-5) 0 var(--step-4); }
.colophon h2 { font-size: 1rem; letter-spacing: 0.06em; color: var(--bleach);
  margin-bottom: var(--step-2); }
.colophon a { color: var(--alum); }
.colophon a:hover { color: var(--bleach); }
.colophon ul { list-style: none; margin: 0; padding: 0; }
.colophon li { margin-bottom: var(--step-1); }
.colophon-cols { display: grid; gap: var(--step-4);
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); }
.colophon-end { border-top: 1px solid var(--graphite-soft); padding-top: var(--step-3);
  margin: var(--step-4) 0 0; font-family: var(--face-mono); font-size: 0.72rem;
  color: var(--alum); max-width: none; }
.hours { color: var(--alum); }
/* --alum-dk is tuned for the light ground; on graphite it measures 2.9:1. */
.colophon .zip-run { color: var(--alum); }

/* ---- narrow ---- */
/* Nav switches to the panel well before the phone breakpoint: the desktop row needs
   roughly 900px and wrapped into two rows below that. */
@media (max-width: 58rem) {
  .nav-label { display: block; order: 3; cursor: pointer; padding: 0.5rem; }
  /* Full-width panel under the row, not a flex item beside the burger. */
  .nav-wrap { order: 4; flex-basis: 100%; width: 100%; display: none;
    margin: var(--step-2) 0 0; border-top: 1px solid var(--alum); }
  .panel-switch:checked ~ .nav-wrap { display: block; }
  .nav-list { flex-direction: column; gap: 0; width: 100%; }
  .nav-list li + li { border-top: 1px solid var(--alum); }
  .nav-list a { display: block; width: 100%; padding: 0.95rem 0; min-height: 48px;
    border-bottom: 0; }
  .nav-list a:hover, .nav-list a:focus-visible { color: var(--anodize); }
  .nav-label { margin-left: auto; }
}

@media (max-width: 47rem) {
  .railing-geo { display: none; }
  /* "Antelope Valley Garage Door" broke to three lines at 375px and pushed the masthead
     to 130px tall. The mark carries the identity here; the full name is in the footer and
     in the title. */
  .plate-name { position: absolute; width: 1px; height: 1px; margin: -1px;
    clip-path: inset(50%); overflow: hidden; white-space: nowrap; }
  .dial--top { font-size: 1rem; padding: 0.62rem 1rem; }
  .masthead-in { gap: var(--step-2); }
  .railing-in { justify-content: center; font-size: 0.64rem; }
  .sheet { padding: var(--step-4) 0; }
  .spec-table { font-size: 0.92rem; }
  .spec-table th, .spec-table td { padding: 0.6rem 0.35rem; }
}

/* Footer and menu links are the only targets that fall under 44px, and only because
   they sit in a dense list. Give them the height wherever a finger is doing the aiming. */
@media (max-width: 58rem), (pointer: coarse) {
  .colophon li a, .nav-list a { display: inline-block; padding: 0.62rem 0; min-height: 44px; }
  /* Breadcrumbs run on all 18 inner pages and the town run is the service-area index;
     both were about 20px tall. DESIGN.md promises 44. */
  .crumbtrail a, .town-run a { display: inline-block; padding: 0.7rem 0; min-height: 44px; }
  .crumbtrail ol { gap: 0.25rem 0.6rem; }
  .town-run { line-height: 1.6; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
