/* ============================================================
   Brampton Mobile Mechanic 24/7
   Composition: cafe warmth · oversized display serif ·
   one-shot load orchestration · museum wall labels ·
   hover-swap H1 · hard background swap per section
   ============================================================ */

:root {
  --bg: #f4ead8;
  --ink: #3a2415;
  --accent: #6b1f1a;
  --secondary: #5a5e3a;
  --paper: #fbf5e9;
  --rule: rgba(58, 36, 21, 0.18);
  --muted: rgba(58, 36, 21, 0.62);

  --serif: "Fraunces", "Iowan Old Style", Georgia, serif;
  --sans: "Archivo", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;

  --pad: clamp(1.25rem, 5vw, 5rem);
  --maxw: 1180px;
}

/* ---------- reset ---------- */
*, *::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: 1rem;
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  transition: background-color 700ms ease;
}
img, video { max-width: 100%; height: auto; display: block; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; margin: 0; }
p { margin: 0 0 1rem; }
a { color: inherit; }
ul, ol, dl, dd { margin: 0; padding: 0; }
li { list-style: none; }

: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;
  background: var(--ink); color: var(--paper);
  padding: 0.6rem 1rem; z-index: 100;
}
.skip:focus { left: 0.5rem; top: 0.5rem; }

/* ---------- shared type ---------- */
.eyebrow {
  font-family: var(--sans);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 1rem;
}
.label {
  font-family: var(--sans);
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 0.5rem;
}
.section-head { max-width: 62ch; margin-bottom: clamp(2rem, 5vw, 3.5rem); }
.section-head h2 {
  font-size: clamp(2.1rem, 5.5vw, 3.6rem);
  line-height: 1.02;
  letter-spacing: -0.015em;
  margin-bottom: 1rem;
}
.section-intro { font-size: 1.02rem; max-width: 58ch; }

/* ============================================================
   TOP BAR
   ============================================================ */
.topbar {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; gap: 1rem;
  flex-wrap: wrap;
  padding: 0.7rem var(--pad);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--rule);
}
.wordmark {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.02rem;
  letter-spacing: -0.01em;
  text-decoration: none;
  margin-right: auto;
}
.wordmark span { color: var(--accent); }
.topnav { display: flex; gap: 1.1rem; flex-wrap: wrap; }
.topnav a {
  font-size: 0.82rem;
  letter-spacing: 0.03em;
  text-decoration: none;
  padding: 0.5rem 0.15rem;
  border-bottom: 1px solid transparent;
}
.topnav a:hover { border-bottom-color: var(--accent); }

.callbtn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  min-height: 44px;
  padding: 0.55rem 1rem;
  background: var(--accent);
  color: var(--paper);
  text-decoration: none;
  font-size: 0.86rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  border-radius: 2px;
}
.callbtn-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: #8fbf6a;
  box-shadow: 0 0 0 3px rgba(143, 191, 106, 0.25);
}

/* ============================================================
   HERO
   ============================================================ */
.hero { padding: clamp(2.5rem, 7vw, 6rem) var(--pad) clamp(3rem, 8vw, 6rem); }
.hero-inner { max-width: var(--maxw); margin: 0 auto; }

.hero-h1 {
  position: relative;
  font-size: clamp(3.2rem, 17vw, 15rem);
  line-height: 0.85;
  letter-spacing: -0.035em;
  font-weight: 600;
  margin: 0 0 -0.28em;
  font-variation-settings: "SOFT" 0, "WONK" 1;
}
.hero-h1 span { display: block; }
.hero-h1 .alt {
  position: absolute; inset: 0;
  opacity: 0;
  color: var(--accent);
  font-style: italic;
  transition: opacity 260ms ease;
  pointer-events: none;
}
.hero-h1 .default { transition: opacity 260ms ease; }
.hero-h1:hover .default,
.hero-h1:focus-within .default { opacity: 0; }
.hero-h1:hover .alt,
.hero-h1:focus-within .alt { opacity: 1; }

.hero-lower {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(1.75rem, 4vw, 3rem);
  align-items: start;
  padding-top: clamp(2rem, 5vw, 3.5rem);
  border-top: 1px solid var(--rule);
}
.hero-copy { max-width: 56ch; }
.lede { font-size: clamp(1rem, 1.6vw, 1.12rem); }
.hero-cta { margin: 1.75rem 0 0; display: flex; flex-direction: column; gap: 0.4rem; }
.phone-big {
  font-family: var(--serif);
  font-size: clamp(1.7rem, 4.5vw, 2.6rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  text-decoration: none;
  color: var(--accent);
  display: inline-block;
  min-height: 44px;
}
.phone-big:hover { text-decoration: underline; text-underline-offset: 6px; }
.cta-note { font-size: 0.82rem; color: var(--muted); }

.hero-figure { margin: 0; }
.hero-figure img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  filter: saturate(0.92) contrast(1.03);
}
.hero-figure .label { margin-top: 0.85rem; }
.hero-figure .label span { text-transform: none; letter-spacing: 0; color: var(--muted); }

/* ============================================================
   TRUST STRIP
   ============================================================ */
.strip {
  background: var(--ink);
  color: var(--bg);
  padding: clamp(1.75rem, 4vw, 2.75rem) var(--pad);
}
.strip-list {
  max-width: var(--maxw); margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem 1rem;
}
.strip-list li { display: flex; flex-direction: column; gap: 0.15rem; }
.strip-list strong {
  font-family: var(--serif);
  font-size: clamp(1.5rem, 3.5vw, 2.2rem);
  line-height: 1;
  color: var(--bg);
}
.strip-list span {
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(244, 234, 216, 0.7);
}

/* ============================================================
   SERVICES — museum wall labels
   ============================================================ */
.services { padding: clamp(3rem, 8vw, 6rem) var(--pad); }
.services .section-head,
.services .wall { max-width: var(--maxw); margin-inline: auto; }

.wall {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(2.5rem, 6vw, 4.5rem);
}
.work {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  padding-bottom: clamp(2rem, 5vw, 3.5rem);
  border-bottom: 1px solid var(--rule);
}
.work:last-child { border-bottom: 0; padding-bottom: 0; }
.work figure { margin: 0; }
.work img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  filter: saturate(0.9) contrast(1.04);
}
.work-body { max-width: 52ch; }
.work h3 {
  font-size: clamp(1.5rem, 3.2vw, 2.1rem);
  line-height: 1.08;
  letter-spacing: -0.015em;
  margin-bottom: 0.7rem;
}
.work-body p { font-size: 0.96rem; }
.price {
  font-family: var(--sans);
  font-size: 0.78rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--accent);
  border-top: 1px solid var(--rule);
  padding-top: 0.7rem;
  margin: 1rem 0 0;
}

/* ============================================================
   HOW IT WORKS
   ============================================================ */
.how {
  background: var(--secondary);
  color: var(--paper);
  padding: clamp(3rem, 8vw, 6rem) var(--pad);
}
.how .section-head,
.how .steps { max-width: var(--maxw); margin-inline: auto; }
.how .eyebrow { color: rgba(251, 245, 233, 0.75); }
.how .section-head h2 { color: var(--paper); }

.steps {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(1.75rem, 4vw, 2.5rem);
  counter-reset: step;
}
.steps li { border-top: 1px solid rgba(251, 245, 233, 0.3); padding-top: 1.1rem; }
.step-num {
  display: block;
  font-family: var(--serif);
  font-size: 1.6rem;
  color: rgba(251, 245, 233, 0.55);
  margin-bottom: 0.4rem;
}
.steps h3 { font-size: 1.35rem; margin-bottom: 0.5rem; color: var(--paper); }
.steps p { font-size: 0.94rem; color: rgba(251, 245, 233, 0.88); margin: 0; }

/* ============================================================
   ABOUT
   ============================================================ */
.about { padding: clamp(3rem, 8vw, 6rem) var(--pad); }
.about-grid {
  max-width: var(--maxw); margin-inline: auto;
  display: grid; grid-template-columns: 1fr; gap: clamp(2rem, 5vw, 3.5rem);
}
.about-copy { max-width: 62ch; }
.about-copy h2 {
  font-size: clamp(2rem, 5vw, 3.2rem);
  line-height: 1.03;
  letter-spacing: -0.02em;
  margin-bottom: 1.25rem;
}
.signoff { font-family: var(--serif); font-style: italic; color: var(--accent); }

.about-facts {
  border-top: 2px solid var(--ink);
  padding-top: 1.25rem;
  align-self: start;
}
.about-facts h3 {
  font-size: 0.78rem;
  font-family: var(--sans);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 1rem;
}
.about-facts dl > div {
  display: flex; justify-content: space-between; gap: 1rem;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--rule);
  font-size: 0.88rem;
}
.about-facts dt { color: var(--muted); }
.about-facts dd { text-align: right; font-weight: 500; }

/* ============================================================
   REVIEWS
   ============================================================ */
.reviews {
  background: var(--accent);
  color: var(--paper);
  padding: clamp(3rem, 8vw, 6rem) var(--pad);
}
.reviews .section-head,
.reviews .quotes { max-width: var(--maxw); margin-inline: auto; }
.reviews .eyebrow { color: rgba(251, 245, 233, 0.75); }
.reviews .section-head h2 { color: var(--paper); }
.quotes {
  display: grid; grid-template-columns: 1fr;
  gap: clamp(1.75rem, 4vw, 2.5rem);
}
.quotes blockquote {
  margin: 0;
  border-top: 1px solid rgba(251, 245, 233, 0.32);
  padding-top: 1.1rem;
}
.quotes p {
  font-family: var(--serif);
  font-size: clamp(1.05rem, 2vw, 1.3rem);
  line-height: 1.42;
  color: var(--paper);
}
.quotes cite {
  font-style: normal;
  font-size: 0.76rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: rgba(251, 245, 233, 0.72);
}

/* ============================================================
   HOURS
   ============================================================ */
.hours { padding: clamp(3rem, 8vw, 6rem) var(--pad); }
.hours-grid {
  max-width: var(--maxw); margin-inline: auto;
  display: grid; grid-template-columns: 1fr; gap: clamp(2rem, 5vw, 3.5rem);
}
.hours h2 {
  font-size: clamp(2rem, 5vw, 3.2rem);
  line-height: 1.03; letter-spacing: -0.02em; margin-bottom: 1rem;
}
.hours-note {
  font-size: 0.88rem;
  color: var(--muted);
  border-left: 3px solid var(--secondary);
  padding-left: 0.9rem;
}
.hours-table { width: 100%; border-collapse: collapse; align-self: start; }
.hours-table th, .hours-table td {
  text-align: left;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--rule);
  font-size: 0.92rem;
  font-weight: 400;
}
.hours-table th { font-family: var(--serif); font-size: 1.02rem; }
.hours-table td {
  text-align: right;
  color: var(--accent);
  font-weight: 500;
  letter-spacing: 0.02em;
}

/* ============================================================
   FIND US
   ============================================================ */
.find {
  background: var(--ink);
  color: var(--bg);
  padding: clamp(3rem, 8vw, 6rem) var(--pad);
}
.find .section-head,
.find .find-grid { max-width: var(--maxw); margin-inline: auto; }
.find .eyebrow { color: rgba(244, 234, 216, 0.7); }
.find .section-head h2 { color: var(--bg); }
.find .section-intro { color: rgba(244, 234, 216, 0.82); }

.find-grid {
  display: grid; grid-template-columns: 1fr;
  gap: clamp(1.75rem, 4vw, 2.5rem);
}
.find-card {
  border-top: 1px solid rgba(244, 234, 216, 0.28);
  padding-top: 1.1rem;
}
.find-card .label { color: rgba(244, 234, 216, 0.6); }
.find-card p { font-size: 0.92rem; color: rgba(244, 234, 216, 0.85); }
.find-card .phone-big { color: var(--bg); }
.find-card address {
  font-style: normal;
  font-family: var(--serif);
  font-size: 1.15rem;
  line-height: 1.5;
  margin-bottom: 0.9rem;
}
.maplink {
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--bg);
  text-decoration: none;
  border-bottom: 1px solid rgba(244, 234, 216, 0.5);
  padding-bottom: 2px;
}
.maplink:hover { border-bottom-color: var(--bg); }
.checklist li {
  font-size: 0.9rem;
  padding: 0.45rem 0 0.45rem 1.2rem;
  position: relative;
  color: rgba(244, 234, 216, 0.88);
}
.checklist li::before {
  content: "—";
  position: absolute; left: 0;
  color: rgba(244, 234, 216, 0.5);
}

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  background: var(--ink);
  color: var(--bg);
  border-top: 1px solid rgba(244, 234, 216, 0.2);
  padding: clamp(2rem, 5vw, 3rem) var(--pad) clamp(3rem, 6vw, 4rem);
}
.footer-inner { max-width: var(--maxw); margin-inline: auto; }
.footer-brand {
  font-family: var(--serif);
  font-size: 1.35rem;
  margin-bottom: 0.35rem;
}
.footer-meta { font-size: 0.86rem; color: rgba(244, 234, 216, 0.75); }
.footer-meta a { color: var(--bg); }

.claim-banner {
  display: inline-block;
  margin: 1.5rem 0 0.75rem;
  padding: 0.45rem 0.8rem;
  font-size: 0.76rem;
  letter-spacing: 0.02em;
  color: rgba(244, 234, 216, 0.82);
  background: rgba(244, 234, 216, 0.09);
  border: 1px solid rgba(244, 234, 216, 0.22);
  border-radius: 2px;
  text-decoration: none;
}
.claim-banner:hover { background: rgba(244, 234, 216, 0.16); color: var(--bg); }

.attribution {
  font-size: 0.72rem;
  color: rgba(244, 234, 216, 0.55);
  margin: 0.5rem 0 0;
}
.attribution a { color: inherit; }

/* ============================================================
   ONE-SHOT LOAD ORCHESTRATION
   ============================================================ */
@keyframes riseIn {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes slideDown {
  from { opacity: 0; transform: translateY(-14px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes typeIn {
  from { opacity: 0; clip-path: inset(0 100% 0 0); }
  to   { opacity: 1; clip-path: inset(0 0 0 0); }
}

.reveal { animation: riseIn 700ms cubic-bezier(0.22, 0.61, 0.36, 1) both; }
.topbar { animation: slideDown 620ms cubic-bezier(0.22, 0.61, 0.36, 1) both; }
.hero-h1 .default { animation: typeIn 900ms steps(14, end) 180ms both; }
.r1 { animation-delay: 60ms; }
.r2 { animation-delay: 180ms; }
.r3 { animation-delay: 300ms; }
.r4 { animation-delay: 420ms; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (min-width: 720px) {
  .strip-list { grid-template-columns: repeat(4, 1fr); }
  .hero-lower { grid-template-columns: 1.05fr 0.95fr; }
  .wall { grid-template-columns: repeat(2, 1fr); gap: clamp(2.5rem, 4vw, 3.5rem); }
  .work { border-bottom: 0; padding-bottom: 0; }
  .steps { grid-template-columns: repeat(3, 1fr); }
  .quotes { grid-template-columns: repeat(3, 1fr); }
  .find-grid { grid-template-columns: repeat(3, 1fr); }
  .hours-grid { grid-template-columns: 1fr 1fr; }
  .about-grid { grid-template-columns: 1.35fr 0.65fr; }
}

@media (min-width: 1024px) {
  .work { grid-template-columns: 1.15fr 0.85fr; align-items: start; }
  .work:nth-child(even) figure { order: 2; }
}

/* ============================================================
   REDUCED MOTION
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  body { transition: none; }
  .reveal, .topbar, .hero-h1 .default {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
    clip-path: none !important;
  }
  .hero-h1 .alt, .hero-h1 .default { transition: none; }
}
