/* ============================================================
   Sbs Moto Dakar — mécanicien mobile, Dakar
   Composition: warm earth editorial · editorial serif ·
   one-shot load orchestration · three-column broadsheet ·
   hover-swap H1 · scroll-following light glow
   ============================================================ */

:root {
  --bg: #f5efe4;
  --bg-soft: #efe6d6;
  --surface: #fbf7ef;
  --ink: #2b1e14;
  --ink-soft: #5c4a3a;
  --ink-faint: #8a7663;
  --accent: #c25a37;
  --accent-deep: #9c4326;
  --secondary: #6a7a4a;
  --line: #d9cbb6;
  --warm-light: rgba(226, 168, 96, 0.30);
  --glow-y: 12%;
  --shadow: 0 1px 2px rgba(43, 30, 20, 0.05), 0 12px 32px -18px rgba(43, 30, 20, 0.35);
  --radius: 4px;
  --maxw: 1180px;
  --serif: 'Fraunces', 'Cormorant Garamond', Georgia, serif;
  --sans: 'DM Sans', 'Inter', system-ui, -apple-system, sans-serif;
}

html[data-theme="dark"] {
  --bg: #1a1310;
  --bg-soft: #221a15;
  --surface: #241b16;
  --ink: #f3e9dc;
  --ink-soft: #cbb9a6;
  --ink-faint: #9c8874;
  --accent: #e07a52;
  --accent-deep: #f0956f;
  --secondary: #9aab74;
  --line: #3a2c23;
  --warm-light: rgba(200, 118, 60, 0.22);
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 14px 36px -20px rgba(0, 0, 0, 0.8);
}

*, *::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: 1.05rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

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

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

: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;
}

.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 5vw, 3rem);
}

/* ---------- scroll-following light source ---------- */

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

body > header, body > main, body > footer { position: relative; z-index: 1; }

/* ---------- header ---------- */

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

.head-inner {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
  padding-block: 0.85rem;
}

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

.brand-mark {
  display: grid;
  place-items: center;
  width: 44px; height: 44px;
  flex: none;
  background: var(--ink);
  color: var(--bg);
  font-family: var(--serif);
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  border-radius: var(--radius);
}

.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text strong { font-family: var(--serif); font-size: 1.12rem; font-weight: 600; }
.brand-text em {
  font-style: normal;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.15rem;
  font-size: 0.92rem;
}

.site-nav a {
  color: var(--ink-soft);
  text-decoration: none;
  padding: 0.55rem 0.1rem;
  border-bottom: 1px solid transparent;
}
.site-nav a:hover { color: var(--accent); border-bottom-color: var(--accent); }

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

.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 44px;
  padding: 0.5rem 0.8rem;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink-soft);
  font: inherit;
  font-size: 0.82rem;
  cursor: pointer;
}
.theme-toggle:hover { border-color: var(--accent); color: var(--accent); }

.theme-icon {
  width: 0.85rem; height: 0.85rem;
  border-radius: 50%;
  background: var(--ink);
  box-shadow: inset -3px -2px 0 0 var(--bg);
}
html[data-theme="dark"] .theme-icon {
  background: var(--accent);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 35%, transparent);
}

.call-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 44px;
  padding: 0.5rem 1rem;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 600;
  white-space: nowrap;
}
.call-btn:hover { background: var(--accent-deep); color: #fff; }

/* ---------- hero ---------- */

.hero { padding-block: clamp(2.5rem, 7vw, 5rem) clamp(2rem, 5vw, 3.5rem); }

.kicker {
  margin: 0 0 1rem;
  font-size: 0.76rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--secondary);
  font-weight: 600;
}

.hero-title {
  position: relative;
  margin: 0 0 1.4rem;
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(2.4rem, 7.4vw, 5.1rem);
  line-height: 1.02;
  letter-spacing: -0.02em;
  max-width: 18ch;
  cursor: default;
}

.hero-title .default,
.hero-title .alt {
  display: block;
  transition: opacity 0.45s ease;
}

.hero-title .alt {
  position: absolute;
  inset: 0;
  opacity: 0;
  color: var(--accent);
  font-style: italic;
  pointer-events: none;
}

.hero-title:hover .default,
.hero-title:focus-within .default { opacity: 0; }
.hero-title:hover .alt,
.hero-title:focus-within .alt { opacity: 1; }

.hero-sub {
  margin: 0 0 1.8rem;
  max-width: 62ch;
  font-size: 1.12rem;
  color: var(--ink-soft);
}

.hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-bottom: 2.4rem; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.75rem 1.5rem;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.98rem;
  border: 1px solid transparent;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-deep); color: #fff; }
.btn-ghost { border-color: var(--line); color: var(--ink); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

.hero-facts {
  list-style: none;
  margin: 0 0 2.6rem;
  padding: 1.2rem 0 0;
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem 2rem;
}
.hero-facts li { display: flex; flex-direction: column; }
.hero-facts strong {
  font-family: var(--serif);
  font-size: 1.5rem;
  font-weight: 600;
  line-height: 1.2;
}
.hero-facts span { font-size: 0.86rem; color: var(--ink-faint); }

.hero-figure { margin: 0; }
.hero-figure img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: var(--radius);
  background: var(--bg-soft);
}
.hero-figure figcaption {
  margin-top: 0.7rem;
  font-size: 0.84rem;
  color: var(--ink-faint);
  max-width: 60ch;
}

/* ---------- band ---------- */

.band {
  background: var(--ink);
  color: var(--bg);
  margin-block: clamp(2rem, 5vw, 3.5rem);
}
.band-inner { padding-block: clamp(2rem, 5vw, 3.2rem); }
.band-line {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(1.4rem, 3.6vw, 2.3rem);
  line-height: 1.25;
  max-width: 30ch;
}
.band-sub {
  margin: 0.6rem 0 0;
  color: color-mix(in srgb, var(--bg) 68%, transparent);
  font-size: 0.95rem;
}

/* ---------- sections ---------- */

.section { padding-block: clamp(2.5rem, 6vw, 4.5rem); }

.section-title {
  margin: 0 0 0.9rem;
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(1.7rem, 4.4vw, 2.7rem);
  line-height: 1.12;
  letter-spacing: -0.015em;
}

.section-title::after {
  content: "";
  display: block;
  width: 3.5rem;
  height: 3px;
  margin-top: 0.9rem;
  background: var(--accent);
}

.section-lede {
  margin: 0 0 2.2rem;
  max-width: 62ch;
  color: var(--ink-soft);
}

/* ---------- service cards ---------- */

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem 1.4rem;
  box-shadow: var(--shadow);
}
.card h3 {
  margin: 0 0 0.35rem;
  font-family: var(--serif);
  font-size: 1.28rem;
  font-weight: 600;
}
.card-meta {
  margin: 0 0 0.8rem;
  font-size: 0.76rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--secondary);
  font-weight: 600;
}
.card p:last-child { margin: 0; font-size: 0.97rem; color: var(--ink-soft); }

/* ---------- broadsheet about ---------- */

.broadsheet {
  column-count: 3;
  column-gap: 3rem;
  column-rule: 1px solid var(--line);
  max-width: none;
}

.broadsheet p {
  margin: 0 0 1.1rem;
  break-inside: avoid;
  hyphens: auto;
}

.broadsheet .dropcap::first-letter {
  float: left;
  font-family: var(--serif);
  font-size: 3.6rem;
  line-height: 0.82;
  font-weight: 600;
  padding: 0.1rem 0.6rem 0 0;
  color: var(--accent);
}

.atelier-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
  margin-top: 2.6rem;
}
.atelier-gallery figure { margin: 0; }
.atelier-gallery img {
  width: 100%;
  aspect-ratio: 9 / 7;
  object-fit: cover;
  border-radius: var(--radius);
  background: var(--bg-soft);
}
.atelier-gallery figcaption {
  margin-top: 0.6rem;
  font-size: 0.82rem;
  color: var(--ink-faint);
}

/* ---------- zone ---------- */

.zone-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1.5rem 2.5rem;
}
.zone-col h3 {
  margin: 0 0 0.8rem;
  font-family: var(--serif);
  font-size: 1.15rem;
  font-weight: 600;
}
.zone-list {
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 0.97rem;
  color: var(--ink-soft);
}
.zone-list li {
  padding: 0.42rem 0 0.42rem 1.1rem;
  border-bottom: 1px solid var(--line);
  position: relative;
}
.zone-list li::before {
  content: "";
  position: absolute;
  left: 0; top: 1.05rem;
  width: 6px; height: 6px;
  background: var(--secondary);
  border-radius: 50%;
}
.zone-note p { margin: 0; font-size: 0.97rem; color: var(--ink-soft); }

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

.hours-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 2.5rem;
  align-items: start;
}

.hours {
  width: 100%;
  border-collapse: collapse;
  font-size: 1rem;
}
.hours th, .hours td {
  text-align: left;
  padding: 0.72rem 0.2rem;
  border-bottom: 1px solid var(--line);
}
.hours th { font-weight: 500; color: var(--ink-soft); }
.hours td { text-align: right; font-variant-numeric: tabular-nums; }
.hours-sunday th, .hours-sunday td { color: var(--accent); font-weight: 600; }

.hours-side { display: flex; flex-direction: column; gap: 1rem; align-items: flex-start; }
.hours-note { margin: 0; font-size: 0.97rem; color: var(--ink-soft); }

/* ---------- contact ---------- */

.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.25rem;
}
.contact-block {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem 1.4rem;
  box-shadow: var(--shadow);
}
.contact-block h3 {
  margin: 0 0 0.7rem;
  font-family: var(--serif);
  font-size: 1.15rem;
  font-weight: 600;
}
.contact-big {
  margin: 0 0 0.8rem;
  font-family: var(--serif);
  font-size: 1.35rem;
  line-height: 1.35;
}
.contact-big a { text-decoration: none; }
.contact-big a:hover { text-decoration: underline; }
.contact-hint { margin: 0 0 1rem; font-size: 0.94rem; color: var(--ink-soft); }
.link-out { font-size: 0.94rem; font-weight: 600; text-decoration: none; }
.link-out:hover { text-decoration: underline; }

.checklist {
  margin: 0 0 1rem;
  padding: 0;
  list-style: none;
  font-size: 0.94rem;
  color: var(--ink-soft);
}
.checklist li {
  padding: 0.35rem 0 0.35rem 1.4rem;
  position: relative;
}
.checklist li::before {
  content: "→";
  position: absolute;
  left: 0;
  color: var(--accent);
}

/* ---------- footer ---------- */

.site-foot {
  margin-top: clamp(2rem, 5vw, 3.5rem);
  border-top: 1px solid var(--line);
  background: var(--bg-soft);
  padding-block: 2.5rem 1.5rem;
}

.foot-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem 3rem;
  justify-content: space-between;
  align-items: flex-start;
}
.foot-brand strong { font-family: var(--serif); font-size: 1.15rem; }
.foot-brand p { margin: 0.35rem 0 0; font-size: 0.92rem; color: var(--ink-soft); max-width: 46ch; }
.foot-nav { display: flex; flex-wrap: wrap; gap: 0.5rem 1.2rem; font-size: 0.92rem; }
.foot-nav a { color: var(--ink-soft); text-decoration: none; }
.foot-nav a:hover { color: var(--accent); text-decoration: underline; }

.foot-claim { margin-top: 2rem; }

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

.foot-attr {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}
.attribution {
  margin: 0;
  font-size: 0.72rem;
  opacity: 0.6;
}
.attribution a { color: inherit; }

/* ---------- one-shot load orchestration ---------- */

@keyframes riseIn {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}
@keyframes dropIn {
  from { opacity: 0; transform: translateY(-12px); }
  to   { opacity: 1; transform: none; }
}
@keyframes typeIn {
  from { opacity: 0; clip-path: inset(0 100% 0 0); }
  to   { opacity: 1; clip-path: inset(0 0 0 0); }
}

.reveal { animation-duration: 0.85s; animation-fill-mode: both; animation-timing-function: cubic-bezier(0.22, 0.61, 0.36, 1); }
.r1 { animation-name: riseIn; animation-delay: 0.05s; }
.r2 { animation-name: typeIn; animation-delay: 0.17s; }
.r3 { animation-name: riseIn; animation-delay: 0.29s; }
.r4 { animation-name: riseIn; animation-delay: 0.41s; }
.r5 { animation-name: riseIn; animation-delay: 0.53s; }
.r6 { animation-name: riseIn; animation-delay: 0.65s; }

.site-head { animation: dropIn 0.6s cubic-bezier(0.22, 0.61, 0.36, 1) both; }

/* ---------- responsive ---------- */

@media (max-width: 1000px) {
  .broadsheet { column-count: 2; column-gap: 2.2rem; }
  .hours-layout { grid-template-columns: 1fr; gap: 1.8rem; }
}

@media (max-width: 720px) {
  .broadsheet { column-count: 1; column-rule: none; }
  .head-inner { gap: 0.6rem 1rem; }
  .site-nav { order: 3; width: 100%; gap: 0.2rem 1rem; font-size: 0.88rem; }
  .brand-text em { display: none; }
  .theme-label { display: none; }
  .theme-toggle { padding: 0.5rem; }
  .hero-title { max-width: none; }
  .hero-title .alt { position: static; opacity: 1; display: none; }
  .hero-title:hover .default { opacity: 1; }
  .hero-title:hover .alt { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal, .site-head { animation: none !important; opacity: 1 !important; transform: none !important; clip-path: none !important; }
  .glow { transition: none; }
  .hero-title .default, .hero-title .alt { transition: none; }
}
