/* ============================================
   CHICAGO BAO HOUSE — Design Tokens & Styles
   Warm & Inviting — Red, Cream, Gold
   ============================================ */

/* --- Type Scale --- */
:root {
  --text-xs:   clamp(0.75rem,  0.7rem  + 0.25vw, 0.875rem);
  --text-sm:   clamp(0.875rem, 0.8rem  + 0.35vw, 1rem);
  --text-base: clamp(1rem,     0.95rem + 0.25vw, 1.125rem);
  --text-lg:   clamp(1.125rem, 1rem    + 0.75vw, 1.5rem);
  --text-xl:   clamp(1.5rem,   1.2rem  + 1.25vw, 2.25rem);
  --text-2xl:  clamp(2rem,     1.2rem  + 2.5vw,  3.5rem);
  --text-3xl:  clamp(2.5rem,   1rem    + 4vw,    5rem);
}

/* --- Spacing (4px base) --- */
:root {
  --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;
}

/* --- Color Palette: Warm & Inviting --- */
:root, [data-theme="light"] {
  --color-bg:             #ffffff;
  --color-surface:        #fafafa;
  --color-surface-2:      #ffffff;
  --color-surface-offset: #f5f5f5;
  --color-surface-offset-2: #eeeeee;
  --color-divider:        #e5e5e5;
  --color-border:         #d4d4d4;

  --color-text:           #1a1a1a;
  --color-text-muted:     #636363;
  --color-text-faint:     #a3a3a3;
  --color-text-inverse:   #ffffff;

  --color-primary:        #b82025;
  --color-primary-hover:  #9a1a1e;
  --color-primary-active: #7d1418;
  --color-primary-highlight: #fce8e8;

  --color-accent:         #c8941a;
  --color-accent-hover:   #a87a12;
  --color-accent-highlight: #fdf5e6;

  --color-success:        #437a22;
  --color-error:          #b82025;

  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-full: 9999px;

  --transition-interactive: 180ms cubic-bezier(0.16, 1, 0.3, 1);

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.10);

  --content-narrow: 640px;
  --content-default: 960px;
  --content-wide: 1200px;

  --font-display: 'Instrument Serif', Georgia, serif;
  --font-body: 'Work Sans', 'Helvetica Neue', sans-serif;
  --font-logo: 'Nunito', 'Nunito Sans', sans-serif;
}

/* --- Dark Mode --- */
[data-theme="dark"] {
  --color-bg:             #141414;
  --color-surface:        #1c1c1c;
  --color-surface-2:      #222222;
  --color-surface-offset: #1a1a1a;
  --color-surface-offset-2: #252525;
  --color-divider:        #2e2e2e;
  --color-border:         #3a3a3a;

  --color-text:           #e8e8e8;
  --color-text-muted:     #999999;
  --color-text-faint:     #666666;
  --color-text-inverse:   #141414;

  --color-primary:        #e05a5a;
  --color-primary-hover:  #c94444;
  --color-primary-active: #a83535;
  --color-primary-highlight: #2e2020;

  --color-accent:         #e0b044;
  --color-accent-hover:   #c89830;
  --color-accent-highlight: #2e2a1e;

  --color-success:        #6daa45;
  --color-error:          #e05a5a;

  --shadow-sm: 0 1px 2px oklch(0 0 0 / 0.2);
  --shadow-md: 0 4px 12px oklch(0 0 0 / 0.3);
  --shadow-lg: 0 12px 32px oklch(0 0 0 / 0.4);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --color-bg:             #141414;
    --color-surface:        #1c1c1c;
    --color-surface-2:      #222222;
    --color-surface-offset: #1a1a1a;
    --color-surface-offset-2: #252525;
    --color-divider:        #2e2e2e;
    --color-border:         #3a3a3a;
    --color-text:           #e8e8e8;
    --color-text-muted:     #999999;
    --color-text-faint:     #666666;
    --color-text-inverse:   #141414;
    --color-primary:        #e05a5a;
    --color-primary-hover:  #c94444;
    --color-primary-active: #a83535;
    --color-primary-highlight: #2e2020;
    --color-accent:         #e0b044;
    --color-accent-hover:   #c89830;
    --color-accent-highlight: #2e2a1e;
    --color-success:        #6daa45;
    --color-error:          #e05a5a;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.4);
  }
}

/* ============================================
   COMPONENTS
   ============================================ */

/* --- Header / Nav --- */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: oklch(from var(--color-bg) l c h / 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-divider);
  transition: box-shadow 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.header--scrolled {
  box-shadow: var(--shadow-sm);
}
.header-inner {
  max-width: var(--content-wide);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-3) var(--space-4);
}
.header-logo {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  text-decoration: none;
  color: var(--color-text);
}
.header-logo img {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-full);
}
.header-logo-text {
  font-family: var(--font-logo);
  font-size: var(--text-lg);
  font-weight: 900;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-6);
  list-style: none;
}
.nav-links a {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text-muted);
  text-decoration: none;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.nav-links a:hover,
.nav-links a.active {
  color: var(--color-primary);
}
.nav-links a.active {
  border-bottom: 2px solid var(--color-primary);
  padding-bottom: 2px;
}
.theme-toggle {
  padding: var(--space-2);
  border-radius: var(--radius-md);
  color: var(--color-text-muted);
}
.theme-toggle:hover {
  background: var(--color-surface-offset);
  color: var(--color-text);
}

/* Mobile nav */
.mobile-menu-btn {
  display: none;
  padding: var(--space-2);
  color: var(--color-text);
}
@media (max-width: 768px) {
  .mobile-menu-btn { display: block; }
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--color-bg);
    flex-direction: column;
    padding: var(--space-4);
    border-bottom: 1px solid var(--color-divider);
    gap: var(--space-4);
  }
  .nav-links.open { display: flex; }
  .header-logo-text { font-size: var(--text-base); }
}

/* --- Hero Section --- */
.hero {
  position: relative;
  min-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    oklch(0.15 0.02 50 / 0.3) 0%,
    oklch(0.1 0.02 50 / 0.65) 100%
  );
  z-index: 1;
}
.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: var(--space-8) var(--space-4);
  max-width: 700px;
}
.hero-content h1 {
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  color: #fff;
  margin-bottom: var(--space-4);
  text-shadow: 0 2px 16px oklch(0.1 0 0 / 0.4);
}
.hero-content p {
  font-size: var(--text-lg);
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: var(--space-8);
  max-width: 55ch;
  margin-inline: auto;
}
.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-8);
  background: var(--color-primary);
  color: #fff;
  font-size: var(--text-sm);
  font-weight: 600;
  text-decoration: none;
  border-radius: var(--radius-full);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.hero-cta:hover {
  background: var(--color-primary-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}
.hero-cta:active {
  background: var(--color-primary-active);
  transform: translateY(0);
}

/* --- Section Styles --- */
.section {
  padding: clamp(var(--space-12), 8vw, var(--space-24)) var(--space-4);
}
.section-inner {
  max-width: var(--content-wide);
  margin: 0 auto;
}
.section-header {
  text-align: center;
  margin-bottom: var(--space-12);
}
.section-header h2 {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  color: var(--color-text);
  margin-bottom: var(--space-3);
}
.section-header p {
  font-size: var(--text-base);
  color: var(--color-text-muted);
  max-width: 55ch;
  margin-inline: auto;
}
.section-divider {
  width: 60px;
  height: 3px;
  background: var(--color-primary);
  border-radius: var(--radius-full);
  margin: var(--space-4) auto;
}

/* --- About / Story Section --- */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-12);
  align-items: center;
}
.about-image {
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.about-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  aspect-ratio: 4/3;
}
.about-text h2 {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  margin-bottom: var(--space-4);
}
.about-text p {
  color: var(--color-text-muted);
  margin-bottom: var(--space-4);
  line-height: 1.7;
}
.about-text p:last-of-type {
  margin-bottom: 0;
}
@media (max-width: 768px) {
  .about-grid {
    grid-template-columns: 1fr;
    gap: var(--space-8);
  }
}

/* --- Featured Products (home page) --- */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr));
  gap: var(--space-6);
}
.product-card {
  background: var(--color-surface-2);
  border-radius: var(--radius-xl);
  overflow: hidden;
  border: 1px solid var(--color-divider);
  transition: transform var(--transition-interactive), box-shadow var(--transition-interactive);
}
.product-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}
.product-card-img {
  aspect-ratio: 4/3;
  overflow: hidden;
}
.product-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.product-card:hover .product-card-img img {
  transform: scale(1.05);
}
.product-card-body {
  padding: var(--space-5);
}
.product-card-body h3 {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  margin-bottom: var(--space-2);
}
.product-card-body p {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin-bottom: var(--space-3);
}
.product-price {
  font-weight: 600;
  color: var(--color-primary);
  font-size: var(--text-base);
}

/* --- Full Menu Page --- */
.menu-category {
  margin-bottom: var(--space-12);
}
.menu-category h3 {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  margin-bottom: var(--space-6);
  padding-bottom: var(--space-3);
  border-bottom: 2px solid var(--color-primary);
  display: inline-block;
}
.menu-items {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(320px, 100%), 1fr));
  gap: var(--space-4);
}
.menu-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: var(--space-4) var(--space-5);
  background: var(--color-surface-2);
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-divider);
  gap: var(--space-4);
}
.menu-item-info {
  flex: 1;
}
.menu-item-name {
  font-weight: 600;
  font-size: var(--text-base);
  margin-bottom: var(--space-1);
}
.menu-item-desc {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.5;
}
.menu-item-price {
  font-weight: 700;
  color: var(--color-primary);
  font-size: var(--text-base);
  white-space: nowrap;
}
.menu-item-tag {
  display: inline-block;
  font-size: var(--text-xs);
  font-weight: 600;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  margin-top: var(--space-1);
}
.tag-popular {
  background: var(--color-primary-highlight);
  color: var(--color-primary);
}
.tag-new {
  background: var(--color-accent-highlight);
  color: var(--color-accent);
}
.tag-veg {
  background: #d4f5cc;
  color: #2d6a1e;
}
[data-theme="dark"] .tag-veg {
  background: #2a3a24;
  color: #6daa45;
}

/* --- Contact Section --- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-12);
  align-items: start;
}
.contact-info h3 {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  margin-bottom: var(--space-6);
}
.contact-detail {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  margin-bottom: var(--space-5);
}
.contact-detail svg {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  color: var(--color-primary);
  margin-top: 2px;
}
.contact-detail p {
  color: var(--color-text-muted);
  font-size: var(--text-sm);
}
.contact-detail strong {
  color: var(--color-text);
  display: block;
  margin-bottom: var(--space-1);
  font-size: var(--text-base);
}
.contact-form {
  background: var(--color-surface-2);
  padding: var(--space-8);
  border-radius: var(--radius-xl);
  border: 1px solid var(--color-divider);
}
.contact-form h3 {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  margin-bottom: var(--space-6);
}
.form-group {
  margin-bottom: var(--space-4);
}
.form-group label {
  display: block;
  font-size: var(--text-sm);
  font-weight: 500;
  margin-bottom: var(--space-2);
  color: var(--color-text);
}
.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: var(--space-3) var(--space-4);
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  font-size: var(--text-base);
  color: var(--color-text);
}
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px var(--color-primary-highlight);
}
.form-group textarea {
  resize: vertical;
  min-height: 120px;
}
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-8);
  background: var(--color-primary);
  color: #fff;
  font-size: var(--text-sm);
  font-weight: 600;
  border-radius: var(--radius-full);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  border: none;
  width: 100%;
}
.btn-primary:hover {
  background: var(--color-primary-hover);
}
.btn-primary:active {
  background: var(--color-primary-active);
}
@media (max-width: 768px) {
  .contact-grid {
    grid-template-columns: 1fr;
    gap: var(--space-8);
  }
}

/* --- Footer --- */
.footer {
  background: var(--color-surface);
  border-top: 1px solid var(--color-divider);
  padding: var(--space-10) var(--space-4);
  text-align: center;
}
.footer-inner {
  max-width: var(--content-wide);
  margin: 0 auto;
}
.footer-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
  text-decoration: none;
  color: var(--color-text);
}
.footer-logo img {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
}
.footer-logo span {
  font-family: var(--font-logo);
  font-size: var(--text-base);
  font-weight: 900;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.footer-links {
  display: flex;
  justify-content: center;
  gap: var(--space-6);
  list-style: none;
  margin-bottom: var(--space-6);
}
.footer-links a {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  text-decoration: none;
}
.footer-links a:hover {
  color: var(--color-primary);
}
.footer-copy {
  font-size: var(--text-xs);
  color: var(--color-text-faint);
}

/* --- Page Banner (for interior pages) --- */
.page-banner {
  background: var(--color-surface-offset);
  padding: var(--space-16) var(--space-4) var(--space-10);
  text-align: center;
}
.page-banner h1 {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  margin-bottom: var(--space-3);
}
.page-banner p {
  font-size: var(--text-base);
  color: var(--color-text-muted);
  max-width: 50ch;
  margin-inline: auto;
}

/* --- Scroll Reveal --- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* --- Utilities --- */
.text-center { text-align: center; }
.bg-surface { background: var(--color-surface); }
.bg-offset { background: var(--color-surface-offset); }
