/* ============================================================
   ZAMM Mobile Mechanics
   bleached cream + oxblood + navy / mono body + display serif
   ============================================================ */

:root {
  --bg: #f4ecdc;
  --bg-tint: #ece1cc;
  --ink: #1a1b2e;
  --ink-soft: #4a4a5e;
  --accent: #6b1f1a;
  --accent-soft: #8a3229;
  --secondary: #1e2a4a;
  --rule: #cdbfa4;
  --plate: #f4ecdc;
  --shadow: 0 1px 0 rgba(26, 27, 46, .06);
  --maxw: 1180px;
  --gut: clamp(1.15rem, 4vw, 3.5rem);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #14151f;
    --bg-tint: #1b1d2b;
    --ink: #efe6d4;
    --ink-soft: #b3ab99;
    --accent: #d98a72;
    --accent-soft: #e8a68f;
    --secondary: #9fb0d8;
    --rule: #33364a;
    --plate: #14151f;
    --shadow: 0 1px 0 rgba(0, 0, 0, .4);
  }
}

:root[data-theme="dark"] {
  --bg: #14151f;
  --bg-tint: #1b1d2b;
  --ink: #efe6d4;
  --ink-soft: #b3ab99;
  --accent: #d98a72;
  --accent-soft: #e8a68f;
  --secondary: #9fb0d8;
  --rule: #33364a;
  --plate: #14151f;
  --shadow: 0 1px 0 rgba(0, 0, 0, .4);
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: clamp(.9rem, .35vw + .82rem, 1rem);
  line-height: 1.72;
  font-weight: 400;
  text-wrap: pretty;
  -webkit-font-smoothing: antialiased;
}
img { display: block; width: 100%; height: auto; }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: .18em; }
a:hover { color: var(--accent-soft); }
h1, h2, h3 { margin: 0; font-weight: 600; line-height: 1.08; }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
table { border-collapse: collapse; width: 100%; }

h1, h2 {
  font-family: 'Fraunces', 'Playfair Display', Georgia, serif;
  font-variation-settings: 'opsz' 96, 'SOFT' 0, 'WONK' 0;
  letter-spacing: -.015em;
}
h1 { font-size: clamp(2.4rem, 7.5vw, 5.4rem); font-weight: 600; }
h2 { font-size: clamp(1.7rem, 4.2vw, 3rem); }
h3 { font-size: 1.02rem; font-weight: 700; letter-spacing: -.01em; }

.eyebrow {
  font-size: .72rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 .9rem;
  font-weight: 500;
}

.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(--ink); color: var(--bg); padding: .7rem 1rem;
}
.skip:focus { left: .5rem; top: .5rem; }

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

/* ---------- masthead ---------- */
.masthead {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--rule);
}
.masthead__inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: .7rem var(--gut);
  display: flex; align-items: center; gap: 1rem; flex-wrap: wrap;
}
.brand { text-decoration: none; color: var(--ink); display: flex; flex-direction: column; line-height: 1.05; }
.brand__mark {
  font-family: 'Fraunces', serif;
  font-size: 1.32rem; font-weight: 700; letter-spacing: .02em;
}
.brand__sub {
  font-size: .62rem; letter-spacing: .22em; text-transform: uppercase;
  color: var(--ink-soft);
}
.nav { display: none; gap: 1.4rem; margin-left: auto; }
.nav a {
  color: var(--ink); text-decoration: none; font-size: .78rem;
  letter-spacing: .04em; padding: .35rem 0;
  border-bottom: 1px solid transparent;
  transition: border-color .2s ease, color .2s ease;
}
.nav a:hover { border-bottom-color: var(--accent); color: var(--accent); }
.masthead__actions { display: flex; align-items: center; gap: .6rem; margin-left: auto; }
.nav + .masthead__actions { margin-left: 0; }

.theme-toggle {
  display: inline-flex; align-items: center; gap: .45rem;
  min-height: 44px; padding: .4rem .7rem;
  background: transparent; color: var(--ink-soft);
  border: 1px solid var(--rule); border-radius: 2px;
  font: inherit; font-size: .7rem; letter-spacing: .1em; text-transform: uppercase;
  cursor: pointer;
  transition: color .2s ease, border-color .2s ease;
}
.theme-toggle:hover { color: var(--ink); border-color: var(--ink-soft); }
.theme-toggle__icon {
  width: 12px; height: 12px; border-radius: 50%;
  border: 1.5px solid currentColor;
  background: linear-gradient(90deg, currentColor 0 50%, transparent 50% 100%);
}

.call-btn {
  display: inline-flex; flex-direction: column; align-items: flex-start;
  gap: .05rem; min-height: 44px; justify-content: center;
  padding: .45rem .95rem;
  background: var(--accent); color: #fdf7ea;
  text-decoration: none; border-radius: 2px;
  transition: background .2s ease, transform .2s ease;
}
.call-btn:hover { background: var(--accent-soft); color: #fdf7ea; }
.call-btn__label { font-size: .6rem; letter-spacing: .18em; text-transform: uppercase; opacity: .85; }
.call-btn__num { font-size: .92rem; font-weight: 700; letter-spacing: .01em; }
.call-btn--lg { padding: .8rem 1.4rem; }
.call-btn--lg .call-btn__num { font-size: clamp(1.05rem, 2.4vw, 1.35rem); }
.call-btn--block { display: flex; width: 100%; align-items: center; }

/* ---------- hero ---------- */
.hero { display: grid; gap: 0; }
.hero__media { position: relative; overflow: hidden; }
.hero__media img {
  width: 100%; height: clamp(300px, 58vh, 620px);
  object-fit: cover; object-position: center 40%;
}
.hero__plate {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(1.6rem, 5vw, 3.2rem) var(--gut) clamp(1.8rem, 5vw, 3rem);
}
.hero__plate h1 { margin-bottom: 1rem; }
.hero__lede { max-width: 62ch; color: var(--ink-soft); font-size: .95rem; }
.hero__cta { margin-top: 1.6rem; display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.4rem; }
.hero__note { margin: 0; font-size: .76rem; color: var(--ink-soft); }

/* ---------- trust strip ---------- */
.strip { border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); background: var(--bg-tint); }
.strip__list {
  max-width: var(--maxw); margin: 0 auto;
  padding: 1.1rem var(--gut);
  display: grid; gap: .9rem 2rem;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}
.strip__list li { display: flex; flex-direction: column; gap: .1rem; }
.strip__k { font-family: 'Fraunces', serif; font-size: 1.25rem; font-weight: 600; color: var(--secondary); }
.strip__v { font-size: .74rem; color: var(--ink-soft); }

/* ---------- generic section ---------- */
.section { padding: clamp(2.6rem, 7vw, 5.5rem) 0; }
.section--tint { background: var(--bg-tint); border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.section__head {
  max-width: var(--maxw); margin: 0 auto clamp(1.8rem, 4vw, 3rem);
  padding: 0 var(--gut);
}
.section__head h2 { max-width: 22ch; margin-bottom: .9rem; }
.section__intro { max-width: 62ch; color: var(--ink-soft); font-size: .92rem; }

/* ---------- gallery (full bleed) ---------- */
.gallery { display: grid; grid-template-columns: 1fr; gap: 0; }
.gallery__item { margin: 0; }
.gallery__item img { width: 100%; height: auto; }
.gallery__item figcaption {
  max-width: var(--maxw); margin: 0 auto;
  padding: 1.3rem var(--gut) clamp(2rem, 5vw, 3.4rem);
}
.gallery__item figcaption h3 { color: var(--secondary); margin-bottom: .45rem; }
.gallery__item figcaption p { max-width: 58ch; color: var(--ink-soft); font-size: .88rem; }
.gallery__item img { aspect-ratio: 4 / 3; object-fit: cover; }

/* ---------- steps ---------- */
.steps {
  max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gut);
  display: grid; gap: 2rem;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}
.step { border-top: 2px solid var(--accent); padding-top: 1rem; }
.step__num {
  display: block; font-family: 'Fraunces', serif;
  font-size: 1.6rem; font-weight: 600; color: var(--accent);
  margin-bottom: .5rem;
}
.step h3 { margin-bottom: .5rem; color: var(--secondary); }
.step p { font-size: .86rem; color: var(--ink-soft); }

/* ---------- band ---------- */
.band { display: grid; gap: 0; }
.band__media img { width: 100%; height: clamp(240px, 46vh, 480px); object-fit: cover; }
.band__plate {
  max-width: var(--maxw); margin: 0 auto;
  padding: clamp(2rem, 5vw, 3.6rem) var(--gut);
}
.band__plate h2 { max-width: 24ch; margin-bottom: 1.1rem; }
.band__plate p { max-width: 64ch; color: var(--ink-soft); font-size: .9rem; }
.band__sig { color: var(--accent); font-style: italic; margin-top: 1.2rem; }

/* ---------- service area ---------- */
.area {
  max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gut);
  display: grid; gap: .55rem 1.4rem;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}
.area li {
  border-bottom: 1px solid var(--rule);
  padding: .55rem 0 .55rem 1.1rem;
  position: relative;
  font-size: .84rem;
}
.area li::before {
  content: ""; position: absolute; left: 0; top: 1.05em;
  width: 6px; height: 6px; background: var(--accent);
}
.area__note {
  max-width: var(--maxw); margin: 1.6rem auto 0; padding: 0 var(--gut);
  font-size: .8rem; color: var(--ink-soft);
}

/* ---------- contact ---------- */
.contact {
  max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gut);
  display: grid; gap: clamp(2rem, 5vw, 4rem);
  grid-template-columns: 1fr;
}
.contact__col h2 { margin-bottom: 1.1rem; }
.contact__lede { color: var(--ink-soft); font-size: .9rem; max-width: 46ch; }
.hours { font-size: .84rem; }
.hours th, .hours td { text-align: left; padding: .5rem 0; border-bottom: 1px solid var(--rule); }
.hours th { font-weight: 400; color: var(--ink-soft); }
.hours td { text-align: right; font-variant-numeric: tabular-nums; }
.hours__note { margin-top: .9rem; font-size: .76rem; color: var(--ink-soft); }
.addr { font-style: normal; margin: 1.5rem 0 0; display: flex; flex-direction: column; gap: .2rem; }
.addr__label { font-size: .62rem; letter-spacing: .18em; text-transform: uppercase; color: var(--ink-soft); }
.addr a { font-size: .92rem; line-height: 1.5; }
.contact__fine { margin-top: 1.1rem; font-size: .76rem; color: var(--ink-soft); max-width: 44ch; }
.contact .call-btn { margin-top: 1.4rem; }

/* ---------- quotes ---------- */
.quotes {
  max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gut);
  display: grid; gap: 1.6rem;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}
.quote {
  margin: 0; padding: 1.3rem 0 0;
  border-top: 1px solid var(--rule);
}
.quote p { font-size: .86rem; color: var(--ink); }
.quote cite { display: block; margin-top: .8rem; font-style: normal; font-size: .74rem; color: var(--accent); }

/* ---------- footer ---------- */
.footer { border-top: 1px solid var(--rule); background: var(--bg-tint); }
.footer__inner {
  max-width: var(--maxw); margin: 0 auto;
  padding: clamp(2rem, 5vw, 3.2rem) var(--gut) 1.6rem;
  display: grid; gap: 1.8rem;
}
.footer__brand { display: flex; flex-direction: column; line-height: 1.05; }
.footer__cols {
  display: grid; gap: 1.6rem;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
}
.footer__cols h3 {
  font-size: .66rem; letter-spacing: .18em; text-transform: uppercase;
  color: var(--ink-soft); font-weight: 500; margin-bottom: .6rem;
}
.footer__cols p { font-size: .82rem; color: var(--ink-soft); }
.footer__cols a { color: var(--ink); text-decoration: none; }
.footer__cols a:hover { color: var(--accent); text-decoration: underline; }
.footer__base {
  max-width: var(--maxw); margin: 0 auto;
  padding: 0 var(--gut) 2.2rem;
  display: flex; flex-direction: column; gap: .7rem; align-items: flex-start;
}
.claim-banner {
  display: inline-block;
  font-size: .72rem;
  padding: .45rem .7rem;
  background: color-mix(in srgb, var(--rule) 45%, transparent);
  border: 1px solid var(--rule);
  border-radius: 2px;
  color: var(--ink-soft);
  text-decoration: none;
}
.claim-banner:hover { color: var(--accent); border-color: var(--accent); }
.attribution { margin: 0; font-size: .7rem; color: var(--ink-soft); }
.attribution a { color: var(--ink-soft); }

/* ---------- anchor-positioned scroll labels ---------- */
.scroll-label {
  display: none;
  anchor-name: --heading;
  position: absolute;
  position-anchor: --heading;
  position-area: right span-block;
  margin-left: 1.2rem;
  font-size: .62rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--accent);
  writing-mode: vertical-rl;
  opacity: 0;
  animation: label-in linear both;
  animation-timeline: view();
  animation-range: entry 20% cover 45%;
}
.section__head h2 { anchor-name: --heading; }

@keyframes label-in {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: .85; transform: translateY(0); }
}

@supports (anchor-name: --x) {
  @media (min-width: 1100px) {
    .section__head { position: relative; }
    .scroll-label { display: block; }
  }
}

/* ---------- wide screens ---------- */
@media (min-width: 760px) {
  .nav { display: flex; }
  .contact { grid-template-columns: 1fr 1fr; }
  .gallery { grid-template-columns: repeat(2, 1fr); }
  .gallery__item--half img { aspect-ratio: 3 / 2; }
  .gallery__item figcaption { padding-left: var(--gut); padding-right: var(--gut); }
  .footer__inner { grid-template-columns: 1fr 2fr; align-items: start; }
}

@media (min-width: 1100px) {
  .gallery { grid-template-columns: repeat(12, 1fr); }
  .gallery__item--half { grid-column: span 6; }
  .gallery__item--half:nth-child(4n + 1) { grid-column: 1 / span 7; }
  .gallery__item--half:nth-child(4n + 2) { grid-column: 8 / span 5; }
  .gallery__item--half:nth-child(4n + 3) { grid-column: 1 / span 5; }
  .gallery__item--half:nth-child(4n + 4) { grid-column: 6 / span 7; }
  .gallery__item--half:nth-child(4n + 1) img,
  .gallery__item--half:nth-child(4n + 4) img { aspect-ratio: 16 / 10; }
  .gallery__item--half:nth-child(4n + 2) img,
  .gallery__item--half:nth-child(4n + 3) img { aspect-ratio: 4 / 5; }
  .gallery__item figcaption { padding-left: clamp(1.5rem, 3vw, 2.5rem); padding-right: clamp(1.5rem, 3vw, 2.5rem); }
}

/* ---------- motion preferences ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  .scroll-label { opacity: .85; transform: none; }
}
