:root {
  --bg: #f7f1e6;
  --paper: #fffdf8;
  --ink: #1d1712;
  --muted: #74685a;
  --line: #e6dccb;
  --accent: #b4432a;
  --gold: #c8963e;
  --gold-soft: #f3e6c8;
  --hero-1: #17120d;
  --hero-2: #2b1d12;
  --hero-ink: #f7efe1;
  --veg: #2f7d32;
  --nonveg: #b3261e;
  --flash: #ffefc2;
  --shadow: 0 1px 2px rgba(60, 40, 20, .06), 0 8px 24px -12px rgba(60, 40, 20, .18);
  --shadow-hover: 0 2px 4px rgba(60, 40, 20, .08), 0 16px 32px -14px rgba(60, 40, 20, .28);
}
/* Dark theme. A small script in index.html sets data-theme from the visitor's
   choice, or from the phone's setting if they haven't chosen. */
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #110d0a;
  --paper: #1b1612;
  --ink: #f3ebde;
  --muted: #a69a8a;
  --line: #2e2620;
  --accent: #e8805f;
  --gold: #d9ab58;
  --gold-soft: #3a2e1a;
  --hero-1: #0a0806;
  --hero-2: #1f150d;
  --veg: #63bd67;
  --nonveg: #f06b60;
  --flash: #3f321c;
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px -12px rgba(0,0,0,.6);
  --shadow-hover: 0 2px 4px rgba(0,0,0,.35), 0 16px 32px -14px rgba(0,0,0,.7);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 130px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.5 Inter, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}
.wrap { max-width: 1040px; margin: 0 auto; padding: 0 16px; }
button { font: inherit; color: inherit; }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden; text-align: center;
  color: var(--hero-ink);
  background:
    radial-gradient(ellipse 60% 70% at 50% 0%, rgba(200,150,62,.28), transparent 70%),
    radial-gradient(ellipse 40% 50% at 10% 100%, rgba(180,67,42,.25), transparent 70%),
    linear-gradient(180deg, var(--hero-1), var(--hero-2));
  padding: 56px 16px 52px;
}
/* faint dotted texture */
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .08;
  background-image: radial-gradient(#fff 1px, transparent 1px);
  background-size: 18px 18px;
  mask-image: linear-gradient(180deg, #000, transparent 85%);
}
.hero-inner { position: relative; max-width: 720px; margin: 0 auto; }
.eyebrow {
  margin: 22px 0 0; font-family: Fraunces, Georgia, serif; font-style: italic;
  color: var(--gold); letter-spacing: .2em; font-size: .95rem;
}
.hero h1 {
  font-family: Fraunces, Georgia, serif; font-weight: 800;
  font-size: clamp(2.6rem, 9vw, 4.8rem); line-height: 1; letter-spacing: -.02em;
  margin: 8px 0 14px;
}
.tagline { margin: 12px 0 0; color: #d6c7ae; font-size: 1.05rem; }
.tagline:empty { display: none; }

.ornament {
  display: flex; align-items: center; justify-content: center; gap: 12px;
  color: var(--gold); font-size: .8rem;
}
.ornament span { width: 56px; height: 1px; background: linear-gradient(90deg, transparent, currentColor); }
.ornament span:last-child { transform: scaleX(-1); }

.theme-btn {
  position: absolute; z-index: 2;
  top: max(14px, env(safe-area-inset-top)); right: max(14px, env(safe-area-inset-right));
  width: 44px; height: 44px; border-radius: 50%; cursor: pointer;
  display: grid; place-items: center;
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.15); color: #f0e3cc;
  transition: background .2s ease, transform .3s ease;
}
.theme-btn:hover { background: rgba(255,255,255,.16); }
.theme-btn:active { transform: rotate(-30deg) scale(.92); }
.theme-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.theme-btn .sun { display: none; }
[data-theme="dark"] .theme-btn .sun { display: block; }
[data-theme="dark"] .theme-btn .moon { display: none; }

.live {
  display: inline-flex; align-items: center; gap: 8px; margin: 0;
  padding: 5px 12px; border-radius: 999px;
  background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.12);
  font-size: .72rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: #e6d9c3;
}
.dot { width: 7px; height: 7px; border-radius: 50%; background: #888; }
.live.on .dot { background: #4cc35a; animation: pulse 2s infinite; }
.live.off .dot { background: #e0a030; }
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(76,195,90,.6); }
  70% { box-shadow: 0 0 0 7px rgba(76,195,90,0); }
  100% { box-shadow: 0 0 0 0 rgba(76,195,90,0); }
}

/* ---------- Sticky toolbar ---------- */
.toolbar {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.tools { display: flex; gap: 10px; padding-top: 12px; }
.search {
  flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px;
  background: var(--paper); border: 1px solid var(--line); border-radius: 12px;
  padding: 0 12px; height: 42px;
}
.search:focus-within { border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-soft); }
.search svg { width: 18px; height: 18px; fill: none; stroke: var(--muted); stroke-width: 2; stroke-linecap: round; flex: none; }
.search input {
  flex: 1; min-width: 0; border: 0; outline: 0; background: transparent;
  font: inherit; color: var(--ink);
}
.veg-toggle {
  flex: none; display: inline-flex; align-items: center; gap: 8px;
  height: 42px; padding: 0 14px; border-radius: 12px; cursor: pointer;
  background: var(--paper); border: 1px solid var(--line); font-weight: 500; font-size: .92rem;
}
.veg-toggle[aria-pressed="true"] {
  background: color-mix(in srgb, var(--veg) 14%, var(--paper));
  border-color: var(--veg); color: var(--veg);
}

.cats {
  display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none;
  max-width: 1040px; margin: 0 auto; padding: 10px 16px 12px;
}
.cats::-webkit-scrollbar { display: none; }
.cats:empty { display: none; }
.cats a {
  flex: none; padding: 7px 15px; border-radius: 999px; text-decoration: none;
  color: var(--muted); font-size: .9rem; font-weight: 500;
  border: 1px solid transparent; transition: all .2s ease;
}
.cats a:hover { color: var(--ink); }
.cats a.active { background: var(--ink); color: var(--bg); }
.cats .count { opacity: .6; font-size: .78em; margin-left: 4px; }

/* ---------- Sections ---------- */
section { padding-top: 40px; }
.sec-head { display: flex; align-items: baseline; gap: 14px; margin-bottom: 16px; }
.sec-head h2 {
  font-family: Fraunces, Georgia, serif; font-weight: 600;
  font-size: clamp(1.6rem, 4vw, 2.1rem); margin: 0; letter-spacing: -.01em;
}
.sec-head .rule { flex: 1; height: 1px; background: var(--line); align-self: center; }
.sec-head .n { color: var(--muted); font-size: .85rem; font-family: Fraunces, Georgia, serif; font-style: italic; }

.items { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
@media (min-width: 760px) { .items { grid-template-columns: 1fr 1fr; gap: 16px; } }

/* ---------- Item card ---------- */
.item {
  position: relative; display: flex; gap: 14px;
  background: var(--paper); border: 1px solid var(--line); border-radius: 18px;
  padding: 12px; box-shadow: var(--shadow);
  transition: transform .25s ease, box-shadow .25s ease, background-color 1.4s ease;
  animation: rise .5s ease both;
}
.item:hover { transform: translateY(-2px); box-shadow: var(--shadow-hover); }
.item.flash { background: var(--flash); transition: none; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }
.ready .item { animation: none; }

.thumb {
  position: relative; flex: none; width: 104px; height: 104px; border-radius: 14px; overflow: hidden;
  display: grid; place-items: center;
  font-family: Fraunces, Georgia, serif; font-weight: 600; font-size: 2.4rem; color: rgba(255,255,255,.92);
  text-shadow: 0 2px 12px rgba(0,0,0,.25);
}
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.item:hover .thumb img { transform: scale(1.05); }
.thumb img { transition: transform .5s ease; }

.body { flex: 1; min-width: 0; display: flex; flex-direction: column; padding: 2px 4px 2px 0; }
.top { display: flex; align-items: flex-start; gap: 8px; }
.name {
  margin: 0; flex: 1; font-family: Fraunces, Georgia, serif; font-weight: 600;
  font-size: 1.15rem; line-height: 1.25;
}
.name .mark { margin-right: 6px; vertical-align: 2px; }
.desc {
  margin: 4px 0 0; color: var(--muted); font-size: .9rem; line-height: 1.45;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.bottom { margin-top: auto; padding-top: 10px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.price {
  font-family: Fraunces, Georgia, serif; font-weight: 600; font-size: 1.2rem;
  color: var(--accent); white-space: nowrap; font-variant-numeric: tabular-nums;
}
.tags { display: flex; flex-wrap: wrap; gap: 5px; justify-content: flex-end; }
.tag {
  font-size: .7rem; font-weight: 600; letter-spacing: .02em;
  padding: 3px 8px; border-radius: 999px;
  background: var(--bg); color: var(--muted); border: 1px solid var(--line);
}
.tag.hot { background: color-mix(in srgb, var(--nonveg) 10%, var(--paper)); color: var(--nonveg); border-color: transparent; }

/* Gold ribbon for featured items (tags containing special / bestseller / signature / chef) */
.item.featured { border-color: color-mix(in srgb, var(--gold) 55%, var(--line)); }
.ribbon {
  position: absolute; top: -9px; left: 18px;
  background: linear-gradient(135deg, #e0b25c, var(--gold)); color: #2a1c08;
  font-size: .66rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  padding: 3px 9px; border-radius: 6px; box-shadow: 0 4px 10px -4px rgba(200,150,62,.7);
}

/* Veg / non-veg mark */
.mark { display: inline-grid; place-items: center; width: 14px; height: 14px; flex: none; border: 1.5px solid currentColor; border-radius: 3px; }
.mark::after { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.mark.veg { color: var(--veg); }
.mark.nonveg { color: var(--nonveg); }
.mark.nonveg::after { border-radius: 0; width: 0; height: 0; background: none;
  border-left: 4px solid transparent; border-right: 4px solid transparent; border-bottom: 7px solid currentColor; }

/* Sold out */
.item.out { box-shadow: none; }
.item.out .thumb { filter: grayscale(1); opacity: .5; }
.item.out .name, .item.out .desc { opacity: .55; }
.item.out .price { color: var(--muted); text-decoration: line-through; opacity: .6; }
.sold {
  font-size: .68rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: var(--nonveg); border: 1px solid currentColor; padding: 2px 7px; border-radius: 6px;
}

.empty { text-align: center; color: var(--muted); padding: 72px 16px; font-family: Fraunces, Georgia, serif; font-style: italic; font-size: 1.1rem; }
.foot { text-align: center; color: var(--muted); font-size: .8rem; padding: 56px 16px 40px; }
.foot p { margin: 12px 0 0; }

/* ---------- Phones ---------- */
/* Hover lift only on devices with a real mouse, so taps don't leave cards "stuck" raised */
@media (hover: none) {
  .item:hover { transform: none; box-shadow: var(--shadow); }
  .item:hover .thumb img { transform: none; }
}
@media (max-width: 600px) {
  html { scroll-padding-top: 118px; }
  .wrap { padding-left: max(16px, env(safe-area-inset-left)); padding-right: max(16px, env(safe-area-inset-right)); }
  .hero { padding: max(28px, env(safe-area-inset-top)) 16px 32px; }
  .eyebrow { margin-top: 16px; font-size: .85rem; }
  .hero h1 { margin-bottom: 10px; }
  .tagline { font-size: .95rem; }

  .tools { padding-top: 10px; gap: 8px; }
  .search, .veg-toggle { height: 44px; }      /* comfortable thumb size */
  .search input { font-size: 16px; }          /* stops iPhone zooming in on tap */
  .veg-toggle { padding: 0 12px; font-size: .88rem; }
  .cats { padding: 8px 16px 10px; scroll-padding: 0 16px; }
  .cats a { padding: 8px 14px; }

  section { padding-top: 28px; }
  .sec-head { margin-bottom: 12px; }
  .items { gap: 12px; }
  .item { padding: 10px; gap: 12px; border-radius: 16px; }
  .item.featured { margin-top: 6px; }
  .thumb { width: 84px; height: 84px; border-radius: 12px; font-size: 2rem; }
  .name { font-size: 1.04rem; }
  .desc { font-size: .86rem; }
  .bottom { flex-wrap: wrap; padding-top: 8px; }
  .price { font-size: 1.1rem; }
  .tags { justify-content: flex-start; }
  .tag { font-size: .66rem; padding: 2px 7px; }
  .foot { padding-bottom: max(32px, env(safe-area-inset-bottom)); }
}
@media (max-width: 360px) {
  .thumb { width: 72px; height: 72px; font-size: 1.7rem; }
  .veg-toggle { gap: 0; width: 44px; justify-content: center; padding: 0; }
  .veg-toggle .lbl { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .veg-toggle .mark { width: 16px; height: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
