/* =========================================================
   Solution Auto Garage Mecanique — warm earth editorial
   ========================================================= */

:root {
  --bg: #f5efe4;
  --bg-alt: #efe6d6;
  --surface: #fbf7ef;
  --ink: #2b1e14;
  --ink-soft: #5c4a3a;
  --ink-faint: #8a7767;
  --accent: #c25a37;
  --accent-deep: #9c4526;
  --secondary: #6a7a4a;
  --rule: rgba(43, 30, 20, 0.16);
  --rule-strong: rgba(43, 30, 20, 0.32);
  --grain-opacity: 0.055;
  --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, "Segoe UI", sans-serif;

  --measure: 68ch;
  --gutter: clamp(1.15rem, 4vw, 3.5rem);
  --maxw: 1180px;
}

html[data-theme="dark"] {
  --bg: #1a1410;
  --bg-alt: #221a15;
  --surface: #241c16;
  --ink: #f2e9dc;
  --ink-soft: #cbbaa6;
  --ink-faint: #9c8b78;
  --accent: #e07a52;
  --accent-deep: #f0a184;
  --secondary: #9aab74;
  --rule: rgba(242, 233, 220, 0.16);
  --rule-strong: rgba(242, 233, 220, 0.32);
  --grain-opacity: 0.075;
  --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;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background-color: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.05rem;
  line-height: 1.7;
  font-weight: 400;
  overflow-x: hidden;
  transition: background-color 0.4s ease, color 0.4s ease;
}

/* ---------- animated noise field ---------- */
.noise-source {
  position: absolute;
  width: 0;
  height: 0;
  pointer-events: none;
}

.grain {
  position: fixed;
  inset: -10%;
  z-index: 0;
  pointer-events: none;
  opacity: var(--grain-opacity);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='240' height='240' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 240px 240px;
  animation: grain-drift 9s steps(6) infinite;
  mix-blend-mode: multiply;
}

html[data-theme="dark"] .grain { mix-blend-mode: screen; }

@keyframes grain-drift {
  0%   { transform: translate3d(0, 0, 0); }
  20%  { transform: translate3d(-2%, 1.5%, 0); }
  40%  { transform: translate3d(1.5%, -1%, 0); }
  60%  { transform: translate3d(-1%, -2%, 0); }
  80%  { transform: translate3d(2%, 1%, 0); }
  100% { transform: translate3d(0, 0, 0); }
}

/* ---------- typography ---------- */
h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 500;
  line-height: 1.12;
  letter-spacing: -0.015em;
  text-wrap: balance;
  margin: 0 0 0.6em;
}

h1 { font-size: clamp(2.3rem, 7.2vw, 4.6rem); }
h2 { font-size: clamp(1.7rem, 4vw, 2.7rem); }
h3 { font-size: clamp(1.15rem, 2vw, 1.4rem); font-weight: 600; }

p { margin: 0 0 1.05em; max-width: var(--measure); }
p:last-child { margin-bottom: 0; }

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
  transition: color 0.2s ease;
}

a:hover { color: var(--accent-deep); }

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

.kicker {
  font-family: var(--sans);
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--secondary);
  margin: 0 0 0.9rem;
  max-width: none;
}

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

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

.wordmark {
  text-decoration: none;
  color: var(--ink);
  display: flex;
  flex-direction: column;
  line-height: 1.1;
  margin-right: auto;
}

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

.wordmark-sub {
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

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

.nav a {
  color: var(--ink-soft);
  text-decoration: none;
  padding: 0.35rem 0;
  border-bottom: 1px solid transparent;
}

.nav a:hover {
  color: var(--ink);
  border-bottom-color: var(--accent);
}

.masthead-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.4rem 0.8rem;
  font: inherit;
  font-size: 0.82rem;
  color: var(--ink-soft);
  background: transparent;
  border: 1px solid var(--rule-strong);
  border-radius: 999px;
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.theme-toggle:hover { color: var(--ink); border-color: var(--accent); }

.theme-toggle-icon {
  width: 0.85rem;
  height: 0.85rem;
  border-radius: 50%;
  background: var(--ink);
  box-shadow: inset -4px -3px 0 0 var(--bg);
  transition: box-shadow 0.3s ease, background 0.3s ease;
}

html[data-theme="dark"] .theme-toggle-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: baseline;
  gap: 0.5rem;
  min-height: 44px;
  padding: 0.55rem 1rem;
  background: var(--accent);
  color: #fff8f2;
  text-decoration: none;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: background 0.2s ease, transform 0.2s ease;
}

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

.call-btn-label {
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.85;
}

/* ---------- layout shell ---------- */
main {
  position: relative;
  z-index: 1;
}

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

.section-alt {
  max-width: none;
  background: var(--bg-alt);
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}

.section-alt > * {
  max-width: var(--maxw);
  margin-left: auto;
  margin-right: auto;
}

.section-head { margin-bottom: clamp(1.8rem, 4vw, 3rem); }

.section-lede {
  font-size: 1.08rem;
  color: var(--ink-soft);
}

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

.hero-title {
  position: relative;
  margin-bottom: 1.1rem;
  font-variation-settings: "wght" 300, "SOFT" 0, "WONK" 0;
  animation: weigh linear both;
  animation-timeline: scroll(root);
  animation-range: 0 30vh;
}

.hero-title em {
  font-style: italic;
  color: var(--accent);
}

.hero-title span {
  display: block;
  transition: opacity 0.45s ease;
}

.hero-title .alt {
  position: absolute;
  inset: 0;
  opacity: 0;
  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; }

@keyframes weigh {
  from { font-variation-settings: "wght" 200, "SOFT" 0, "WONK" 0; }
  to   { font-variation-settings: "wght" 900, "SOFT" 0, "WONK" 1; }
}

.hero-standfirst {
  font-size: clamp(1.05rem, 1.6vw, 1.22rem);
  color: var(--ink-soft);
  max-width: 60ch;
}

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

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

.btn-primary {
  background: var(--ink);
  color: var(--bg);
}

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

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

.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
}

.hero-figure {
  margin: 0;
  border-radius: 4px;
  overflow: hidden;
  box-shadow: var(--shadow);
  background: var(--surface);
}

.hero-figure img,
.zone-figure img,
.atelier-figure img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  filter: saturate(0.94) contrast(1.02);
}

.atelier-figure img { aspect-ratio: 9 / 11; }

figcaption {
  font-size: 0.82rem;
  color: var(--ink-faint);
  padding: 0.7rem 0.9rem;
  border-top: 1px solid var(--rule);
  background: var(--surface);
}

/* ---------- broadsheet services ---------- */
.broadsheet {
  column-count: 3;
  column-gap: 3rem;
  column-rule: 1px solid var(--rule);
}

.service {
  break-inside: avoid;
  margin-bottom: 1.9rem;
  padding-bottom: 1.6rem;
  border-bottom: 1px solid var(--rule);
}

.service:last-child { border-bottom: 0; }

.service h3 {
  margin-bottom: 0.25rem;
  color: var(--ink);
}

.service-price {
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.55rem;
}

.service p:last-child {
  font-size: 0.97rem;
  color: var(--ink-soft);
}

/* ---------- atelier ---------- */
.atelier-grid {
  display: grid;
  gap: clamp(1.6rem, 4vw, 3rem);
  grid-template-columns: 1fr;
  align-items: start;
}

.atelier-figure {
  margin: 0;
  border-radius: 4px;
  overflow: hidden;
  box-shadow: var(--shadow);
  background: var(--surface);
}

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

.facts {
  list-style: none;
  margin: 1.8rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.7rem;
}

.facts li {
  padding-left: 1.4rem;
  position: relative;
  font-size: 0.97rem;
  color: var(--ink-soft);
}

.facts li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 0.6rem;
  height: 1px;
  background: var(--accent);
}

.facts strong { color: var(--ink); }

/* ---------- zone ---------- */
.zone-grid {
  display: grid;
  gap: 1.8rem 2.5rem;
  grid-template-columns: 1fr;
  margin-bottom: clamp(1.8rem, 4vw, 3rem);
}

.zone-col h3 {
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--rule-strong);
  margin-bottom: 0.8rem;
}

.zone-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.zone-col li {
  font-size: 0.97rem;
  color: var(--ink-soft);
  padding: 0.32rem 0;
  border-bottom: 1px dotted var(--rule);
}

.zone-col li:last-child { border-bottom: 0; }

.zone-figure {
  margin: 0;
  border-radius: 4px;
  overflow: hidden;
  box-shadow: var(--shadow);
  background: var(--surface);
}

/* ---------- reasons ---------- */
.reasons {
  display: grid;
  gap: 1.6rem 2.5rem;
  grid-template-columns: 1fr;
}

.reason {
  border-top: 2px solid var(--accent);
  padding-top: 1rem;
}

.reason p {
  color: var(--ink-soft);
  font-size: 0.99rem;
}

/* ---------- hours ---------- */
.hours {
  width: 100%;
  max-width: 620px;
  border-collapse: collapse;
  font-size: 1rem;
}

.hours th,
.hours td {
  text-align: left;
  padding: 0.72rem 0.4rem;
  border-bottom: 1px solid var(--rule);
}

.hours th {
  font-weight: 500;
  color: var(--ink);
  width: 45%;
}

.hours td {
  color: var(--ink-soft);
  font-variant-numeric: tabular-nums;
}

.hours tr.closed th,
.hours tr.closed td {
  color: var(--ink-faint);
}

.hours tr.closed td { font-style: italic; }

/* ---------- contact ---------- */
.section-contact {
  border-top: 1px solid var(--rule);
}

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

.contact-block h3 {
  margin-bottom: 0.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--rule-strong);
}

.contact-big {
  font-family: var(--serif);
  font-size: clamp(1.7rem, 4vw, 2.3rem);
  font-weight: 600;
  margin: 0 0 0.4rem;
  line-height: 1.2;
}

.contact-big a { text-decoration: none; }
.contact-big a:hover { text-decoration: underline; }

.contact-address {
  font-size: 1.05rem;
  color: var(--ink);
  margin-bottom: 0.5rem;
}

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

/* ---------- footer ---------- */
.site-footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--rule);
  background: var(--bg-alt);
  padding: clamp(2.2rem, 5vw, 3.2rem) var(--gutter) 1.6rem;
}

.footer-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 1.4rem 2.5rem;
  justify-content: space-between;
  align-items: flex-start;
}

.footer-name {
  font-family: var(--serif);
  font-size: 1.15rem;
  font-weight: 600;
  margin: 0 0 0.2rem;
}

.footer-line {
  font-size: 0.9rem;
  color: var(--ink-soft);
  margin: 0 0 0.2rem;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.2rem;
  font-size: 0.9rem;
}

.footer-nav a {
  color: var(--ink-soft);
  text-decoration: none;
}

.footer-nav a:hover { color: var(--accent); }

.claim-wrap {
  max-width: var(--maxw);
  margin: 1.8rem auto 0.9rem;
  padding: 0;
}

.claim-banner {
  display: inline-block;
  font-size: 0.8rem;
  color: var(--ink-soft);
  background: color-mix(in srgb, var(--ink) 6%, transparent);
  border: 1px solid var(--rule);
  border-radius: 999px;
  padding: 0.45rem 0.9rem;
  text-decoration: none;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.claim-banner:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.muted {
  max-width: var(--maxw);
  margin: 0 auto;
  font-size: 0.78rem;
  color: var(--ink-faint);
}

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

/* ---------- responsive ---------- */
@media (min-width: 700px) {
  .atelier-grid { grid-template-columns: 0.85fr 1.15fr; }
  .zone-grid { grid-template-columns: repeat(3, 1fr); }
  .reasons { grid-template-columns: repeat(3, 1fr); }
  .contact-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 1020px) {
  .broadsheet { column-count: 2; column-gap: 2.2rem; }
}

@media (max-width: 640px) {
  .broadsheet { column-count: 1; column-rule: none; }
  .nav { width: 100%; order: 3; font-size: 0.88rem; }
  .masthead-actions { margin-left: auto; }
  .call-btn-label { display: none; }
  .hero-title .alt { position: static; opacity: 0; height: 0; overflow: hidden; }
  .hero-title:hover .alt { height: auto; }
}

/* ---------- motion preferences ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  .grain { animation: none; }

  .hero-title {
    animation: none;
    font-variation-settings: "wght" 600, "SOFT" 0, "WONK" 0;
  }

  .hero-title span,
  .btn,
  .call-btn,
  .theme-toggle,
  .claim-banner,
  body { transition: none; }

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

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

@supports not (animation-timeline: scroll()) {
  .hero-title { font-variation-settings: "wght" 600, "SOFT" 0, "WONK" 0; }
}
