/* ============================================================
   KHELKOME — mécanicien mobile, Thiès
   Composition: warm earth editorial · broken bento · drag band
   ============================================================ */

:root {
  --bg:        #f5efe4;
  --bg-soft:   #efe6d6;
  --surface:   #fbf7ef;
  --ink:       #2b1e14;
  --ink-soft:  #5c4a3a;
  --ink-faint: #6f5d4d;
  --accent:    #c25a37;
  --accent-dk: #9c4426;
  --secondary: #5c6b3e;
  --on-accent: #ffffff;
  --accent-ink: #8f3d20;
  --accent-ink-hover: #6f2e17;
  --quote-src: #cdbca8;
  --line:      rgba(43, 30, 20, 0.14);
  --line-soft: rgba(43, 30, 20, 0.08);
  --shadow:    0 1px 2px rgba(43,30,20,.05), 0 12px 32px -18px rgba(43,30,20,.35);
  --radius:    4px;
  --wrap:      1160px;
  --serif: 'Fraunces', 'Cormorant Garamond', Georgia, serif;
  --sans:  'DM Sans', 'Inter', system-ui, -apple-system, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg:        #1a1512;
    --bg-soft:   #221b16;
    --surface:   #241d18;
    --ink:       #f2e9dc;
    --ink-soft:  #c9b9a6;
    --ink-faint: #b3a08c;
    --accent:    #e07a52;
    --accent-dk: #f09268;
    --secondary: #9aab74;
    --on-accent: #2b1206;
    --accent-ink: #f09268;
    --accent-ink-hover: #f7b394;
    --quote-src: #4a3a2c;
    --line:      rgba(242, 233, 220, 0.16);
    --line-soft: rgba(242, 233, 220, 0.09);
    --shadow:    0 1px 2px rgba(0,0,0,.4), 0 14px 36px -18px rgba(0,0,0,.8);
  }
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

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

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

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.14;
  letter-spacing: -0.015em;
  margin: 0;
  text-wrap: balance;
}

p { margin: 0 0 1rem; max-width: 68ch; text-wrap: pretty; }

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

: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: clamp(1.15rem, 5vw, 2.5rem);
}

/* ---------- ambient background shapes ---------- */
.ambient {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}
.blob {
  position: absolute;
  display: block;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.22;
}
.blob-a { width: 46vw; height: 46vw; background: var(--accent);    top: -14vw; left: -10vw;  animation: drift-a 34s ease-in-out infinite; }
.blob-b { width: 38vw; height: 38vw; background: var(--secondary); top: 34vh;  right: -12vw; animation: drift-b 44s ease-in-out infinite; }
.blob-c { width: 30vw; height: 30vw; background: var(--accent);    top: 118vh; left: 6vw;    animation: drift-c 39s ease-in-out infinite; }
.blob-d { width: 34vw; height: 34vw; background: var(--secondary); top: 196vh; right: 4vw;   animation: drift-a 51s ease-in-out infinite reverse; }

@keyframes drift-a {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  50%      { transform: translate3d(4vw, 5vh, 0) scale(1.09); }
}
@keyframes drift-b {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1.04); }
  50%      { transform: translate3d(-5vw, -4vh, 0) scale(1); }
}
@keyframes drift-c {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  50%      { transform: translate3d(3vw, -6vh, 0) scale(1.12); }
}

/* ---------- staggered line reveal ---------- */
@keyframes riseIn {
  from { opacity: 0; translate: 0 22px; }
  to   { opacity: 1; translate: 0 0; }
}

@supports (animation-timeline: view()) {
  .hero-copy > *,
  .section-head > *,
  .bento-item,
  .avis-card,
  .info-card,
  .contact-copy > *,
  .hero-figure {
    animation: riseIn linear both;
    animation-timeline: view();
    animation-range: entry 0% cover 38%;
  }
  .bento-item:nth-child(2),
  .avis-card:nth-child(2),
  .info-card:nth-child(2) { animation-range: entry 4% cover 44%; }
  .bento-item:nth-child(3),
  .avis-card:nth-child(3),
  .info-card:nth-child(3) { animation-range: entry 8% cover 50%; }
  .bento-item:nth-child(4),
  .avis-card:nth-child(4) { animation-range: entry 12% cover 56%; }
}

/* ---------- header ---------- */
.site-head {
  position: sticky;
  top: 0;
  z-index: 40;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line-soft);
}
.head-inner {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  min-height: 72px;
  flex-wrap: wrap;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  color: inherit;
  margin-right: auto;
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 40px; height: 40px;
  background: var(--ink);
  color: var(--bg);
  font-family: var(--serif);
  font-size: 1.35rem;
  font-weight: 700;
  border-radius: 3px;
  flex: none;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-text strong {
  font-family: var(--serif);
  font-size: 1.16rem;
  letter-spacing: 0.06em;
  font-weight: 700;
}
.brand-text em {
  font-style: normal;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.site-nav { display: flex; gap: 1.4rem; }
.site-nav a {
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 0.94rem;
  padding: 0.6rem 0;
  border-bottom: 2px solid transparent;
}
.site-nav a:hover { color: var(--ink); border-bottom-color: var(--accent); }

.call-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 44px;
  padding: 0.6rem 1.05rem;
  background: var(--accent);
  color: var(--on-accent);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  border-radius: 3px;
  transition: background 0.2s ease;
}
.call-btn:hover { background: var(--accent-dk); color: var(--on-accent); }
.call-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0 0 currentColor;
  animation: pulse 2.4s ease-out infinite;
}
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 currentColor; }
  70%  { box-shadow: 0 0 0 9px transparent; }
  100% { box-shadow: 0 0 0 0 transparent; }
}

/* ---------- hero ---------- */
.hero { position: relative; z-index: 1; padding: clamp(3rem, 8vw, 6.5rem) 0 clamp(3rem, 7vw, 5.5rem); }
.hero-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: end;
}
.hero-copy { grid-column: 1 / 5; }
.hero-figure { grid-column: 4 / 7; margin: 0; align-self: start; }

.eyebrow {
  font-size: 0.76rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--secondary);
  font-weight: 500;
  margin-bottom: 1.1rem;
}
.hero h1 {
  font-size: clamp(2.3rem, 6.4vw, 4.15rem);
  margin-bottom: 1.4rem;
}
.hero h1 .mark {
  color: var(--accent);
  font-style: italic;
  font-weight: 400;
}
.lede {
  font-size: 1.1rem;
  color: var(--ink-soft);
  max-width: 46ch;
  margin-bottom: 1.9rem;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.8rem; margin-bottom: 2.4rem; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.75rem 1.5rem;
  border-radius: 3px;
  text-decoration: none;
  font-size: 0.98rem;
  font-weight: 500;
  transition: 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: var(--on-accent); }
.btn-ghost { border: 1px solid var(--line); color: var(--ink); }
.btn-ghost:hover { border-color: var(--accent-ink); color: var(--accent-ink); }

.hero-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 1.6rem 2.4rem;
  margin: 0;
  padding-top: 1.6rem;
  border-top: 1px solid var(--line);
}
.hero-facts dt {
  font-size: 0.72rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 0.25rem;
}
.hero-facts dd { margin: 0; font-family: var(--serif); font-size: 1.06rem; }

.hero-figure img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.hero-figure figcaption {
  margin-top: 0.7rem;
  font-size: 0.82rem;
  color: var(--ink-faint);
  max-width: 40ch;
}

/* ---------- section head ---------- */
.section-head { margin-bottom: clamp(1.8rem, 4vw, 2.8rem); }
.section-head h2 { font-size: clamp(1.7rem, 3.6vw, 2.5rem); margin-bottom: 0.7rem; }
.section-note { color: var(--ink-soft); font-size: 1rem; margin: 0; }

/* ---------- services band ---------- */
.services { position: relative; z-index: 1; padding: clamp(2.5rem, 6vw, 4.5rem) 0; }
.band-shell { position: relative; }
.band {
  display: flex;
  gap: 1.1rem;
  overflow-x: auto;
  overflow-y: hidden;
  cursor: grab;
  padding: 0.4rem clamp(1.15rem, 5vw, 2.5rem) 1.6rem;
  scrollbar-width: none;
  -ms-overflow-style: none;
  touch-action: pan-y;
  scroll-snap-type: x proximity;
}
.band::-webkit-scrollbar { display: none; }
.band.is-dragging { cursor: grabbing; scroll-snap-type: none; }
.band.is-dragging * { user-select: none; }

.card {
  flex: 0 0 clamp(250px, 74vw, 320px);
  scroll-snap-align: start;
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  padding: 0 0 1.3rem;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.25s ease;
}
.card:hover { transform: translateY(-4px); }
.card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  margin-bottom: 1.1rem;
}
.card h3 {
  font-size: 1.22rem;
  padding: 0 1.25rem;
  margin-bottom: 0.6rem;
}
.card p {
  padding: 0 1.25rem;
  font-size: 0.94rem;
  color: var(--ink-soft);
  margin-bottom: 0.9rem;
}
.card-meta {
  font-size: 0.76rem !important;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--secondary) !important;
  margin-bottom: 0 !important;
}
.band-hint {
  text-align: center;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin: 0;
}

/* ---------- broken bento ---------- */
.bento-section { position: relative; z-index: 1; padding: clamp(2.5rem, 6vw, 4.5rem) 0; }
.bento {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: clamp(0.9rem, 2vw, 1.4rem);
}
.bento-item {
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  padding: clamp(1.3rem, 2.6vw, 1.9rem);
  box-shadow: var(--shadow);
}
.bento-item h3 { font-size: 1.3rem; margin-bottom: 0.65rem; }
.bento-item p { font-size: 0.96rem; color: var(--ink-soft); margin-bottom: 0; }
.step {
  display: block;
  font-family: var(--serif);
  font-size: 0.85rem;
  letter-spacing: 0.16em;
  color: var(--accent);
  margin-bottom: 0.7rem;
}

/* intentional misalignment — one breaks out, one leaves a gap */
.b1 { grid-column: 1 / 4; }
.b2 { grid-column: 4 / 7; margin-top: 2.6rem; }
.b3 { grid-column: 2 / 5; margin-top: -1.4rem; }
.b4 { grid-column: 5 / 7; margin-top: 1.2rem; }
.b5 { grid-column: 1 / 3; margin-top: 2.2rem; }
.b6 { grid-column: 3 / 7; margin-top: -0.6rem; }

.quote {
  background: var(--ink);
  color: var(--bg);
  border-color: transparent;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.quote blockquote {
  margin: 0 0 1rem;
  font-family: var(--serif);
  font-size: 1.14rem;
  line-height: 1.45;
  font-style: italic;
}
.quote-src {
  font-size: 0.78rem !important;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--quote-src) !important;
  margin: 0 !important;
}

.zone-list {
  list-style: none;
  margin: 0 0 1rem;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 0.35rem 1.6rem;
}
.zone-list li {
  font-size: 0.94rem;
  color: var(--ink-soft);
  padding-left: 1.1rem;
  position: relative;
}
.zone-list li::before {
  content: "";
  position: absolute;
  left: 0; top: 0.72em;
  width: 6px; height: 6px;
  background: var(--secondary);
  border-radius: 50%;
}
.zone-note { font-size: 0.86rem !important; color: var(--ink-faint) !important; margin: 0 !important; }

/* ---------- avis ---------- */
.avis { position: relative; z-index: 1; padding: clamp(2.5rem, 6vw, 4.5rem) 0; }
.avis-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: clamp(0.9rem, 2vw, 1.4rem);
}
.avis-card {
  margin: 0;
  background: var(--bg-soft);
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 1.5rem 1.5rem 1.2rem;
}
.avis-card blockquote {
  margin: 0 0 1rem;
  font-size: 0.98rem;
  color: var(--ink-soft);
}
.avis-card figcaption {
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

/* ---------- contact ---------- */
.contact { position: relative; z-index: 1; padding: clamp(2.5rem, 6vw, 5rem) 0 clamp(3rem, 7vw, 5.5rem); }
.contact-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: start;
}
.contact-copy { grid-column: 1 / 4; }
.contact-cards {
  grid-column: 4 / 7;
  display: grid;
  gap: 1rem;
}
.contact-copy h2 { font-size: clamp(1.7rem, 3.6vw, 2.5rem); margin-bottom: 1rem; }
.contact-copy p { color: var(--ink-soft); }

.phone-big {
  display: inline-flex;
  flex-direction: column;
  gap: 0.15rem;
  margin: 1.4rem 0 1.2rem;
  padding: 1rem 1.6rem;
  background: var(--accent);
  color: var(--on-accent);
  text-decoration: none;
  border-radius: 3px;
  transition: background 0.2s ease;
}
.phone-big:hover { background: var(--accent-dk); color: var(--on-accent); }
.phone-label {
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  opacity: 1;
}
.phone-num {
  font-family: var(--serif);
  font-size: clamp(1.5rem, 4vw, 2rem);
  font-weight: 600;
  letter-spacing: 0.01em;
}
.contact-alt { font-size: 0.92rem; color: var(--ink-faint); }

.info-card {
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  padding: 1.4rem 1.5rem;
  box-shadow: var(--shadow);
}
.info-card h3 { font-size: 1.1rem; margin-bottom: 0.85rem; }
.info-card address { font-style: normal; font-size: 0.98rem; color: var(--ink-soft); margin-bottom: 0.7rem; }
.hours { margin: 0 0 0.8rem; }
.hours > div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.32rem 0;
  border-bottom: 1px dashed var(--line-soft);
  font-size: 0.94rem;
}
.hours > div:last-child { border-bottom: 0; }
.hours dt { color: var(--ink-soft); }
.hours dd { margin: 0; font-weight: 500; }
.info-note { font-size: 0.86rem; color: var(--ink-faint); margin: 0 0 0.6rem; }
.map-link { font-size: 0.9rem; }

.prep-list { margin: 0; padding-left: 1.15rem; }
.prep-list li { font-size: 0.94rem; color: var(--ink-soft); margin-bottom: 0.3rem; }

/* ---------- footer ---------- */
.site-foot {
  position: relative;
  z-index: 1;
  background: var(--bg-soft);
  border-top: 1px solid var(--line);
  padding: clamp(2.2rem, 5vw, 3.2rem) 0 2rem;
}
.foot-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 1.4rem 2.5rem;
  align-items: flex-start;
  justify-content: space-between;
}
.foot-brand strong {
  font-family: var(--serif);
  font-size: 1.15rem;
  letter-spacing: 0.06em;
  display: block;
  margin-bottom: 0.3rem;
}
.foot-brand p { font-size: 0.88rem; color: var(--ink-faint); margin: 0; }
.foot-nav { display: flex; flex-wrap: wrap; gap: 0.6rem 1.3rem; }
.foot-nav a { font-size: 0.9rem; color: var(--ink-soft); text-decoration: none; }
.foot-nav a:hover { color: var(--accent-ink); text-decoration: underline; }
.foot-legal { font-size: 0.82rem; color: var(--ink-faint); margin: 0; flex-basis: 100%; }

.foot-claim { margin-top: 1.8rem; }
.claim-banner {
  display: inline-block;
  font-size: 0.78rem;
  color: var(--ink-faint);
  background: color-mix(in srgb, var(--ink) 5%, transparent);
  border: 1px solid var(--line-soft);
  border-radius: 3px;
  padding: 0.4rem 0.75rem;
  text-decoration: none;
}
.claim-banner:hover { color: var(--accent-ink); border-color: var(--accent-ink); }

.foot-attr { margin-top: 1rem; }
.attribution {
  position: static;
  font-size: 0.72rem;
  color: var(--ink-soft);
  margin: 0;
  font-family: var(--sans);
}
.attribution a { color: inherit; }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .hero-copy { grid-column: 1 / 7; }
  .hero-figure { grid-column: 1 / 7; margin-top: 1.6rem; }
  .contact-copy { grid-column: 1 / 7; }
  .contact-cards { grid-column: 1 / 7; }

  .bento-item { grid-column: 1 / 7 !important; margin-top: 0 !important; }
  .b6 { grid-column: 1 / 7 !important; }
}

@media (max-width: 720px) {
  .site-nav { display: none; }
  .head-inner { min-height: 64px; }
  .brand-text em { display: none; }
  .call-btn { padding: 0.55rem 0.85rem; font-size: 0.84rem; }
  .hero-facts { gap: 1.1rem 1.6rem; }
  .band { padding-inline: 1.15rem; }
}

@media (max-width: 420px) {
  .call-btn span:not(.call-dot) { display: none; }
  .call-btn { padding: 0.6rem 0.75rem; }
}

/* ---------- reduced motion ---------- */
@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;
  }
  .blob { animation: none !important; }
  .hero-copy > *, .section-head > *, .bento-item, .avis-card,
  .info-card, .contact-copy > *, .hero-figure {
    animation: none !important;
    opacity: 1 !important;
    translate: none !important;
  }
}
