/* ============================================================
   menu.css
   ────────────────────────────────────────────────────────────
   Page styles for menu.html. Mostly:
     – Menu hero composition
     – Sticky category nav
     – Dish-tile composition (name + desc + price + badges)
     – Allergy notice
   ============================================================ */

/* ── 1. Menu hero ──────────────────────────────────────────── */
.menu-hero {
  grid-auto-rows: clamp(160px, 16vw, 220px);
  margin-bottom: var(--s-6);
}

.menu-title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2.6rem, 1.6rem + 4.4vw, 5.4rem);
  line-height: 0.95;
  letter-spacing: -0.02em;
  color: var(--paper-bone);
}
.menu-title__italic {
  font-style: italic;
  color: rgba(246,240,225,0.7);
  display: inline-block;
  margin-left: -0.02em;
}
.menu-lede {
  font-family: var(--font-ui);
  font-size: clamp(0.96rem, 0.88rem + 0.5vw, 1.12rem);
  color: rgba(246,240,225,0.78);
  max-width: 42ch;
  line-height: 1.5;
}

/* ── 2. Sticky category nav ────────────────────────────────── */
.menu-nav {
  position: sticky;
  top: var(--header-h);
  z-index: 30;
  background: rgba(246,240,225,0.85);
  backdrop-filter: blur(14px) saturate(110%);
  -webkit-backdrop-filter: blur(14px) saturate(110%);
  border-top: var(--rule);
  border-bottom: var(--rule);
  margin-bottom: var(--s-7);
  /* Negative margin so the nav escapes the page padding and goes
     edge-to-edge — but keeps the inner ul centered. */
  margin-left: calc(-1 * var(--gutter));
  margin-right: calc(-1 * var(--gutter));
  padding: var(--s-3) var(--gutter);
  overflow-x: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--ink-300) transparent;
}
.menu-nav ul {
  display: flex;
  gap: 8px;
  width: max-content;
  margin: 0 auto;
}
.menu-nav .chip {
  white-space: nowrap;
  background: transparent;
  border-color: var(--paper-edge);
  color: var(--ink-700);
}
.menu-nav .chip:hover {
  background: var(--ink-900);
  border-color: var(--ink-900);
}
.menu-nav .chip__count {
  background: var(--paper-cream);
  padding: 1px 6px;
  border-radius: var(--r-pill);
  color: var(--ink-500);
  margin-left: 4px;
}
.menu-nav .chip:hover .chip__count {
  background: rgba(255,255,255,0.12);
  color: var(--paper-bone);
}

/* ── 3. Category section ───────────────────────────────────── */
.menu-cat {
  margin: var(--s-9) 0;
  scroll-margin-top: calc(var(--header-h) + 80px);
}
.menu-cat__head {
  margin-bottom: var(--s-5);
}
.menu-cat__title {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 1.4rem + 3vw, 3.8rem);
  font-weight: 400;
  letter-spacing: var(--ls-display);
  line-height: 1;
  margin-top: var(--s-3);
}
.menu-cat__title em {
  font-style: italic;
  color: var(--ink-500);
}

/* ── 4. Dish tile ──────────────────────────────────────────── */
.dish {
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
}
.dish__name {
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 0.9rem + 0.8vw, 1.6rem);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: var(--ls-tight);
  color: var(--ink-900);
}
.dish__desc {
  font-size: 0.9rem;
  color: var(--ink-700);
  line-height: 1.45;
  flex: 1;
}
.dish__price {
  margin-top: auto;
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 1rem + 1.2vw, 2.1rem);
  font-weight: 400;
  font-feature-settings: "tnum";
  letter-spacing: var(--ls-tight);
  color: var(--matcha-700);
}
.tile--matcha .dish__price,
.tile--filled .dish__price { color: var(--paper-bone); }

/* Veg / spicy badges */
.dish__badge {
  display: inline-grid;
  place-items: center;
  width: 18px; height: 18px;
  border-radius: 50%;
  font-family: var(--font-ui);
  font-size: 0.6rem;
  font-weight: 700;
  color: var(--paper-bone);
  margin-left: 4px;
  flex: 0 0 auto;
}
.dish__badge--v { background: var(--matcha-500); }
.dish__badge--s { background: var(--akami); }

/* ── 5. Allergy notice ─────────────────────────────────────── */
.allergy {
  margin-top: var(--s-9);
  display: grid;
  grid-template-columns: 1fr;
}
.allergy .tile {
  background: transparent;
  border: 1px dashed var(--paper-edge);
}
.allergy .tile__title {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  color: var(--ink-700);
  max-width: 64ch;
  line-height: 1.4;
}

/* ── 6. Mobile collapse ────────────────────────────────────── */
@media (max-width: 720px) {
  .menu-hero { grid-auto-rows: minmax(160px, auto); }
  .menu-nav { padding: var(--s-2) var(--gutter); }
  .menu-nav .chip { font-size: 0.78rem; }
}
