/* ============================================================
   USA Mobile Mechanic Truck — warm earth editorial
   ============================================================ */

:root {
  --bg: #f5efe4;
  --bg-2: #efe6d6;
  --paper: #fbf6ec;
  --ink: #2b1e14;
  --ink-soft: #574636;
  --ink-faint: #8a7864;
  --accent: #c25a37;
  --accent-deep: #9d4325;
  --secondary: #6a7a4a;
  --line: rgba(43, 30, 20, 0.16);
  --line-soft: rgba(43, 30, 20, 0.09);
  --shadow: 0 18px 40px -28px rgba(43, 30, 20, 0.5);
  --radius: 4px;
  --wrap: 1180px;
  --gutter: clamp(1.15rem, 4vw, 3.25rem);
  --serif: 'Fraunces', 'Cormorant Garamond', Georgia, serif;
  --sans: 'DM Sans', 'Inter', system-ui, -apple-system, sans-serif;
}

html[data-theme="dark"] {
  --bg: #17110c;
  --bg-2: #1e1710;
  --paper: #221a12;
  --ink: #f2e8da;
  --ink-soft: #c8b8a4;
  --ink-faint: #9a8874;
  --accent: #e07a52;
  --accent-deep: #f0936c;
  --secondary: #9aab74;
  --line: rgba(242, 232, 218, 0.18);
  --line-soft: rgba(242, 232, 218, 0.1);
  --shadow: 0 18px 40px -26px rgba(0, 0, 0, 0.8);
}

@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) {
    --bg: #17110c;
    --bg-2: #1e1710;
    --paper: #221a12;
    --ink: #f2e8da;
    --ink-soft: #c8b8a4;
    --ink-faint: #9a8874;
    --accent: #e07a52;
    --accent-deep: #f0936c;
    --secondary: #9aab74;
    --line: rgba(242, 232, 218, 0.18);
    --line-soft: rgba(242, 232, 218, 0.1);
    --shadow: 0 18px 40px -26px rgba(0, 0, 0, 0.8);
  }
}

/* ---------- 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: var(--sans);
  font-size: 1.05rem;
  line-height: 1.7;
  font-weight: 400;
  overflow-x: hidden;
  text-wrap: pretty;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent-deep); text-underline-offset: 3px; }
a:hover { color: var(--accent); }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.12; margin: 0 0 .6em; letter-spacing: -0.015em; }
h1 { font-size: clamp(2.35rem, 6.2vw, 4.1rem); font-variation-settings: "SOFT" 0, "WONK" 1; }
h2 { font-size: clamp(1.7rem, 3.6vw, 2.6rem); }
h3 { font-size: clamp(1.12rem, 1.9vw, 1.35rem); }
p { margin: 0 0 1.05em; max-width: 68ch; }
ul, ol { margin: 0 0 1em; padding-left: 1.15em; }
li { margin-bottom: .35em; }
address { font-style: normal; }
table { border-collapse: collapse; width: 100%; }
:focus-visible { outline: 3px solid var(--accent); 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;
}
.skip {
  position: absolute; left: -9999px; top: 0; z-index: 200;
  background: var(--ink); color: var(--bg); padding: .7rem 1.1rem;
}
.skip:focus { left: .5rem; top: .5rem; }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }

/* ---------- animated noise field ---------- */
.noise-defs { position: absolute; width: 0; height: 0; overflow: hidden; }
.grain {
  position: fixed; inset: -60%;
  pointer-events: none; z-index: 0;
  opacity: .5;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='320' height='320'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.78' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='320' height='320' filter='url(%23n)' opacity='0.42'/%3E%3C/svg%3E");
  animation: grainDrift 14s steps(6) infinite;
  mix-blend-mode: multiply;
}
html[data-theme="dark"] .grain { mix-blend-mode: screen; opacity: .28; }
@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) .grain { mix-blend-mode: screen; opacity: .28; }
}
@keyframes grainDrift {
  0%   { transform: translate3d(0, 0, 0); }
  20%  { transform: translate3d(-6%, 4%, 0); }
  40%  { transform: translate3d(4%, -5%, 0); }
  60%  { transform: translate3d(-3%, 6%, 0); }
  80%  { transform: translate3d(5%, 2%, 0); }
  100% { transform: translate3d(0, 0, 0); }
}
main, .site-head, .site-foot { position: relative; z-index: 1; }

/* ---------- header ---------- */
.site-head {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line-soft);
}
.head-inner {
  display: flex; align-items: center; gap: 1rem;
  min-height: 74px; flex-wrap: wrap;
  padding-block: .55rem;
}
.brand { display: flex; align-items: center; gap: .7rem; text-decoration: none; color: inherit; }
.brand-mark {
  display: grid; place-items: center;
  width: 42px; height: 42px; flex: none;
  background: var(--ink); color: var(--bg);
  font-family: var(--serif); font-weight: 700; font-size: .95rem;
  letter-spacing: .02em; border-radius: 2px;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-text strong { font-family: var(--serif); font-size: 1.02rem; font-weight: 600; }
.brand-text em { font-style: normal; font-size: .74rem; color: var(--ink-faint); letter-spacing: .04em; text-transform: uppercase; }
.site-nav { display: flex; gap: 1.35rem; margin-left: auto; }
.site-nav a {
  color: var(--ink-soft); text-decoration: none; font-size: .93rem;
  padding: .55rem 0; border-bottom: 2px 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; flex: none;
  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); }
.tt-icon {
  width: 15px; height: 15px; border-radius: 50%;
  background: var(--ink);
  box-shadow: inset -5px -3px 0 0 var(--bg);
  transition: box-shadow .25s ease, background .25s ease;
}
html[data-theme="dark"] .tt-icon { box-shadow: inset 0 0 0 0 var(--bg); background: var(--bg); }

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

/* ---------- shared bits ---------- */
.eyebrow {
  font-size: .74rem; letter-spacing: .16em; text-transform: uppercase;
  color: var(--accent-deep); font-weight: 500; margin-bottom: .9rem;
}
.eyebrow--light { color: var(--accent); }
.section-head { max-width: 62ch; margin-bottom: clamp(2rem, 4vw, 3.2rem); }
.section-lede { color: var(--ink-soft); font-size: 1.06rem; }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: .8rem 1.5rem;
  font-family: var(--sans); font-size: .97rem; font-weight: 500;
  text-decoration: none; border-radius: 2px; border: 1px solid transparent;
  transition: background .2s ease, color .2s ease, border-color .2s ease;
}
.btn--solid { background: var(--accent); color: #fff; }
.btn--solid:hover { background: var(--accent-deep); color: #fff; }
.btn--ghost { border-color: var(--line); color: var(--ink); }
.btn--ghost:hover { border-color: var(--accent); color: var(--accent-deep); }
.btn--lg { font-size: 1.15rem; padding: 1rem 2.1rem; min-height: 58px; font-family: var(--serif); }
.text-link { font-size: .95rem; font-weight: 500; }

/* ---------- hero: diagonal split ---------- */
.hero { position: relative; display: grid; grid-template-columns: 1fr 1fr; }
.hero-half { position: relative; }
.hero-half--paper {
  background: var(--bg);
  clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
  padding-block: clamp(3rem, 7vw, 6rem);
}
.hero-half--photo {
  background: var(--ink);
  clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: clamp(1.5rem, 3vw, 2.5rem);
  margin-left: -6vw;
}
.hero-half--photo img {
  width: 100%; height: 100%; min-height: 340px;
  object-fit: cover; border-radius: 2px;
  filter: saturate(.92) contrast(1.03);
}
.hero-copy { max-width: 40rem; margin-left: auto; padding-right: clamp(1rem, 5vw, 4rem); }
.hero-copy h1 { margin-bottom: .5em; }
.hero-copy .accent { color: var(--accent); font-style: italic; }
.lede { font-size: 1.1rem; color: var(--ink-soft); max-width: 46ch; }
.hero-cta { display: flex; flex-wrap: wrap; gap: .75rem; margin: 1.6rem 0 2rem; }
.hero-facts {
  list-style: none; padding: 0; margin: 0;
  display: flex; flex-wrap: wrap; gap: 1.4rem;
  border-top: 1px solid var(--line-soft); padding-top: 1.2rem;
}
.hero-facts li { font-size: .9rem; color: var(--ink-soft); margin: 0; }
.hero-facts strong { display: block; font-family: var(--serif); font-size: 1.35rem; color: var(--ink); }
.hero-caption {
  color: color-mix(in srgb, var(--bg) 82%, transparent);
  font-size: .88rem; margin: .9rem 0 0; max-width: 40ch;
}

/* ---------- drag band ---------- */
.band-section { padding-block: clamp(3rem, 6vw, 5rem) clamp(2.5rem, 5vw, 4rem); background: var(--bg-2); }
.band-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.6rem; }
.band-head h2 { margin: 0; }
.band-hint { font-size: .85rem; color: var(--ink-faint); margin: 0; }
.band {
  overflow-x: auto; overflow-y: hidden;
  cursor: grab;
  scrollbar-width: thin;
  padding-block: .5rem 1.5rem;
  -webkit-overflow-scrolling: touch;
}
.band.is-dragging { cursor: grabbing; scroll-behavior: auto; }
.band.is-dragging * { user-select: none; }
.band-track {
  display: flex; gap: 1.1rem;
  padding-inline: var(--gutter);
  width: max-content;
}
.card {
  width: min(78vw, 340px); flex: none;
  background: var(--paper); border: 1px solid var(--line-soft);
  border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow);
  display: flex; flex-direction: column;
}
.card img { aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }
.card h3 { margin: 1.1rem 1.15rem .5rem; }
.card p { margin: 0 1.15rem .8rem; font-size: .94rem; color: var(--ink-soft); }
.card-meta {
  margin-top: auto !important; padding-top: .9rem;
  border-top: 1px solid var(--line-soft);
  font-size: .8rem !important; letter-spacing: .05em; text-transform: uppercase;
  color: var(--accent-deep) !important;
}

/* ---------- services ---------- */
.services { padding-block: clamp(3.5rem, 7vw, 6rem); }
.service-grid {
  display: grid; gap: 1px;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  background: var(--line-soft);
  border: 1px solid var(--line-soft);
}
.service { background: var(--bg); padding: clamp(1.4rem, 2.6vw, 2.1rem); }
.service h3 { color: var(--ink); }
.service p { font-size: .96rem; color: var(--ink-soft); }
.service ul { list-style: none; padding: 0; margin: 1rem 0 0; }
.service li {
  font-size: .89rem; color: var(--ink-soft);
  padding-left: 1.1rem; position: relative;
}
.service li::before {
  content: ""; position: absolute; left: 0; top: .62em;
  width: 6px; height: 6px; background: var(--secondary); border-radius: 50%;
}

/* ---------- how: diagonal split ---------- */
.how { display: grid; grid-template-columns: 1fr 1fr; align-items: stretch; }
.how-half { padding-block: clamp(3rem, 6vw, 5rem); }
.how-half--ink {
  background: var(--ink); color: var(--bg);
  clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
}
.how-half--ink h2 { color: var(--bg); }
.how-lede { color: color-mix(in srgb, var(--bg) 78%, transparent); }
.how-half--paper {
  background: var(--bg-2);
  clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
  margin-left: -6vw; padding-left: calc(6vw + var(--gutter));
}
.steps { list-style: none; padding: 0; margin: 0; counter-reset: step; }
.steps li {
  display: grid; grid-template-columns: auto 1fr; gap: 1.1rem;
  padding-bottom: 1.6rem; margin-bottom: 1.6rem;
  border-bottom: 1px solid var(--line-soft);
}
.steps li:last-child { border-bottom: 0; margin-bottom: 0; padding-bottom: 0; }
.step-num {
  font-family: var(--serif); font-size: 1.5rem; font-weight: 700;
  color: var(--accent); line-height: 1;
}
.steps h3 { margin-bottom: .35em; }
.steps p { font-size: .96rem; color: var(--ink-soft); margin: 0; }

/* ---------- coverage ---------- */
.coverage { padding-block: clamp(3.5rem, 7vw, 6rem); }
.coverage-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: clamp(1.8rem, 4vw, 3.5rem); align-items: start; }
.coverage-copy p { color: var(--ink-soft); }
.coverage-tags { display: flex; flex-wrap: wrap; gap: .5rem; margin: 1.4rem 0; }
.coverage-tags span {
  font-size: .82rem; letter-spacing: .04em;
  border: 1px solid var(--line); border-radius: 999px;
  padding: .3rem .8rem; color: var(--ink-soft);
}
.coverage-note { font-size: .92rem; color: var(--ink-faint); }
.coverage-figure { margin: 0; }
.coverage-figure img { border-radius: var(--radius); aspect-ratio: 4 / 3; object-fit: cover; }
.coverage-figure figcaption {
  font-size: .85rem; color: var(--ink-faint);
  margin-top: .8rem; border-left: 2px solid var(--accent); padding-left: .8rem;
}

/* ---------- visit ---------- */
.visit { padding-block: clamp(3.5rem, 7vw, 6rem); background: var(--bg-2); }
.visit-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: 1.2rem; }
.visit-card {
  background: var(--paper); border: 1px solid var(--line-soft);
  border-radius: var(--radius); padding: clamp(1.4rem, 2.6vw, 2rem);
  box-shadow: var(--shadow);
}
.visit-card--phone { border-top: 3px solid var(--accent); }
.big-phone {
  display: block; font-family: var(--serif); font-weight: 700;
  font-size: clamp(1.6rem, 3.4vw, 2.15rem);
  text-decoration: none; color: var(--ink); margin: .2rem 0 .9rem;
  letter-spacing: -0.01em;
}
.big-phone:hover { color: var(--accent); }
.visit-card p { font-size: .94rem; color: var(--ink-soft); }
.visit-note { font-size: .87rem !important; color: var(--ink-faint) !important; }
.hours th, .hours td { text-align: left; padding: .42rem 0; font-size: .93rem; border-bottom: 1px solid var(--line-soft); }
.hours th { font-weight: 400; color: var(--ink-soft); }
.hours td { text-align: right; color: var(--secondary); font-weight: 500; }
.pay-note {
  margin-top: 1.6rem; padding: clamp(1.4rem, 2.6vw, 2rem);
  border: 1px dashed var(--line); border-radius: var(--radius);
}
.pay-note h3 { margin-bottom: .4em; }
.pay-note p { margin: 0; color: var(--ink-soft); font-size: .96rem; }

/* ---------- reviews ---------- */
.reviews { padding-block: clamp(3.5rem, 7vw, 6rem); }
.review-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.2rem; }
.review {
  margin: 0; padding: clamp(1.3rem, 2.4vw, 1.9rem);
  background: var(--paper); border: 1px solid var(--line-soft);
  border-radius: var(--radius); border-left: 3px solid var(--secondary);
}
.review p { font-family: var(--serif); font-size: 1.02rem; line-height: 1.55; color: var(--ink); }
.review footer { font-size: .82rem; letter-spacing: .05em; text-transform: uppercase; color: var(--ink-faint); }

/* ---------- closing ---------- */
.closing { background: var(--ink); color: var(--bg); padding-block: clamp(3.5rem, 7vw, 6rem); }
.closing-inner { text-align: center; }
.closing h2 { color: var(--bg); max-width: 22ch; margin-inline: auto; }
.closing p { color: color-mix(in srgb, var(--bg) 76%, transparent); margin-inline: auto; }
.closing .btn--solid { margin-top: .6rem; }
.closing-small { font-size: .84rem; margin-top: 1.4rem; color: color-mix(in srgb, var(--bg) 60%, transparent) !important; }

/* ---------- footer ---------- */
.site-foot { background: var(--bg-2); border-top: 1px solid var(--line-soft); padding-block: clamp(2.2rem, 4vw, 3.2rem) 1.6rem; }
.foot-inner { display: flex; flex-wrap: wrap; gap: 1.5rem; justify-content: space-between; align-items: flex-start; }
.foot-brand strong { font-family: var(--serif); font-size: 1.1rem; }
.foot-brand p { font-size: .92rem; color: var(--ink-soft); margin: .35rem 0 0; }
.foot-small { font-size: .84rem !important; color: var(--ink-faint) !important; max-width: 46ch; }
.foot-nav { display: flex; flex-wrap: wrap; gap: 1.1rem; }
.foot-nav a { font-size: .9rem; color: var(--ink-soft); text-decoration: none; }
.foot-nav a:hover { color: var(--accent-deep); text-decoration: underline; }
.foot-claim { margin-top: 1.8rem; }
.claim-banner {
  display: inline-block; font-size: .82rem;
  background: color-mix(in srgb, var(--ink) 6%, transparent);
  border: 1px solid var(--line-soft); border-radius: 2px;
  padding: .45rem .8rem; color: var(--ink-soft); text-decoration: none;
}
.claim-banner:hover { color: var(--accent-deep); border-color: var(--line); }
.foot-attr { margin-top: 1.2rem; border-top: 1px solid var(--line-soft); padding-top: 1rem; }
.attribution { margin: 0; font-size: .8rem; }
.attribution a { color: var(--ink-faint); text-decoration: none; }
.attribution a:hover { color: var(--accent-deep); text-decoration: underline; }
.muted { color: var(--ink-faint); }

/* ---------- motion: staggered line 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) {
    .section-head > *,
    .service,
    .card,
    .steps li,
    .coverage-copy > *,
    .visit-card,
    .review,
    .pay-note,
    .closing-inner > * {
      animation: riseIn linear both;
      animation-timeline: view();
      animation-range: entry 0% cover 38%;
    }
    .service-grid > .service:nth-child(2),
    .review-grid > .review:nth-child(2),
    .visit-grid > .visit-card:nth-child(2) { animation-range: entry 0% cover 46%; }
    .service-grid > .service:nth-child(3),
    .review-grid > .review:nth-child(3),
    .visit-grid > .visit-card:nth-child(3) { animation-range: entry 0% cover 54%; }
    .service-grid > .service:nth-child(5),
    .review-grid > .review:nth-child(4) { animation-range: entry 0% cover 46%; }
    .service-grid > .service:nth-child(6) { animation-range: entry 0% cover 54%; }
  }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .grain { animation: none; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}

/* ---------- responsive ---------- */
@media (max-width: 940px) {
  .hero, .how { grid-template-columns: 1fr; }
  .hero-half--photo, .how-half--paper { margin-left: 0; clip-path: none; padding-left: 0; }
  .hero-half--photo { padding: 0; }
  .hero-half--photo img { min-height: 300px; border-radius: 0; }
  .hero-caption { padding: 0 var(--gutter) 1.6rem; }
  .hero-copy { margin-left: 0; padding-right: 0; }
  .coverage-grid { grid-template-columns: 1fr; }
  .site-nav { order: 3; width: 100%; margin-left: 0; gap: 1.1rem; overflow-x: auto; }
  .head-actions { margin-left: auto; }
}
@media (max-width: 560px) {
  body { font-size: 1rem; }
  .brand-text em { display: none; }
  .call-label { display: none; }
  .call-num { font-size: .95rem; }
  .hero-facts { gap: 1rem; }
  .hero-facts strong { font-size: 1.15rem; }
  .card { width: 82vw; }
  .steps li { grid-template-columns: 1fr; gap: .4rem; }
}
