/* ============================================
   Tables du Médoc — Base + Design Tokens
   ============================================ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  -webkit-text-size-adjust: none;
  text-size-adjust: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  scroll-behavior: smooth;
  hanging-punctuation: first last;
}

:root,
[data-theme='dark'] {
  /* Surfaces */
  --color-bg: #0b0705;
  --color-surface: #170f0c;
  --color-surface-2: #1f1512;
  --color-border: #3a2420;
  --color-divider: #2a1a16;

  /* Text */
  --color-text: #f5efe6;
  --color-text-muted: #b8a99c;
  --color-text-faint: #7a6a5d;
  --color-text-inverse: #0b0705;

  /* Accents */
  --color-bordeaux: #9c1f2e;
  --color-bordeaux-hover: #b8283a;
  --color-bordeaux-highlight: #2a1013;
  --color-gold: #d4af37;
  --color-gold-hover: #e8c76f;
  --color-gold-highlight: #2c2412;

  --shadow-sm: 0 1px 2px rgb(0 0 0 / 0.4);
  --shadow-md: 0 8px 24px rgb(0 0 0 / 0.45);
  --shadow-lg: 0 20px 48px rgb(0 0 0 / 0.55);
}

[data-theme='light'] {
  --color-bg: #f7f1e6;
  --color-surface: #ffffff;
  --color-surface-2: #fbf5ea;
  --color-border: #e3d5be;
  --color-divider: #ebe0cb;

  --color-text: #1d1210;
  --color-text-muted: #6b5a4e;
  --color-text-faint: #9a8b7c;
  --color-text-inverse: #f7f1e6;

  --color-bordeaux: #7a1622;
  --color-bordeaux-hover: #611119;
  --color-bordeaux-highlight: #f3dde0;
  --color-gold: #8c6900;
  --color-gold-hover: #6f5300;
  --color-gold-highlight: #f3e9cc;

  --shadow-sm: 0 1px 2px rgb(0 0 0 / 0.06);
  --shadow-md: 0 8px 24px rgb(0 0 0 / 0.08);
  --shadow-lg: 0 20px 48px rgb(0 0 0 / 0.12);
}

:root {
  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-body: 'Work Sans', 'Helvetica Neue', sans-serif;

  --text-xs: clamp(0.75rem, 0.7rem + 0.2vw, 0.875rem);
  --text-sm: clamp(0.875rem, 0.82rem + 0.25vw, 1rem);
  --text-base: clamp(1rem, 0.96rem + 0.2vw, 1.125rem);
  --text-lg: clamp(1.15rem, 1.05rem + 0.5vw, 1.5rem);
  --text-xl: clamp(1.5rem, 1.2rem + 1.25vw, 2.25rem);
  --text-2xl: clamp(2rem, 1.1rem + 3vw, 3.75rem);
  --text-3xl: clamp(2.5rem, 0.8rem + 5.5vw, 6.5rem);

  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;
  --space-32: 8rem;

  --radius-sm: 0.375rem;
  --radius-md: 0.625rem;
  --radius-lg: 1rem;
  --radius-full: 9999px;

  --content-default: 720px;
  --content-wide: 1120px;

  --transition: 220ms cubic-bezier(0.16, 1, 0.3, 1);
}

body {
  min-height: 100dvh;
  line-height: 1.6;
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: var(--color-text);
  background-color: var(--color-bg);
  overflow-x: hidden;
  transition: background-color var(--transition), color var(--transition);
}

img, picture, svg { display: block; max-width: 100%; height: auto; }
ul[role='list'] { list-style: none; }
button, a { font: inherit; color: inherit; }

h1, h2, h3 { text-wrap: balance; line-height: 1.12; font-family: var(--font-display); }
p, li { text-wrap: pretty; }

::selection { background: color-mix(in oklab, var(--color-gold) 35%, transparent); color: var(--color-text); }

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

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

button { cursor: pointer; background: none; border: none; }

a, button, [role='button'] {
  transition: color var(--transition), background var(--transition), border-color var(--transition), box-shadow var(--transition), transform var(--transition);
}

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border-width: 0;
}

/* ============================================
   Layout helpers
   ============================================ */
.wrap {
  width: 100%;
  max-width: var(--content-wide);
  margin-inline: auto;
  padding-inline: var(--space-6);
}
.wrap--narrow { max-width: var(--content-default); }

section { padding-block: clamp(var(--space-16), 9vw, var(--space-32)); position: relative; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-gold);
}
.eyebrow::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-gold);
  box-shadow: 0 0 0 3px color-mix(in oklab, var(--color-gold) 25%, transparent);
}

.divider-mark {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  margin-block: var(--space-6);
}
.divider-mark span {
  width: 48px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--color-gold));
}
.divider-mark span:last-child { background: linear-gradient(90deg, var(--color-gold), transparent); }
.divider-mark .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--color-gold); flex-shrink: 0; }

/* ============================================
   Header
   ============================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in oklab, var(--color-bg) 85%, transparent);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--color-divider);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: var(--space-4);
}
.brand {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  text-decoration: none;
  color: var(--color-text);
  min-width: 0;
}
.brand-mark {
  width: 38px;
  height: 38px;
  flex-shrink: 0;
}
.brand-name {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 600;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.header-actions { display: flex; align-items: center; gap: var(--space-4); flex-shrink: 0; }

@media (max-width: 480px) {
  .brand-mark { width: 30px; height: 30px; }
  .brand-name { font-size: 1rem; }
  .header-actions { gap: var(--space-2); }
  .header-actions .btn--outline { display: none; }
}

.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  border: 1px solid var(--color-border);
  color: var(--color-text-muted);
}
.theme-toggle:hover { color: var(--color-gold); border-color: var(--color-gold); }
.theme-toggle svg { width: 18px; height: 18px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-6);
  border-radius: var(--radius-full);
  font-size: var(--text-sm);
  font-weight: 600;
  text-decoration: none;
  max-width: 100%;
}
.btn--primary, .btn--outline { white-space: nowrap; }
@media (max-width: 480px) {
  .btn--primary, .btn--outline { white-space: normal; text-align: center; }
}
.btn--primary {
  background: linear-gradient(180deg, var(--color-gold-hover), var(--color-gold));
  color: #201408;
  box-shadow: var(--shadow-sm);
}
.btn--primary:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }
.btn--outline {
  border: 1px solid var(--color-border);
  color: var(--color-text);
}
.btn--outline:hover { border-color: var(--color-gold); color: var(--color-gold); }

/* ============================================
   Hero
   ============================================ */
.hero {
  padding-block: clamp(var(--space-20), 12vw, 9rem) clamp(var(--space-16), 8vw, var(--space-24));
  text-align: center;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: -20% -10% auto -10%;
  height: 620px;
  background:
    radial-gradient(circle at 25% 20%, color-mix(in oklab, var(--color-bordeaux) 55%, transparent), transparent 60%),
    radial-gradient(circle at 78% 8%, color-mix(in oklab, var(--color-gold) 22%, transparent), transparent 55%);
  -webkit-mask-image: linear-gradient(to bottom, black 0%, black 55%, transparent 100%);
  mask-image: linear-gradient(to bottom, black 0%, black 55%, transparent 100%);
  pointer-events: none;
  z-index: 0;
}
[data-theme='light'] .hero::before { opacity: 0.5; }
.hero .wrap { position: relative; z-index: 1; }

.hero-crest {
  width: 76px;
  height: 76px;
  margin-inline: auto;
  margin-bottom: var(--space-6);
}

.hero h1 {
  font-size: var(--text-3xl);
  font-weight: 600;
  max-width: 16ch;
  margin-inline: auto;
  margin-top: var(--space-5);
}
.hero h1 em {
  font-style: italic;
  color: var(--color-gold);
  font-weight: 500;
}

.hero-sub {
  max-width: 46ch;
  margin: var(--space-6) auto 0;
  color: var(--color-text-muted);
  font-size: var(--text-lg);
  line-height: 1.6;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-4);
  margin-top: var(--space-10);
}

.hero-note {
  margin-top: var(--space-6);
  font-size: var(--text-xs);
  color: var(--color-text-faint);
  letter-spacing: 0.04em;
}

/* ============================================
   Value props
   ============================================ */
.values { border-top: 1px solid var(--color-divider); }
.section-head { text-align: center; max-width: 42ch; margin-inline: auto; margin-bottom: var(--space-16); }
.section-head h2 { font-size: var(--text-2xl); font-weight: 600; }
.section-head p { color: var(--color-text-muted); margin-top: var(--space-4); font-size: var(--text-base); }

.value-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-6);
}
@media (max-width: 980px) { .value-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .value-grid { grid-template-columns: 1fr; } }

.value-card {
  padding: var(--space-8) var(--space-6);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  transition: border-color var(--transition), transform var(--transition), box-shadow var(--transition);
}
.value-card:hover {
  border-color: var(--color-gold);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}
.value-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-gold-highlight);
  color: var(--color-gold);
  margin-bottom: var(--space-5);
}
.value-icon svg { width: 22px; height: 22px; }
.value-card h3 {
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: 600;
  margin-bottom: var(--space-2);
}
.value-card p { color: var(--color-text-muted); font-size: var(--text-sm); }

/* ============================================
   Cities
   ============================================ */
.cities { background: var(--color-surface); border-top: 1px solid var(--color-divider); border-bottom: 1px solid var(--color-divider); }

.city-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-3);
  max-width: 880px;
  margin-inline: auto;
}
.city-chip {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-5);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  font-size: var(--text-sm);
  color: var(--color-text);
  background: var(--color-bg);
}
.city-chip svg { width: 14px; height: 14px; color: var(--color-gold); flex-shrink: 0; }

.cities-note {
  text-align: center;
  margin-top: var(--space-8);
  color: var(--color-text-faint);
  font-size: var(--text-sm);
}

/* ============================================
   Restaurateurs CTA
   ============================================ */
.pro-cta {
  border-top: 1px solid var(--color-divider);
}
.pro-cta .wrap { max-width: 880px; }
.pro-panel {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: clamp(var(--space-10), 6vw, var(--space-16));
  text-align: center;
  background: linear-gradient(160deg, var(--color-bordeaux-highlight), var(--color-surface) 55%);
  position: relative;
  overflow: hidden;
}
.pro-panel h2 { font-size: var(--text-xl); font-weight: 600; }
.pro-panel p { color: var(--color-text-muted); max-width: 52ch; margin: var(--space-4) auto var(--space-8); }
.pro-list {
  display: grid;
  grid-template-columns: repeat(3, auto);
  justify-content: center;
  gap: var(--space-3) var(--space-8);
  margin: 0 auto var(--space-8);
  font-size: var(--text-sm);
  color: var(--color-text);
}
@media (max-width: 640px) { .pro-list { grid-template-columns: 1fr; } }
.pro-list li { display: flex; align-items: center; gap: var(--space-2); }
.pro-list svg { width: 16px; height: 16px; color: var(--color-gold); flex-shrink: 0; }

/* ============================================
   Footer
   ============================================ */
.site-footer {
  padding-block: var(--space-12);
  border-top: 1px solid var(--color-divider);
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-6);
}
.footer-brand {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}
.footer-brand .brand-mark { width: 28px; height: 28px; }
.footer-meta {
  font-size: var(--text-xs);
  color: var(--color-text-faint);
  text-align: right;
}
.footer-meta a { color: var(--color-text-muted); text-decoration: none; }
.footer-meta a:hover { color: var(--color-gold); }

@media (max-width: 560px) {
  .footer-inner { flex-direction: column; text-align: center; }
  .footer-meta { text-align: center; }
}

/* ============================================
   Reveal-on-scroll
   ============================================ */
[data-reveal] {
  opacity: 1;
}
.value-card, .city-chip, .pro-panel {
  animation: fadeInUp 600ms cubic-bezier(0.16, 1, 0.3, 1) both;
}
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  .value-card, .city-chip, .pro-panel { animation: none; }
}
