/* ============================================================
   401 Mobile Truck Repair and Tire
   Composition: clashing warm neons on near-black · collage headline
   · book-spread layout · dictated quote · view transitions
   ============================================================ */

/* ---------- tokens ---------- */
:root {
  --bg: #0a0a0a;
  --bg-2: #121212;
  --bg-3: #171717;
  --ink: #ffffff;
  --ink-soft: #c9c4bd;
  --ink-dim: #8d8880;
  --accent-a: #ff2f92;   /* magenta */
  --accent-b: #ff8a00;   /* acid orange */
  --accent-c: #f4ff33;   /* electric yellow */
  --signal: #ffffff;
  --rule: rgba(255, 255, 255, 0.14);
  --rule-strong: rgba(255, 255, 255, 0.28);
  --card: rgba(255, 255, 255, 0.035);
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
  --gutter-w: 4px;
  --pad: clamp(1.25rem, 4vw, 3.5rem);
  --maxw: 1440px;
  --font-display: "Bricolage Grotesque", "Helvetica Neue", Arial, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
}

html[data-theme="light"] {
  --bg: #f7f3ec;
  --bg-2: #ffffff;
  --bg-3: #efe9df;
  --ink: #100f0d;
  --ink-soft: #3d3933;
  --ink-dim: #6b655c;
  --accent-a: #d4006e;
  --accent-b: #c25a00;
  --accent-c: #8a8f00;
  --signal: #100f0d;
  --rule: rgba(16, 15, 13, 0.16);
  --rule-strong: rgba(16, 15, 13, 0.34);
  --card: rgba(16, 15, 13, 0.035);
  --shadow: 0 20px 50px rgba(40, 30, 20, 0.14);
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-display);
  font-size: clamp(1rem, 0.55vw + 0.9rem, 1.075rem);
  line-height: 1.62;
  font-variation-settings: "wdth" 100, "wght" 400;
  -webkit-font-smoothing: antialiased;
  text-wrap: pretty;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }

h1, h2, h3 { line-height: 1.04; margin: 0 0 0.6em; letter-spacing: -0.02em; }
h2 { font-size: clamp(1.9rem, 3.4vw, 3rem); font-variation-settings: "wdth" 92, "wght" 700; }
h3 { font-size: clamp(1.05rem, 1.2vw, 1.22rem); font-variation-settings: "wdth" 96, "wght" 650; letter-spacing: -0.01em; }
p { margin: 0 0 1.05em; }
a { color: inherit; }

:focus-visible {
  outline: 3px solid var(--accent-c);
  outline-offset: 3px;
  border-radius: 2px;
}

.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- view transitions ---------- */
@view-transition { navigation: auto; }

::view-transition-old(root) {
  animation: 320ms cubic-bezier(.4, 0, .2, 1) both vt-out;
}
::view-transition-new(root) {
  animation: 420ms cubic-bezier(.2, .7, .1, 1) both vt-in;
}
@keyframes vt-out {
  to { opacity: 0; transform: translateX(-2.5%) scale(0.985); }
}
@keyframes vt-in {
  from { opacity: 0; transform: translateX(3%) scale(0.99); }
}

/* ---------- call rail ---------- */
.call-rail {
  position: fixed;
  z-index: 60;
  left: 50%;
  bottom: 0.85rem;
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  min-height: 48px;
  padding: 0.6rem 1.1rem;
  border-radius: 999px;
  background: var(--accent-a);
  color: #fff;
  text-decoration: none;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  letter-spacing: 0.02em;
  box-shadow: 0 10px 30px rgba(255, 47, 146, 0.35);
  transition: background 200ms ease, transform 200ms ease;
}
.call-rail:hover { background: var(--accent-b); transform: translateX(-50%) translateY(-2px); }
.call-rail__dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent-c);
  animation: pulse 2.4s ease-in-out infinite;
}
.call-rail__num { font-weight: 700; }
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.45; transform: scale(0.75); }
}

/* ---------- masthead ---------- */
.masthead {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--rule);
}
.masthead__inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0.7rem var(--pad);
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  margin-right: auto;
}
.brand__mark {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: -0.04em;
  padding: 0.35rem 0.5rem;
  background: var(--accent-c);
  color: #0a0a0a;
  border-radius: 3px;
}
.brand__text { display: flex; flex-direction: column; line-height: 1.1; }
.brand__text strong { font-size: 0.95rem; font-variation-settings: "wdth" 96, "wght" 700; }
.brand__text em {
  font-style: normal;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-dim);
}
.nav {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
}
.nav a {
  text-decoration: none;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-soft);
  padding: 0.6rem 0.7rem;
  border-radius: 4px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  transition: color 160ms ease, background 160ms ease;
}
.nav a:hover { color: var(--ink); background: var(--card); }
.nav a[aria-current="true"] { color: var(--accent-c); }
.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 44px;
  padding: 0.5rem 0.85rem;
  background: transparent;
  border: 1px solid var(--rule-strong);
  border-radius: 999px;
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  transition: border-color 160ms ease, background 160ms ease;
}
.theme-toggle:hover { border-color: var(--accent-b); background: var(--card); }
.theme-toggle__icon { font-size: 0.95rem; line-height: 1; }

/* ---------- book spread ---------- */
.spread {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(2.5rem, 6vw, 5.5rem) var(--pad);
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  border-bottom: 1px solid var(--rule);
  scroll-margin-top: 5rem;
}
.spread__page { min-width: 0; }
.spread__page--left { padding-bottom: 2rem; }
.spread__page--right { padding-top: 2rem; }
.spread__gutter { display: none; }

@media (min-width: 900px) {
  .spread {
    grid-template-columns: 1fr var(--gutter-w) 1fr;
    gap: 0;
  }
  .spread__page--left { padding: 0 clamp(1.5rem, 3vw, 3rem) 0 0; }
  .spread__page--right { padding: 0 0 0 clamp(1.5rem, 3vw, 3rem); }
  .spread__gutter {
    display: block;
    background: linear-gradient(
      to bottom,
      transparent,
      var(--rule-strong) 12%,
      var(--rule-strong) 88%,
      transparent
    );
    position: relative;
  }
  .spread__gutter::after {
    content: "";
    position: absolute;
    inset: 0 -14px;
    background: radial-gradient(ellipse at center, rgba(0,0,0,0.5), transparent 72%);
    pointer-events: none;
  }
  html[data-theme="light"] .spread__gutter::after {
    background: radial-gradient(ellipse at center, rgba(90,70,40,0.14), transparent 72%);
  }
}

/* ---------- cover ---------- */
.spread--cover { padding-top: clamp(2rem, 5vw, 4rem); }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-b);
  margin-bottom: 1.2rem;
}

.collage {
  font-size: clamp(2.9rem, 9vw, 6.4rem);
  line-height: 0.92;
  margin: 0 0 1.4rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0 0.28em;
}
.collage .w { display: inline-block; }
.collage .w--a { font-variation-settings: "wdth" 78, "wght" 800; color: var(--ink); }
.collage .w--b { font-variation-settings: "wdth" 100, "wght" 300; font-style: italic; color: var(--accent-a); }
.collage .w--c { font-variation-settings: "wdth" 88, "wght" 600; color: var(--ink); }
.collage .w--d { font-variation-settings: "wdth" 75, "wght" 800; color: var(--accent-b); }
.collage .w--e { font-variation-settings: "wdth" 100, "wght" 200; color: var(--ink-soft); }
.collage .w--f {
  font-variation-settings: "wdth" 82, "wght" 800;
  color: var(--accent-c);
  border-bottom: 6px solid var(--accent-c);
  padding-bottom: 0.04em;
}

/* ---------- dictated quote (signature) ---------- */
.dictated {
  font-size: clamp(1.05rem, 1.5vw, 1.35rem);
  line-height: 1.55;
  color: var(--ink-soft);
  max-width: 34ch;
  margin: 0 0 2rem;
  position: relative;
}
.dictated__word {
  display: inline-block;
  opacity: 0;
  animation: dictate 420ms cubic-bezier(.2, .7, .1, 1) both;
}
.dictated__word::after {
  content: "";
  display: inline-block;
  width: 2px;
  height: 1em;
  margin-left: 0.12em;
  vertical-align: -0.14em;
  background: var(--accent-c);
  opacity: 0;
}
.dictated__word:not(:last-child)::after { animation: caret 900ms steps(1) infinite; }
.dictated__word:nth-child(1)  { animation-delay: 0.15s; }
.dictated__word:nth-child(2)  { animation-delay: 0.42s; }
.dictated__word:nth-child(3)  { animation-delay: 0.62s; }
.dictated__word:nth-child(4)  { animation-delay: 0.95s; }
.dictated__word:nth-child(5)  { animation-delay: 1.28s; }
.dictated__word:nth-child(6)  { animation-delay: 1.72s; }
.dictated__word:nth-child(7)  { animation-delay: 2.05s; }
.dictated__word:nth-child(8)  { animation-delay: 2.5s; }
.dictated__word:nth-child(9)  { animation-delay: 2.72s; }
.dictated__word:nth-child(10) { animation-delay: 3.05s; }
.dictated__word:nth-child(11) { animation-delay: 3.4s; }
.dictated__word:nth-child(12) { animation-delay: 3.6s; }
.dictated__word:nth-child(13) { animation-delay: 3.85s; }
.dictated__word:nth-child(14) { animation-delay: 4.15s; }
.dictated__word:nth-child(15) { animation-delay: 4.45s; }
.dictated__word:nth-child(16) { animation-delay: 4.72s; }

@keyframes dictate {
  from { opacity: 0; transform: translateY(0.35em); filter: blur(3px); }
  to { opacity: 1; transform: none; filter: blur(0); }
}
@keyframes caret {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0; }
}

/* ---------- buttons ---------- */
.cover-actions { display: flex; flex-wrap: wrap; gap: 0.7rem; margin-bottom: 2.4rem; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.75rem 1.4rem;
  border-radius: 4px;
  text-decoration: none;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  transition: background 180ms ease, color 180ms ease, border-color 180ms ease, transform 180ms ease;
}
.btn--primary {
  background: var(--accent-a);
  color: #fff;
  font-weight: 700;
}
.btn--primary:hover { background: var(--signal); color: var(--bg); transform: translateY(-2px); }
.btn--ghost {
  border: 1px solid var(--rule-strong);
  color: var(--ink);
}
.btn--ghost:hover { border-color: var(--accent-b); color: var(--accent-b); }

/* ---------- cover stats ---------- */
.cover-stats {
  list-style: none;
  margin: 0;
  padding: 1.4rem 0 0;
  border-top: 1px solid var(--rule);
  display: grid;
  gap: 1rem;
}
@media (min-width: 560px) { .cover-stats { grid-template-columns: repeat(3, 1fr); } }
.cover-stats li { display: flex; flex-direction: column; gap: 0.2rem; }
.cover-stats strong {
  font-size: 1.5rem;
  font-variation-settings: "wdth" 88, "wght" 800;
  color: var(--accent-c);
}
.cover-stats span { font-size: 0.85rem; color: var(--ink-dim); line-height: 1.4; }

/* ---------- plates (photos) ---------- */
.plate {
  margin: 0 0 1.5rem;
  border: 1px solid var(--rule);
  background: var(--bg-2);
  overflow: hidden;
}
.plate img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  filter: saturate(1.05) contrast(1.05);
}
.plate--tall img { aspect-ratio: 4 / 3; }
.plate figcaption {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.03em;
  color: var(--ink-dim);
  padding: 0.7rem 0.85rem;
  border-top: 1px solid var(--rule);
  line-height: 1.5;
}

/* ---------- accent block (background reveal) ---------- */
.accent-block {
  position: relative;
  padding: 1.3rem 1.4rem;
  margin: 0 0 1.5rem;
  background: var(--accent-b);
  color: #0a0a0a;
  font-variation-settings: "wdth" 92, "wght" 600;
  font-size: 1.02rem;
  line-height: 1.5;
  overflow: hidden;
}
.accent-block p { margin: 0; }
.accent-block--tall { background: var(--accent-a); color: #fff; font-size: 1.15rem; padding: 1.8rem 1.6rem; }

@supports (animation-timeline: view()) {
  .accent-block {
    animation: revealFromLeft 800ms cubic-bezier(.2, .7, .1, 1) both;
    animation-timeline: view();
    animation-range: entry 10% cover 32%;
  }
}
@keyframes revealFromLeft {
  from { clip-path: inset(0 100% 0 0); }
  to { clip-path: inset(0 0 0 0); }
}

/* ---------- section markers ---------- */
.section-marker {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent-a);
  margin: 0 0 0.9rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid var(--rule);
}
.lede { font-size: 1.06rem; color: var(--ink-soft); max-width: 46ch; }

/* ---------- service list ---------- */
.service-list {
  list-style: none;
  margin: 2rem 0 0;
  padding: 0;
  display: grid;
  gap: 0;
  border-top: 1px solid var(--rule);
}
.service-list li {
  padding: 1.15rem 0;
  border-bottom: 1px solid var(--rule);
  transition: padding-left 200ms ease, border-color 200ms ease;
}
.service-list li:hover { padding-left: 0.6rem; border-color: var(--accent-b); }
.service-list h3 { margin-bottom: 0.35rem; }
.service-list h3::before {
  content: "▚ ";
  color: var(--accent-c);
  font-size: 0.8em;
}
.service-list p { margin: 0; font-size: 0.94rem; color: var(--ink-soft); }

/* ---------- note cards ---------- */
.note-card {
  border: 1px solid var(--rule);
  border-left: 3px solid var(--accent-c);
  background: var(--card);
  padding: 1.2rem 1.3rem;
  margin: 0 0 1.5rem;
}
.note-card h3 { margin-bottom: 0.5rem; }
.note-card p { margin: 0; font-size: 0.94rem; color: var(--ink-soft); }
.note-card--accent { border-left-color: var(--accent-a); }
.note-card ol { margin: 0; padding-left: 1.15rem; font-size: 0.94rem; color: var(--ink-soft); }
.note-card ol li { margin-bottom: 0.45rem; }
.note-card ol li:last-child { margin-bottom: 0; }

/* ---------- fleet grid ---------- */
.fleet-grid {
  display: grid;
  gap: 1rem;
  margin: 2rem 0;
}
@media (min-width: 620px) { .fleet-grid { grid-template-columns: 1fr 1fr; } }
.fleet-grid article {
  border-top: 2px solid var(--accent-b);
  padding-top: 0.9rem;
}
.fleet-grid h3 { margin-bottom: 0.35rem; }
.fleet-grid p { margin: 0; font-size: 0.92rem; color: var(--ink-soft); }

.pull-quote {
  margin: 2rem 0 0;
  padding: 1.3rem 0 0;
  border-top: 1px solid var(--rule);
}
.pull-quote p {
  font-size: clamp(1.1rem, 1.6vw, 1.4rem);
  font-variation-settings: "wdth" 88, "wght" 500;
  font-style: italic;
  color: var(--ink);
  margin-bottom: 0.6rem;
}
.pull-quote cite {
  font-family: var(--font-mono);
  font-style: normal;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-a);
}

/* ---------- coverage ---------- */
.coverage-list {
  list-style: none;
  margin: 2rem 0 1.5rem;
  padding: 0;
  border-top: 1px solid var(--rule);
}
.coverage-list li {
  display: grid;
  gap: 0.15rem;
  padding: 0.95rem 0;
  border-bottom: 1px solid var(--rule);
}
@media (min-width: 560px) {
  .coverage-list li { grid-template-columns: 12rem 1fr; gap: 1rem; align-items: baseline; }
}
.coverage-list strong {
  font-variation-settings: "wdth" 92, "wght" 700;
  color: var(--accent-c);
  font-size: 0.98rem;
}
.coverage-list span { font-size: 0.92rem; color: var(--ink-soft); }

.fineprint { font-size: 0.85rem; color: var(--ink-dim); line-height: 1.6; }

/* ---------- address card ---------- */
.address-card {
  border: 1px solid var(--rule);
  background: var(--bg-2);
  padding: 1.4rem 1.4rem 1.5rem;
}
.address-card address {
  font-style: normal;
  font-size: 1.12rem;
  font-variation-settings: "wdth" 92, "wght" 600;
  line-height: 1.5;
  margin-bottom: 0.8rem;
}
.wayfinding { font-size: 0.9rem; color: var(--ink-soft); }

/* ---------- hours table ---------- */
.hours-table {
  width: 100%;
  border-collapse: collapse;
  margin: 2rem 0 1.2rem;
  font-size: 0.96rem;
}
.hours-table th, .hours-table td {
  text-align: left;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--rule);
}
.hours-table th {
  font-variation-settings: "wdth" 96, "wght" 600;
  color: var(--ink);
  width: 40%;
}
.hours-table td {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  letter-spacing: 0.02em;
  color: var(--accent-c);
}

/* ---------- contact ---------- */
.spread--contact { border-bottom: none; }

.phone-block {
  display: block;
  text-decoration: none;
  border: 1px solid var(--rule-strong);
  border-radius: 4px;
  padding: 1.4rem 1.5rem;
  margin: 1.8rem 0;
  background: var(--bg-2);
  transition: border-color 200ms ease, background 200ms ease, transform 200ms ease;
}
.phone-block:hover {
  border-color: var(--accent-a);
  background: var(--bg-3);
  transform: translateY(-2px);
}
.phone-block__label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-b);
  margin-bottom: 0.4rem;
}
.phone-block__number {
  display: block;
  font-size: clamp(1.7rem, 4.4vw, 2.6rem);
  font-variation-settings: "wdth" 82, "wght" 800;
  letter-spacing: -0.02em;
  line-height: 1.05;
  color: var(--ink);
}
.phone-block__hint {
  display: block;
  margin-top: 0.5rem;
  font-size: 0.82rem;
  color: var(--ink-dim);
}

.contact-details {
  display: grid;
  gap: 1.5rem;
  margin-top: 1.5rem;
}
@media (min-width: 620px) { .contact-details { grid-template-columns: 1fr 1fr; } }
.contact-details address { font-style: normal; font-size: 0.95rem; color: var(--ink-soft); line-height: 1.6; }
.contact-details p { font-size: 0.92rem; color: var(--ink-soft); margin: 0; }

/* ---------- footer ---------- */
.site-footer {
  border-top: 1px solid var(--rule);
  background: var(--bg-2);
  padding: clamp(2rem, 4vw, 3rem) var(--pad) 5.5rem;
}
.site-footer__inner {
  max-width: var(--maxw);
  margin: 0 auto;
  display: grid;
  gap: 1.6rem;
}
@media (min-width: 760px) {
  .site-footer__inner { grid-template-columns: 1.4fr 1fr; align-items: start; }
}
.brand--footer { margin-bottom: 0.8rem; }
.footer-phone {
  display: inline-block;
  font-size: 1.35rem;
  font-variation-settings: "wdth" 88, "wght" 700;
  text-decoration: none;
  color: var(--accent-c);
  margin-bottom: 0.8rem;
}
.footer-phone:hover { color: var(--accent-b); }
.footer-nav { display: flex; flex-wrap: wrap; gap: 0.2rem 1rem; }
.footer-nav a {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-dim);
  text-decoration: none;
  padding: 0.5rem 0;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}
.footer-nav a:hover { color: var(--ink); }

.claim-row {
  max-width: var(--maxw);
  margin: 2rem auto 0.9rem;
}
.claim-banner {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.03em;
  text-decoration: none;
  color: var(--ink-dim);
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: 3px;
  padding: 0.5rem 0.75rem;
  transition: color 160ms ease, border-color 160ms ease;
}
.claim-banner:hover { color: var(--ink); border-color: var(--rule-strong); }

.attribution {
  max-width: var(--maxw);
  margin: 0 auto;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  opacity: 0.55;
}
.attribution a { color: inherit; text-decoration: none; }
.attribution a:hover { text-decoration: underline; }

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-delay: 0ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .dictated__word { opacity: 1; filter: none; transform: none; }
  .dictated__word::after { display: none; }
  .accent-block { clip-path: none; }
  ::view-transition-old(root), ::view-transition-new(root) { animation: none; }
}
