/* ============================================================
   MENU PAGE — bespoke browsable menu (derived T3.16 page).
   Scoped under .menu-page. Reuses the LOCKED shared primitives
   (.ticket .btn .eyebrow .star-div .perf-rule .frame .display .em
   .daypart-chip) — this file adds ONLY the menu-page layout:
   the page-hero band, the sticky daypart/category jump-filter,
   the daypart bands, and the ticket-styled menu-item cards.

   CLIENT: Milo Coffee House — LIGHT-DOMINANT buttermilk canvas,
   Milo Teal + Marigold Clay, DM Serif / Albert Sans, 14px radius,
   ticket / order-slip motif. Nothing Sharp.

   Truth: every dish name + description is VERBATIM from SITE_READ.md
   (T3.15, unsmoothed). No prices except where a description carries
   one verbatim. Checkout deliberately UNWIRED (Order Ahead → Square).
   ============================================================ */

.menu-page {
  /* the menu page rides the same dominant buttermilk field */
  background: var(--base);
  color: var(--ink);
}

/* offset in-page anchors so a jumped-to category clears the fixed nav
   + the sticky filter bar (nav-h + filter bar height + breathing) */
.menu-page {
  --menu-anchor-offset: calc(var(--nav-h) + 4.6rem);
}

/* ============================================================
   1 · PAGE HERO — the menu masthead band (paper, bright).
   ============================================================ */
.menu-hero {
  position: relative;
  padding-top: calc(var(--nav-h) + var(--space-l));
  padding-bottom: var(--space-l);
  overflow: hidden;
}
.menu-hero__inner {
  display: grid;
  grid-template-columns: 1.25fr 0.85fr;
  gap: var(--space-l);
  align-items: center;
}
.menu-hero__copy { max-width: 40ch; }
.menu-hero__eyebrow { margin-bottom: var(--space-s); }
.menu-hero__title {
  font-size: var(--step-hero);
  line-height: var(--leading-display);
  margin-bottom: var(--space-s);
}
.menu-hero__title .menu-hero__l1 { display: block; }
.menu-hero__title .menu-hero__l2 { display: block; }
.menu-hero__lede {
  font-size: 1.08rem;
  color: var(--ink-soft);
  line-height: var(--leading-body);
  max-width: 46ch;
  margin-bottom: var(--space-m);
}
.menu-hero__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-s);
  margin-bottom: var(--space-m);
}
.menu-hero__hours {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  font-size: 0.92rem;
  color: var(--ink-soft);
}
.menu-hero__hours svg { color: var(--teal-deep); flex: none; }
.menu-hero__hours b { color: var(--ink); font-weight: 700; }

/* hero art — a warm tray with a signature plate + a "Milo" ticket stub */
.menu-hero__art {
  position: relative;
  isolation: isolate;
}
.menu-hero__plate {
  aspect-ratio: 4 / 3.4;
  width: 100%;
}
.menu-hero__stub {
  position: absolute;
  left: -0.65rem;
  bottom: 1.35rem;
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.1rem;
  padding: 0.7rem 1rem;
  border-radius: var(--radius);
  background: var(--paper-raised);
  border: 1px solid var(--paper-line);
  box-shadow: var(--shadow-soft);
}
.menu-hero__stub-mark {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.66rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--teal-deep);
}
.menu-hero__stub-line {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.15rem;
  color: var(--support);
  line-height: 1.1;
}

/* ============================================================
   2 · STICKY FILTER — daypart / category jump + filter chips.
   Sticks just under the fixed nav. Chips both JUMP (anchor) and
   FILTER (state) — a menu-chip micro-interaction. Alive at t0.
   ============================================================ */
.menu-filter {
  position: sticky;
  top: var(--nav-h);
  z-index: 40;
  background: rgba(247, 241, 231, 0.94);
  -webkit-backdrop-filter: saturate(1.2) blur(10px);
  backdrop-filter: saturate(1.2) blur(10px);
  border-top: 1px solid var(--paper-line);
  border-bottom: 1px solid var(--paper-line);
  box-shadow: var(--shadow-soft);
}
.menu-filter__inner {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  overflow-x: auto;
  scrollbar-width: none;
  padding-block: 0.7rem;
  -webkit-overflow-scrolling: touch;
}
.menu-filter__inner::-webkit-scrollbar { display: none; }
.menu-filter__lead {
  flex: none;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--ink-soft);
  padding-right: 0.35rem;
}
/* filter chips reuse the shared .daypart-chip look; add a glyph slot */
.menu-chip { flex: none; }
.menu-chip__glyph { color: currentColor; }
/* active filter reads teal (shared .daypart-chip active state applies) */

/* ============================================================
   3 · MENU BODY — daypart bands + category groups.
   ============================================================ */
.menu-body {
  padding-block: var(--space-l) var(--space-xl);
}

/* a daypart band = one anchor target (#coffee #breakfast #brunch #lunch) */
.daypart-band {
  scroll-margin-top: var(--menu-anchor-offset);
  padding-block: var(--space-l);
}
.daypart-band + .daypart-band {
  border-top: 1px dashed var(--paper-line-strong);
}
/* filtered-out band collapses out cleanly (state, not a content gate:
   default is fully visible; filtering is an explicit user action) */
.daypart-band.is-filtered { display: none; }

.daypart-band__head {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  margin-bottom: var(--space-m);
}
.daypart-band__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.55em;
}
.daypart-band__title {
  font-family: var(--font-display);
  font-size: var(--step-section);
  line-height: var(--leading-display);
  color: var(--ink);
}
.daypart-band__note {
  font-size: 0.92rem;
  color: var(--ink-soft);
  margin-left: auto;
}
.daypart-band__note b { color: var(--teal-deep); font-weight: 700; }

/* a category group inside a band */
.menu-cat { margin-top: var(--space-m); }
.menu-cat:first-of-type { margin-top: 0; }
.menu-cat__head {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: var(--space-s);
}
.menu-cat__label {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--support);
  white-space: nowrap;
}
.menu-cat__rule {
  flex: 1 1 auto;
  height: 1px;
  border: 0;
  border-top: 1px dashed var(--paper-line-strong);
  margin: 0;
}
.menu-cat__stub {
  flex: none;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--teal-deep);
  background: var(--teal-soft);
  border-radius: 999px;
  padding: 0.25em 0.7em;
}

/* the menu-item grid */
.menu-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-s);
}

/* ============================================================
   4 · MENU ITEM — a ticket-styled order-slip card.
   Builds on the shared .ticket (perforated top edge). Adds the
   real punched notch seams + the item body layout.
   ============================================================ */
.menu-item {
  display: flex;
  flex-direction: column;
  padding: var(--space-s) var(--space-m) var(--space-m);
}
.menu-item__top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
}
.menu-item__name {
  font-family: var(--font-display);
  font-size: 1.28rem;
  line-height: 1.14;
  color: var(--ink);
}
/* a verbatim inline price token (only when SITE_READ carries one) */
.menu-item__price {
  flex: none;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--teal-deep);
  white-space: nowrap;
}
.menu-item__desc {
  margin-top: 0.4rem;
  font-size: 0.98rem;
  line-height: 1.5;
  color: var(--ink-soft);
}
/* name-only dishes (no verified description in truth) carry a small
   ask-us cue instead of an invented ingredient list — keeps the card
   from reading empty without fabricating a claim (C1 / T3.15). */
.menu-item__ask {
  margin-top: 0.4rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  font-size: 0.8rem;
  font-style: italic;
  color: var(--ink-soft);
}
.menu-item__ask::before {
  content: "✦";
  font-style: normal;
  color: var(--accent);
  font-size: 0.7em;
}
/* punched half-circle notch seams (the real torn-ticket read) —
   two notches on the left + right of the top perforation line */
.menu-item::after {
  content: "";
  position: absolute;
  left: -7px;
  top: 50%;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  transform: translateY(-50%);
  background: var(--base);
  border: 1px solid var(--paper-line);
  pointer-events: none;
}
.menu-item__notch-r {
  position: absolute;
  right: -7px;
  top: 50%;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  transform: translateY(-50%);
  background: var(--base);
  border: 1px solid var(--paper-line);
  pointer-events: none;
}
/* a small teal daypart tag inside an item (e.g. a "Fri–Sun" note) */
.menu-item__tag {
  align-self: flex-start;
  margin-top: 0.65rem;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--teal-deep);
  background: var(--teal-soft);
  border-radius: 999px;
  padding: 0.25em 0.65em;
}
.menu-item__tag--clay {
  color: var(--support-deep);
  background: var(--marigold-soft);
}

/* a lone item in a category spans the full row so it doesn't leave a
   dead half-cell beside it (T2.5 content-fit; no orphaned white space) */
.menu-item--wide { grid-column: 1 / -1; }

/* ---- FEATURED item — the same ticket, upgraded with a plate image.
   These are the appetite anchors; verbatim copy, image seated. ---- */
.menu-item--feature {
  grid-column: span 2;
  flex-direction: row;
  align-items: stretch;
  gap: var(--space-m);
  padding: 0;
  overflow: hidden;
}
.menu-item--feature .menu-item__figure {
  flex: 0 0 40%;
  min-width: 0;
  align-self: stretch;
  border-radius: 0;
  border: 0;
  border-right: 1px solid var(--paper-line);
}
.menu-item--feature .menu-item__body {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: var(--space-m) var(--space-m) var(--space-m) 0;
}
.menu-item--feature .menu-item__name { font-size: 1.5rem; }
.menu-item--feature .menu-item__desc { font-size: 1rem; }
/* feature notch sits mid-height on the seam between image + body */
.menu-item--feature::after { left: calc(40% - 7px); }
.menu-item--feature .menu-item__notch-r { display: none; }

/* the featured plate photo uses the shared .frame cover behavior */
.menu-item__figure { position: relative; overflow: hidden; }
.menu-item__figure img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.03) contrast(1.02) brightness(1.02);
  transition: transform 600ms var(--ease-out);
}
@media (hover: hover) {
  .menu-item--feature.lift:hover .menu-item__figure img { transform: scale(1.045); }
}

/* ============================================================
   5 · ORDER BAND — the closing "Order Ahead on Square" ticket band.
   Checkout deliberately UNWIRED — this links to the real Square URL.
   ============================================================ */
.menu-order {
  padding-bottom: var(--space-xl);
}
.menu-order__band {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-m);
  padding: var(--space-m) var(--space-l);
  border-radius: var(--radius);
  border: 1px solid var(--paper-line);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.4), transparent 46%),
    var(--paper-raised);
  box-shadow: var(--shadow);
}
.menu-order__text { max-width: 52ch; }
.menu-order__title {
  font-family: var(--font-display);
  font-size: var(--step-2);
  line-height: 1.12;
  color: var(--ink);
  margin-bottom: 0.35rem;
}
.menu-order__title .em { font-size: inherit; }
.menu-order__sub {
  font-size: 0.98rem;
  color: var(--ink-soft);
  line-height: var(--leading-body);
}
.menu-order__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-s);
  align-items: center;
}
.menu-order__note {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  font-size: 0.86rem;
  color: var(--ink-soft);
}
.menu-order__note svg { color: var(--teal-deep); flex: none; }

/* ============================================================
   6 · RESPONSIVE — mobile is RECOMPOSED, not squished (DESIGN.md).
   Menu becomes a ranked single-column rail; filter stays a
   horizontal swipe strip; hero stacks copy over art.
   ============================================================ */
@media (max-width: 960px) {
  .menu-hero__inner { grid-template-columns: 1fr; gap: var(--space-m); }
  .menu-hero__copy { max-width: none; }
  .menu-hero__art { max-width: 30rem; }
}

@media (max-width: 720px) {
  .menu-grid { grid-template-columns: 1fr; }
  .menu-item--feature { grid-column: auto; flex-direction: column; }
  .menu-item--feature .menu-item__figure {
    flex: none;
    aspect-ratio: 16 / 10;
    border-right: 0;
    border-bottom: 1px solid var(--paper-line);
  }
  .menu-item--feature .menu-item__body { padding: var(--space-s) var(--space-m) var(--space-m); }
  /* feature notch returns to the horizontal-seam position */
  .menu-item--feature::after { left: -7px; top: auto; }
  .menu-item::after,
  .menu-item__notch-r { display: none; }
  .daypart-band__note { margin-left: 0; width: 100%; }
  .menu-order__band { padding: var(--space-m); }
  .menu-order__actions { width: 100%; }
  .menu-order__actions .btn { flex: 1 1 auto; }
}

/* ============================================================
   7 · MOTION FLOOR — reduced-motion / no-JS.
   Content is alive at t0; filtering is user-driven. If JS is off
   or reduced-motion, everything stays visible and the anchor jumps
   still work (native). Belt-and-suspenders below.
   ============================================================ */
.menu-page .daypart-band.is-filtered { display: none; }
@media (prefers-reduced-motion: reduce) {
  .menu-item__figure img { transition: none; }
}
