/* ============================================================
   Mobile Oil Change & Car Repair — Brampton
   Palette: bleached cream + oxblood + navy
   Type: JetBrains Mono body / Fraunces display
   ============================================================ */

:root {
  --bg:        #f4ecdc;
  --bg-alt:    #ece1cc;
  --surface:   #faf5ea;
  --ink:       #1a1b2e;
  --ink-soft:  #4a4a5e;
  --ink-faint: #7b7a8a;
  --accent:    #6b1f1a;
  --secondary: #1e2a4a;
  --rule:      #d3c4a8;
  --rule-soft: #e2d6bd;

  --shadow: 0 1px 2px rgba(26,27,46,.06), 0 8px 28px -18px rgba(26,27,46,.35);

  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --serif: 'Fraunces', 'Playfair Display', Georgia, serif;

  --measure: 55ch;
  --gutter: clamp(1.15rem, 4vw, 3rem);
  --maxw: 1180px;

  --scroll: 0;
}

html[data-theme="dark"] {
  --bg:        #14141c;
  --bg-alt:    #1b1b26;
  --surface:   #1f1f2b;
  --ink:       #ece4d4;
  --ink-soft:  #b9b3a6;
  --ink-faint: #8b8679;
  --accent:    #d98a7f;
  --secondary: #9fb0d8;
  --rule:      #33333f;
  --rule-soft: #2a2a35;
  --shadow: 0 1px 2px rgba(0,0,0,.4), 0 8px 28px -18px rgba(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(--mono);
  font-size: clamp(0.875rem, 0.82rem + 0.22vw, 0.98rem);
  line-height: 1.72;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

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

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

:focus-visible {
  outline: 2px 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;
}

.skip {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--ink); color: var(--bg);
  padding: .6rem 1rem; font-size: .8rem;
}
.skip:focus { left: .5rem; top: .5rem; }

.muted { color: var(--ink-faint); }

/* ---------- Typography ---------- */

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 600;
  font-variation-settings: "SOFT" 0, "WONK" 0, "opsz" 60;
  line-height: 1.06;
  letter-spacing: -0.015em;
  margin: 0;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.35rem, 1.4rem + 4.6vw, 4.6rem);
  font-weight: 500;
  font-variation-settings: "SOFT" 0, "WONK" 1, "opsz" 144;
}

h2 {
  font-size: clamp(1.75rem, 1.2rem + 2.4vw, 2.9rem);
  font-weight: 500;
}

h3 {
  font-size: clamp(1.05rem, 0.98rem + 0.5vw, 1.3rem);
  font-weight: 600;
  letter-spacing: -0.01em;
}

p { margin: 0 0 1rem; }
p:last-child { margin-bottom: 0; }

.eyebrow {
  font-family: var(--mono);
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 .9rem;
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--rule-soft);
}

.header-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: .7rem var(--gutter);
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.brand {
  display: flex; align-items: center; gap: .65rem;
  text-decoration: none; color: var(--ink);
  margin-right: auto;
}
.brand-mark {
  display: grid; place-items: center;
  width: 38px; height: 38px;
  background: var(--accent); color: var(--bg);
  font-family: var(--serif); font-weight: 700; font-size: 1.25rem;
  border-radius: 2px;
  flex: none;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text strong {
  font-family: var(--serif); font-weight: 600; font-size: 1.02rem;
  letter-spacing: -0.01em;
}
.brand-text em {
  font-style: normal; font-size: .66rem; letter-spacing: .1em;
  text-transform: uppercase; color: var(--ink-faint);
}

.site-nav { display: flex; gap: 1.4rem; }
.site-nav a {
  color: var(--ink-soft); text-decoration: none;
  font-size: .78rem; letter-spacing: .04em;
  padding: .35rem 0;
  border-bottom: 1px solid transparent;
}
.site-nav a:hover { color: var(--accent); border-bottom-color: var(--accent); }

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

.call-btn {
  display: flex; flex-direction: column; align-items: flex-start;
  background: var(--accent); color: var(--bg);
  text-decoration: none;
  padding: .5rem .95rem;
  border-radius: 2px;
  line-height: 1.15;
  min-height: 44px;
  justify-content: center;
  transition: background .18s ease;
}
.call-btn:hover { background: var(--secondary); color: var(--bg); }
.call-label { font-size: .6rem; letter-spacing: .14em; text-transform: uppercase; opacity: .82; }
.call-number { font-size: .88rem; font-weight: 600; letter-spacing: .01em; }

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

/* ---------- Layout primitives ---------- */

.section {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(3.5rem, 7vw, 6.5rem) var(--gutter);
}

.section-alt {
  max-width: none;
  background: var(--bg-alt);
  border-block: 1px solid var(--rule-soft);
}
.section-alt > * {
  max-width: var(--maxw);
  margin-inline: auto;
}

.section-head { max-width: var(--measure); margin-bottom: clamp(2rem, 4vw, 3.25rem); }
.section-intro { color: var(--ink-soft); margin-top: 1rem; }

/* ---------- Hero ---------- */

.hero {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(2.5rem, 6vw, 5rem) var(--gutter) clamp(2rem, 4vw, 3.5rem);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(2rem, 4vw, 3.5rem);
  align-items: start;
}

.hero-copy { max-width: 46ch; }
.hero-copy h1 { margin-bottom: 1.4rem; }

.lede {
  font-size: clamp(.95rem, .9rem + .25vw, 1.06rem);
  color: var(--ink-soft);
  max-width: 48ch;
}

.hero-cta {
  display: flex; flex-wrap: wrap; align-items: center;
  gap: 1.1rem 1.5rem;
  margin: 2rem 0 2.5rem;
}

.btn {
  display: inline-flex; flex-direction: column;
  align-items: flex-start; justify-content: center;
  text-decoration: none;
  padding: .8rem 1.5rem;
  border-radius: 2px;
  min-height: 52px;
  line-height: 1.15;
  transition: background .18s ease, transform .18s ease;
}
.btn-primary { background: var(--accent); color: var(--bg); }
.btn-primary:hover { background: var(--secondary); color: var(--bg); }
.btn-kicker { font-size: .6rem; letter-spacing: .16em; text-transform: uppercase; opacity: .8; }
.btn-main { font-size: 1.12rem; font-weight: 600; letter-spacing: .01em; }
.btn-large { padding: 1rem 2rem; }
.btn-large .btn-main { font-size: 1.35rem; }

.cta-note { font-size: .78rem; color: var(--ink-soft); line-height: 1.6; margin: 0; }

.hero-facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1.25rem;
  margin: 0;
  padding-top: 1.75rem;
  border-top: 1px solid var(--rule);
}
.hero-facts dt {
  font-size: .62rem; letter-spacing: .15em; text-transform: uppercase;
  color: var(--ink-faint); margin-bottom: .3rem;
}
.hero-facts dd { margin: 0; font-size: .84rem; color: var(--ink); }

.hero-figure { margin: 0; }
.hero-figure img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 2px;
  box-shadow: var(--shadow);
  will-change: transform;
}

/* Parallax layer — native scroll-driven where supported */
@supports (animation-timeline: scroll()) {
  @media (prefers-reduced-motion: no-preference) {
    .hero-figure img {
      animation: hero-drift linear both;
      animation-timeline: scroll(root block);
      animation-range: 0 90vh;
    }
    @keyframes hero-drift {
      from { transform: translate3d(0, 0, 0) scale(1.04); }
      to   { transform: translate3d(0, -5.5vh, 0) scale(1.04); }
    }
  }
}
.hero-figure figcaption {
  font-size: .72rem; color: var(--ink-faint);
  margin-top: .75rem; padding-left: .9rem;
  border-left: 2px solid var(--accent);
  line-height: 1.6;
}

/* ---------- Signature: dictated quote ---------- */

.dictation {
  margin-top: clamp(3rem, 6vw, 5rem);
  padding-top: clamp(2rem, 4vw, 3rem);
  border-top: 1px solid var(--rule);
  max-width: 34ch;
}

.dictation-line {
  font-family: var(--serif);
  font-size: clamp(1.35rem, 1rem + 1.9vw, 2.15rem);
  font-weight: 400;
  font-variation-settings: "SOFT" 0, "WONK" 1, "opsz" 90;
  line-height: 1.24;
  letter-spacing: -0.015em;
  color: var(--ink);
  margin: 0;
}

.dictation-words { display: inline; }

.dictation-words .w {
  display: inline-block;
  opacity: 0;
  transform: translateY(0.35em);
  animation: word-in .42s cubic-bezier(.2,.7,.3,1) forwards;
  animation-delay: var(--d, 0s);
}

@keyframes word-in {
  to { opacity: 1; transform: translateY(0); }
}

.caret {
  display: inline-block;
  width: 2px;
  height: 1em;
  margin-left: .12em;
  vertical-align: -0.12em;
  background: var(--accent);
  animation: blink 1.05s steps(1, end) infinite;
  animation-delay: var(--caret-delay, 0s);
}
@keyframes blink { 0%, 49% { opacity: 1; } 50%, 100% { opacity: 0; } }

.dictation-source {
  font-size: .72rem;
  letter-spacing: .06em;
  color: var(--ink-faint);
  margin-top: 1rem;
}

/* ---------- Services ---------- */

.service-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  border-top: 1px solid var(--rule);
}

.service {
  padding: 1.9rem 0;
  border-bottom: 1px solid var(--rule-soft);
  max-width: 68ch;
}

.service-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 1.5rem; flex-wrap: wrap;
  margin-bottom: .7rem;
}

.service-price {
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .04em;
  color: var(--accent);
  white-space: nowrap;
  margin: 0;
}

.service p { color: var(--ink-soft); }

.service-meta {
  font-size: .72rem;
  color: var(--ink-faint);
  letter-spacing: .02em;
  padding-top: .7rem;
  margin-top: .9rem;
  border-top: 1px dashed var(--rule-soft);
}

/* Wide aside pulling into the margin */
.aside {
  max-width: var(--measure);
  margin-top: 2.5rem;
  padding: 1.4rem 1.6rem;
  background: var(--surface);
  border-left: 3px solid var(--secondary);
  border-radius: 2px;
}
.aside-label {
  font-size: .62rem; letter-spacing: .16em; text-transform: uppercase;
  color: var(--secondary); margin-bottom: .5rem;
}
.aside p:last-child { color: var(--ink-soft); font-size: .84rem; }

/* ---------- Steps ---------- */

.steps {
  list-style: none;
  margin: 0; padding: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

.steps li {
  padding-top: 1.2rem;
  border-top: 2px solid var(--ink);
  max-width: 40ch;
}

.step-num {
  display: block;
  font-size: .68rem;
  letter-spacing: .18em;
  color: var(--accent);
  margin-bottom: .6rem;
}
.steps h3 { margin-bottom: .6rem; }
.steps p { color: var(--ink-soft); font-size: .86rem; }

/* ---------- Service area ---------- */

.area-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(2rem, 4vw, 3.5rem);
  align-items: start;
}

.area-figure { margin: 0; }
.area-figure img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  border-radius: 2px;
  box-shadow: var(--shadow);
}
.area-figure figcaption {
  font-size: .72rem; color: var(--ink-faint);
  margin-top: .75rem; line-height: 1.6;
}

.area-copy h3 { margin: 1.75rem 0 .75rem; }
.area-copy h3:first-child { margin-top: 0; }
.area-copy p { color: var(--ink-soft); }

.area-list {
  list-style: none;
  margin: 0 0 1rem;
  padding: 0;
  font-size: .86rem;
}
.area-list li {
  padding: .55rem 0 .55rem 1.5rem;
  border-bottom: 1px solid var(--rule-soft);
  color: var(--ink-soft);
  position: relative;
}
.area-list li::before {
  content: "→";
  position: absolute; left: 0;
  color: var(--accent);
  font-size: .8rem;
}

/* ---------- Why ---------- */

.why-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}
.why {
  padding-top: 1.2rem;
  border-top: 2px solid var(--ink);
  max-width: 42ch;
}
.why h3 { margin-bottom: .6rem; }
.why p { color: var(--ink-soft); font-size: .86rem; }

/* ---------- Contact / hours ---------- */

.contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

.contact-card {
  background: var(--surface);
  border: 1px solid var(--rule-soft);
  border-radius: 2px;
  padding: 1.6rem;
  box-shadow: var(--shadow);
}

.contact-label {
  font-size: .62rem; letter-spacing: .16em; text-transform: uppercase;
  color: var(--ink-faint); margin-bottom: .7rem;
}

.contact-phone { border-left: 3px solid var(--accent); }

.contact-big {
  display: inline-block;
  font-family: var(--serif);
  font-size: clamp(1.5rem, 1.1rem + 1.6vw, 2.1rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--accent);
  text-decoration: none;
  margin-bottom: .6rem;
  min-height: 44px;
}
.contact-big:hover { color: var(--secondary); }

.contact-card address {
  font-style: normal;
  font-size: .88rem;
  line-height: 1.8;
  margin-bottom: .8rem;
}

.text-link { font-size: .8rem; }

.hours-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .82rem;
}
.hours-table th, .hours-table td {
  text-align: left;
  padding: .42rem 0;
  border-bottom: 1px solid var(--rule-soft);
  font-weight: 400;
}
.hours-table th { color: var(--ink-soft); }
.hours-table td { color: var(--accent); font-weight: 600; text-align: right; }
.hours-table tr:last-child th, .hours-table tr:last-child td { border-bottom: 0; }

.reviews {
  margin-top: 2.5rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--rule);
  max-width: var(--measure);
}
.reviews-score {
  display: flex; align-items: baseline; gap: .7rem; flex-wrap: wrap;
  font-size: .9rem;
}
.reviews-score strong {
  font-family: var(--serif); font-size: 1.6rem; font-weight: 600;
  color: var(--ink);
}
.stars { color: var(--accent); letter-spacing: .12em; font-size: .95rem; }
.reviews-note { font-size: .82rem; color: var(--ink-soft); margin-top: .6rem; }

/* ---------- Closing ---------- */

.closing {
  background: var(--secondary);
  color: var(--bg);
  text-align: center;
  padding: clamp(3.5rem, 7vw, 6rem) var(--gutter);
}
html[data-theme="dark"] .closing { background: var(--bg-alt); color: var(--ink); }
.closing h2 {
  color: inherit;
  margin-bottom: 1rem;
  font-size: clamp(1.6rem, 1.1rem + 2.2vw, 2.6rem);
}
.closing p {
  color: inherit; opacity: .82;
  max-width: 44ch; margin: 0 auto 2rem;
  font-size: .9rem;
}
.closing .btn-primary { background: var(--accent); color: #f4ecdc; }
.closing .btn-primary:hover { background: var(--bg); color: var(--secondary); }
html[data-theme="dark"] .closing .btn-primary:hover { background: var(--ink); color: var(--bg); }

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--rule);
  padding: clamp(2.5rem, 5vw, 3.5rem) var(--gutter) 2rem;
  max-width: var(--maxw);
  margin: 0 auto;
}

.footer-inner {
  display: flex; flex-wrap: wrap; gap: 1.5rem 3rem;
  justify-content: space-between;
  align-items: flex-start;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--rule-soft);
}
.footer-name {
  font-family: var(--serif); font-weight: 600; font-size: 1.05rem;
  margin-bottom: .3rem;
}
.footer-inner .muted { font-size: .76rem; }
.footer-contact { display: flex; flex-direction: column; gap: .4rem; font-size: .82rem; }
.footer-contact a { font-weight: 600; text-decoration: none; }
.footer-contact a:hover { text-decoration: underline; }
.footer-contact address { font-style: normal; color: var(--ink-faint); font-size: .78rem; }

.claim-wrap { margin: 1.5rem 0 0; }
.claim-banner {
  display: inline-block;
  font-size: .72rem;
  letter-spacing: .02em;
  color: var(--ink-soft);
  background: var(--bg-alt);
  border: 1px solid var(--rule-soft);
  border-radius: 2px;
  padding: .5rem .85rem;
  text-decoration: none;
  min-height: 36px;
}
.claim-banner:hover { color: var(--accent); border-color: var(--accent); }

.attribution {
  margin: 1.25rem 0 0;
  font-size: .7rem;
  opacity: .5;
}
.attribution a { color: inherit; }

/* ============================================================
   Responsive
   ============================================================ */

@media (min-width: 760px) {
  .hero-grid { grid-template-columns: 1.05fr 0.95fr; }
  .service-list { grid-template-columns: 1fr; }
  .steps { grid-template-columns: repeat(2, 1fr); gap: 2.5rem 2.5rem; }
  .why-grid { grid-template-columns: repeat(2, 1fr); gap: 2.5rem; }
  .contact-grid { grid-template-columns: repeat(2, 1fr); }
  .contact-phone { grid-column: 1 / -1; }
}

@media (min-width: 1000px) {
  .hero-grid { grid-template-columns: 1.1fr 0.9fr; gap: 4rem; }
  .steps { grid-template-columns: repeat(4, 1fr); }
  .why-grid { grid-template-columns: repeat(4, 1fr); }
  .contact-grid { grid-template-columns: 1.1fr 1fr 1fr; }
  .contact-phone { grid-column: auto; }

  .area-grid { grid-template-columns: 1fr 1fr; }

  /* wide aside pulling into the margin */
  .aside-note {
    max-width: none;
    margin-inline: -8vw;
    margin-top: 3rem;
    padding: 1.75rem 2.25rem;
  }
}

@media (max-width: 759px) {
  .site-nav { display: none; }
  .brand-text em { display: none; }
  .header-inner { gap: .5rem; }
  .call-btn { padding: .45rem .7rem; }
  .call-number { font-size: .8rem; }
}

@media (max-width: 420px) {
  .call-label { display: none; }
  .brand-mark { width: 34px; height: 34px; font-size: 1.1rem; }
}

/* ============================================================
   Motion preferences
   ============================================================ */

@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;
  }
  .dictation-words .w { opacity: 1; transform: none; }
  .caret { animation: none; opacity: 1; }
}
