:root {
  /* ==========================================================================
     THE DYNAMIC TYPOGRAPHY SYSTEM — The Back 40 Smoke House (dark mode)
     ========================================================================== */
  --font-serif: 'Oswald', 'Arial Narrow', sans-serif;
  --font-sans:  'Barlow', system-ui, sans-serif;
  --font-display: 'Bebas Neue', 'Oswald', sans-serif;

  /* ==========================================================================
     THE DYNAMIC BASE CANVAS — pit black & charcoal layers
     ========================================================================== */
  --color-bg-cream:      #0C0B0A;   /* Main body — deep smoke */
  --color-surface-pure:  #1A1816;   /* Cards, checkout, modals */
  --color-surface-tint:  #121110;   /* Alternating sections, footer */

  /* ==========================================================================
     THE DYNAMIC TEXT & READABILITY SYSTEM
     ========================================================================== */
  --color-text-charcoal: #EDE6DC;   /* Primary copy (~14:1 on bg) */
  --color-text-muted:    #A89B8F;   /* Secondary copy (~5.5:1 on bg) */
  --color-border-warm:   #3A342E;   /* Dividers */

  /* ==========================================================================
     THE DYNAMIC BRAND ACCENTS — ember & ash highlights
     ========================================================================== */
  --color-primary-deep:  #F2E8DC;   /* Headings, nav brand (light on dark) */
  --color-accent-sage:   #E8632A;   /* CTAs, prices, links */
  --color-accent-light:  #C49A6A;   /* Hero subtext, hovers, tags */

  /* ==========================================================================
     THE OPERATIONAL FEEDBACK STATE
     ========================================================================== */
  --color-alert-crimson: #F07167;

  --shadow-ember:        rgba(232, 99, 42, 0.35);
  --shadow-card:         rgba(0, 0, 0, 0.45);
  --nav-glass:           rgba(12, 11, 10, 0.92);

  --border-radius-sm: 6px;
  --border-radius-lg: 12px;
  --transition-smooth: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- Global resets --- */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

html {
  scroll-behavior: smooth;
  zoom: 0.85;
  overflow-x: hidden;
  max-width: 100%;
}

@supports not (zoom: 0.85) {
  html {
    font-size: 85%;
  }
}

body {
  background-color: var(--color-bg-cream);
  color: var(--color-text-charcoal);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.65;
  letter-spacing: normal;
  overflow-x: hidden;
  max-width: 100%;
}

h1, h2, h3, h4 {
  font-family: var(--font-serif);
  color: var(--color-primary-deep);
  font-weight: 600;
  letter-spacing: 0.04em;
  line-height: 1.1;
  text-transform: uppercase;
}

hr.section-break {
  border: 0;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--color-border-warm) 20%, var(--color-border-warm) 80%, transparent);
  margin: 3rem 0;
}

p {
  color: var(--color-text-charcoal);
}

a {
  color: var(--color-accent-sage);
  text-decoration: none;
  transition: color 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

a:hover {
  color: var(--color-accent-light);
}

/* --- Layout --- */
.app-container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 24px;
}

/* --- Nav --- */
.main-nav {
  background-color: var(--nav-glass);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border-warm);
  position: sticky;
  top: 0;
  z-index: 1000;
  padding: 16px 0;
}

.nav-wrapper {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-brand {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 0;
  text-decoration: none;
  line-height: 1;
}

.nav-brand:hover {
  text-decoration: none;
}

.nav-brand:hover .nav-brand-title {
  color: var(--color-accent-sage);
}

.nav-brand:hover .nav-brand-sub {
  color: var(--color-accent-light);
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 32px;
  align-items: center;
}

.nav-links a {
  text-decoration: none;
  color: var(--color-text-charcoal);
  font-size: 15px;
  font-weight: 500;
  transition: color 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-links a:hover,
.nav-links li.active a {
  color: var(--color-accent-sage);
}

/* --- Buttons --- */
.btn-primary {
  background-color: var(--color-accent-sage);
  color: #0c0b0a;
  font-family: var(--font-sans);
  font-weight: 600;
  border-radius: var(--border-radius-sm);
  padding: 0.85rem 2rem;
  font-size: 15px;
  border: none;
  cursor: pointer;
  transition: var(--transition-smooth);
  display: inline-block;
  text-decoration: none;
}

.btn-primary:hover {
  background-color: #c4511f;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px var(--shadow-ember);
  text-decoration: none;
  color: #0c0b0a;
}

.btn-secondary {
  background-color: transparent;
  color: var(--color-text-charcoal);
  font-family: var(--font-sans);
  font-weight: 600;
  border: 1px solid var(--color-border-warm);
  border-radius: var(--border-radius-sm);
  padding: 0.85rem 2rem;
  cursor: pointer;
  transition: var(--transition-smooth);
  display: inline-block;
  text-decoration: none;
}

.btn-secondary:hover {
  background: var(--color-accent-light);
  color: var(--color-bg-cream);
  border-color: var(--color-accent-light);
  text-decoration: none;
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-primary:disabled {
  background-color: #999;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-outline {
  background-color: transparent;
  color: var(--color-accent-sage);
  border: 2px solid var(--color-accent-sage);
  box-shadow: none;
}

.btn-outline:hover {
  background-color: var(--color-accent-sage);
  color: var(--color-bg-cream);
  box-shadow: 0 4px 12px rgba(192, 78, 26, 0.15);
}

.action-btn {
  background-color: var(--color-accent-sage);
  color: var(--color-bg-cream);
  border: none;
  padding: 14px 24px;
  font-weight: 700;
  border-radius: 8px;
  cursor: pointer;
  font-family: inherit;
  font-size: 1rem;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.action-btn:hover {
  background-color: #c4511f;
}

.action-btn.danger {
  background-color: var(--color-alert-crimson);
}

.action-btn.danger:hover {
  background-color: #c9302c;
}

/* --- Hero (layout; photo & colors in extras.css) --- */
.hero {
  padding: 2.75rem 1.25rem;
  text-align: center;
  position: relative;
}

.hero--pixel-fire {
  padding: 0;
}

.hero-inner {
  width: 100%;
  max-width: 640px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* --- Sections --- */
.section {
  padding: 80px 0;
}

.section-title {
  text-align: center;
  margin-bottom: 40px;
}

.section-title h2 {
  margin-bottom: 12px;
  font-size: 2.5rem;
}

.section-title p {
  color: var(--color-text-muted);
  max-width: 600px;
  margin: 0 auto;
}

/* --- Menu Grid --- */
.menu-hero {
  text-align: center;
  padding: 60px 0 40px;
}

.menu-sub-tag {
  font-family: var(--font-sans);
  text-transform: uppercase;
  font-size: 13px;
  letter-spacing: 0.15em;
  color: var(--color-accent-sage);
  font-weight: 700;
}

.menu-hero h2 {
  font-size: 42px;
  margin-top: 8px;
  margin-bottom: 24px;
}

.menu-category-tabs {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 24px;
  flex-wrap: wrap;
}

.tab-pill {
  background: transparent;
  border: 1px solid var(--color-border-warm);
  padding: 8px 20px;
  border-radius: 30px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  color: var(--color-text-charcoal);
  transition: all 0.2s ease;
  font-family: inherit;
}

.tab-pill:hover, .tab-pill.active {
  background: var(--color-primary-deep);
  color: var(--color-bg-cream);
  border-color: var(--color-primary-deep);
}

.menu-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
  padding-bottom: 40px;
}

.menu-card {
  background: var(--color-surface-pure);
  border: 1px solid var(--color-border-warm);
  border-radius: var(--border-radius-lg);
  padding: 0;
  overflow: hidden;
  transition: var(--transition-smooth);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
}

.menu-card--text {
  border-left: 3px solid var(--color-accent-sage);
}

.menu-card:hover {
  border-color: var(--color-accent-sage);
  box-shadow: 0 8px 28px var(--shadow-card);
  transform: none;
}

.diet-tag {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  background-color: var(--color-accent-light);
  color: var(--color-primary-deep);
  margin-right: 0.35rem;
  text-transform: uppercase;
  position: static;
  border: none;
  letter-spacing: 0.05em;
}

.menu-card-content {
  padding: 24px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.menu-card-header,
.menu-card .card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 12px;
}

.menu-item-title,
.menu-card .item-title {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  color: var(--color-text-charcoal);
  margin: 0;
  font-weight: 700;
}

.menu-item-price,
.menu-card .item-price {
  font-family: var(--font-sans);
  font-weight: 700;
  color: var(--color-accent-sage);
  font-size: 1.2rem;
  white-space: nowrap;
}

.menu-item-desc {
  font-size: 14px;
  color: var(--color-text-muted);
  margin-bottom: 24px;
  flex-grow: 1;
  line-height: 1.6;
}

.category-header {
  grid-column: 1 / -1;
  padding: 20px 0 8px;
  border-bottom: 2px solid var(--color-border-warm);
  margin-bottom: 8px;
}

.category-header h3 {
  font-size: 1.6rem;
  color: var(--color-text-charcoal);
}

/* --- Tag (alternative to diet-tag) --- */
.tag {
  display: inline-block;
  background-color: var(--color-surface-tint);
  color: var(--color-accent-sage);
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid var(--color-border-warm);
}

/* --- Cart floating --- */
.floating-cart {
  position: fixed;
  bottom: 32px;
  right: 32px;
  z-index: 2000;
  animation: slideInUp 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  background-color: var(--color-accent-sage);
  color: #0c0b0a;
  padding: 16px 32px;
  border-radius: 50px;
  box-shadow: 0 10px 30px var(--shadow-ember);
  display: flex;
  align-items: center;
  font-family: var(--font-sans);
  font-weight: 600;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.floating-cart .cart-divider {
  margin: 0 16px;
  opacity: 0.35;
  color: #0c0b0a;
}

.floating-cart a {
  color: #0c0b0a;
  text-decoration: none;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 2px solid var(--color-accent-sage);
  padding-bottom: 2px;
  margin-left: 12px;
  transition: border-color 0.2s ease;
}

.floating-cart a:hover {
  border-color: #0c0b0a;
  text-decoration: none;
}

@keyframes slideInUp {
  from { transform: translateY(100px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* --- Forms --- */
.form-group {
  margin-bottom: 20px;
}

.form-group label, .input-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--color-text-charcoal);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.form-input {
  width: 100%;
  padding: 14px;
  border: 1px solid var(--color-border-warm);
  background-color: var(--color-bg-cream);
  border-radius: 6px;
  font-family: inherit;
  font-size: 15px;
  color: var(--color-text-charcoal);
  transition: all 0.2s ease;
}

.form-input:focus {
  outline: none;
  border-color: var(--color-accent-sage);
  background-color: var(--color-surface-pure);
  box-shadow: 0 0 0 3px rgba(192, 78, 26, 0.1);
}

.form-input::placeholder {
  color: var(--color-text-muted);
}

.form-row-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

/* --- Checkout --- */
.checkout-layout-grid {
  display: grid;
  grid-template-columns: 1fr 400px;
  gap: 40px;
  padding: 60px 24px;
  align-items: start;
}

.checkout-card-block {
  background: var(--color-surface-pure);
  border: 1px solid var(--color-border-warm);
  border-radius: 12px;
  padding: 32px;
  margin-bottom: 32px;
  box-shadow: 0 4px 20px rgba(30, 37, 34, 0.02);
}

.block-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--color-border-warm);
  padding-bottom: 16px;
}

.step-num {
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 800;
  background-color: var(--color-surface-tint);
  color: var(--color-accent-sage);
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.sticky-ledger-card {
  position: sticky;
  top: 100px;
  background-color: var(--color-surface-tint);
  border: 1px solid var(--color-border-warm);
  border-radius: 12px;
  padding: 32px;
}

.sticky-ledger-card h3 {
  font-size: 1.2rem;
  margin-bottom: 16px;
}

.ledger-items-list {
  margin: 20px 0;
  max-height: 200px;
  overflow-y: auto;
}

.ledger-item-row {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  margin-bottom: 12px;
}

.ledger-divider {
  border: 0;
  height: 1px;
  background-color: var(--color-border-warm);
  margin: 20px 0;
}

.total-row {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  margin-bottom: 8px;
  color: var(--color-text-muted);
}

.total-row.grand-total {
  font-size: 18px;
  color: var(--color-primary-deep);
  font-weight: 700;
  margin-top: 16px;
  border-top: 1px solid var(--color-border-warm);
  padding-top: 12px;
}

.complete-checkout-btn {
  width: 100%;
  margin-top: 24px;
  padding: 16px;
}

/* --- Order Summary / Tracker --- */
.order-summary-card {
  background-color: var(--color-surface-pure);
  padding: 24px;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(30, 37, 34, 0.03);
  border: 1px solid var(--color-border-warm);
  border-left: 4px solid var(--color-accent-sage);
  margin-bottom: 16px;
}

.order-summary-card .order-id {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--color-primary-deep);
  margin-bottom: 12px;
}

.order-summary-card .order-item-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px dashed var(--color-border-warm);
  font-size: 0.9rem;
}

.order-summary-card .order-totals {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 2px solid var(--color-border-warm);
}

.order-summary-card .order-totals .total-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 4px;
  font-size: 0.9rem;
}

.order-summary-card .order-totals .total-row.grand-total {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--color-primary-deep);
  border-top: 1px solid var(--color-border-warm);
  padding-top: 8px;
  margin-top: 8px;
}

.status-badge {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 50px;
  font-weight: 700;
  font-size: 0.85rem;
  margin-top: 12px;
  font-family: var(--font-sans);
}

.status-badge.pending {
  background-color: rgba(196, 154, 106, 0.2);
  color: #E8C89A;
}

.status-badge.paid {
  background-color: rgba(106, 168, 120, 0.2);
  color: #8FD4A0;
}

.status-badge.in-kitchen {
  background-color: rgba(106, 154, 196, 0.2);
  color: #8FC0E8;
}

.status-badge.ready {
  background-color: rgba(232, 99, 42, 0.25);
  color: #F0A878;
}

.tracker-hero {
  text-align: center;
  padding: 60px 20px;
  background-color: var(--color-surface-tint);
  border-radius: 12px;
  margin: 20px 0;
}

.tracker-eta {
  font-size: 1.2rem;
  color: var(--color-primary-deep);
  font-weight: 700;
  font-family: var(--font-sans);
}

.progress-bar {
  width: 100%;
  height: 8px;
  background-color: var(--color-border-warm);
  border-radius: 4px;
  margin: 24px 0;
  overflow: hidden;
}

.progress-bar .progress-fill {
  height: 100%;
  background-color: var(--color-accent-sage);
  transition: width 0.5s ease;
  border-radius: 4px;
}

/* --- Time Slots --- */
.time-slot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.time-slot-btn {
  padding: 12px;
  border: 2px solid var(--color-border-warm);
  background-color: var(--color-surface-pure);
  border-radius: 6px;
  cursor: pointer;
  font-family: inherit;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--color-text-charcoal);
  transition: all 0.2s ease;
}

.time-slot-btn:hover,
.time-slot-btn.selected {
  border-color: var(--color-accent-sage);
  background-color: var(--color-accent-sage);
  color: var(--color-bg-cream);
}

.time-slot-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* --- About --- */
.about-content {
  max-width: 700px;
  margin: 0 auto;
}

.about-content p {
  font-size: 1.05rem;
}

.about-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  margin-top: 40px;
}

.about-item {
  text-align: center;
  padding: 20px;
}

.about-item .icon {
  font-size: 2.5rem;
  margin-bottom: 12px;
}

.about-item h4 {
  font-size: 1.1rem;
  margin-bottom: 8px;
}

.about-item p {
  color: var(--color-text-muted);
  font-size: 0.9rem;
}

/* --- Footer --- */
.site-footer {
  background-color: var(--color-surface-tint);
  border-top: 1px solid var(--color-border-warm);
  padding: 40px 0;
  margin-top: 60px;
  font-size: 14px;
  color: var(--color-text-muted);
}

.footer-links {
  text-align: right;
}

.footer-links a {
  color: var(--color-accent-sage);
  text-decoration: none;
  margin-left: 15px;
  font-weight: 500;
}

.footer-links a:hover {
  text-decoration: underline;
}

/* --- Misc --- */
.no-orders {
  text-align: center;
  padding: 60px 20px;
  color: var(--color-text-muted);
  font-size: 1.2rem;
}

.hidden {
  display: none !important;
}

/* --- Scrollbar --- */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: var(--color-bg-cream);
}
::-webkit-scrollbar-thumb {
  background: var(--color-accent-light);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--color-accent-sage);
}

/* --- Responsive --- */
@media (max-width: 960px) {
  .checkout-layout-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  /* Nav layout handled in extras.css (drawer) */
  .about-grid {
    grid-template-columns: 1fr;
  }
  .form-row-split,
  .form-row {
    grid-template-columns: 1fr;
  }
  .menu-grid {
    grid-template-columns: 1fr;
  }
  /* Floating cart + footer: extras.css */
  .menu-hero h2 {
    font-size: 28px;
  }
}
