/* =========================================================
   SAMUEL7 — DESIGN TOKENS
   Palette:
     --ink        #100D0B  base background, warm near-black
     --charcoal   #1B1613  card / surface
     --charcoal-2 #241E19  raised surface / hover
     --brass      #C8A24A  primary accent (gold/brass — fixtures, candlelight)
     --brass-dim  #8C7233  brass at low opacity contexts
     --ember      #B84C32  secondary accent — CTAs, price emphasis
     --parchment  #EDE6DA  primary text
     --stone      #9C9186  secondary / muted text
     --line       rgba(237,230,218,0.10)  hairline dividers
   Type:
     Display  "Fraunces"      — headings, brand
     Body     "Work Sans"     — paragraphs, UI labels
     Utility  "IBM Plex Mono" — prices, order numbers, ticket detail
   ========================================================= */

:root {
  --ink: #100d0b;
  --charcoal: #1b1613;
  --charcoal-2: #241e19;
  --brass: #c8a24a;
  --brass-dim: #8c7233;
  --ember: #b84c32;
  --parchment: #ede6da;
  --stone: #9c9186;
  --line: rgba(237, 230, 218, 0.1);
}

* {
  -webkit-tap-highlight-color: transparent;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
}

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

body {
  background-color: var(--ink);
  color: var(--parchment);
  font-family: "Work Sans", ui-sans-serif, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.font-display {
  font-family: "Fraunces", ui-serif, Georgia, serif;
}

.font-mono {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
}

/* Visible keyboard focus everywhere */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 2px solid var(--brass);
  outline-offset: 3px;
  border-radius: 2px;
}

/* Hide scrollbar on the horizontally scrolling category nav, keep it usable */
.no-scrollbar {
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.no-scrollbar::-webkit-scrollbar {
  display: none;
}

/* =========================================================
   HERO
   ========================================================= */
.hero-gradient {
  background: linear-gradient(
    180deg,
    rgba(16, 13, 11, 0.15) 0%,
    rgba(16, 13, 11, 0.55) 55%,
    var(--ink) 100%
  );
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #7bd389;
  box-shadow: 0 0 0 0 rgba(123, 211, 137, 0.6);
  animation: pulse-dot 2.2s infinite;
}
.status-dot.closed {
  background: var(--stone);
  animation: none;
}
@keyframes pulse-dot {
  0% {
    box-shadow: 0 0 0 0 rgba(123, 211, 137, 0.55);
  }
  70% {
    box-shadow: 0 0 0 8px rgba(123, 211, 137, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(123, 211, 137, 0);
  }
}

/* =========================================================
   CATEGORY NAV — pill links
   ========================================================= */
.cat-pill {
  border: 1px solid var(--line);
  color: var(--stone);
  background: rgba(27, 22, 19, 0.6);
  transition: color 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}
.cat-pill:hover {
  color: var(--parchment);
  border-color: var(--brass-dim);
}
.cat-pill.active {
  color: var(--ink);
  background: var(--brass);
  border-color: var(--brass);
}

/* =========================================================
   MENU CARD
   ========================================================= */
.menu-card {
  background: linear-gradient(180deg, var(--charcoal) 0%, var(--charcoal-2) 100%);
  border: 1px solid var(--line);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}
.menu-card:hover {
  transform: translateY(-3px);
  border-color: var(--brass-dim);
  box-shadow: 0 12px 30px -12px rgba(0, 0, 0, 0.6);
}
.menu-card img,
.menu-card .img-fallback {
  transition: transform 0.5s ease;
}
.menu-card:hover img,
.menu-card:hover .img-fallback {
  transform: scale(1.04);
}

.img-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  background: repeating-linear-gradient(
    135deg,
    var(--charcoal-2) 0px,
    var(--charcoal-2) 14px,
    var(--charcoal) 14px,
    var(--charcoal) 28px
  );
  color: var(--brass-dim);
  font-family: "Fraunces", serif;
  font-style: italic;
  letter-spacing: 0.02em;
  text-align: center;
  padding: 1rem;
}

.add-btn {
  background: var(--brass);
  color: var(--ink);
  transition: background-color 0.2s ease, transform 0.15s ease;
}
.add-btn:hover {
  background: #dab766;
}
.add-btn:active {
  transform: scale(0.94);
}
.add-btn.added {
  background: #7bd389;
}

/* =========================================================
   GLASSMORPHISM SURFACES (checkout modal, floating bar)
   ========================================================= */
.glass {
  background: rgba(27, 22, 19, 0.72);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border: 1px solid var(--line);
}

/* =========================================================
   CART DRAWER — "order docket" signature treatment
   The drawer reads like a kitchen order ticket: monospace type,
   a perforated top edge, and a torn-paper texture, tying the
   visual language directly to "this becomes a message we send."
   ========================================================= */
#cart-drawer {
  background: #17120f;
  border-left: 1px solid var(--line);
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}
#cart-drawer.open {
  transform: translateX(0);
}

#cart-overlay {
  background: rgba(0, 0, 0, 0.55);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
#cart-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.docket-perf {
  height: 14px;
  background-image: radial-gradient(circle, var(--ink) 4px, transparent 4.5px);
  background-size: 18px 18px;
  background-position: center;
  background-repeat: repeat-x;
}

.docket-line {
  border-top: 1px dashed var(--line);
}

.qty-btn {
  width: 26px;
  height: 26px;
  border: 1px solid var(--line);
  color: var(--parchment);
  transition: border-color 0.2s ease, background-color 0.2s ease;
}
.qty-btn:hover {
  border-color: var(--brass);
  background: rgba(200, 162, 74, 0.1);
}

/* =========================================================
   FLOATING CART BAR
   ========================================================= */
#floating-bar {
  transform: translateY(140%);
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}
#floating-bar.visible {
  transform: translateY(0);
}

/* =========================================================
   MODALS (item detail + checkout)
   ========================================================= */
dialog {
  border: none;
  padding: 0;
  background: transparent;
  color: inherit;
  max-width: none;
  max-height: none;
  overflow: visible;
}
dialog::backdrop {
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(3px);
}
.modal-panel {
  animation: modal-in 0.28s ease;
}
@keyframes modal-in {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Checkout form inputs */
.field-input {
  background: rgba(16, 13, 11, 0.6);
  border: 1px solid var(--line);
  color: var(--parchment);
  transition: border-color 0.2s ease;
}
.field-input::placeholder {
  color: var(--stone);
}
.field-input:focus {
  border-color: var(--brass);
}

/* WhatsApp CTA */
.wa-btn {
  background: var(--ember);
  color: var(--parchment);
  transition: background-color 0.2s ease, transform 0.15s ease;
}
.wa-btn:hover {
  background: #cf5a3c;
}
.wa-btn:active {
  transform: scale(0.98);
}

/* Toast (added-to-cart confirmation) */
#toast {
  transform: translateY(-20px);
  opacity: 0;
  transition: transform 0.25s ease, opacity 0.25s ease;
  pointer-events: none;
}
#toast.show {
  transform: translateY(0);
  opacity: 1;
}
