/* ============================================================
   Mobile Mechanic Mississauga
   Composition: warm earth editorial · museum wall labels ·
   kinetic weight-shift H1 · one-shot load orchestration ·
   drifting light source · hover phrase swap
   ============================================================ */

:root {
  --bg: #f5efe4;
  --bg-alt: #efe6d7;
  --paper: #fbf7ef;
  --ink: #2b1e14;
  --ink-soft: #5c4a3a;
  --ink-faint: #8a7767;
  --accent: #c25a37;
  --accent-deep: #9c4426;
  --secondary: #6a7a4a;
  --rule: rgba(43, 30, 20, 0.14);
  --warm-light: rgba(255, 214, 160, 0.55);
  --glow-y: 12%;
  --max: 1180px;
  --pad: clamp(1.25rem, 5vw, 4rem);
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --serif: "Fraunces", "Iowan Old Style", Georgia, serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1a1310;
    --bg-alt: #221a15;
    --paper: #241b16;
    --ink: #f2e8db;
    --ink-soft: #c9b8a5;
    --ink-faint: #9c8874;
    --accent: #e07a52;
    --accent-deep: #f0946f;
    --secondary: #9aab74;
    --rule: rgba(242, 232, 219, 0.16);
    --warm-light: rgba(224, 122, 82, 0.22);
  }
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

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

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

/* ---------- drifting light source ---------- */
.glow {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: radial-gradient(
    circle at 50% var(--glow-y),
    var(--warm-light) 0,
    transparent 62%
  );
  transition: background 0.6s linear;
}

/* ---------- shared type ---------- */
.eyebrow,
.label {
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin: 0;
}

h1, h2, h3 {
  font-family: var(--serif);
  font-optical-sizing: auto;
  line-height: 1.08;
  margin: 0;
  text-wrap: balance;
}

h2 {
  font-size: clamp(1.75rem, 4.2vw, 2.9rem);
  font-weight: 500;
  letter-spacing: -0.015em;
}

h3 {
  font-size: clamp(1.1rem, 2.2vw, 1.4rem);
  font-weight: 600;
  letter-spacing: -0.01em;
}

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

/* ============================================================
   HEADER
   ============================================================ */
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
  padding: 0.85rem var(--pad);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--rule);
  animation: slide-down 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--ink);
  margin-right: auto;
}

.mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff8f2;
  font-family: var(--serif);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.wordmark-text {
  font-family: var(--serif);
  font-size: 0.98rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.nav {
  display: flex;
  gap: 1.35rem;
  flex-wrap: wrap;
}

.nav a {
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--ink-soft);
  text-decoration: none;
  padding: 0.35rem 0;
  border-bottom: 1px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}
.nav a:hover { color: var(--ink); border-bottom-color: var(--accent); }

.call-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  min-height: 44px;
  padding: 0.5rem 1rem;
  border-radius: 999px;
  background: var(--ink);
  color: var(--bg);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  transition: background 0.2s, transform 0.2s;
}
.call-btn:hover { background: var(--accent); color: #fff8f2; transform: translateY(-1px); }
.call-label { opacity: 0.7; }
.call-num { font-weight: 600; letter-spacing: 0.01em; }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  z-index: 1;
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(2.5rem, 7vw, 5.5rem) var(--pad) clamp(2.5rem, 6vw, 4.5rem);
  display: grid;
  gap: clamp(2rem, 5vw, 3.5rem);
  align-items: center;
}

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

.hero-h1 {
  position: relative;
  font-size: clamp(2.6rem, 8.5vw, 5.2rem);
  font-weight: 300;
  letter-spacing: -0.03em;
  margin: 0.75rem 0 1.25rem;
  font-variation-settings: "wght" 220, "opsz" 120;
  transition: font-variation-settings 0.45s cubic-bezier(0.2, 0.7, 0.2, 1);
  cursor: default;
}

.hero-h1 span {
  display: block;
  transition: opacity 0.35s ease;
}

.hero-h1 .alt {
  position: absolute;
  inset: 0;
  opacity: 0;
  color: var(--accent);
}

.hero-h1:hover,
.hero-h1:focus-visible {
  font-variation-settings: "wght" 880, "opsz" 120;
}

.hero-h1:hover .default,
.hero-h1:focus-visible .default { opacity: 0; }
.hero-h1:hover .alt,
.hero-h1:focus-visible .alt { opacity: 1; }

.hero-sub {
  font-size: clamp(1rem, 1.6vw, 1.12rem);
  color: var(--ink-soft);
  max-width: 32rem;
}

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

.btn-primary,
.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.8rem 1.5rem;
  border-radius: 999px;
  font-size: 0.94rem;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.2s, color 0.2s, transform 0.2s, border-color 0.2s;
}

.btn-primary {
  background: var(--accent);
  color: #fff8f2;
  border: 1px solid var(--accent);
}
.btn-primary:hover { background: var(--accent-deep); border-color: var(--accent-deep); color: #fff8f2; transform: translateY(-1px); }

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--rule);
}
.btn-ghost:hover { border-color: var(--ink); color: var(--ink); }

.hero-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr));
  gap: 1rem;
  margin: 0;
  padding-top: 1.4rem;
  border-top: 1px solid var(--rule);
}
.hero-stats dt {
  font-size: 0.68rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 0.2rem;
}
.hero-stats dd {
  margin: 0;
  font-family: var(--serif);
  font-size: 1.05rem;
  font-weight: 600;
}

.hero-figure {
  margin: 0;
  position: relative;
}
.hero-figure img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 3px;
  box-shadow: 0 24px 60px -30px rgba(43, 30, 20, 0.5);
}
.hero-figure .label {
  margin-top: 0.7rem;
  padding-left: 0.1rem;
}

/* ============================================================
   SECTIONS
   ============================================================ */
.section {
  position: relative;
  z-index: 1;
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(3rem, 8vw, 6rem) var(--pad);
}

.section-alt {
  max-width: none;
  background: color-mix(in srgb, var(--bg-alt) 70%, transparent);
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}
.section-alt > * {
  max-width: var(--max);
  margin-left: auto;
  margin-right: auto;
}

.section-head {
  max-width: 44rem;
  margin-bottom: clamp(2rem, 5vw, 3.25rem);
}
.section-head h2 { margin: 0.6rem 0 1rem; }
.section-lede { color: var(--ink-soft); font-size: 1.02rem; }

/* ---------- museum wall: services ---------- */
.wall {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(19rem, 1fr));
  gap: clamp(1.75rem, 4vw, 3rem);
}

.work {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.work img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 2px;
  filter: saturate(0.94);
  transition: filter 0.4s ease;
}
.work:hover img { filter: saturate(1.05); }

.work-body { display: flex; flex-direction: column; gap: 0.45rem; }
.work-body .label { color: var(--accent); }
.work-body p { color: var(--ink-soft); font-size: 0.95rem; }

.work-text {
  justify-content: center;
  padding: clamp(1.25rem, 3vw, 2rem);
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 3px;
}

.plain-list {
  list-style: none;
  margin: 0.4rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.4rem;
  font-size: 0.94rem;
  color: var(--ink-soft);
}
.plain-list li {
  padding-left: 1.1rem;
  position: relative;
}
.plain-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 6px;
  height: 1px;
  background: var(--secondary);
}
.two-col { grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr)); }

/* ---------- recent work log ---------- */
.log {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr));
  gap: 0;
  border-top: 1px solid var(--rule);
}

.log-item {
  padding: clamp(1.4rem, 3vw, 2rem) clamp(1rem, 2.5vw, 1.75rem);
  border-bottom: 1px solid var(--rule);
  border-right: 1px solid var(--rule);
}
.log-item .label { color: var(--secondary); margin-bottom: 0.5rem; }
.log-item h3 { margin-bottom: 0.5rem; }
.log-item p { color: var(--ink-soft); font-size: 0.94rem; }

/* ---------- steps ---------- */
.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: clamp(1.5rem, 3.5vw, 2.5rem);
  counter-reset: step;
}
.steps li {
  padding-top: 1.25rem;
  border-top: 2px solid var(--ink);
}
.step-num {
  display: block;
  font-family: var(--serif);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-bottom: 0.5rem;
}
.steps h3 { margin-bottom: 0.5rem; }
.steps p { color: var(--ink-soft); font-size: 0.94rem; }

/* ---------- hours ---------- */
.hours-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr));
  gap: clamp(1.75rem, 4vw, 3rem);
  align-items: start;
}

.hours-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.96rem;
}
.hours-table caption {
  text-align: left;
  padding-bottom: 0.75rem;
  color: var(--accent);
}
.hours-table th,
.hours-table td {
  text-align: left;
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--rule);
  font-weight: 400;
}
.hours-table th { color: var(--ink); font-weight: 500; }
.hours-table td { color: var(--ink-soft); text-align: right; }

.hours-note {
  padding: clamp(1.25rem, 3vw, 1.9rem);
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 3px;
}
.hours-note .label { color: var(--secondary); margin-bottom: 0.6rem; }

/* ---------- visit ---------- */
.visit-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr));
  gap: clamp(1.5rem, 3.5vw, 2.5rem);
}

.visit-card {
  padding-top: 1.25rem;
  border-top: 1px solid var(--rule);
}
.visit-card .label { color: var(--accent); margin-bottom: 0.7rem; }

address {
  font-style: normal;
  font-family: var(--serif);
  font-size: 1.22rem;
  font-weight: 500;
  line-height: 1.4;
  margin-bottom: 0.7rem;
}

.big-phone {
  display: inline-block;
  font-family: var(--serif);
  font-size: clamp(1.5rem, 4vw, 2rem);
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink);
  text-decoration: none;
  margin-bottom: 0.7rem;
  border-bottom: 2px solid var(--accent);
  padding-bottom: 0.1rem;
}
.big-phone:hover { color: var(--accent); }

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

.text-link {
  display: inline-block;
  margin-top: 0.6rem;
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  border-bottom: 1px solid var(--accent);
  padding-bottom: 1px;
}

/* ---------- closing ---------- */
.closing {
  position: relative;
  z-index: 1;
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(3rem, 8vw, 6rem) var(--pad) clamp(4rem, 9vw, 7rem);
  text-align: center;
}
.closing-line {
  font-family: var(--serif);
  font-size: clamp(1.4rem, 4vw, 2.4rem);
  font-weight: 400;
  line-height: 1.25;
  letter-spacing: -0.02em;
  max-width: 34rem;
  margin: 0 auto 2rem;
  text-wrap: balance;
}

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--rule);
  background: color-mix(in srgb, var(--bg-alt) 80%, transparent);
  padding: clamp(2rem, 5vw, 3rem) var(--pad) clamp(3rem, 6vw, 4rem);
}
.footer-inner {
  max-width: var(--max);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  align-items: flex-start;
}
.footer-name {
  font-family: var(--serif);
  font-size: 1.02rem;
  font-weight: 600;
  margin: 0;
}
.footer-meta {
  font-size: 0.86rem;
  color: var(--ink-faint);
  margin: 0;
}
.footer-meta a { color: var(--ink-soft); }

.claim-banner {
  display: inline-block;
  margin-top: 0.9rem;
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--secondary) 14%, transparent);
  border: 1px solid color-mix(in srgb, var(--secondary) 34%, transparent);
  color: var(--ink-soft);
  font-size: 0.78rem;
  font-weight: 500;
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
}
.claim-banner:hover {
  background: color-mix(in srgb, var(--secondary) 24%, transparent);
  color: var(--ink);
}

.muted.attribution {
  margin: 0.4rem 0 0;
  font-size: 0.72rem;
  color: var(--ink-faint);
  opacity: 0.75;
}
.muted.attribution a { color: inherit; }

/* ============================================================
   ONE-SHOT LOAD ORCHESTRATION
   ============================================================ */
@keyframes slide-down {
  from { transform: translateY(-100%); opacity: 0; }
  to   { transform: translateY(0);     opacity: 1; }
}
@keyframes rise-in {
  from { transform: translateY(14px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}
@keyframes fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.reveal {
  animation: rise-in 0.75s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}
.r1 { animation-delay: 0.12s; }
.r2 { animation-delay: 0.24s; }
.r3 { animation-delay: 0.36s; }
.r4 { animation-delay: 0.48s; }
.r5 { animation-delay: 0.60s; }

.hero-figure { animation: fade-in 1s ease 0.36s both; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (min-width: 900px) {
  .hero {
    grid-template-columns: 1.05fr 0.95fr;
    padding-top: clamp(3.5rem, 6vw, 6rem);
  }
}

@media (max-width: 720px) {
  .topbar { gap: 0.75rem; }
  .nav { order: 3; width: 100%; gap: 1rem; }
  .nav a { font-size: 0.78rem; }
  .call-btn { padding: 0.5rem 0.85rem; font-size: 0.8rem; }
  .call-label { display: none; }
  .hours-table td { text-align: left; }
  .log-item { border-right: none; }
}

/* ============================================================
   REDUCED MOTION
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .topbar,
  .reveal,
  .hero-figure {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
  .hero-h1 { transition: none; }
  .glow { transition: none; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
