/* Hallmark · redesign: /menu/ · macrostructure: Catalogue (hero + sticky index + tiered listing)
 * tone: appetite-first, fire-lit · theme: house (style.css tokens: #1b1a1a paper, #bd2621 red, #f7941d orange,
 * Righteous display + Titillium Web body) · enrichment: live Otter food photography
 * pre-emit critique: P4 H5 E4 S5 R4 V4
 *
 * /menu/ page. Loaded after /style.css, which supplies the brand tokens, the header and the footer.
 * The page itself is generated by site/tools/build_menu.py. Three item layouts, chosen per category
 * by the generator: .items-cards (signature categories, big photos), .items-rows (photo thumbnails),
 * .items-list (compact price list, no image slot at all). */

.menu-page {
  --m-card: #231e1c;
  --m-card-hi: #2c2522;
  --m-line: rgba(255, 255, 255, .08);
  --m-line-hot: rgba(247, 148, 29, .55);
  --m-muted: rgba(255, 255, 255, .7);
  --m-faint: rgba(255, 255, 255, .5);
  --m-chip: rgba(255, 255, 255, .06);
  --m-chip-line: rgba(255, 255, 255, .16);
  --m-glass: rgba(20, 16, 14, .95);
  --m-scrim: rgba(18, 14, 12, .82);
  --m-glow-red: rgba(189, 38, 33, .38);
  --m-glow-ember: rgba(224, 102, 31, .22);
  --m-shadow: rgba(0, 0, 0, .5);
  --m-leader: rgba(255, 255, 255, .22);
  /* Warm plate for Otter's white-background product photos: multiply turns the photo's
     white into this cream, so the food sits on a plate instead of in a glaring box. */
  --m-plate-hi: #f8efe3;
  --m-plate-lo: #e6d2b8;
  --m-plate-rim: rgba(120, 60, 20, .28);
  --m-plate: radial-gradient(90% 85% at 50% 42%, var(--m-plate-hi) 58%, var(--m-plate-lo) 100%);
  --thumb: 88px;
  --gutter: 16px;
  --wrap: 1120px;
  --radius: 14px;
  --ease-out: cubic-bezier(.22, .8, .3, 1);
  overflow-x: clip;
}
html:has(body.menu-page) {
  overflow-x: clip;
  scroll-padding-top: calc(var(--nav-h, 56px) + var(--cats-h, 69px) + 12px);
  scroll-padding-bottom: 88px; /* keep a focused item clear of the phone order bar */
}

.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* ------------------------------------------------------------ hero */
.menu-hero {
  position: relative; isolation: isolate; overflow: hidden;
  padding: 8px var(--gutter) 36px;
  background:
    radial-gradient(80% 90% at 0% 0%, var(--m-glow-red), transparent 60%),
    radial-gradient(60% 70% at 100% 100%, var(--m-glow-ember), transparent 65%),
    linear-gradient(var(--m-scrim), var(--bg)),
    url("/img/flames.jpg") center 30% / cover no-repeat;
  border-bottom: 1px solid var(--rule);
}
.menu-hero-inner { max-width: var(--wrap); margin: 0 auto; }
.crumbs { display: flex; align-items: center; gap: 8px; font-size: .9rem; color: var(--m-muted); }
.crumbs a { display: inline-flex; align-items: center; min-height: 44px; min-width: 44px; text-decoration: none; }
.crumbs a:hover { color: var(--text); text-decoration: underline; text-underline-offset: 4px; text-decoration-color: var(--orange); }

.menu h1 { margin: 4px 0 14px; min-width: 0; }
.h1-main {
  display: block; font-size: clamp(2.6rem, 11vw, 5.2rem); line-height: .95; letter-spacing: .005em;
  overflow-wrap: anywhere;
}
.h1-sub {
  display: block; margin-top: 12px; font-family: var(--body); font-weight: 600;
  font-size: clamp(1.1rem, 2.6vw, 1.45rem); line-height: 1.3; color: var(--orange); max-width: 30ch;
}
.menu-lede { margin: 0; color: var(--ink-2); font-size: 1.05rem; line-height: 1.55; max-width: 46ch; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; }
.hero-ctas .btn { min-height: 48px; padding: .6em 1.4em; white-space: nowrap; font-size: 1.02rem; }

.hero-pick { display: none; }

@media (min-width: 860px) {
  .menu-hero { padding: 12px 32px 56px; }
  .menu-hero.has-pick .menu-hero-inner {
    display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 48px; align-items: center;
  }
  .hero-pick {
    display: block; position: relative; margin-top: 28px; border-radius: 20px; overflow: hidden;
    aspect-ratio: 6 / 5; text-decoration: none; background: var(--m-plate); padding: 14px;
    box-shadow: 0 24px 60px var(--m-shadow), 0 0 0 1px var(--m-line-hot);
    transform: rotate(1.2deg); transition: transform .3s var(--ease-out);
  }
  .hero-pick img { width: 100%; height: 100%; object-fit: cover; display: block; mix-blend-mode: multiply; transition: transform .5s var(--ease-out); }
  .hero-pick:hover { transform: rotate(0deg); }
  .hero-pick:hover img { transform: scale(1.03); }
  .hero-pick-tag {
    position: absolute; left: 16px; bottom: 16px; display: inline-flex; align-items: baseline; gap: 12px;
    padding: 10px 16px; border-radius: 10px; background: var(--m-glass);
  }
  .hero-pick-name { font-weight: 700; }
  .hero-pick-price { font-family: var(--heading); color: var(--orange); font-size: 1.2rem; }
  .hero-pick:focus-visible { outline: 3px solid var(--orange); outline-offset: 4px; }
}

/* ------------------------------------------------------------ sticky category chips */
.cats {
  position: sticky; top: var(--nav-h, 56px); z-index: 9;
  background: var(--m-glass); border-bottom: 1px solid var(--m-line);
}
@supports (backdrop-filter: blur(10px)) { .cats { backdrop-filter: blur(10px) saturate(1.2); } }
.cats-inner { max-width: calc(var(--wrap) + 2 * var(--gutter)); margin: 0 auto; display: flex; align-items: flex-start; gap: 16px; }
.cats-inner > nav { flex: 1 1 auto; min-width: 0; }
.cats ul {
  position: relative; list-style: none; margin: 0;
  padding: 12px var(--gutter);
  display: flex; gap: 8px; overflow-x: auto; overscroll-behavior-x: contain;
  scroll-padding-inline: var(--gutter); scrollbar-width: none;
  mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent);
}
/* Once the strip has scrolled, chips slide out under a soft left edge instead of being cut mid-word. */
.cats ul.is-scrolled {
  mask-image: linear-gradient(90deg, transparent 0, #000 72px, #000 calc(100% - 28px), transparent);
}
html.at-foot .cats { opacity: 0; pointer-events: none; }
.cats { transition: opacity .15s var(--ease-out); }
.cats ul::-webkit-scrollbar { display: none; }
.cats li { flex: none; }
.cats li a {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px;
  border: 1px solid var(--m-chip-line); border-radius: 999px; background: var(--m-chip);
  text-decoration: none; font-weight: 600; font-size: .95rem; white-space: nowrap; color: var(--ink-2);
  transition: background-color .15s var(--ease-out), border-color .15s var(--ease-out), color .15s var(--ease-out);
}
.cats li a:hover { border-color: var(--orange); color: var(--text); }
.cats li a[aria-current="true"] { background: var(--orange); border-color: var(--orange); color: var(--char); }
@media (min-width: 1024px) {
  .cats ul { padding: 10px var(--gutter); }
  .cats li a { min-height: 44px; padding: 0 14px; font-size: .92rem; }
}

/* ------------------------------------------------------------ sections */
.menu-body { max-width: var(--wrap); margin: 0 auto; padding: 8px var(--gutter) 48px; }
@media (min-width: 860px) { .menu-body { padding-left: 32px; padding-right: 32px; box-sizing: content-box; } }
.menu-section { padding-top: 40px; }
.menu-section h2 {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px;
  font-size: clamp(1.55rem, 4.2vw, 2.2rem); line-height: 1.1; margin: 0 0 18px; overflow-wrap: anywhere; min-width: 0;
}
.menu-section h2::after {
  content: ""; flex: 1 1 48px; min-width: 48px; height: 2px;
  background: linear-gradient(90deg, var(--red), var(--ember) 40%, transparent);
}
.items { list-style: none; margin: 0; padding: 0; }
.item-name { font-weight: 700; font-size: 1.06rem; line-height: 1.25; overflow-wrap: anywhere; }
.item-desc { display: block; margin-top: 4px; color: var(--m-muted); font-size: .93rem; line-height: 1.45; }
.item-price { font-family: var(--heading); color: var(--orange); font-size: 1.12rem; white-space: nowrap; font-variant-numeric: tabular-nums; }
.go-ico { width: 20px; height: 20px; flex: none; }

/* Feature cards: signature categories */
.items-cards { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
@media (min-width: 640px) { .items-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; } }
@media (min-width: 1120px) {
  .items-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .items-cards:has(> li:nth-child(4):last-child) { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
.items-cards li { min-width: 0; }
.card {
  display: flex; flex-direction: column; height: 100%; border-radius: var(--radius); overflow: hidden;
  background: var(--m-card); box-shadow: inset 0 0 0 1px var(--m-line);
  text-decoration: none; color: inherit;
  transition: box-shadow .2s var(--ease-out), background-color .2s var(--ease-out);
}
.card-media { display: block; aspect-ratio: 16 / 11; overflow: hidden; background: var(--m-plate); padding: 8px 8px 0; isolation: isolate; box-shadow: inset 0 -1px 0 var(--m-plate-rim); }
.card-media img { width: 100%; height: 100%; object-fit: contain; display: block; mix-blend-mode: multiply; transition: transform .4s var(--ease-out); }
.card-body { display: flex; flex-direction: column; flex: 1; padding: 14px 16px 16px; }
.card .item-name { font-size: 1.15rem; }
.card-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: auto; padding-top: 14px; }
.card .item-price { font-size: 1.4rem; }
.go {
  display: inline-flex; align-items: center; gap: 2px; min-height: 40px; padding: 0 10px 0 16px; border-radius: 999px;
  background: var(--red); color: var(--text); font-weight: 700; font-size: .95rem; letter-spacing: .02em;
  transition: background-color .15s var(--ease-out);
}
.card:hover { background: var(--m-card-hi); box-shadow: inset 0 0 0 1px var(--m-line-hot); }
.card:hover .card-media img { transform: scale(1.04); }
.card:hover .go { background: var(--red-hover); }
.card:active { background: var(--m-card); }

/* Photo rows */
.items-rows { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0 40px; }
@media (min-width: 900px) { .items-rows { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.items-rows li, .items-list li { border-bottom: 1px solid var(--m-line); min-width: 0; }
.row {
  display: grid; grid-template-columns: var(--thumb) minmax(0, 1fr) auto; gap: 14px; align-items: center;
  min-height: 64px; padding: 12px 8px; margin: 0 -8px; border-radius: 12px;
  text-decoration: none; color: inherit; transition: background-color .15s var(--ease-out);
}
.row-photo {
  width: var(--thumb); height: var(--thumb); object-fit: cover; border-radius: 12px; display: block;
  background: var(--m-card);
}
/* Photo rows: the cream plate is a pseudo-element in the photo's grid cell, so the photo can
   multiply onto it (an image cannot multiply onto its own background). The no-photo ember
   mark keeps its own look. */
.row:has(> img.row-photo) { isolation: isolate; }
.row:has(> img.row-photo)::before {
  content: ""; grid-column: 1; grid-row: 1; width: var(--thumb); height: var(--thumb); border-radius: 12px;
  background: var(--m-plate); box-shadow: inset 0 0 0 1px var(--m-plate-rim);
}
img.row-photo { grid-column: 1; grid-row: 1; mix-blend-mode: multiply; background: none; }
/* A row without a photo (or repeating the one above it) drops the thumbnail column: text from the left edge */
.items-rows > li { display: grid; }  /* the row fills its cell, so a text row centres against its photo neighbour */
.row.no-photo { grid-template-columns: minmax(0, 1fr) auto; }
.row-text { min-width: 0; display: block; }
.row-end { display: flex; align-items: center; gap: 6px; color: var(--orange); }
.row-end .go-ico { color: var(--m-faint); transition: color .15s var(--ease-out), transform .15s var(--ease-out); }
.row:hover { background: var(--m-chip); }
.row:hover .go-ico { color: var(--orange); transform: translateX(2px); }
.row:active { background: var(--m-card); }

/* Compact price list */
.items-list { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0 40px; }
@media (min-width: 700px) { .items-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .is-list .items-list:has(li:nth-child(9)) { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.line {
  display: flex; flex-direction: column; justify-content: flex-start; min-height: 52px; padding: 13px 8px 12px; margin: 0 -8px;
  border-radius: 10px; text-decoration: none; color: inherit; transition: background-color .15s var(--ease-out);
}
.line-top { display: flex; align-items: baseline; gap: 10px; }
.line .item-name { font-weight: 600; font-size: 1.02rem; min-width: 0; }
.leader { flex: 1 1 12px; min-width: 12px; border-bottom: 2px dotted var(--m-leader); transform: translateY(-4px); }
.line .item-price { font-size: 1.05rem; min-width: 3.4em; text-align: right; }
.line .go-ico { align-self: center; width: 18px; height: 18px; color: var(--m-faint); transition: color .15s var(--ease-out); }
.line .item-desc { font-size: .88rem; margin-top: 2px; }
.line:hover { background: var(--m-chip); }
.line:hover .go-ico { color: var(--orange); }
.line:active { background: var(--m-card); }

.menu-note { margin: 40px 0 0; color: var(--m-muted); font-size: .9rem; }

/* ------------------------------------------------------------ sticky Order Online */
.order-bar {
  position: sticky; bottom: 0; z-index: 9; display: flex; justify-content: center;
  padding: 10px var(--gutter) calc(10px + env(safe-area-inset-bottom));
  background: var(--m-glass); border-top: 1px solid var(--m-line);
}
@supports (backdrop-filter: blur(10px)) { .order-bar { backdrop-filter: blur(10px); } }
.order-btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 50px;
  width: min(100%, 420px); font-size: 1.05rem;
  box-shadow: 0 8px 24px var(--m-glow-red);
}
/* Wide screens: the header's Order Online is enough, no bottom bar over the menu.
   Phones: the bar goes once the footer (which has its own Order button) is on screen. */
@media (min-width: 900px) { .order-bar { display: none; } }
html.at-foot .order-bar { display: none; }

/* ------------------------------------------------------------ focus */
.crumbs a:focus-visible, .cats li a:focus-visible, .row:focus-visible, .line:focus-visible,
.order-btn:focus-visible, .hero-ctas .btn:focus-visible {
  outline: 2px solid var(--orange); outline-offset: 2px;
}
.card:focus-visible { outline: 3px solid var(--orange); outline-offset: 3px; }
.cats li a:focus-visible { outline-offset: -2px; }

/* ------------------------------------------------------------ phones */
@media (max-width: 480px) {
  .menu-page { --thumb: 76px; }
  .row { gap: 12px; }
  .item-name { font-size: 1rem; }
  .item-desc { font-size: .88rem; }
  .card .item-name { font-size: 1.08rem; }
  .card-media { aspect-ratio: 16 / 9; }
  .card-body { padding: 12px 14px 14px; }
  .card-foot { padding-top: 10px; }
  .hero-ctas { gap: 10px; margin-top: 18px; }
  .hero-ctas .btn { flex: 1 1 0; min-width: 0; padding-inline: .7em; font-size: .98rem; }
  .menu-hero { padding-bottom: 28px; }
}

@media (prefers-reduced-motion: reduce) {
  .cats li a, .card, .card-media img, .row, .row-end .go-ico, .line, .go, .hero-pick, .hero-pick img { transition: none; }
  .card:hover .card-media img, .hero-pick:hover img { transform: none; }
  .hero-pick, .hero-pick:hover { transform: none; }
}
