/* =============================================================
   Samudra — QR / table menu (menu.samudravegrestaurant.in)
   Reference fine-dine layout, recoloured to the Samudra brand.
   Shares /data/menu.json with the main website.
   ============================================================= */

:root {
  --bg:          #FFF8F0;
  --surface:     #FFFFFF;
  --ink:         #1F1F1F;
  --muted:       #6B6B6B;
  --soft:        #4F4F4F;
  --primary:     #E8471E;
  --primary-deep:#A82E10;
  --primary-soft:#FCEAE3;
  --secondary:   #1B4F72;
  --secondary-soft: #E3EDF4;
  --gold:        #B4791C;   /* warm brass — prices & fine accents */
  --gold-soft:   #EFE1C4;
  --border:      #E8DFD4;
  --tag-bg:      #E7F3E8;
  --tag-text:    #2E7D32;
  --cream:       #FFF8F0;

  --font-display: "Young Serif", "Georgia", serif;
  --font-body:    "Hanken Grotesk", "Segoe UI", system-ui, sans-serif;

  --shadow-cover: 0 24px 60px -28px rgba(168, 46, 16, 0.30);
  --shadow-sm:    0 2px 8px -3px rgba(31, 31, 31, 0.14);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- Cover ---------- */
.cover {
  max-width: 640px;
  margin: 0 auto;
  background: var(--surface);
  min-height: 100vh;
  box-shadow: var(--shadow-cover);
  padding-bottom: 40px;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  text-align: center;
  padding: 34px 22px 26px;
  color: var(--cream);
  overflow: hidden;
}
.hero__bg {
  position: absolute; inset: 0;
  background:
    radial-gradient(120% 90% at 50% -20%, rgba(255,255,255,0.16), transparent 60%),
    linear-gradient(165deg, var(--primary) 0%, var(--primary-deep) 100%);
  z-index: 0;
}
.hero__bg::after {
  content: ""; position: absolute; inset: 0;
  background-image: repeating-linear-gradient(115deg,
    rgba(255,255,255,0.05) 0 2px, transparent 2px 7px);
  opacity: 0.5;
}
.hero > *:not(.hero__bg) { position: relative; z-index: 1; }

.emblem {
  width: 92px; height: 92px;
  margin: 4px auto 12px;
  border-radius: 50%;
  background: var(--surface);
  border: 3px solid var(--gold);
  display: grid; place-items: center;
  box-shadow: 0 0 0 5px rgba(180,121,28,0.18), 0 10px 24px -8px rgba(0,0,0,0.4);
}
.emblem img { width: 76px; height: 76px; object-fit: contain; border-radius: 50%; }

.estd {
  display: inline-block;
  margin: 0 0 6px;
  font-size: 0.62rem;
  letter-spacing: 2.5px;
  font-weight: 700;
  text-transform: uppercase;
  color: #3a1608;
  background: var(--gold);
  padding: 3px 12px;
  border-radius: 999px;
}
.brand {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 2.7rem;
  line-height: 1;
  margin: 4px 0 0;
  letter-spacing: 0.5px;
  text-shadow: 0 2px 14px rgba(0,0,0,0.28);
}
.tagline {
  font-size: 1rem;
  margin: 8px 0 0;
  color: rgba(255,248,240,0.92);
}
.menu-word {
  font-family: var(--font-display);
  letter-spacing: 6px;
  font-size: 0.9rem;
  margin: 16px 0 0;
  opacity: 0.9;
}
.veg-badge {
  display: inline-flex; align-items: center; gap: 7px;
  margin: 14px 0 0;
  font-size: 0.74rem; font-weight: 600; letter-spacing: 0.3px;
  background: rgba(255,255,255,0.14);
  border: 1px solid rgba(255,255,255,0.28);
  padding: 5px 13px; border-radius: 999px;
}
.veg-dot {
  width: 11px; height: 11px; border-radius: 3px;
  border: 2px solid #fff;
  display: inline-grid; place-items: center;
}
.veg-dot::after { content: ""; width: 5px; height: 5px; border-radius: 50%; background: #fff; }

/* ---------- AC notice bar ---------- */
.notice {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  margin: 0;
  padding: 11px 18px;
  font-size: 0.86rem; font-weight: 600;
  text-align: center;
  color: var(--secondary);
  background: var(--secondary-soft);
  border-bottom: 1px solid #cfe0ec;
}

/* ---------- Search ---------- */
.search-wrap { padding: 18px 18px 4px; }
.search-box {
  display: flex; align-items: center; gap: 9px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 12px 16px;
  color: var(--muted);
  transition: border-color .18s ease, box-shadow .18s ease;
}
.search-box:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-soft);
}
.search-box svg { flex: 0 0 auto; color: var(--primary); }
.search-box input {
  border: 0; outline: 0; background: none; width: 100%;
  font-family: var(--font-body); font-size: 0.98rem; color: var(--ink);
}
.search-box input::placeholder { color: var(--muted); }

/* ---------- Sticky category nav ---------- */
.catnav {
  position: sticky; top: 0; z-index: 20;
  background: var(--surface);
  padding: 10px 0 11px;
  border-bottom: 1px solid var(--border);
}
.catnav-scroll {
  display: flex; gap: 8px;
  overflow-x: auto;
  padding: 0 18px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.catnav-scroll::-webkit-scrollbar { display: none; }
.chip {
  flex: 0 0 auto;
  font-family: var(--font-body);
  font-size: 0.8rem; font-weight: 600; letter-spacing: 0.2px;
  padding: 8px 15px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--soft);
  cursor: pointer;
  white-space: nowrap;
  transition: background .18s ease, color .18s ease, border-color .18s ease;
}
.chip:hover { border-color: var(--primary); color: var(--primary); }
.chip.active {
  background: linear-gradient(165deg, var(--primary), var(--primary-deep));
  color: #fff; border-color: transparent;
}

/* ---------- Content ---------- */
main { padding: 8px 16px 4px; }
.loading { text-align: center; color: var(--muted); padding: 40px 0; }

.section { margin: 24px 0; scroll-margin-top: 74px; }

.ribbon {
  position: relative;
  display: inline-flex; align-items: center; gap: 9px;
  background: linear-gradient(165deg, var(--primary), var(--primary-deep));
  color: #fff;
  font-family: var(--font-display); font-weight: 400;
  font-size: 1.12rem;
  padding: 10px 26px;
  margin-bottom: 14px;
  clip-path: polygon(0% 0%, 100% 0%, 96% 50%, 100% 100%, 0% 100%, 4% 50%);
  box-shadow: 0 8px 16px -8px rgba(168,46,16,0.6);
}
.ribbon img {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 2px rgba(255,255,255,0.9);
}

.subhead {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.02rem;
  color: var(--secondary);
  margin: 18px 2px 9px;
  padding-bottom: 5px;
  border-bottom: 1px dashed var(--border);
}

.item-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 2px 15px;
  box-shadow: var(--shadow-sm);
}
.item-row {
  display: flex; align-items: baseline; gap: 10px;
  padding: 11px 0;
  border-bottom: 1px solid var(--bg);
}
.item-row:last-child { border-bottom: none; }
.item-name {
  font-size: 0.96rem; font-weight: 500; color: var(--ink);
  display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.popular {
  font-size: 0.62rem; font-weight: 700; letter-spacing: 0.4px;
  text-transform: uppercase;
  color: var(--tag-text); background: var(--tag-bg);
  padding: 2px 8px; border-radius: 999px;
}
.dots {
  flex: 1;
  border-bottom: 2px dotted var(--border);
  margin: 0 4px 5px; min-width: 14px;
}
.item-price {
  font-weight: 700; color: var(--gold); font-size: 0.95rem;
  white-space: nowrap;
}
.item-price.is-apc { color: var(--muted); font-weight: 600; font-size: 0.85rem; }

.empty-state { text-align: center; padding: 50px 24px; color: var(--muted); }

/* ---------- Footer ---------- */
footer {
  text-align: center;
  padding: 30px 24px 8px;
  color: var(--muted);
  font-size: 0.8rem; line-height: 1.7;
}
footer p { margin: 6px 0; }
footer .rule {
  display: block; width: 54px; height: 2px;
  background: var(--gold); opacity: 0.6;
  margin: 0 auto 16px; border-radius: 2px;
}
footer strong { color: var(--soft); }
.callus { margin-top: 12px !important; }
.callus a { color: var(--primary); font-weight: 600; text-decoration: none; }

/* ---------- Back to top ---------- */
.to-top {
  position: fixed;
  right: max(16px, calc(50% - 320px + 16px));
  bottom: 20px;
  z-index: 40;
  width: 44px; height: 44px;
  display: grid; place-items: center;
  background: var(--primary); color: #fff;
  border-radius: 50%;
  box-shadow: 0 8px 20px -6px rgba(168,46,16,0.6);
  transition: opacity .2s ease, transform .2s ease;
}
.to-top svg { width: 20px; height: 20px; }
.to-top[hidden] { opacity: 0; pointer-events: none; transform: translateY(8px); display: grid; }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
}
