/* ============================================================
   Mobile Truck Repair Concord
   Composition: bleached cream + oxblood + navy
   Typography: deliberately wrong weight (thin H1 / heavy body)
   Layout: full-bleed image gallery
   Motion: anchor-positioned scroll-linked labels
   Background: layered radial + linear gradient depth
   ============================================================ */

:root {
  --bg: #f4ecdc;
  --bg-deep: #ece0c9;
  --ink: #1a1b2e;
  --ink-soft: #4a4a5e;
  --accent: #6b1f1a;
  --accent-bright: #8c2a22;
  --secondary: #1e2a4a;
  --line: rgba(26, 27, 46, 0.16);
  --line-strong: rgba(26, 27, 46, 0.32);
  --card: rgba(255, 252, 244, 0.62);
  --glow-a: rgba(107, 31, 26, 0.10);
  --glow-b: rgba(30, 42, 74, 0.12);
  --shadow: 0 1px 0 rgba(26, 27, 46, 0.06), 0 18px 40px -28px rgba(26, 27, 46, 0.45);
  --pad: clamp(1.25rem, 5vw, 5rem);
  --measure: 62ch;
  --font-display: "Fraunces", "Iowan Old Style", Georgia, serif;
  --font-body: "Bricolage Grotesque", "Helvetica Neue", Arial, sans-serif;
}

html[data-theme="dark"] {
  --bg: #14151f;
  --bg-deep: #0e0f17;
  --ink: #f2e9d8;
  --ink-soft: #b6b0a4;
  --accent: #d9705f;
  --accent-bright: #e88a78;
  --secondary: #8ea3d4;
  --line: rgba(242, 233, 216, 0.18);
  --line-strong: rgba(242, 233, 216, 0.34);
  --card: rgba(255, 255, 255, 0.045);
  --glow-a: rgba(217, 112, 95, 0.14);
  --glow-b: rgba(142, 163, 212, 0.14);
  --shadow: 0 1px 0 rgba(0, 0, 0, 0.4), 0 18px 40px -28px rgba(0, 0, 0, 0.8);
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100vh;
  color: var(--ink);
  font-family: var(--font-body);
  /* deliberately wrong weight: body is heavy, headings are thin */
  font-weight: 700;
  font-size: clamp(1rem, 0.95rem + 0.25vw, 1.075rem);
  line-height: 1.62;
  letter-spacing: -0.005em;
  background-color: var(--bg);
  background-image:
    radial-gradient(ellipse 90% 60% at 8% -5%, var(--glow-a) 0%, transparent 62%),
    radial-gradient(ellipse 80% 55% at 100% 12%, var(--glow-b) 0%, transparent 58%),
    radial-gradient(ellipse 120% 70% at 50% 108%, var(--glow-b) 0%, transparent 60%),
    linear-gradient(178deg, var(--bg) 0%, var(--bg-deep) 100%);
  background-attachment: fixed;
  overflow-x: hidden;
}

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

a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { color: var(--accent-bright); }

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

.muted { color: var(--ink-soft); font-weight: 500; }

/* ---------- Typography: thin display, heavy body ---------- */

h1, h2, h3 {
  font-family: var(--font-display);
  font-optical-sizing: auto;
  line-height: 1.02;
  letter-spacing: -0.03em;
  margin: 0 0 0.6em;
  text-wrap: balance;
}

h1 {
  font-weight: 200;
  font-size: clamp(2.9rem, 1.6rem + 7.2vw, 7.5rem);
  font-variation-settings: "SOFT" 0, "WONK" 1;
  letter-spacing: -0.045em;
}

h2 {
  font-weight: 250;
  font-size: clamp(1.9rem, 1.1rem + 3.4vw, 3.6rem);
}

h3 {
  font-weight: 400;
  font-size: clamp(1.15rem, 1rem + 0.7vw, 1.5rem);
  letter-spacing: -0.02em;
}

p { margin: 0 0 1.1em; max-width: var(--measure); }

.kicker {
  font-family: var(--font-body);
  font-weight: 800;
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 1.1rem;
}

/* ---------- Top bar ---------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 0.7rem var(--pad);
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: blur(14px) saturate(1.3);
  border-bottom: 1px solid var(--line);
}

.wordmark {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  color: var(--ink);
  min-height: 44px;
}

.wordmark__mark {
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  background: var(--secondary);
  color: var(--bg);
  font-family: var(--font-body);
  font-weight: 800;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  border-radius: 3px;
}

.wordmark__text {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.82rem;
  line-height: 1.2;
  letter-spacing: -0.01em;
}
.wordmark__text em {
  font-style: normal;
  color: var(--accent);
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.7rem;
}

.topbar__right {
  display: flex;
  align-items: center;
  gap: clamp(0.6rem, 2vw, 1.4rem);
  flex-wrap: wrap;
}

.topbar__status {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--ink-soft);
}

.dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: #2f7d4f;
  box-shadow: 0 0 0 0 rgba(47, 125, 79, 0.55);
  animation: pulse 2.6s ease-in-out infinite;
}
html[data-theme="dark"] .dot { background: #57c98a; }

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(47, 125, 79, 0.5); }
  50% { box-shadow: 0 0 0 7px rgba(47, 125, 79, 0); }
}

.topbar__phone {
  font-family: var(--font-body);
  font-weight: 800;
  font-size: 0.95rem;
  letter-spacing: -0.01em;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 2px solid var(--accent);
  padding-bottom: 1px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}
.topbar__phone:hover { color: var(--accent); }

.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 44px;
  padding: 0.4rem 0.8rem;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink);
  background: transparent;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  cursor: pointer;
  transition: background-color 0.25s ease, border-color 0.25s ease, color 0.25s ease;
}
.theme-toggle:hover { background: var(--card); border-color: var(--accent); color: var(--accent); }

.theme-toggle__icon {
  width: 0.85rem;
  height: 0.85rem;
  border-radius: 50%;
  background: var(--ink);
  box-shadow: inset -4px -3px 0 0 var(--bg);
  transition: box-shadow 0.3s ease, background-color 0.3s ease;
}
html[data-theme="dark"] .theme-toggle__icon {
  background: var(--ink);
  box-shadow: inset 0 0 0 0 var(--bg), 0 0 0 2px var(--ink);
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  align-items: end;
  min-height: min(88vh, 780px);
  isolation: isolate;
}

.hero__media { grid-area: 1 / 1; position: relative; height: 100%; }

.hero__media img {
  width: 100%;
  height: 100%;
  min-height: min(88vh, 780px);
  object-fit: cover;
  object-position: center 42%;
  filter: saturate(0.82) contrast(1.04);
}

.hero__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to top, color-mix(in srgb, var(--bg) 96%, transparent) 0%, color-mix(in srgb, var(--bg) 62%, transparent) 34%, transparent 72%),
    linear-gradient(to right, color-mix(in srgb, var(--bg) 72%, transparent) 0%, transparent 58%);
}

.hero__plate {
  grid-area: 1 / 1;
  position: relative;
  z-index: 2;
  padding: clamp(2rem, 6vw, 5rem) var(--pad) clamp(2.5rem, 6vw, 4.5rem);
  max-width: 78rem;
}

.hero__lede {
  font-size: clamp(1.05rem, 0.95rem + 0.7vw, 1.4rem);
  font-weight: 600;
  line-height: 1.5;
  max-width: 46ch;
  color: var(--ink);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin: 1.8rem 0 2.4rem;
}

.btn {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.1rem;
  min-height: 56px;
  padding: 0.7rem 1.5rem;
  border-radius: 3px;
  text-decoration: none;
  font-family: var(--font-body);
  font-weight: 800;
  letter-spacing: -0.01em;
  transition: transform 0.25s ease, background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

.btn--primary {
  background: var(--accent);
  color: #fdf6ea;
  border: 1px solid var(--accent);
  box-shadow: var(--shadow);
}
.btn--primary:hover { background: var(--accent-bright); color: #fff; transform: translateY(-2px); }
.btn__label { font-size: 1.05rem; }
.btn__sub { font-size: 0.68rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; opacity: 0.82; }

.btn--ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line-strong);
  font-size: 0.92rem;
}
.btn--ghost:hover { background: var(--card); border-color: var(--accent); color: var(--accent); transform: translateY(-2px); }

.hero__facts {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(1.2rem, 4vw, 3rem);
  margin: 0;
  padding-top: 1.4rem;
  border-top: 1px solid var(--line);
  max-width: 46rem;
}
.hero__facts div { margin: 0; }
.hero__facts dt {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 0.2rem;
}
.hero__facts dd {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 300;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
}

/* ---------- Marquee strip ---------- */

.strip {
  overflow: hidden;
  border-block: 1px solid var(--line);
  background: color-mix(in srgb, var(--secondary) 8%, transparent);
  padding: 0.7rem 0;
  mask-image: linear-gradient(to right, transparent, #000 6%, #000 94%, transparent);
}

.strip__track {
  display: flex;
  gap: 2.5rem;
  width: max-content;
  animation: slide 42s linear infinite;
}
.strip__track span {
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--secondary);
  white-space: nowrap;
}
.strip__track span::before { content: "— "; color: var(--accent); }

@keyframes slide {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ---------- Intro ---------- */

.intro {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(1.8rem, 5vw, 4rem);
  padding: clamp(3.5rem, 9vw, 7rem) var(--pad);
  align-items: start;
}

.intro__text h2 { max-width: 22ch; }
.intro__text p { color: var(--ink); }
.intro__text p:first-of-type::first-letter {
  float: left;
  font-family: var(--font-display);
  font-weight: 200;
  font-size: 4.2rem;
  line-height: 0.78;
  padding: 0.12em 0.12em 0 0;
  color: var(--accent);
}

.intro__figure { margin: 0; }
.intro__figure img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  filter: saturate(0.85);
  border-radius: 2px;
}
.intro__figure figcaption {
  margin-top: 0.7rem;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

/* ---------- Section head ---------- */

.section-head {
  padding: 0 var(--pad);
  margin-bottom: clamp(1.8rem, 4vw, 3rem);
}
.section-head h2 { max-width: 20ch; }
.section-head__note {
  font-weight: 600;
  color: var(--ink-soft);
  max-width: 52ch;
  font-size: 1rem;
}

/* ---------- Services ---------- */

.services { padding: clamp(3rem, 8vw, 6rem) 0 clamp(3.5rem, 9vw, 7rem); }

.services__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr));
  gap: 1px;
  background: var(--line);
  border-block: 1px solid var(--line);
}

.card {
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  padding: clamp(1.5rem, 3vw, 2.4rem);
  transition: background-color 0.3s ease;
}
.card:hover { background: var(--card); }

.card__num {
  font-family: var(--font-body);
  font-weight: 800;
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  color: var(--accent);
  margin: 0 0 0.9rem;
}
.card h3 { margin-bottom: 0.5rem; }
.card p:last-child {
  margin: 0;
  font-weight: 500;
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--ink-soft);
  max-width: 42ch;
}

/* ---------- Full-bleed gallery ---------- */

.gallery {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 0;
  margin: 0;
}

.gallery figure { margin: 0; position: relative; overflow: hidden; }

.gallery__full { grid-column: 1 / -1; }
.gallery__pair { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr; }

.gallery img {
  width: 100%;
  height: auto;
  display: block;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  filter: saturate(0.84) contrast(1.03);
  transition: transform 0.9s cubic-bezier(0.16, 1, 0.3, 1), filter 0.6s ease;
}
.gallery figure:hover img { transform: scale(1.02); filter: saturate(0.95) contrast(1.05); }

.gallery figcaption {
  position: absolute;
  left: 0;
  bottom: 0;
  padding: 0.6rem 0.9rem;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(8px);
  border-top-right-radius: 3px;
  max-width: min(90%, 34rem);
}

/* Anchor-positioned scroll-linked label (progressive enhancement) */
.label {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink);
}

@supports (anchor-name: --x) {
  .gallery figure { anchor-name: --shot; }
  .gallery figcaption {
    position: absolute;
    position-anchor: --shot;
    position-area: bottom span-right;
    position-try-fallbacks: bottom span-left, top span-right;
    left: auto;
    bottom: auto;
    margin: 0.75rem;
    border-radius: 3px;
    border: 1px solid var(--line);
    animation: label-in linear both;
    animation-timeline: view();
    animation-range: entry 10% cover 34%;
  }
  @keyframes label-in {
    from { opacity: 0; transform: translateY(0.6rem); }
    to { opacity: 1; transform: translateY(0); }
  }
}

/* ---------- Process ---------- */

.process { padding: clamp(3.5rem, 9vw, 7rem) 0; }

.process__list {
  list-style: none;
  margin: 0;
  padding: 0 var(--pad);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr));
  gap: 1px;
  background: var(--line);
  border-block: 1px solid var(--line);
}

.process__list li {
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  padding: clamp(1.4rem, 3vw, 2.2rem);
  counter-increment: step;
}
.process__list { counter-reset: step; }
.process__list li h3 { display: flex; gap: 0.7rem; align-items: baseline; }
.process__list li h3::before {
  content: counter(step, decimal-leading-zero);
  font-family: var(--font-body);
  font-weight: 800;
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  color: var(--accent);
  flex: none;
}
.process__list li p {
  margin: 0;
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--ink-soft);
  max-width: 40ch;
}

/* ---------- Reviews ---------- */

.reviews { padding: clamp(3rem, 8vw, 6rem) 0 clamp(3.5rem, 9vw, 7rem); }

.reviews__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 19rem), 1fr));
  gap: clamp(1rem, 3vw, 2rem);
  padding: 0 var(--pad);
}

.reviews blockquote {
  margin: 0;
  padding: clamp(1.4rem, 3vw, 2rem);
  background: var(--card);
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: 2px;
  box-shadow: var(--shadow);
}
.reviews blockquote p {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(1.05rem, 1rem + 0.5vw, 1.3rem);
  line-height: 1.42;
  letter-spacing: -0.015em;
  margin-bottom: 1rem;
  max-width: none;
}
.reviews cite {
  font-style: normal;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

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

.contact {
  padding: clamp(3.5rem, 9vw, 7rem) var(--pad);
  border-top: 1px solid var(--line);
  background: color-mix(in srgb, var(--secondary) 6%, transparent);
}

.contact__inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(2rem, 5vw, 4rem);
  max-width: 82rem;
  margin: 0 auto;
}

.contact__call h2 { max-width: 14ch; }
.contact__call p { max-width: 40ch; }

.contact__phone {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 200;
  font-size: clamp(2rem, 1.2rem + 3.6vw, 3.6rem);
  letter-spacing: -0.035em;
  line-height: 1.05;
  color: var(--accent);
  text-decoration: none;
  border-bottom: 2px solid color-mix(in srgb, var(--accent) 40%, transparent);
  padding-bottom: 0.1em;
  margin: 0.4rem 0 0.9rem;
  transition: border-color 0.3s ease, color 0.3s ease;
}
.contact__phone:hover { color: var(--accent-bright); border-color: var(--accent-bright); }

.contact__hint { font-size: 0.9rem; font-weight: 600; color: var(--ink-soft); }

.contact__details {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr));
  gap: clamp(1.4rem, 3vw, 2.2rem);
}

.detail h3 {
  font-family: var(--font-body);
  font-weight: 800;
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.7rem;
}
.detail address { font-style: normal; font-weight: 600; line-height: 1.6; }
.detail p { font-weight: 500; font-size: 0.95rem; color: var(--ink-soft); }
.detail__link {
  display: inline-block;
  margin-top: 0.5rem;
  font-size: 0.85rem;
  font-weight: 800;
  text-decoration: none;
  border-bottom: 1px solid var(--line-strong);
  min-height: 44px;
  line-height: 44px;
}
.detail__link:hover { border-color: var(--accent); }

.hours {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}
.hours th, .hours td {
  text-align: left;
  padding: 0.32rem 0;
  border-bottom: 1px solid var(--line);
  font-weight: 600;
}
.hours th { color: var(--ink-soft); font-weight: 600; }
.hours td { text-align: right; font-weight: 800; color: var(--ink); }
.hours tr:last-child th, .hours tr:last-child td { border-bottom: none; }

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--line);
  padding: clamp(2rem, 5vw, 3rem) var(--pad) clamp(4.5rem, 8vw, 5.5rem);
  background: color-mix(in srgb, var(--bg-deep) 70%, transparent);
}

.site-footer__inner { max-width: 82rem; margin: 0 auto; }

.site-footer__name {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(1.3rem, 1.1rem + 1vw, 1.9rem);
  letter-spacing: -0.03em;
  margin: 0 0 0.4rem;
  max-width: none;
}
.site-footer__meta {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink-soft);
  margin: 0 0 1.6rem;
  max-width: 60ch;
}

.claim-banner {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: var(--ink-soft);
  background: color-mix(in srgb, var(--ink) 6%, transparent);
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 0.5rem 0.8rem;
  text-decoration: none;
  margin-bottom: 1.2rem;
  transition: color 0.25s ease, border-color 0.25s ease, background-color 0.25s ease;
}
.claim-banner:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 8%, transparent);
}

.attribution {
  position: static;
  font-size: 0.72rem;
  font-weight: 600;
  opacity: 0.62;
  margin: 0;
  max-width: none;
}
.attribution a { color: inherit; }

/* ---------- Wider screens ---------- */

@media (min-width: 48rem) {
  .intro { grid-template-columns: 1.15fr 0.85fr; }
  .intro__figure { position: sticky; top: 6rem; }
  .gallery__pair { grid-template-columns: 1fr 1fr; }
  .gallery img { aspect-ratio: 21 / 9; }
  .gallery__pair img { aspect-ratio: 4 / 3; }
  .contact__inner { grid-template-columns: 0.85fr 1.15fr; }
}

@media (min-width: 72rem) {
  .hero__plate { padding-bottom: clamp(3rem, 5vw, 5rem); }
  .gallery__pair { grid-template-columns: 7fr 5fr; }
  .gallery__pair figure:nth-child(2) img { aspect-ratio: 3 / 4; height: 100%; }
}

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .strip__track { animation: none; transform: none; }
  .gallery figure:hover img { transform: none; }
  .btn:hover { transform: none; }
  .gallery figcaption { animation: none !important; opacity: 1 !important; transform: none !important; }
}
