/* ============================================================
   Mobile Mechanic Showtys Auto Repairs
   Composition: bleached cream + oxblood + navy · inverted type
   weights · full-bleed image gallery · anchor-positioned labels
   ============================================================ */

:root {
  --bg:        #f4ecdc;
  --bg-tint:   #ece1cb;
  --ink:       #1a1b2e;
  --ink-soft:  #4a4a5e;
  --accent:    #6b1f1a;   /* oxblood — text accent */
  --secondary: #1e2a4a;   /* navy — structural */
  --rule:      #cbbfa5;
  --card:      #fbf6ea;

  --measure: 62ch;
  --pad: clamp(1.25rem, 5vw, 5rem);
  --stack: clamp(3.5rem, 9vw, 8rem);

  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Bricolage Grotesque", system-ui, -apple-system, sans-serif;
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
img, video { max-width: 100%; height: auto; display: block; }

/* ---------- base ---------- */
body {
  min-height: 100vh;
  font-family: var(--font-body);
  font-weight: 700;                 /* inverted hierarchy: body is heavy */
  font-size: clamp(1rem, 0.96rem + 0.25vw, 1.125rem);
  line-height: 1.62;
  color: var(--ink);
  background:
    radial-gradient(ellipse 70% 55% at 8% 0%,   rgba(107, 31, 26, 0.10) 0%, transparent 62%),
    radial-gradient(ellipse 65% 50% at 100% 22%, rgba(30, 42, 74, 0.11) 0%, transparent 58%),
    radial-gradient(ellipse 80% 60% at 50% 108%, rgba(107, 31, 26, 0.07) 0%, transparent 60%),
    var(--bg);
  background-attachment: fixed;
  text-wrap: pretty;
}

h1, h2, h3 { font-family: var(--font-display); line-height: 1.06; margin: 0; }
h1 { font-weight: 200; letter-spacing: -0.025em; font-size: clamp(2.9rem, 11vw, 7.5rem); }
h2 { font-weight: 300; letter-spacing: -0.015em; font-size: clamp(1.9rem, 5.2vw, 3.4rem); }
h3 { font-weight: 500; letter-spacing: -0.005em; font-size: clamp(1.15rem, 2.4vw, 1.5rem); }

p { margin: 0 0 1rem; max-width: var(--measure); }
p:last-child { margin-bottom: 0; }

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

address { font-style: normal; margin-bottom: 0.75rem; }

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

.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}

.skip {
  position: absolute; left: -9999px; top: 0; z-index: 99;
  background: var(--secondary); color: #fff; padding: 0.75rem 1.25rem;
  font-size: 0.9rem; text-decoration: none;
}
.skip:focus { left: 0; }

/* ---------- top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--rule);
}
.topbar__inner {
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 1.5rem;
  padding: 0.7rem var(--pad);
}
.topbar__name {
  margin: 0; font-family: var(--font-display); font-weight: 500;
  font-size: 1.02rem; letter-spacing: -0.01em; color: var(--secondary);
  max-width: none;
}
.topbar__nav {
  display: flex; flex-wrap: wrap; gap: 0.4rem 1.15rem;
  margin-inline: auto 0; font-size: 0.86rem; font-weight: 600;
}
.topbar__nav a {
  color: var(--ink-soft); text-decoration: none;
  padding: 0.55rem 0.1rem; min-height: 44px; display: inline-flex; align-items: center;
  border-bottom: 2px solid transparent;
  transition: color 0.18s ease, border-color 0.18s ease;
}
.topbar__nav a:hover { color: var(--accent); border-bottom-color: var(--accent); }

/* ---------- call button ---------- */
.callbtn {
  display: inline-flex; flex-direction: column; align-items: flex-start;
  gap: 0.05rem; padding: 0.6rem 1.05rem; min-height: 44px;
  background: var(--accent); color: #fdf7ec; text-decoration: none;
  border-radius: 3px; line-height: 1.15;
  transition: background 0.18s ease, transform 0.18s ease;
}
.callbtn:hover { background: var(--secondary); color: #fdf7ec; }
.callbtn__label { font-size: 0.66rem; letter-spacing: 0.14em; text-transform: uppercase; font-weight: 600; opacity: 0.85; }
.callbtn__num { font-family: var(--font-display); font-weight: 500; font-size: 1.02rem; letter-spacing: 0.01em; }
.callbtn--big { padding: 0.85rem 1.5rem; }
.callbtn--big .callbtn__num { font-size: clamp(1.2rem, 3.4vw, 1.7rem); }

/* ---------- hero ---------- */
.hero { padding-bottom: var(--stack); }
.hero__media { position: relative; }
.hero__media img {
  width: 100%; aspect-ratio: 16 / 9; object-fit: cover;
  filter: saturate(0.88) contrast(1.03);
}
.hero__media::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to bottom, rgba(26,27,46,0.10), rgba(26,27,46,0.34));
  pointer-events: none;
}
.hero__text {
  padding: clamp(2rem, 5vw, 3.5rem) var(--pad) 0;
  max-width: 78rem;
}
.eyebrow {
  font-size: 0.74rem; letter-spacing: 0.2em; text-transform: uppercase;
  font-weight: 600; color: var(--accent); margin-bottom: 1rem; max-width: none;
}
.hero__lede {
  font-size: clamp(1.05rem, 1.9vw, 1.3rem);
  font-weight: 600; color: var(--ink-soft);
  max-width: 46ch; margin-top: 1.5rem;
}
.hero__cta { margin: 2rem 0 1rem; }
.hero__meta {
  font-size: 0.85rem; font-weight: 600; color: var(--ink-soft);
  letter-spacing: 0.01em; max-width: none;
}

/* ---------- bands ---------- */
.band { padding: var(--stack) var(--pad); }
.band--tint {
  background: color-mix(in srgb, var(--bg-tint) 70%, transparent);
  border-block: 1px solid var(--rule);
}
.band__head { max-width: 60rem; margin-bottom: clamp(2rem, 5vw, 3.5rem); }
.band__head h2 { margin-bottom: 1.1rem; }
.band__sub { color: var(--ink-soft); font-weight: 600; max-width: 58ch; }

/* ---------- full-bleed gallery ---------- */
.gallery {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: clamp(1.5rem, 4vw, 3.5rem) clamp(1rem, 3vw, 2.5rem);
  /* break out of the band padding to run edge to edge */
  margin-inline: calc(var(--pad) * -1);
}
.gallery__item {
  grid-column: 1 / -1;
  margin: 0;
  display: grid;
  gap: 1.25rem;
}
.gallery__item img {
  width: 100%; aspect-ratio: 16 / 9; object-fit: cover;
  filter: saturate(0.88) contrast(1.03);
}
.gallery__item figcaption { padding-inline: var(--pad); max-width: 62rem; }
.gallery__item h3 { margin-bottom: 0.6rem; color: var(--secondary); }
.gallery__item p { color: var(--ink-soft); font-weight: 600; }

@media (min-width: 46rem) {
  .gallery__item--half { grid-column: span 6; }
  .gallery__item--half img { aspect-ratio: 4 / 3; }
  .gallery__item--half figcaption { padding-inline: var(--pad); }
  .gallery__item--half:nth-of-type(odd) figcaption { padding-inline: var(--pad) 0; }
}

/* ---------- steps ---------- */
.steps {
  list-style: none; margin: 0; padding: 0;
  display: grid; gap: clamp(1.75rem, 4vw, 3rem);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr));
}
.steps__item {
  border-top: 2px solid var(--secondary);
  padding-top: 1.25rem;
}
.steps__num {
  display: block; font-family: var(--font-display); font-weight: 200;
  font-size: clamp(2.4rem, 6vw, 3.6rem); line-height: 1;
  color: var(--accent); margin-bottom: 0.75rem;
}
.steps__item h3 { margin-bottom: 0.6rem; color: var(--secondary); }
.steps__item p { color: var(--ink-soft); font-weight: 600; font-size: 0.98rem; }

.note {
  margin-top: clamp(2.5rem, 6vw, 4rem);
  padding: clamp(1.25rem, 3vw, 2rem);
  background: var(--card);
  border-left: 4px solid var(--accent);
  max-width: 62rem;
}
.note h3 { margin-bottom: 0.5rem; color: var(--accent); }
.note p { color: var(--ink-soft); font-weight: 600; }

/* ---------- service area ---------- */
.area {
  display: grid; gap: clamp(2rem, 5vw, 3.5rem);
  grid-template-columns: 1fr;
  align-items: start;
}
@media (min-width: 52rem) {
  .area { grid-template-columns: 1fr 1fr; }
}
.chips {
  list-style: none; margin: 0 0 1.5rem; padding: 0;
  display: flex; flex-wrap: wrap; gap: 0.5rem;
}
.chips li {
  font-size: 0.86rem; font-weight: 600; letter-spacing: 0.01em;
  padding: 0.45rem 0.85rem;
  border: 1px solid var(--rule);
  background: var(--card);
  color: var(--secondary);
  border-radius: 999px;
}
.area__note { color: var(--ink-soft); font-weight: 600; font-size: 0.95rem; }
.area__fig { margin: 0; }
.area__fig img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; filter: saturate(0.88) contrast(1.03); }
.area__fig figcaption {
  font-size: 0.8rem; font-weight: 600; color: var(--ink-soft);
  margin-top: 0.6rem; letter-spacing: 0.01em;
}

/* ---------- visit ---------- */
.visit {
  display: grid; gap: clamp(2rem, 5vw, 4rem);
  grid-template-columns: 1fr;
}
@media (min-width: 52rem) {
  .visit { grid-template-columns: 1fr 1fr; }
}
.visit__col h3 {
  color: var(--secondary); margin-bottom: 0.75rem;
  padding-bottom: 0.5rem; border-bottom: 1px solid var(--rule);
}
.visit__col h3 + p { margin-top: 0.75rem; }
.visit__col h3:not(:first-child) { margin-top: 2.25rem; }
.visit__col p { color: var(--ink-soft); font-weight: 600; }
.visit__phone { margin: 0 0 0.75rem; }
.visit__phone a {
  font-family: var(--font-display); font-weight: 300;
  font-size: clamp(1.7rem, 5vw, 2.6rem); letter-spacing: -0.01em;
  color: var(--accent); text-decoration: none;
  display: inline-block; padding-block: 0.15rem;
}
.visit__phone a:hover { text-decoration: underline; }
.visit__hint { font-size: 0.9rem; }
.maplink { font-weight: 600; }

.hours { width: 100%; border-collapse: collapse; margin-bottom: 1.25rem; }
.hours th, .hours td {
  text-align: left; padding: 0.6rem 0.25rem;
  border-bottom: 1px solid var(--rule);
  font-size: 0.95rem;
}
.hours th { font-weight: 600; color: var(--secondary); width: 45%; }
.hours td { font-weight: 600; color: var(--ink-soft); font-variant-numeric: tabular-nums; }

/* ---------- about ---------- */
.about { max-width: 62rem; }
.about p { color: var(--ink-soft); font-weight: 600; }
.about p:first-child::first-letter {
  font-family: var(--font-display); font-weight: 200;
  font-size: 3.4em; line-height: 0.82; float: left;
  padding: 0.06em 0.12em 0 0; color: var(--accent);
}

/* ---------- footer ---------- */
.foot {
  border-top: 1px solid var(--rule);
  background: color-mix(in srgb, var(--bg-tint) 60%, transparent);
  padding: clamp(2.5rem, 6vw, 4rem) var(--pad) 5.5rem;
}
.foot__inner { max-width: 62rem; }
.foot__name {
  font-family: var(--font-display); font-weight: 500;
  font-size: 1.1rem; color: var(--secondary); margin-bottom: 0.5rem; max-width: none;
}
.foot__line { font-size: 0.9rem; font-weight: 600; color: var(--ink-soft); margin-bottom: 0.4rem; }
.foot__line--small { font-size: 0.82rem; opacity: 0.85; }

.claim-wrap { margin: 1.75rem 0 0; }
.claim-banner {
  display: inline-block;
  font-size: 0.78rem; font-weight: 600; letter-spacing: 0.01em;
  padding: 0.5rem 0.85rem;
  background: color-mix(in srgb, var(--rule) 45%, transparent);
  border: 1px solid var(--rule);
  border-radius: 3px;
  color: var(--ink-soft);
  text-decoration: none;
  transition: background 0.18s ease, color 0.18s ease;
}
.claim-banner:hover { background: var(--card); color: var(--accent); }

.attribution {
  position: static;
  margin: 1.5rem 0 0;
  font-size: 0.72rem;
  opacity: 0.55;
  font-family: var(--font-body);
  max-width: none;
}
.attribution a { color: inherit; }

/* ---------- anchor-positioned scroll labels ---------- */
/* Small labels that track their heading as it scrolls, positioned with
   CSS anchor positioning only — no JS. Browsers without anchor support
   simply render the label inline above the heading. */
.band__head { position: relative; }
.band__head h2 { anchor-name: --band-heading; }
.band__head::before {
  content: attr(data-label);
  display: block;
  font-family: var(--font-body);
  font-size: 0.68rem; font-weight: 600;
  letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--accent);
  opacity: 0.75;
  margin-bottom: 0.9rem;
}
@supports (anchor-name: --x) {
  .band__head::before {
    position: absolute;
    position-anchor: --band-heading;
    position-area: top span-right;
    margin-bottom: 0;
    translate: 0 -0.15rem;
  }
}

/* ---------- scroll-linked reveal (CSS only, no JS) ---------- */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .gallery__item img,
    .area__fig img,
    .steps__item {
      animation: rise linear both;
      animation-timeline: view();
      animation-range: entry 5% cover 32%;
    }
    @keyframes rise {
      from { opacity: 0.35; transform: translateY(1.6rem); }
      to   { opacity: 1;    transform: translateY(0); }
    }
  }
}

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

/* ---------- small screens ---------- */
@media (max-width: 40rem) {
  .topbar__nav { display: none; }
  .topbar__inner { justify-content: space-between; }
  .topbar__name { font-size: 0.95rem; }
  .hero__media img { aspect-ratio: 4 / 3; }
  .gallery__item img { aspect-ratio: 4 / 3; }
  .about p:first-child::first-letter { font-size: 2.8em; }
}
