/* ============================================================
   The Mobile Mechanic — warm earth editorial
   ============================================================ */

:root {
  --bg: #f5efe4;
  --bg-soft: #efe6d6;
  --ink: #2b1e14;
  --ink-soft: #5a4636;
  --accent: #c25a37;
  --accent-deep: #a3462a;
  --secondary: #6a7a4a;
  --line: rgba(43, 30, 20, 0.14);
  --card: #fbf6ec;
  --shadow: 0 18px 40px -28px rgba(43, 30, 20, 0.55);
  --radius: 4px;
  --wrap: 1180px;
  --serif: 'Fraunces', 'Cormorant Garamond', Georgia, serif;
  --sans: 'DM Sans', 'Inter', system-ui, sans-serif;
}

html[data-theme="dark"] {
  --bg: #1b1410;
  --bg-soft: #241b15;
  --ink: #f2e8da;
  --ink-soft: #c3b3a1;
  --accent: #e07a52;
  --accent-deep: #f0916b;
  --secondary: #9aab74;
  --line: rgba(242, 232, 218, 0.16);
  --card: #241b15;
  --shadow: 0 18px 40px -28px rgba(0, 0, 0, 0.9);
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.05rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: background-color .35s ease, color .35s ease;
}

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

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.015em;
  margin: 0 0 .6em;
  text-wrap: balance;
}

h1 { font-size: clamp(2.6rem, 7vw, 4.6rem); font-variation-settings: 'SOFT' 0, 'WONK' 1; }
h2 { font-size: clamp(1.7rem, 3.6vw, 2.5rem); }
h3 { font-size: 1.22rem; }

p { margin: 0 0 1.1em; max-width: 68ch; }

a { color: var(--accent); text-underline-offset: 3px; }
a:hover { color: var(--accent-deep); }

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

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

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: clamp(1.15rem, 4vw, 2.5rem);
}

/* ---------- ambient background shapes ---------- */
.ambient {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}
.blob {
  position: absolute;
  display: block;
  border-radius: 50%;
  filter: blur(70px);
  opacity: .22;
}
.blob-a {
  width: 46vw; height: 46vw; max-width: 620px; max-height: 620px;
  background: var(--accent);
  top: -8vw; left: -10vw;
  animation: drift-a 34s ease-in-out infinite alternate;
}
.blob-b {
  width: 38vw; height: 38vw; max-width: 520px; max-height: 520px;
  background: var(--secondary);
  top: 42%; right: -12vw;
  animation: drift-b 44s ease-in-out infinite alternate;
}
.blob-c {
  width: 30vw; height: 30vw; max-width: 420px; max-height: 420px;
  background: var(--accent);
  bottom: -10vw; left: 32%;
  opacity: .14;
  animation: drift-c 52s ease-in-out infinite alternate;
}
@keyframes drift-a { from { translate: 0 0; } to { translate: 6vw 9vh; } }
@keyframes drift-b { from { translate: 0 0; } to { translate: -7vw -6vh; } }
@keyframes drift-c { from { translate: 0 0; } to { translate: 4vw -8vh; } }

/* ---------- header ---------- */
.site-head {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: .7rem clamp(1.15rem, 4vw, 2.5rem);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}

.brand {
  display: flex;
  align-items: center;
  gap: .7rem;
  text-decoration: none;
  color: var(--ink);
  flex: 0 0 auto;
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 42px; height: 42px;
  background: var(--ink);
  color: var(--bg);
  font-family: var(--serif);
  font-weight: 700;
  font-size: .95rem;
  letter-spacing: .02em;
  border-radius: 50%;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text strong { font-family: var(--serif); font-size: 1.02rem; font-weight: 600; }
.brand-text em {
  font-style: normal;
  font-size: .72rem;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.site-nav {
  display: flex;
  gap: 1.4rem;
  margin-inline-start: auto;
  font-size: .92rem;
}
.site-nav a {
  color: var(--ink-soft);
  text-decoration: none;
  padding: .55rem 0;
  border-bottom: 1px solid transparent;
}
.site-nav a:hover { color: var(--ink); border-bottom-color: var(--accent); }

.head-actions { display: flex; align-items: center; gap: .6rem; }

.theme-toggle {
  width: 44px; height: 44px;
  display: grid; place-items: center;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 50%;
  cursor: pointer;
  color: var(--ink);
}
.theme-toggle:hover { border-color: var(--accent); }
.theme-icon {
  width: 15px; height: 15px;
  border-radius: 50%;
  background: var(--ink);
  box-shadow: inset -5px -3px 0 0 var(--bg);
  transition: box-shadow .3s ease, background-color .3s ease;
}
html[data-theme="dark"] .theme-icon {
  background: var(--ink);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--ink) 30%, transparent);
}

.call-btn {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0;
  padding: .5rem 1rem;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  border-radius: var(--radius);
  line-height: 1.15;
  min-height: 44px;
  justify-content: center;
}
.call-btn:hover { background: var(--accent-deep); color: #fff; }
.call-label { font-size: .68rem; letter-spacing: .12em; text-transform: uppercase; opacity: .9; }
.call-num { font-family: var(--serif); font-size: 1rem; font-weight: 600; }

/* ---------- hero: diagonal split ---------- */
.hero {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: min(88vh, 760px);
  isolation: isolate;
}

.hero-half { position: relative; }

.hero-half--paper {
  background: var(--bg);
  clip-path: polygon(0 0, 100% 0, 88% 100%, 0 100%);
  padding: clamp(2.5rem, 6vw, 5rem) clamp(1.15rem, 4vw, 2.5rem) clamp(3rem, 7vw, 5.5rem) clamp(1.15rem, 4vw, 2.5rem);
  z-index: 2;
}
.hero-half--ink {
  background: var(--ink);
  color: var(--bg);
  margin-inline-start: -12%;
  clip-path: polygon(12% 0, 100% 0, 100% 100%, 0 100%);
  padding: clamp(2.5rem, 6vw, 5rem) clamp(1.15rem, 4vw, 2.5rem) clamp(3rem, 7vw, 5.5rem) 14%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1rem;
}

.hero-inner { max-width: 34rem; }

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

.hero h1 { margin-bottom: .5em; }
.hero h1::after {
  content: "";
  display: block;
  width: 4.5rem;
  height: 3px;
  background: var(--accent);
  margin-top: .55em;
}

.lede {
  font-size: 1.08rem;
  color: var(--ink-soft);
  max-width: 40ch;
}

.hero-cta { display: flex; flex-wrap: wrap; gap: .75rem; margin: 1.6rem 0 2rem; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: .8rem 1.5rem;
  border-radius: var(--radius);
  font-size: .95rem;
  font-weight: 500;
  text-decoration: none;
  transition: background-color .25s ease, color .25s ease, border-color .25s ease, translate .25s ease;
}
.btn--solid { background: var(--ink); color: var(--bg); }
.btn--solid:hover { background: var(--accent); color: #fff; translate: 0 -2px; }
.btn--ghost { border: 1px solid var(--line); color: var(--ink); }
.btn--ghost:hover { border-color: var(--accent); color: var(--accent); translate: 0 -2px; }

.hero-facts {
  list-style: none;
  margin: 0;
  padding: 1.4rem 0 0;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: 1.6rem 2.2rem;
}
.hero-facts li { display: flex; flex-direction: column; line-height: 1.3; }
.hero-facts strong { font-family: var(--serif); font-size: 1.5rem; font-weight: 600; color: var(--accent); }
.hero-facts span { font-size: .82rem; color: var(--ink-soft); }

.hero-photo {
  margin: 0;
  border-radius: 2px;
  overflow: hidden;
  box-shadow: var(--shadow);
  max-width: 30rem;
  width: 100%;
}
.hero-photo img { aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }

.hero-caption {
  font-size: .82rem;
  color: color-mix(in srgb, var(--bg) 62%, transparent);
  max-width: 30rem;
  margin: 0;
  font-style: italic;
}

/* ---------- intro ---------- */
.intro {
  position: relative;
  z-index: 1;
  padding: clamp(3.5rem, 8vw, 6.5rem) 0 clamp(2.5rem, 5vw, 4rem);
  background: var(--bg-soft);
}
.intro h2 { max-width: 22ch; }
.intro-cols {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem 2.5rem;
}
.intro-cols p { margin-bottom: 0; color: var(--ink-soft); }
.intro-cols p:first-child { color: var(--ink); }

/* ---------- services band ---------- */
.services {
  position: relative;
  z-index: 1;
  padding: clamp(3.5rem, 8vw, 6rem) 0 clamp(3rem, 6vw, 5rem);
}
.services-head { margin-bottom: 2rem; }
.services-head h2 { margin-bottom: .4em; }
.band-hint {
  font-size: .88rem;
  color: var(--ink-soft);
  margin: 0;
}

.band {
  overflow-x: auto;
  overflow-y: hidden;
  cursor: grab;
  scrollbar-width: thin;
  scrollbar-color: var(--line) transparent;
  padding-bottom: 1rem;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x proximity;
}
.band.is-dragging { cursor: grabbing; scroll-snap-type: none; }
.band.is-dragging * { user-select: none; }
.band::-webkit-scrollbar { height: 6px; }
.band::-webkit-scrollbar-thumb { background: var(--line); border-radius: 3px; }

.band-track {
  display: flex;
  gap: 1.25rem;
  padding: 0 clamp(1.15rem, 4vw, 2.5rem);
  width: max-content;
}

.card {
  width: min(78vw, 340px);
  flex: 0 0 auto;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0 0 1.4rem;
  overflow: hidden;
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  transition: translate .3s ease, box-shadow .3s ease;
}
.card:hover { translate: 0 -4px; box-shadow: var(--shadow); }
.card img { aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }
.card h3 { margin: 1.2rem 1.3rem .25em; }
.card-meta {
  margin: 0 1.3rem .8em;
  font-size: .76rem;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--secondary);
  font-weight: 500;
}
.card p:last-child {
  margin: 0 1.3rem;
  font-size: .93rem;
  color: var(--ink-soft);
  max-width: none;
}

/* ---------- how it works ---------- */
.how {
  position: relative;
  z-index: 1;
  padding: clamp(3.5rem, 8vw, 6rem) 0;
  background: var(--bg-soft);
}
.steps {
  list-style: none;
  margin: 2rem 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  counter-reset: step;
}
.steps li {
  border-top: 2px solid var(--accent);
  padding-top: 1.2rem;
}
.step-num {
  display: block;
  font-family: var(--serif);
  font-size: .95rem;
  letter-spacing: .1em;
  color: var(--accent);
  margin-bottom: .5rem;
}
.steps h3 { margin-bottom: .4em; }
.steps p { font-size: .95rem; color: var(--ink-soft); margin: 0; }

/* ---------- service area ---------- */
.area {
  position: relative;
  z-index: 1;
  padding: clamp(3.5rem, 8vw, 6rem) 0;
}
.area-grid {
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}
.area-list {
  list-style: none;
  margin: 1.5rem 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: .55rem 1.5rem;
}
.area-list li {
  position: relative;
  padding-left: 1.1rem;
  font-size: .95rem;
  color: var(--ink-soft);
}
.area-list li::before {
  content: "";
  position: absolute;
  left: 0; top: .72em;
  width: 6px; height: 6px;
  background: var(--secondary);
  border-radius: 50%;
}
.area-note { font-size: .92rem; color: var(--ink-soft); font-style: italic; }

.area-photo { margin: 0; }
.area-photo img {
  aspect-ratio: 4 / 5;
  object-fit: cover;
  width: 100%;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.area-photo figcaption {
  font-size: .82rem;
  color: var(--ink-soft);
  margin-top: .8rem;
  font-style: italic;
}

/* ---------- reviews ---------- */
.reviews {
  position: relative;
  z-index: 1;
  padding: clamp(3.5rem, 8vw, 6rem) 0;
  background: var(--ink);
  color: var(--bg);
}
.reviews h2 { color: var(--bg); }
.rev-score {
  font-size: .95rem;
  color: color-mix(in srgb, var(--bg) 70%, transparent);
  margin-bottom: 2.5rem;
}
.rev-score strong {
  font-family: var(--serif);
  font-size: 1.6rem;
  color: var(--accent);
  margin-right: .35rem;
}
.rev-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
}
.rev-grid blockquote {
  margin: 0;
  padding: 1.6rem 1.5rem;
  border: 1px solid color-mix(in srgb, var(--bg) 18%, transparent);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--bg) 5%, transparent);
}
.rev-grid blockquote p {
  font-family: var(--serif);
  font-size: 1.05rem;
  line-height: 1.55;
  color: var(--bg);
  max-width: none;
}
.rev-grid cite {
  font-style: normal;
  font-size: .82rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--bg) 62%, transparent);
}

/* ---------- visit ---------- */
.visit {
  position: relative;
  z-index: 1;
  padding: clamp(3.5rem, 8vw, 6rem) 0 clamp(4rem, 8vw, 6.5rem);
}
.visit-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: clamp(2rem, 4vw, 3rem);
}
.visit-block h2 { font-size: 1.5rem; }

.hours {
  width: 100%;
  border-collapse: collapse;
  font-size: .95rem;
}
.hours th, .hours td {
  text-align: left;
  padding: .5rem 0;
  border-bottom: 1px solid var(--line);
  font-weight: 400;
}
.hours th { color: var(--ink-soft); }
.hours td { text-align: right; font-variant-numeric: tabular-nums; }

.addr {
  font-style: normal;
  font-family: var(--serif);
  font-size: 1.15rem;
  line-height: 1.6;
  margin-bottom: 1.2rem;
}

.visit-note { font-size: .92rem; color: var(--ink-soft); }

.visit-block--call {
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.8rem 1.6rem;
}
.big-phone {
  display: inline-block;
  font-family: var(--serif);
  font-size: clamp(1.6rem, 4vw, 2.1rem);
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
  margin-bottom: 1rem;
  line-height: 1.2;
}
.big-phone:hover { color: var(--accent-deep); }

/* ---------- footer ---------- */
.site-foot {
  position: relative;
  z-index: 1;
  background: var(--bg-soft);
  border-top: 1px solid var(--line);
  padding: 2.5rem 0 3.5rem;
}
.foot-inner { display: flex; flex-direction: column; gap: .5rem; align-items: flex-start; }
.foot-brand {
  font-family: var(--serif);
  font-size: 1.05rem;
  margin: 0;
}
.foot-line { font-size: .9rem; color: var(--ink-soft); margin: 0; }

.claim-banner {
  display: inline-block;
  margin-top: .9rem;
  padding: .45rem .8rem;
  font-size: .8rem;
  color: var(--ink-soft);
  background: color-mix(in srgb, var(--ink) 6%, transparent);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  text-decoration: none;
}
.claim-banner:hover { color: var(--accent); border-color: var(--accent); }

.attribution {
  margin: .9rem 0 0;
  font-size: .72rem;
  opacity: .55;
}
.attribution a { color: inherit; }

/* ---------- scroll-driven reveal ---------- */
@keyframes riseIn {
  from { opacity: 0; translate: 0 22px; }
  to { opacity: 1; translate: 0 0; }
}

@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .intro h2, .intro-cols p,
    .services-head h2, .services-head p,
    .how h2, .steps li,
    .area-copy h2, .area-copy p, .area-list li,
    .reviews h2, .rev-grid blockquote,
    .visit-block h2, .visit-block p, .visit-block table, .visit-block address,
    .site-foot .foot-inner > * {
      animation: riseIn linear both;
      animation-timeline: view();
      animation-range: entry 0% cover 38%;
    }
    .intro-cols p:nth-child(2),
    .steps li:nth-child(2),
    .rev-grid blockquote:nth-child(2) { animation-range: entry 0% cover 46%; }
    .intro-cols p:nth-child(3),
    .steps li:nth-child(3),
    .rev-grid blockquote:nth-child(3) { animation-range: entry 0% cover 54%; }
  }
}

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .site-nav { display: none; }
  .hero {
    grid-template-columns: 1fr;
    min-height: 0;
  }
  .hero-half--paper {
    clip-path: polygon(0 0, 100% 0, 100% 88%, 0 100%);
    padding-bottom: 4.5rem;
  }
  .hero-half--ink {
    margin-inline-start: 0;
    clip-path: polygon(0 12%, 100% 0, 100% 100%, 0 100%);
    padding: 3.5rem clamp(1.15rem, 4vw, 2.5rem) 3rem;
    margin-top: -2.5rem;
  }
  .area-grid { grid-template-columns: 1fr; }
  .area-photo img { aspect-ratio: 4 / 3; }
}

@media (max-width: 560px) {
  .brand-text em { display: none; }
  .call-label { display: none; }
  .call-btn { padding: .5rem .8rem; }
  .hero-facts { gap: 1.2rem 1.6rem; }
  .card { width: 82vw; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .blob { animation: none; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
