/* ==========================================================================
   LA (Tire Mobile service) — Mississauga mobile mechanic
   Composition: black/white + one colour per section · stacked headline ·
   broken bento · hover footnote annotations · patterned SVG tile background
   ========================================================================== */

/* ---------- tokens ---------- */
:root {
  --bg-section-1: #0a0a0a;
  --bg-section-2: #e10600;
  --bg-section-3: #003c8a;
  --bg-section-4: #f4ff33;

  --ink: #0a0a0a;
  --paper: #f6f5f1;
  --paper-2: #ffffff;
  --line: rgba(10, 10, 10, 0.16);
  --line-strong: rgba(10, 10, 10, 0.4);
  --muted: rgba(10, 10, 10, 0.62);

  --on-dark: #f6f5f1;
  --on-dark-muted: rgba(246, 245, 241, 0.72);
  --on-dark-line: rgba(246, 245, 241, 0.22);

  --accent: #e10600;
  --accent-ink: #ffffff;

  --page-bg: #f6f5f1;
  --page-ink: #0a0a0a;

  --font-display: "Bricolage Grotesque", "Helvetica Neue", Arial, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  --pad: clamp(1.25rem, 5vw, 5rem);
  --maxw: 1240px;
  --radius: 2px;
}

/* dark theme — inverted paper/ink, section colours stay recognisable */
html[data-theme="dark"] {
  --page-bg: #0a0a0a;
  --page-ink: #f6f5f1;
  --paper: #121212;
  --paper-2: #171717;
  --ink: #f6f5f1;
  --line: rgba(246, 245, 241, 0.18);
  --line-strong: rgba(246, 245, 241, 0.42);
  --muted: rgba(246, 245, 241, 0.66);
  --bg-section-2: #ff1a0d;
  --bg-section-3: #0a4fb0;
  --bg-section-4: #e9f52a;
}

@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) {
    --page-bg: #0a0a0a;
    --page-ink: #f6f5f1;
    --paper: #121212;
    --paper-2: #171717;
    --ink: #f6f5f1;
    --line: rgba(246, 245, 241, 0.18);
    --line-strong: rgba(246, 245, 241, 0.42);
    --muted: rgba(246, 245, 241, 0.66);
    --bg-section-2: #ff1a0d;
    --bg-section-3: #0a4fb0;
    --bg-section-4: #e9f52a;
  }
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  min-height: 100vh;
  font-family: var(--font-display);
  font-size: clamp(1rem, 0.96rem + 0.2vw, 1.0625rem);
  line-height: 1.6;
  color: var(--page-ink);
  background-color: var(--page-bg);
  /* patterned SVG tile — fine dot matrix */
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 20 20'><circle cx='1.5' cy='1.5' r='1.1' fill='%230a0a0a' fill-opacity='0.13'/></svg>");
  background-size: 20px 20px;
  overflow-x: hidden;
}

html[data-theme="dark"] body {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 20 20'><circle cx='1.5' cy='1.5' r='1.1' fill='%23f6f5f1' fill-opacity='0.14'/></svg>");
}
@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) body {
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 20 20'><circle cx='1.5' cy='1.5' r='1.1' fill='%23f6f5f1' fill-opacity='0.14'/></svg>");
  }
}

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

h1, h2, h3 { font-family: var(--font-display); line-height: 1.02; margin: 0; letter-spacing: -0.02em; }
h1 { font-weight: 800; }
h2 { font-weight: 800; font-size: clamp(1.85rem, 1.2rem + 3.2vw, 3.4rem); }
h3 { font-weight: 600; font-size: clamp(1.15rem, 1rem + 0.7vw, 1.5rem); letter-spacing: -0.01em; }
p { margin: 0 0 1rem; }
p:last-child { margin-bottom: 0; }

: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: 100;
  background: var(--accent); color: #fff; padding: 0.75rem 1rem; font-weight: 600;
}
.skip:focus { left: 0.5rem; top: 0.5rem; }

/* ---------- shared bits ---------- */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin: 0 0 0.9rem;
  opacity: 0.75;
}

.section-head { max-width: 62ch; margin-bottom: clamp(2rem, 4vw, 3.25rem); }
.section-intro { margin-top: 1.1rem; font-size: 1.05rem; opacity: 0.85; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0.85rem 1.5rem;
  font-family: var(--font-display); font-weight: 600; font-size: 1rem;
  text-decoration: none; border: 2px solid transparent; border-radius: var(--radius);
  transition: transform 180ms ease, background-color 180ms ease, color 180ms ease;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: #b80500; }
.btn-ghost { border-color: currentColor; color: inherit; }
.btn-ghost:hover { background: var(--ink); color: var(--page-bg); }
.btn-xl { font-size: 1.15rem; padding: 1.1rem 2rem; min-height: 60px; }

/* ---------- 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(--page-bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 0.7rem; text-decoration: none; }
.brand-mark {
  display: grid; place-items: center;
  width: 42px; height: 42px; flex: 0 0 42px;
  background: var(--ink); color: var(--page-bg);
  font-weight: 800; font-size: 1.05rem; letter-spacing: -0.03em;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text strong { font-weight: 600; font-size: 0.98rem; }
.brand-text em {
  font-family: var(--font-mono); font-style: normal;
  font-size: 0.68rem; letter-spacing: 0.08em; text-transform: uppercase; opacity: 0.65;
}

.topnav { display: none; gap: 1.4rem; margin-left: auto; }
.topnav a {
  text-decoration: none; font-size: 0.92rem; font-weight: 600;
  padding: 0.5rem 0; border-bottom: 2px solid transparent;
}
.topnav a:hover { border-bottom-color: var(--accent); }

.topbar-actions { display: flex; align-items: center; gap: 0.6rem; margin-left: auto; }
.topnav + .topbar-actions { margin-left: 0; }

.theme-toggle {
  display: inline-flex; align-items: center; gap: 0.4rem;
  min-height: 44px; padding: 0.5rem 0.8rem;
  background: transparent; color: inherit; cursor: pointer;
  border: 1px solid var(--line-strong); border-radius: var(--radius);
  font-family: var(--font-mono); font-size: 0.72rem;
  letter-spacing: 0.08em; text-transform: uppercase;
}
.theme-toggle:hover { background: var(--ink); color: var(--page-bg); }
.theme-icon { font-size: 0.95rem; }
.theme-label { display: none; }

.call-btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  min-height: 44px; padding: 0.5rem 1rem;
  background: var(--accent); color: #fff; text-decoration: none;
  font-weight: 600; font-size: 0.95rem; border-radius: var(--radius);
}
.call-btn:hover { background: #b80500; }
.call-dot {
  width: 8px; height: 8px; border-radius: 50%; background: #fff;
  animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }

@media (min-width: 900px) {
  .topnav { display: flex; }
  .theme-label { display: inline; }
}

/* ---------- motion: fade + rise on scroll enter ---------- */
@keyframes fadeRise {
  from { opacity: 0; translate: 0 12px; }
  to { opacity: 1; translate: 0 0; }
}
section {
  animation: fadeRise 420ms cubic-bezier(.2, .7, .1, 1) both;
  animation-timeline: view();
  animation-range: entry 0% cover 25%;
}
@supports not (animation-timeline: view()) {
  section { animation: none; opacity: 1; }
}

/* ---------- hero ---------- */
.hero {
  display: grid; gap: clamp(2rem, 4vw, 3.5rem);
  padding: clamp(2.5rem, 6vw, 5.5rem) var(--pad) clamp(3rem, 6vw, 5rem);
  max-width: var(--maxw); margin: 0 auto;
  align-items: center;
}
.hero-copy { max-width: 46rem; }

.stacked { font-size: clamp(2.9rem, 1.4rem + 9vw, 7rem); margin-bottom: 1.6rem; }
.stacked span { display: block; }
.stacked span:nth-child(1) { margin-left: 0; }
.stacked span:nth-child(2) { margin-left: 0.9em; color: var(--accent); }
.stacked span:nth-child(3) { margin-left: -0.06em; }

.lede { font-size: clamp(1.05rem, 1rem + 0.5vw, 1.28rem); max-width: 40rem; opacity: 0.9; }

.hero-cta { display: flex; flex-wrap: wrap; gap: 0.75rem; margin: 1.8rem 0 2.2rem; }

.hero-facts {
  list-style: none; margin: 0; padding: 0;
  display: grid; gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  border-top: 1px solid var(--line); padding-top: 1.4rem;
}
.hero-facts li { display: flex; flex-direction: column; gap: 0.15rem; }
.hero-facts strong { font-size: 1.5rem; font-weight: 800; letter-spacing: -0.02em; }
.hero-facts span { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.06em; text-transform: uppercase; opacity: 0.7; }

.hero-media { margin: 0; }
.hero-media img {
  width: 100%; aspect-ratio: 4 / 3; object-fit: cover;
  border: 1px solid var(--line-strong);
}
.hero-media figcaption {
  font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.04em;
  opacity: 0.65; margin-top: 0.6rem;
}

@media (min-width: 960px) {
  .hero { grid-template-columns: 1.15fr 0.85fr; }
  .hero-media { margin-top: 3.5rem; }
}

/* ---------- signature: hover footnote annotations ---------- */
.note {
  border-bottom: 1px dotted var(--line-strong);
  position: relative;
  cursor: help;
}
.note::after {
  content: attr(data-note);
  position: absolute; left: 0; bottom: calc(100% + 0.55rem);
  width: max-content; max-width: min(19rem, 70vw);
  padding: 0.6rem 0.75rem;
  background: var(--ink); color: var(--page-bg);
  font-family: var(--font-mono); font-size: 0.72rem; line-height: 1.45;
  letter-spacing: 0.01em; text-transform: none;
  opacity: 0; translate: 0 4px; pointer-events: none;
  transition: opacity 180ms ease, translate 180ms ease;
  z-index: 20;
}
.note:hover::after,
.note:focus-visible::after { opacity: 1; translate: 0 0; }

/* ---------- services (section 1: near-black) ---------- */
.services {
  background: var(--bg-section-1);
  color: var(--on-dark);
  padding: clamp(3rem, 7vw, 6rem) var(--pad);
}
.services .section-head { max-width: 60ch; }
.services .section-intro { color: var(--on-dark-muted); }

.bento {
  display: grid; gap: 1rem;
  grid-template-columns: 1fr;
  max-width: var(--maxw); margin: 0 auto;
}
.card {
  border: 1px solid var(--on-dark-line);
  padding: clamp(1.3rem, 2.4vw, 2rem);
  background: rgba(246, 245, 241, 0.03);
  display: flex; flex-direction: column; gap: 0.7rem;
}
.card h3 { color: var(--on-dark); }
.card p { color: var(--on-dark-muted); margin: 0; }
.card-num {
  font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.14em;
  color: var(--bg-section-4); opacity: 0.9;
}
.card-meta {
  font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.03em;
  color: var(--on-dark-muted); border-top: 1px solid var(--on-dark-line);
  padding-top: 0.7rem; margin-top: auto !important;
}
.card-accent { background: var(--bg-section-2); border-color: transparent; }
.card-accent h3, .card-accent p { color: #fff; }
.card-accent .card-num { color: #fff; opacity: 0.8; }

@media (min-width: 760px) {
  .bento { grid-template-columns: repeat(6, 1fr); }
  .card { grid-column: span 3; }
  .card-wide { grid-column: 1 / 4; }
  .card-tall { grid-column: 3 / 7; }
  .card-accent { grid-column: 4 / 7; }
  /* intentional misalignment: one card breaks its row, one cell stays empty */
  .card:nth-of-type(2) { grid-column: 4 / 7; }
  .card:nth-of-type(4) { grid-column: 1 / 3; }
  .card:nth-of-type(5) { grid-column: 3 / 7; }
}

/* ---------- how it works (section 2: red) ---------- */
.how {
  background: var(--bg-section-2);
  color: #fff;
  padding: clamp(3rem, 7vw, 6rem) var(--pad);
}
.how .eyebrow { opacity: 0.85; }
.steps {
  list-style: none; margin: 0; padding: 0;
  display: grid; gap: 1.25rem;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  max-width: var(--maxw);
}
.steps li {
  border-top: 2px solid rgba(255, 255, 255, 0.5);
  padding-top: 1.1rem;
}
.steps li:nth-child(2) { margin-top: 1.75rem; }
.steps li:nth-child(3) { margin-top: 0.6rem; }
.step-num {
  display: block; font-family: var(--font-mono); font-size: 0.78rem;
  letter-spacing: 0.16em; margin-bottom: 0.6rem; opacity: 0.85;
}
.steps h3 { color: #fff; margin-bottom: 0.5rem; }
.steps p { color: rgba(255, 255, 255, 0.88); margin: 0; }

/* ---------- service area (section 3: blue) ---------- */
.area {
  background: var(--bg-section-3);
  color: #fff;
  padding: clamp(3rem, 7vw, 6rem) var(--pad);
  display: grid; gap: clamp(2rem, 4vw, 3.5rem);
  align-items: start;
}
.area-copy { max-width: 46rem; }
.area-copy p { color: rgba(255, 255, 255, 0.88); }
.area-list {
  list-style: none; margin: 1.6rem 0 0; padding: 0;
  display: grid; gap: 0.7rem;
  font-family: var(--font-mono); font-size: 0.82rem; line-height: 1.5;
}
.area-list li {
  border-left: 2px solid var(--bg-section-4);
  padding-left: 0.85rem;
  color: rgba(255, 255, 255, 0.92);
}
.area-media { margin: 0; }
.area-media img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.area-media figcaption {
  font-family: var(--font-mono); font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.75); margin-top: 0.6rem;
}
@media (min-width: 960px) {
  .area { grid-template-columns: 1.1fr 0.9fr; max-width: var(--maxw); margin: 0 auto; }
  .area-media { margin-top: 2.5rem; }
}

/* ---------- why us (section 4: acid yellow) ---------- */
.why {
  background: var(--bg-section-4);
  color: #0a0a0a;
  padding: clamp(3rem, 7vw, 6rem) var(--pad);
}
.why .eyebrow { opacity: 0.7; }
.why-grid {
  display: grid; gap: 1.5rem 2rem;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  max-width: var(--maxw);
}
.why-item { border-top: 2px solid rgba(10, 10, 10, 0.35); padding-top: 1rem; }
.why-item:nth-child(2) { margin-top: 1.5rem; }
.why-item:nth-child(4) { margin-top: 0.8rem; }
.why-item p { color: rgba(10, 10, 10, 0.78); margin: 0.5rem 0 0; }

.why-media {
  display: grid; gap: 0.75rem; margin-top: clamp(2rem, 4vw, 3rem);
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  max-width: var(--maxw);
}
.why-media img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; }
.why-media img:nth-child(2) { margin-top: 1.5rem; }
.why-media img:nth-child(4) { margin-top: 1.5rem; }

/* ---------- hours ---------- */
.hours {
  padding: clamp(3rem, 7vw, 6rem) var(--pad);
  display: grid; gap: clamp(2rem, 4vw, 3.5rem);
  max-width: var(--maxw); margin: 0 auto;
  align-items: start;
}
.hours-note { max-width: 42ch; opacity: 0.85; }
.hours-table {
  width: 100%; border-collapse: collapse; margin-top: 1.6rem;
  font-family: var(--font-mono); font-size: 0.85rem;
}
.hours-table th, .hours-table td {
  text-align: left; padding: 0.7rem 0;
  border-bottom: 1px solid var(--line);
}
.hours-table th { font-weight: 400; opacity: 0.72; letter-spacing: 0.04em; }
.hours-table td { text-align: right; font-weight: 600; }
.hours-table tr:last-child th, .hours-table tr:last-child td { border-bottom: none; }

.hours-side { display: grid; gap: 1rem; }
.hours-card {
  border: 1px solid var(--line-strong);
  background: var(--paper-2);
  padding: clamp(1.3rem, 2.4vw, 1.9rem);
}
.hours-card h3 { margin-bottom: 0.7rem; }
.hours-card p { font-size: 0.92rem; opacity: 0.8; margin: 0.7rem 0 0; }
.hours-card address { font-style: normal; line-height: 1.6; }
.big-phone {
  display: inline-block; font-size: clamp(1.4rem, 1.1rem + 1.4vw, 2rem);
  font-weight: 800; letter-spacing: -0.02em; text-decoration: none;
  border-bottom: 3px solid var(--accent); padding-bottom: 0.15rem;
}
.big-phone:hover { color: var(--accent); }

@media (min-width: 900px) {
  .hours { grid-template-columns: 1.15fr 0.85fr; }
}

/* ---------- contact ---------- */
.contact {
  background: var(--bg-section-1);
  color: var(--on-dark);
  padding: clamp(3rem, 7vw, 6rem) var(--pad);
}
.contact-inner { max-width: 62rem; margin: 0 auto; }
.contact-lede { color: var(--on-dark-muted); max-width: 46ch; margin-bottom: 1.8rem; }
.contact-details {
  display: grid; gap: 1.25rem 2rem; margin: 2.5rem 0 0;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  border-top: 1px solid var(--on-dark-line); padding-top: 1.8rem;
}
.contact-details dt {
  font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--on-dark-muted); margin-bottom: 0.35rem;
}
.contact-details dd { margin: 0; font-weight: 600; }
.contact-details dd a { text-decoration: none; border-bottom: 2px solid var(--bg-section-4); }
.contact-foot {
  margin-top: 2.2rem; color: var(--on-dark-muted); font-size: 0.92rem; max-width: 52ch;
}

/* ---------- footer ---------- */
.site-footer {
  padding: clamp(2.5rem, 5vw, 4rem) var(--pad) 5.5rem;
  border-top: 1px solid var(--line);
  background: var(--page-bg);
}
.footer-inner {
  display: flex; flex-wrap: wrap; gap: 1.5rem 3rem;
  justify-content: space-between; align-items: flex-start;
  max-width: var(--maxw); margin: 0 auto;
}
.footer-brand { display: flex; gap: 0.8rem; align-items: flex-start; }
.footer-brand p { font-size: 0.92rem; line-height: 1.7; opacity: 0.85; margin: 0; }
.footer-brand a { text-decoration: none; border-bottom: 1px solid var(--line-strong); }
.footer-nav { display: flex; flex-wrap: wrap; gap: 0.5rem 1.4rem; }
.footer-nav a {
  text-decoration: none; font-size: 0.9rem; font-weight: 600;
  padding: 0.4rem 0; border-bottom: 2px solid transparent;
}
.footer-nav a:hover { border-bottom-color: var(--accent); }
.footer-note {
  max-width: var(--maxw); margin: 2rem auto 0;
  font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.04em;
  opacity: 0.6;
}

/* claim banner — small, subtle, above the kwaku attribution */
.claim-banner {
  display: block; max-width: var(--maxw); margin: 1.5rem auto 0;
  padding: 0.65rem 0.9rem;
  font-family: var(--font-mono); font-size: 0.74rem; letter-spacing: 0.02em;
  text-decoration: none;
  background: color-mix(in srgb, var(--page-ink) 6%, transparent);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  opacity: 0.85;
}
.claim-banner:hover { opacity: 1; border-color: var(--line-strong); }

/* kwaku attribution — required on free tier */
.attribution {
  position: static;
  max-width: var(--maxw);
  margin: 1rem auto 0;
  font-size: 0.72rem;
  opacity: 0.5;
  font-family: var(--font-mono);
}
.attribution a { color: inherit; }

/* ---------- reduced motion ---------- */
@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;
  }
  section { animation: none !important; opacity: 1 !important; translate: none !important; }
  .note::after { transition: none; }
}
