/* ============================================================
   Garage Clando — Yeumbeul, Dakar
   Composition: warm earth editorial / diagonal split /
   kinetic hero / expandable index / scroll-following glow
   ============================================================ */

/* ---------- tokens ---------- */
:root {
  --bg: #f5efe4;
  --bg-deep: #ece2d2;
  --ink: #2b1e14;
  --ink-soft: #5b4a3a;
  --accent: #c25a37;
  --accent-deep: #9d4527;
  --secondary: #6a7a4a;
  --line: rgba(43, 30, 20, 0.14);
  --warm-light: rgba(226, 178, 116, 0.55);
  --glow-y: 12%;
  --card: #fbf7ef;
  --shadow: 0 1px 2px rgba(43, 30, 20, 0.05), 0 12px 32px -18px rgba(43, 30, 20, 0.35);
  --radius: 4px;
  --wrap: 1120px;
  --pad: clamp(1.25rem, 5vw, 4rem);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #17110c;
    --bg-deep: #100c08;
    --ink: #f2e8da;
    --ink-soft: #c3b3a0;
    --accent: #e07a52;
    --accent-deep: #f0936c;
    --secondary: #9db06f;
    --line: rgba(242, 232, 218, 0.16);
    --warm-light: rgba(196, 122, 62, 0.30);
    --card: #1f1811;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 14px 36px -20px rgba(0, 0, 0, 0.9);
  }
}

/* explicit theme overrides (header switcher) */
html[data-theme="light"] {
  --bg: #f5efe4;
  --bg-deep: #ece2d2;
  --ink: #2b1e14;
  --ink-soft: #5b4a3a;
  --accent: #c25a37;
  --accent-deep: #9d4527;
  --secondary: #6a7a4a;
  --line: rgba(43, 30, 20, 0.14);
  --warm-light: rgba(226, 178, 116, 0.55);
  --card: #fbf7ef;
  --shadow: 0 1px 2px rgba(43, 30, 20, 0.05), 0 12px 32px -18px rgba(43, 30, 20, 0.35);
}
html[data-theme="dark"] {
  --bg: #17110c;
  --bg-deep: #100c08;
  --ink: #f2e8da;
  --ink-soft: #c3b3a0;
  --accent: #e07a52;
  --accent-deep: #f0936c;
  --secondary: #9db06f;
  --line: rgba(242, 232, 218, 0.16);
  --warm-light: rgba(196, 122, 62, 0.30);
  --card: #1f1811;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 14px 36px -20px rgba(0, 0, 0, 0.9);
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "DM Sans", "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 1.05rem;
  line-height: 1.7;
  overflow-x: hidden;
  text-wrap: pretty;
}
img { max-width: 100%; display: block; height: auto; }
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { color: var(--accent-deep); }
h1, h2, h3, h4 {
  font-family: "Fraunces", "Cormorant Garamond", Georgia, serif;
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.015em;
  margin: 0 0 0.6em;
  text-wrap: balance;
}
p { margin: 0 0 1.1em; }
ul { margin: 0; padding: 0; list-style: none; }

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

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--pad);
}
.eyebrow {
  font-size: 0.76rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--secondary);
  margin: 0 0 0.9rem;
}
.lede { font-size: 1.15rem; color: var(--ink-soft); max-width: 62ch; }
.muted { color: var(--ink-soft); }

/* ---------- scroll-following glow ---------- */
.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.2s linear;
}
main, header.site, footer.site { position: relative; z-index: 1; }

/* ---------- header ---------- */
header.site {
  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);
}
.bar {
  display: flex;
  align-items: center;
  gap: 1rem;
  justify-content: space-between;
  min-height: 68px;
  flex-wrap: wrap;
  padding-block: 0.5rem;
}
.brand {
  display: flex;
  align-items: baseline;
  gap: 0.55rem;
  text-decoration: none;
  color: var(--ink);
}
.brand strong {
  font-family: "Fraunces", serif;
  font-size: 1.22rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.brand span {
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--secondary);
  font-weight: 600;
}
.bar nav { display: flex; align-items: center; gap: 0.35rem; flex-wrap: wrap; }
.bar nav a {
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 0.92rem;
  padding: 0.7rem 0.6rem;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  border-radius: var(--radius);
}
.bar nav a:hover { color: var(--accent); background: color-mix(in srgb, var(--accent) 8%, transparent); }

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

.theme-toggle {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--ink-soft);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  cursor: pointer;
  display: inline-grid;
  place-items: center;
  font-size: 1rem;
  line-height: 1;
  transition: border-color 0.18s ease, color 0.18s ease;
}
.theme-toggle:hover { border-color: var(--accent); color: var(--accent); }
.theme-toggle .icon-sun { display: none; }
html[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
html[data-theme="dark"] .theme-toggle .icon-moon { display: none; }
@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) .theme-toggle .icon-sun { display: block; }
  html:not([data-theme="light"]) .theme-toggle .icon-moon { display: none; }
}

/* ---------- hero: diagonal split ---------- */
.hero {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  background: var(--bg);
  isolation: isolate;
}
.hero__panel {
  padding-block: clamp(3rem, 9vw, 6.5rem);
}
.hero__panel--top { padding-bottom: clamp(4.5rem, 12vw, 8rem); }
.hero__panel--bottom {
  background: var(--bg-deep);
  padding-top: clamp(4.5rem, 12vw, 8rem);
  margin-top: -1px;
}
.hero__panel--bottom > .wrap { max-width: var(--wrap); }

/* the diagonal slice */
.hero__panel--bottom {
  clip-path: polygon(0 5.5rem, 100% 0, 100% 100%, 0 100%);
}
.hero__panel--top {
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 5.5rem), 0 100%);
}

h1.hero__title {
  font-size: clamp(2.6rem, 9vw, 5.4rem);
  font-weight: 300;
  margin-bottom: 0.35em;
  font-variation-settings: "wght" 300, "SOFT" 20, "WONK" 1;
}
.hero__title em {
  font-style: italic;
  color: var(--accent);
  font-variation-settings: "wght" 500, "SOFT" 60, "WONK" 1;
}
.hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.6rem;
  margin-top: 1.6rem;
  font-size: 0.92rem;
  color: var(--ink-soft);
}
.hero__meta strong { color: var(--ink); font-weight: 600; }

.hero__grid {
  display: grid;
  gap: clamp(1.5rem, 4vw, 3rem);
  grid-template-columns: 1fr;
  align-items: center;
}
@media (min-width: 860px) {
  .hero__grid { grid-template-columns: 1.05fr 0.95fr; }
}
.hero__figure { margin: 0; }
.hero__figure img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.hero__figure figcaption {
  font-size: 0.82rem;
  color: var(--ink-soft);
  margin-top: 0.7rem;
  border-left: 2px solid var(--accent);
  padding-left: 0.7rem;
}

/* kinetic hero — weight shifts with scroll */
@keyframes weigh {
  from { font-variation-settings: "wght" 200, "SOFT" 20, "WONK" 1; }
  to   { font-variation-settings: "wght" 800, "SOFT" 40, "WONK" 1; }
}
@supports (animation-timeline: scroll()) {
  @media (prefers-reduced-motion: no-preference) {
    h1.hero__title {
      animation: weigh linear both;
      animation-timeline: scroll(root);
      animation-range: 0 40vh;
    }
  }
}

/* ---------- marquee strip ---------- */
.strip {
  background: var(--ink);
  color: var(--bg);
  padding-block: 0.85rem;
  overflow: hidden;
}
.strip ul {
  display: flex;
  gap: 2.4rem;
  flex-wrap: wrap;
  justify-content: center;
  font-size: 0.84rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 600;
}
.strip li { display: flex; align-items: center; gap: 0.6rem; }
.strip li::before {
  content: "";
  width: 6px; height: 6px;
  background: var(--accent);
  border-radius: 50%;
  flex: none;
}

/* ---------- sections ---------- */
section { padding-block: clamp(3.2rem, 8vw, 6rem); }
.section-head { max-width: 68ch; margin-bottom: clamp(1.8rem, 4vw, 3rem); }
.section-head h2 { font-size: clamp(1.9rem, 4.6vw, 3rem); }
.section-head p { color: var(--ink-soft); }

/* ---------- expandable index (signature) ---------- */
.index { border-top: 1px solid var(--line); }
.entry {
  border-bottom: 1px solid var(--line);
  background: transparent;
  transition: background 0.2s ease;
}
.entry[open] { background: color-mix(in srgb, var(--card) 70%, transparent); }
.entry > summary {
  list-style: none;
  cursor: pointer;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: baseline;
  gap: 0.4rem 1.1rem;
  padding: 1.35rem 0.4rem;
  min-height: 44px;
}
.entry > summary::-webkit-details-marker { display: none; }
.entry__num {
  font-family: "Fraunces", serif;
  font-size: 0.85rem;
  color: var(--accent);
  font-weight: 600;
  letter-spacing: 0.06em;
}
.entry__title {
  font-family: "Fraunces", serif;
  font-size: clamp(1.25rem, 3.2vw, 1.85rem);
  font-weight: 600;
  line-height: 1.2;
}
.entry__tag {
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--secondary);
  font-weight: 600;
  white-space: nowrap;
}
.entry__plus {
  grid-column: 3;
  justify-self: end;
  font-size: 1.4rem;
  color: var(--ink-soft);
  line-height: 1;
  transition: transform 0.25s ease, color 0.2s ease;
}
.entry[open] .entry__plus { transform: rotate(45deg); color: var(--accent); }
.entry__body {
  padding: 0 0.4rem 1.9rem;
  display: grid;
  gap: clamp(1.2rem, 3vw, 2.4rem);
  grid-template-columns: 1fr;
}
@media (min-width: 780px) {
  .entry__body { grid-template-columns: 1.15fr 0.85fr; }
}
.entry__body p:last-child { margin-bottom: 0; }
.entry__body img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.entry__list { margin-top: 0.4rem; }
.entry__list li {
  padding: 0.5rem 0 0.5rem 1.5rem;
  position: relative;
  border-top: 1px dashed var(--line);
  font-size: 0.98rem;
}
.entry__list li:first-child { border-top: 0; }
.entry__list li::before {
  content: "→";
  position: absolute;
  left: 0;
  color: var(--accent);
  font-size: 0.85rem;
}
@supports (interpolate-size: allow-keywords) {
  :root { interpolate-size: allow-keywords; }
  @media (prefers-reduced-motion: no-preference) {
    .entry::details-content {
      block-size: 0;
      overflow: hidden;
      transition: content-visibility 0.3s allow-discrete, block-size 0.3s ease;
    }
    .entry[open]::details-content { block-size: auto; }
  }
}

/* ---------- zone / coverage ---------- */
.zones { background: var(--bg-deep); }
.zone-grid {
  display: grid;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
}
.zone-grid li {
  background: var(--bg);
  padding: 1.15rem 1.1rem;
  font-size: 0.96rem;
}
.zone-grid strong { display: block; font-family: "Fraunces", serif; font-size: 1.05rem; }
.zone-grid span { color: var(--ink-soft); font-size: 0.86rem; }

/* ---------- hours ---------- */
.hours-grid {
  display: grid;
  gap: clamp(1.6rem, 4vw, 3rem);
  grid-template-columns: 1fr;
}
@media (min-width: 820px) {
  .hours-grid { grid-template-columns: 1fr 1fr; }
}
.hours-list { border-top: 1px solid var(--line); }
.hours-list li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.98rem;
}
.hours-list .day { font-weight: 600; }
.hours-list .open { color: var(--secondary); font-weight: 600; }
.hours-note {
  background: var(--card);
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  padding: 1.2rem 1.3rem;
  border-radius: var(--radius);
  font-size: 0.96rem;
}
.hours-note strong { font-family: "Fraunces", serif; }

/* ---------- contact ---------- */
.contact { background: var(--ink); color: var(--bg); }
.contact h2 { color: var(--bg); }
.contact .eyebrow { color: var(--secondary); }
.contact a { color: var(--bg); }
.contact-grid {
  display: grid;
  gap: clamp(1.6rem, 4vw, 3rem);
  grid-template-columns: 1fr;
}
@media (min-width: 820px) {
  .contact-grid { grid-template-columns: 1fr 1fr; }
}
.contact-block { border-top: 1px solid rgba(245, 239, 228, 0.22); padding-top: 1.1rem; }
.contact-block h3 {
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-family: "DM Sans", sans-serif;
  font-weight: 600;
  color: var(--secondary);
  margin-bottom: 0.5rem;
}
.contact-block p { margin-bottom: 0.35rem; }
.phone-big {
  font-family: "Fraunces", serif;
  font-size: clamp(1.7rem, 5.5vw, 2.6rem);
  font-weight: 700;
  text-decoration: none;
  display: inline-block;
  border-bottom: 2px solid var(--accent);
  line-height: 1.25;
}
.phone-big:hover { color: var(--accent); }
.contact .call-btn { background: var(--accent); border-color: var(--accent); margin-top: 1.2rem; }
.contact .call-btn:hover { background: var(--bg); color: var(--ink); border-color: var(--bg); }

/* ---------- footer ---------- */
footer.site {
  background: var(--bg-deep);
  border-top: 1px solid var(--line);
  padding-block: 2.4rem 2rem;
  font-size: 0.9rem;
  color: var(--ink-soft);
}
.foot-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2rem;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1.6rem;
}
.foot-grid p { margin: 0; }
.claim-banner {
  display: inline-block;
  font-size: 0.82rem;
  color: var(--ink-soft);
  background: color-mix(in srgb, var(--accent) 10%, transparent);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.55rem 0.85rem;
  text-decoration: none;
  margin-bottom: 1rem;
}
.claim-banner:hover { color: var(--accent); border-color: var(--accent); }
.attribution { margin: 0; font-size: 0.82rem; }
.attribution a { color: var(--ink-soft); }

/* ---------- reveal on scroll ---------- */
@keyframes rise {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: none; }
}
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .reveal {
      animation: rise linear both;
      animation-timeline: view();
      animation-range: entry 5% cover 26%;
    }
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

@media (max-width: 620px) {
  .hero__panel--bottom { clip-path: polygon(0 2.5rem, 100% 0, 100% 100%, 0 100%); }
  .hero__panel--top { clip-path: polygon(0 0, 100% 0, 100% calc(100% - 2.5rem), 0 100%); }
  .entry > summary { grid-template-columns: auto 1fr; }
  .entry__tag { grid-column: 2; }
  .entry__plus { grid-column: 2; }
}
