/* ============================================================
   Demba's Auto Repair — warm earth editorial broadsheet
   ============================================================ */

:root {
  --bg: #f5efe4;
  --bg-deep: #ece3d3;
  --paper: #fbf7ef;
  --ink: #2b1e14;
  --ink-soft: #5c4a3a;
  --ink-faint: #8a7663;
  --accent: #c25a37;
  --accent-deep: #9c4326;
  --secondary: #6a7a4a;
  --rule: #d8cbb6;
  --warm-light: rgba(226, 178, 118, 0.42);
  --glow-y: 12%;
  --shadow: 0 1px 2px rgba(43, 30, 20, 0.06), 0 12px 32px -18px rgba(43, 30, 20, 0.35);
  --serif: "Fraunces", "Cormorant Garamond", Georgia, serif;
  --sans: "DM Sans", "Inter", system-ui, -apple-system, sans-serif;
}

html[data-theme="dark"] {
  --bg: #17120d;
  --bg-deep: #100c08;
  --paper: #1f1811;
  --ink: #f2e8da;
  --ink-soft: #c6b6a2;
  --ink-faint: #9a8873;
  --accent: #e07a52;
  --accent-deep: #f0956f;
  --secondary: #9aab74;
  --rule: #3a2e23;
  --warm-light: rgba(196, 122, 62, 0.20);
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 14px 36px -18px rgba(0, 0, 0, 0.8);
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  background-color: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.05rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* Soft light source that drifts with scroll ------------------ */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(circle at 50% var(--glow-y), var(--warm-light) 0, transparent 58%),
    linear-gradient(180deg, transparent 0%, transparent 70%, var(--bg-deep) 100%);
  transition: background-position 0.2s linear;
}

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

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

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

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 600;
  font-variation-settings: "SOFT" 0, "WONK" 1, "opsz" 40;
  line-height: 1.12;
  letter-spacing: -0.015em;
  margin: 0 0 0.6em;
  color: var(--ink);
}

p { margin: 0 0 1.1em; max-width: 68ch; }

.wrap {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* ============================================================
   Header
   ============================================================ */

.site-head {
  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);
  animation: slide-down 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.site-head .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 68px;
  padding-block: 0.5rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  color: var(--ink);
}

.brand-mark {
  width: 40px;
  height: 40px;
  flex: none;
  border-radius: 50%;
  background: var(--accent);
  color: #fff7ee;
  display: grid;
  place-items: center;
  font-family: var(--serif);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-name { font-family: var(--serif); font-size: 1.08rem; font-weight: 600; }
.brand-sub {
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.head-right { display: flex; align-items: center; gap: 0.6rem; }

.nav-links { display: none; gap: 1.4rem; font-size: 0.92rem; }
.nav-links a { color: var(--ink-soft); text-decoration: none; }
.nav-links a:hover { color: var(--accent); }

.call-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 44px;
  padding: 0.55rem 1.05rem;
  background: var(--accent);
  color: #fff8f0;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.18s ease, transform 0.18s ease;
}
.call-btn:hover { background: var(--accent-deep); color: #fff8f0; transform: translateY(-1px); }
.call-btn svg { width: 16px; height: 16px; flex: none; }

.theme-toggle {
  width: 44px;
  height: 44px;
  flex: none;
  display: grid;
  place-items: center;
  background: transparent;
  border: 1px solid var(--rule);
  border-radius: 50%;
  color: var(--ink-soft);
  cursor: pointer;
  transition: border-color 0.18s ease, color 0.18s ease;
}
.theme-toggle:hover { border-color: var(--accent); color: var(--accent); }
.theme-toggle svg { width: 18px; height: 18px; }
.theme-toggle .icon-moon { display: none; }
html[data-theme="dark"] .theme-toggle .icon-sun { display: none; }
html[data-theme="dark"] .theme-toggle .icon-moon { display: block; }

/* ============================================================
   Hero
   ============================================================ */

.hero { padding: 3.5rem 0 2.5rem; }

.eyebrow {
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 1.1rem;
  animation: fade-up 0.7s 0.1s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.hero h1 {
  font-size: clamp(2.6rem, 9vw, 5.4rem);
  line-height: 1.02;
  letter-spacing: -0.03em;
  margin-bottom: 1rem;
  animation: fade-up 0.8s 0.22s cubic-bezier(0.22, 1, 0.36, 1) both;
}

/* Signature: hover swaps the headline phrase */
.swap {
  position: relative;
  display: block;
  cursor: default;
}
.swap .default,
.swap .alt {
  display: block;
  transition: opacity 0.35s ease;
}
.swap .alt {
  position: absolute;
  inset: 0;
  opacity: 0;
  color: var(--accent);
  pointer-events: none;
}
.swap:hover .default,
.swap:focus-visible .default { opacity: 0; }
.swap:hover .alt,
.swap:focus-visible .alt { opacity: 1; }

.hero-lede {
  font-size: 1.15rem;
  color: var(--ink-soft);
  max-width: 56ch;
  animation: fade-up 0.8s 0.34s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  margin-top: 1.6rem;
  animation: fade-up 0.8s 0.46s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.ghost-btn {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0.55rem 1.15rem;
  border: 1px solid var(--rule);
  border-radius: 999px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  transition: border-color 0.18s ease, color 0.18s ease;
}
.ghost-btn:hover { border-color: var(--accent); color: var(--accent); }

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.4rem;
  margin-top: 1.8rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--rule);
  font-size: 0.88rem;
  color: var(--ink-faint);
  animation: fade-up 0.8s 0.58s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.hero-meta strong { color: var(--ink-soft); font-weight: 600; }

/* ============================================================
   Figure / photography
   ============================================================ */

.hero-figure {
  margin: 2.5rem 0 0;
  animation: fade-up 0.9s 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.hero-figure img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 4px;
  box-shadow: var(--shadow);
}
.hero-figure figcaption {
  margin-top: 0.7rem;
  font-size: 0.82rem;
  color: var(--ink-faint);
  font-style: italic;
}

/* ============================================================
   Broadsheet body — three-column newspaper
   ============================================================ */

.broadsheet {
  padding: 3rem 0 1rem;
}

.section-rule {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 0 0 1.6rem;
}
.section-rule span {
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-faint);
  font-weight: 600;
  white-space: nowrap;
}
.section-rule::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--rule);
}

article.broadsheet-body {
  column-count: 1;
  column-gap: 3rem;
  column-rule: 1px solid var(--rule);
}

article.broadsheet-body > h2 {
  column-span: all;
  font-size: clamp(1.7rem, 4.4vw, 2.5rem);
  margin-bottom: 1.1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--ink);
}

article.broadsheet-body p { max-width: none; }
article.broadsheet-body p:first-of-type::first-letter {
  font-family: var(--serif);
  float: left;
  font-size: 3.4rem;
  line-height: 0.82;
  padding: 0.12em 0.12em 0 0;
  color: var(--accent);
  font-weight: 600;
}

.pull-quote {
  break-inside: avoid;
  margin: 1.4rem 0;
  padding: 1rem 0 1rem 1.1rem;
  border-left: 3px solid var(--accent);
  font-family: var(--serif);
  font-size: 1.2rem;
  line-height: 1.4;
  color: var(--ink);
}
.pull-quote cite {
  display: block;
  margin-top: 0.5rem;
  font-family: var(--sans);
  font-size: 0.78rem;
  font-style: normal;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

/* ============================================================
   Services
   ============================================================ */

.services { padding: 3rem 0; }

.service-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.1rem;
}

.service-card {
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 4px;
  padding: 1.4rem 1.3rem;
  box-shadow: var(--shadow);
}
.service-card h3 {
  font-size: 1.22rem;
  margin-bottom: 0.45rem;
}
.service-card p {
  font-size: 0.95rem;
  color: var(--ink-soft);
  margin-bottom: 0.7rem;
}
.service-card .tag {
  display: inline-block;
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--secondary);
  font-weight: 600;
  border-top: 1px solid var(--rule);
  padding-top: 0.6rem;
  width: 100%;
}

/* ============================================================
   Photo strip
   ============================================================ */

.photo-strip {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  padding: 1rem 0 3rem;
}
.photo-strip figure { margin: 0; }
.photo-strip img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 4px;
  box-shadow: var(--shadow);
}
.photo-strip figcaption {
  margin-top: 0.55rem;
  font-size: 0.8rem;
  color: var(--ink-faint);
  font-style: italic;
}

/* ============================================================
   Visit / hours
   ============================================================ */

.visit {
  padding: 3rem 0;
  border-top: 1px solid var(--rule);
}

.visit-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

.hours-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.98rem;
}
.hours-table th,
.hours-table td {
  text-align: left;
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--rule);
}
.hours-table th { font-weight: 500; color: var(--ink-soft); }
.hours-table td { text-align: right; font-variant-numeric: tabular-nums; }
.hours-table tr.closed td { color: var(--accent); font-weight: 600; }
.hours-table tr.today th,
.hours-table tr.today td { color: var(--ink); font-weight: 700; }
.hours-table tr.today th::after {
  content: "today";
  display: inline-block;
  margin-left: 0.5rem;
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  vertical-align: middle;
}

.contact-block p { margin-bottom: 0.9rem; }
.contact-block .label {
  display: block;
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-faint);
  font-weight: 600;
  margin-bottom: 0.15rem;
}
.contact-block .value { font-size: 1.05rem; }
.contact-block .value.big {
  font-family: var(--serif);
  font-size: 1.6rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.contact-block a { text-decoration: none; }
.contact-block a:hover { text-decoration: underline; }

.map-link {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 44px;
  margin-top: 0.4rem;
  font-weight: 500;
}

.note {
  margin-top: 1.4rem;
  padding: 0.9rem 1rem;
  background: var(--paper);
  border: 1px solid var(--rule);
  border-left: 3px solid var(--secondary);
  border-radius: 3px;
  font-size: 0.9rem;
  color: var(--ink-soft);
}

/* ============================================================
   Coverage list
   ============================================================ */

.coverage { padding: 0 0 3rem; }
.coverage ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.coverage li {
  font-size: 0.85rem;
  padding: 0.35rem 0.8rem;
  border: 1px solid var(--rule);
  border-radius: 999px;
  color: var(--ink-soft);
  background: var(--paper);
}

/* ============================================================
   Footer
   ============================================================ */

.site-foot {
  border-top: 1px solid var(--rule);
  padding: 2.5rem 0 5rem;
  background: var(--bg-deep);
}
.foot-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.6rem;
}
.site-foot h4 {
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-family: var(--sans);
  color: var(--ink-faint);
  margin-bottom: 0.7rem;
}
.site-foot p { font-size: 0.92rem; color: var(--ink-soft); margin-bottom: 0.5rem; }
.site-foot a { color: var(--ink-soft); }
.site-foot a:hover { color: var(--accent); }

.claim-banner {
  display: inline-block;
  margin-top: 1.6rem;
  padding: 0.5rem 0.85rem;
  font-size: 0.78rem;
  color: var(--ink-soft);
  background: color-mix(in srgb, var(--rule) 45%, transparent);
  border: 1px solid var(--rule);
  border-radius: 3px;
  text-decoration: none;
}
.claim-banner:hover { color: var(--accent); border-color: var(--accent); }

.attribution {
  position: static;
  margin-top: 1.4rem;
  font-size: 0.72rem;
  opacity: 0.6;
  font-family: var(--sans);
}
.attribution a { color: inherit; }

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

@keyframes fade-up {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes slide-down {
  from { opacity: 0; transform: translateY(-100%); }
  to { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   Breakpoints
   ============================================================ */

@media (min-width: 640px) {
  .service-grid { grid-template-columns: repeat(2, 1fr); }
  .photo-strip { grid-template-columns: repeat(2, 1fr); }
  .foot-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 900px) {
  .wrap { padding: 0 2.5rem; }
  .nav-links { display: flex; }
  .hero { padding: 5rem 0 3rem; }
  article.broadsheet-body { column-count: 3; }
  .service-grid { grid-template-columns: repeat(3, 1fr); }
  .photo-strip { grid-template-columns: repeat(3, 1fr); }
  .visit-grid { grid-template-columns: 1fr 1fr; gap: 3.5rem; }
  .foot-grid { grid-template-columns: 2fr 1fr 1fr; }
}

@media (min-width: 1100px) {
  article.broadsheet-body { column-count: 3; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-delay: 0ms !important;
    transition-duration: 0.01ms !important;
  }
  .swap .alt { display: none; }
  .swap:hover .default { opacity: 1; }
}
