/* =========================================================
   Carbone Doha — Design System
   Italian-American NY brasserie, red-sauce classic w/ gold trim
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,500;0,600;0,700;1,500&family=Lato:wght@300;400;600;700&display=swap');

:root {
  /* Color tokens */
  --burgundy: #6B1420;
  --burgundy-dark: #4A0E16;
  --burgundy-light: #8A1F2E;
  --gold: #C9A15A;
  --gold-soft: #DFC38A;
  --ivory: #F7F1E8;
  --ivory-warm: #EFE6D6;
  --charcoal: #1A1310;
  --charcoal-soft: #241C18;
  --ink: #2B1E17;
  --ink-muted: #6B5E54;
  --line: rgba(43, 30, 23, 0.12);
  --line-on-dark: rgba(247, 241, 232, 0.16);

  /* Type */
  --font-head: 'Playfair Display', Georgia, serif;
  --font-body: 'Lato', -apple-system, sans-serif;

  /* Scale */
  --step-0: clamp(1rem, 0.95rem + 0.25vw, 1.0625rem);
  --step-1: clamp(1.25rem, 1.15rem + 0.5vw, 1.5rem);
  --step-2: clamp(1.75rem, 1.5rem + 1vw, 2.25rem);
  --step-3: clamp(2.25rem, 1.8rem + 2vw, 3.25rem);
  --step-4: clamp(2.75rem, 2rem + 3vw, 4.5rem);

  --container: 1180px;
  --gutter: clamp(1.25rem, 4vw, 3rem);
  --radius: 2px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* Reset */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.6;
  color: var(--ink);
  background: var(--ivory);
  -webkit-font-smoothing: antialiased;
}
img, picture, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; padding: 0; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }

@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;
  }
}

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

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* Typography */
h1, h2, h3, h4 {
  font-family: var(--font-head);
  font-weight: 600;
  line-height: 1.15;
  color: var(--charcoal);
  letter-spacing: -0.01em;
}
h1 { font-size: var(--step-4); }
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-2); }
h4 { font-size: var(--step-1); }
p { max-width: 62ch; color: var(--ink-muted); }
.on-dark p { color: rgba(247, 241, 232, 0.78); }
.on-dark h1, .on-dark h2, .on-dark h3, .on-dark h4 { color: var(--ivory); }

.eyebrow {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--burgundy);
  margin-bottom: 0.75rem;
}
.on-dark .eyebrow { color: var(--gold); }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.9rem 1.75rem;
  font-size: 0.9375rem;
  font-weight: 600;
  border-radius: var(--radius);
  border: 1px solid transparent;
  transition: background 0.25s var(--ease), color 0.25s var(--ease), border-color 0.25s var(--ease);
  white-space: nowrap;
}
.btn-primary {
  background: var(--burgundy);
  color: var(--ivory);
}
.btn-primary:hover { background: var(--burgundy-light); }
.btn-outline {
  background: transparent;
  border-color: currentColor;
  color: var(--ivory);
}
.btn-outline:hover { background: rgba(247, 241, 232, 0.1); }
.btn-gold {
  background: var(--gold);
  color: var(--charcoal);
}
.btn-gold:hover { background: var(--gold-soft); }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--charcoal);
  border-bottom: 1px solid var(--line-on-dark);
}
.site-header__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding-block: 1.1rem;
}
.brand {
  font-family: var(--font-head);
  font-size: 1.375rem;
  font-weight: 700;
  color: var(--ivory);
  letter-spacing: 0.01em;
}
.brand span { color: var(--gold); }
.site-nav {
  display: flex;
  align-items: center;
  gap: 2.25rem;
}
.site-nav a {
  font-size: 0.9375rem;
  color: rgba(247, 241, 232, 0.82);
  position: relative;
  padding-block: 0.25rem;
}
.site-nav a:hover,
.site-nav a[aria-current="page"] { color: var(--ivory); }
.site-nav a[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: 1px;
  background: var(--gold);
}
.header-actions { display: flex; align-items: center; gap: 0.75rem; }
.cart-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  color: var(--ivory);
}
.cart-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  min-width: 16px;
  height: 16px;
  padding: 0 3px;
  background: var(--gold);
  color: var(--charcoal);
  font-size: 0.6875rem;
  font-weight: 700;
  line-height: 16px;
  text-align: center;
  border-radius: 999px;
}
.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: none;
  border: 0;
  color: var(--ivory);
}

@media (max-width: 880px) {
  .site-nav { 
    position: fixed;
    inset: 0 0 0 auto;
    width: min(78vw, 320px);
    height: 100vh;
    background: var(--charcoal-soft);
    flex-direction: column;
    align-items: flex-start;
    padding: 5.5rem 1.75rem 2rem;
    gap: 1.5rem;
    transform: translateX(100%);
    transition: transform 0.35s var(--ease);
  }
  .site-nav.is-open { transform: translateX(0); }
  .nav-toggle { display: inline-flex; }
  .header-actions .btn-primary { display: none; }
  .site-nav .btn-primary { display: inline-flex; margin-top: 0.5rem; }
}

/* Footer */
.site-footer {
  background: var(--charcoal);
  color: rgba(247, 241, 232, 0.78);
  padding-block: 4rem 2rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 3rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid var(--line-on-dark);
}
.footer-grid h4 {
  color: var(--ivory);
  font-size: 1rem;
  margin-bottom: 1.1rem;
}
.footer-grid ul { display: flex; flex-direction: column; gap: 0.6rem; }
.footer-grid a:hover { color: var(--gold); }
.footer-brand p { margin-top: 1rem; max-width: 32ch; }
.footer-social { display: flex; gap: 0.9rem; margin-top: 1.25rem; }
.footer-social a {
  width: 36px; height: 36px;
  display: grid; place-items: center;
  border: 1px solid var(--line-on-dark);
  border-radius: 50%;
}
.footer-social a:hover { border-color: var(--gold); color: var(--gold); }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  padding-top: 1.75rem;
  font-size: 0.8125rem;
}
.footer-bottom a:hover { color: var(--gold); }

@media (max-width: 880px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 540px) {
  .footer-grid { grid-template-columns: 1fr; }
}

/* Section helpers (used from Phase 2 onward) */
.section { padding-block: clamp(3.5rem, 8vw, 6.5rem); }
.section-dark { background: var(--charcoal); color: var(--ivory); }
.section-tint { background: var(--ivory-warm); }
