/* ============================================================
   Citymarket Dakar — cafe warmth / editorial serif / broadsheet
   ============================================================ */

:root {
  --bg: #f4ead8;
  --bg-2: #efe2cb;
  --surface: #fbf5e9;
  --ink: #3a2415;
  --ink-soft: #6b5340;
  --accent: #6b1f1a;
  --accent-soft: #8c2f28;
  --secondary: #5a5e3a;
  --line: rgba(58, 36, 21, 0.16);
  --line-strong: rgba(58, 36, 21, 0.3);
  --wa: #1f7a4d;
  --wa-ink: #f6fbf7;
  --shadow: 0 1px 2px rgba(58, 36, 21, 0.06), 0 12px 32px -18px rgba(58, 36, 21, 0.35);
  --radius: 4px;
  --wrap: 1180px;
  --grain-opacity: 0.055;
  color-scheme: light;
}

html[data-theme="dark"] {
  --bg: #1c1410;
  --bg-2: #241a14;
  --surface: #261c15;
  --ink: #f0e4d2;
  --ink-soft: #bda98f;
  --accent: #e08a72;
  --accent-soft: #f0a68f;
  --secondary: #a8ad7c;
  --line: rgba(240, 228, 210, 0.16);
  --line-strong: rgba(240, 228, 210, 0.3);
  --wa: #2f9e63;
  --wa-ink: #0f1a13;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 14px 36px -18px rgba(0, 0, 0, 0.7);
  --grain-opacity: 0.075;
  color-scheme: dark;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #1c1410;
    --bg-2: #241a14;
    --surface: #261c15;
    --ink: #f0e4d2;
    --ink-soft: #bda98f;
    --accent: #e08a72;
    --accent-soft: #f0a68f;
    --secondary: #a8ad7c;
    --line: rgba(240, 228, 210, 0.16);
    --line-strong: rgba(240, 228, 210, 0.3);
    --wa: #2f9e63;
    --wa-ink: #0f1a13;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 14px 36px -18px rgba(0, 0, 0, 0.7);
    --grain-opacity: 0.075;
    color-scheme: dark;
  }
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: 'DM Sans', 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 1.05rem;
  line-height: 1.7;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* ---------- grain overlay ---------- */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: var(--grain-opacity);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/><feColorMatrix type='saturate' values='0'/></filter><rect width='220' height='220' filter='url(%23n)'/></svg>");
  background-size: 220px 220px;
  mix-blend-mode: multiply;
}
html[data-theme="dark"] body::before { mix-blend-mode: screen; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) body::before { mix-blend-mode: screen; }
}

img, svg { display: block; max-width: 100%; }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--accent-soft); }

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

h1, h2, h3, h4 {
  font-family: 'Fraunces', 'Cormorant Garamond', Georgia, serif;
  font-weight: 500;
  line-height: 1.12;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

p { text-wrap: pretty; }

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: clamp(1.15rem, 4vw, 2.75rem);
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--accent);
  color: #fff;
  padding: 0.6rem 1rem;
  z-index: 10000;
}
.skip:focus { left: 0.5rem; top: 0.5rem; }

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

.head-inner {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: 68px;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--ink);
  margin-right: auto;
}
.brand-mark { color: var(--accent); flex: none; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-text strong {
  font-family: 'Fraunces', serif;
  font-weight: 600;
  font-size: 1.16rem;
  letter-spacing: -0.02em;
}
.brand-text em {
  font-style: normal;
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--secondary);
  font-weight: 500;
}

.site-nav {
  display: none;
  gap: 1.35rem;
  font-size: 0.9rem;
}
.site-nav a {
  color: var(--ink-soft);
  text-decoration: none;
  padding: 0.5rem 0;
  border-bottom: 1.5px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}
.site-nav a:hover { color: var(--accent); border-bottom-color: var(--accent); }

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

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

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 44px;
  padding: 0.62rem 1.15rem;
  border-radius: var(--radius);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.92rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
}
.btn-lg { padding: 0.85rem 1.6rem; font-size: 1rem; min-height: 52px; }
.btn-wa { background: var(--wa); color: var(--wa-ink); }
.btn-wa:hover { background: color-mix(in srgb, var(--wa) 84%, #000); color: var(--wa-ink); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.btn-ghost:hover { background: var(--bg-2); color: var(--accent); border-color: var(--accent); }
.btn:active { transform: translateY(1px); }

/* ---------- hero ---------- */
.hero {
  padding-block: clamp(3rem, 9vw, 6.5rem) clamp(2.5rem, 6vw, 4.5rem);
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(120% 90% at 12% 0%, color-mix(in srgb, var(--accent) 7%, transparent) 0%, transparent 55%),
    var(--bg);
}

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

.hero-title {
  font-size: clamp(2.5rem, 8.2vw, 5.6rem);
  font-weight: 300;
  line-height: 1.02;
  letter-spacing: -0.03em;
  max-width: 16ch;
  margin-bottom: 1.6rem;
  font-variation-settings: 'wght' 300, 'opsz' 120;
  animation: weigh linear both;
  animation-timeline: scroll(root);
  animation-range: 0 30vh;
}

@keyframes weigh {
  from { font-variation-settings: 'wght' 220, 'opsz' 120; }
  to   { font-variation-settings: 'wght' 780, 'opsz' 120; }
}

@media (prefers-reduced-motion: reduce) {
  .hero-title {
    animation: none;
    font-variation-settings: 'wght' 420, 'opsz' 120;
  }
}

.hero-lede {
  max-width: 62ch;
  font-size: 1.1rem;
  color: var(--ink-soft);
  margin-bottom: 2rem;
}

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

.hero-facts {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  border-top: 1px solid var(--line);
  padding-top: 1.5rem;
  max-width: 780px;
}
.hero-facts > div { display: flex; flex-direction: column; gap: 0.15rem; }
.hero-facts dt {
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--secondary);
  font-weight: 600;
}
.hero-facts dd { font-family: 'Fraunces', serif; font-size: 1.05rem; }

/* ---------- ticker ---------- */
.ticker {
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background: var(--bg-2);
  padding-block: 0.7rem;
}
.ticker-track {
  display: flex;
  gap: 1.4rem;
  white-space: nowrap;
  width: max-content;
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--secondary);
  font-weight: 500;
  animation: slide 42s linear infinite;
}
@keyframes slide {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
  .ticker-track { animation: none; }
}

/* ---------- menu sections ---------- */
.menu-section {
  padding-block: clamp(3rem, 7vw, 5.5rem);
  border-bottom: 1px solid var(--line);
}
.menu-section.alt { background: var(--bg-2); }

.section-head { max-width: 66ch; margin-bottom: clamp(2rem, 4vw, 3rem); }
.section-head h2 {
  font-size: clamp(1.9rem, 4.6vw, 3.1rem);
  margin-bottom: 0.85rem;
}
.section-note { color: var(--ink-soft); font-size: 1rem; }

.menu-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  border-top: 1px solid var(--line);
}

.menu-item {
  padding-block: 1.35rem;
  border-bottom: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.mi-head {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
}
.mi-head h3 {
  font-size: 1.22rem;
  font-weight: 500;
  flex: 1;
}
.mi-head::after {
  content: '';
  flex: 1 1 auto;
  border-bottom: 1px dotted var(--line-strong);
  transform: translateY(-0.28em);
  order: 1;
}
.mi-head h3 { order: 0; }
.price {
  order: 2;
  font-family: 'Fraunces', serif;
  font-weight: 600;
  font-size: 1.02rem;
  color: var(--accent);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.menu-item p {
  font-size: 0.94rem;
  color: var(--ink-soft);
  line-height: 1.6;
  max-width: 60ch;
}

.menu-foot {
  margin-top: 1.75rem;
  font-size: 0.88rem;
  color: var(--secondary);
  border-left: 3px solid var(--secondary);
  padding-left: 0.9rem;
  max-width: 62ch;
}

/* ---------- atelier / broadsheet ---------- */
.atelier {
  padding-block: clamp(3rem, 7vw, 5.5rem);
  border-bottom: 1px solid var(--line);
}

.broadsheet {
  column-gap: 3rem;
  font-size: 1.02rem;
}
.broadsheet p { margin-bottom: 1.1rem; color: var(--ink-soft); }
.broadsheet .lead {
  color: var(--ink);
  font-size: 1.18rem;
  line-height: 1.65;
}
.broadsheet .lead::first-letter {
  font-family: 'Fraunces', serif;
  font-size: 3.4em;
  line-height: 0.82;
  float: left;
  padding: 0.06em 0.1em 0 0;
  color: var(--accent);
  font-weight: 600;
}

.suppliers {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  margin-top: 2.5rem;
  border-top: 1px solid var(--line);
  padding-top: 1.75rem;
}
.sup h3 {
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--secondary);
  font-family: 'DM Sans', sans-serif;
  font-weight: 600;
  margin-bottom: 0.35rem;
}
.sup p { font-size: 0.94rem; color: var(--ink-soft); }

/* ---------- order ---------- */
.order {
  padding-block: clamp(3rem, 7vw, 5.5rem);
  border-bottom: 1px solid var(--line);
  background: var(--bg-2);
}

.steps {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  margin-bottom: 3rem;
}
.steps li {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem 1.4rem;
  box-shadow: var(--shadow);
}
.step-n {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--bg);
  font-family: 'Fraunces', serif;
  font-weight: 600;
  font-size: 1rem;
  margin-bottom: 0.85rem;
}
.steps h3 { font-size: 1.15rem; margin-bottom: 0.4rem; }
.steps p { font-size: 0.94rem; color: var(--ink-soft); }

.order-cta {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  align-items: flex-start;
  background: var(--ink);
  color: var(--bg);
  border-radius: var(--radius);
  padding: clamp(1.5rem, 4vw, 2.5rem);
  margin-bottom: 3rem;
}
.order-cta h3 {
  font-size: clamp(1.4rem, 3.4vw, 2rem);
  color: var(--bg);
  margin-bottom: 0.4rem;
}
.order-cta p { color: color-mix(in srgb, var(--bg) 78%, transparent); font-size: 0.96rem; max-width: 46ch; }

.info-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}
.info h3 {
  font-size: 1.1rem;
  margin-bottom: 0.85rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--line);
}
.info p { font-size: 0.95rem; color: var(--ink-soft); }
.fine { font-size: 0.86rem; margin-top: 0.7rem; color: var(--secondary); }

.hours { list-style: none; padding: 0; font-size: 0.94rem; }
.hours li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.32rem 0;
  border-bottom: 1px dotted var(--line);
  color: var(--ink-soft);
}
.hours li span:last-child { font-variant-numeric: tabular-nums; }
.hours li.closed { color: var(--accent); font-weight: 500; }

/* ---------- house line ---------- */
.house-line {
  padding-block: clamp(3rem, 8vw, 6rem);
  background: var(--bg);
}
.house-line blockquote {
  max-width: 34ch;
  margin-inline: auto;
  text-align: center;
}
.house-line p {
  font-family: 'Fraunces', serif;
  font-size: clamp(1.5rem, 4.4vw, 2.6rem);
  font-weight: 300;
  line-height: 1.25;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
}
.house-line cite {
  font-style: normal;
  font-size: 0.74rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--secondary);
  font-weight: 600;
}

/* ---------- footer ---------- */
.site-foot {
  background: var(--ink);
  color: var(--bg);
  padding-block: clamp(2.5rem, 5vw, 3.5rem) 1.5rem;
}
.foot-inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid color-mix(in srgb, var(--bg) 20%, transparent);
}
.foot-brand strong {
  font-family: 'Fraunces', serif;
  font-size: 1.3rem;
  font-weight: 600;
  display: block;
  margin-bottom: 0.5rem;
}
.foot-brand p, .foot-col p {
  font-size: 0.9rem;
  color: color-mix(in srgb, var(--bg) 72%, transparent);
}
.foot-col h4 {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--bg) 60%, transparent);
  font-weight: 600;
  margin-bottom: 0.6rem;
}
.site-foot a { color: var(--bg); text-decoration-color: color-mix(in srgb, var(--bg) 40%, transparent); }
.site-foot a:hover { color: var(--accent-soft); }

.foot-base {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  justify-content: space-between;
  padding-top: 1.25rem;
}
.muted { font-size: 0.8rem; color: color-mix(in srgb, var(--bg) 58%, transparent); }
.attribution a { color: color-mix(in srgb, var(--bg) 70%, transparent); }

/* ---------- floating whatsapp ---------- */
.wa-float {
  position: fixed;
  right: clamp(0.9rem, 3vw, 1.6rem);
  bottom: clamp(0.9rem, 3vw, 1.6rem);
  z-index: 300;
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--wa);
  color: var(--wa-ink);
  box-shadow: 0 8px 24px -8px rgba(0, 0, 0, 0.5);
  transition: transform 0.2s ease, background 0.2s ease;
}
.wa-float:hover { transform: scale(1.06); background: color-mix(in srgb, var(--wa) 84%, #000); color: var(--wa-ink); }

/* ============================================================
   breakpoints
   ============================================================ */
@media (min-width: 640px) {
  .hero-facts { grid-template-columns: repeat(3, 1fr); }
  .menu-grid { grid-template-columns: repeat(2, 1fr); column-gap: 3rem; }
  .suppliers { grid-template-columns: repeat(3, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .info-grid { grid-template-columns: repeat(2, 1fr); }
  .foot-inner { grid-template-columns: 1.6fr 1fr 1fr; }
  .order-cta { flex-direction: row; align-items: center; justify-content: space-between; }
}

@media (min-width: 900px) {
  .site-nav { display: flex; }
  .broadsheet { column-count: 3; }
  .broadsheet .lead { column-span: all; }
  .steps { grid-template-columns: repeat(4, 1fr); }
  .info-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 1100px) {
  .menu-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 899px) {
  .head-actions .btn-wa { display: none; }
}
