/* ============================================================
   MR. CHEN — MENU PAGE (menu.html)
   Loads after css/fonts.css + css/main.css — page styles only
   ============================================================ */

:root { --rail-h: 60px; }

/* ---------- current-page nav link (subtle orange underline) ---------- */
/* anchored targets clear the fixed header AND the sticky category rail */
main [id] { scroll-margin-top: calc(var(--nav-h) + var(--rail-h) + 1.2rem); }

/* ---------- compact page hero ---------- */
.page-hero {
  position: relative;
  background: var(--orange); color: var(--cream);
  overflow: clip; text-align: center;
  padding: calc(var(--nav-h) + clamp(2.5rem, 6vw, 4.5rem)) clamp(1rem, 4vw, 3rem) clamp(3rem, 7vw, 5rem);
}
.page-hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse 62% 58% at 50% 46%, rgba(244, 126, 66, .85) 0%, rgba(244, 126, 66, 0) 70%);
}
.page-hero__pattern {
  position: absolute; inset: 0; opacity: .035; pointer-events: none;
  background: url("../assets/pattern/PATTERN.svg") 0 0 / 640px repeat;
  filter: saturate(0) brightness(2.5);
  animation: pattern-drift 60s linear infinite;
  -webkit-mask-image: linear-gradient(180deg, transparent 100px, #000 240px);
  mask-image: linear-gradient(180deg, transparent 100px, #000 240px);
}
.page-hero__inner {
  position: relative; z-index: 2;
  max-width: 900px; margin-inline: auto;
  display: grid; justify-items: center; gap: clamp(.8rem, 2vw, 1.2rem);
}
.page-hero__kicker { font-size: clamp(1.5rem, 2.6vw, 2.1rem); color: var(--cream); transform: rotate(-3deg); }
.page-hero__title {
  font-family: var(--font-display); font-weight: 400;
  font-size: clamp(3.2rem, 9.5vw, 7.5rem);
  line-height: .92; text-transform: uppercase; letter-spacing: .01em;
}
.page-hero__title span { display: block; text-shadow: 0.045em 0.045em 0 var(--chrome); }
.t-cream { color: var(--cream); }
.t-yellow { color: var(--yellow); }
.t-green { color: var(--green); }
.page-hero__sub {
  max-width: 48ch; font-size: clamp(1rem, 1.4vw, 1.15rem);
  line-height: 1.55; color: var(--ink); font-weight: 500;
}
.page-hero__fineline { font-size: .85rem; line-height: 1.5; color: rgba(253, 246, 227, .88); max-width: 56ch; }
/* oversized brand icons bleeding off the band edges (template behavior) */
.page-hero__ico { position: absolute; pointer-events: none; z-index: 1; }
.page-hero__ico--chopsticks {
  width: 300px; height: 300px; right: -90px; top: 46%; transform: rotate(24deg);
  background: var(--yellow);
  -webkit-mask: url("../assets/icons/svg/chopsticks.svg") center / contain no-repeat;
  mask: url("../assets/icons/svg/chopsticks.svg") center / contain no-repeat;
}
.page-hero__ico--noodles {
  width: 260px; height: 190px; left: -70px; bottom: -34px; transform: rotate(-12deg);
  background: var(--green);
  -webkit-mask: url("../assets/icons/svg/noodles.svg") center / contain no-repeat;
  mask: url("../assets/icons/svg/noodles.svg") center / contain no-repeat;
}
@media (max-width: 700px) {
  .page-hero__ico--chopsticks { width: 190px; height: 190px; right: -66px; }
  .page-hero__ico--noodles { width: 170px; height: 124px; left: -52px; }
}

/* ---------- sticky category rail ---------- */
.rail {
  position: sticky; top: var(--nav-h); z-index: 90;
  background: rgba(253, 246, 227, .94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 3px solid var(--chrome);
  transition: top .35s var(--ease-out);
}
/* header hides on scroll-down: rail glides up to own the top edge */
body:has(.site-header.is-hidden) .rail { top: 0; }
.rail__scroller {
  max-width: 1400px; margin-inline: auto;
  height: var(--rail-h);
  display: flex; align-items: center; gap: .6rem;
  padding: 0 clamp(1rem, 4vw, 2.5rem);
  overflow-x: auto; scrollbar-width: none;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 18px, #000 calc(100% - 42px), transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0, #000 18px, #000 calc(100% - 42px), transparent 100%);
}
.rail__scroller::-webkit-scrollbar { display: none; }
@media (min-width: 900px) {
  .rail__scroller { justify-content: center; -webkit-mask-image: none; mask-image: none; }
}
.rail__link {
  flex: 0 0 auto;
  font-family: var(--font-label); font-weight: 600; font-size: .85rem;
  text-transform: uppercase; letter-spacing: .05em; text-decoration: none;
  color: var(--green);
  border: 2.5px solid transparent; border-radius: 999px;
  padding: .45rem 1.05rem;
  transition: background .18s, color .18s, border-color .18s;
}
.rail__link:hover { border-color: var(--green); }
.rail__link.is-active { background: var(--green); color: var(--yellow); border-color: var(--green); }
.rail__link.is-dim { opacity: .35; pointer-events: none; }

/* ---------- dietary filters ---------- */
.filters {
  max-width: 1400px; margin: 0 auto;
  padding: clamp(2.2rem, 5vw, 3.2rem) clamp(1rem, 4vw, 3rem) 0;
  display: grid; gap: .7rem; justify-items: center;
}
.filters__kicker { font-size: clamp(1.4rem, 2.4vw, 1.8rem); color: var(--orange); transform: rotate(-2deg); }
.filters .menu__filters { margin: 0; max-width: 100%; }
@media (max-width: 700px) {
  .filters .menu__filters { width: 100%; }
}
/* active chip pops like the stickers — chrome border + hard offset shadow; inactive stay flat */
.filters .chip.is-active {
  border-color: var(--chrome);
  box-shadow: 0 4px 0 var(--chrome);
}
/* visible mirror of the aria-live filter count */
.filters__count {
  font-family: var(--font-label); font-weight: 600; font-size: .72rem;
  text-transform: uppercase; letter-spacing: .08em;
  color: rgba(12, 11, 8, .55);
}

/* ---------- category sections ---------- */
.cat { max-width: 1400px; margin: 0 auto; padding: clamp(2.6rem, 6vw, 4.2rem) clamp(1rem, 4vw, 3rem); }
.cat .section-head { margin-bottom: clamp(1.8rem, 4vw, 2.6rem); }
.cat[hidden] { display: none; }
/* 5-item sections: featured card (span 2) + 4 singles = perfect 3-col rows */
@media (min-width: 1100px) {
  .menu__grid--3 { grid-template-columns: repeat(3, 1fr); }
}

/* ---------- dish card extensions ---------- */
.dish__stats { display: inline-flex; align-items: center; gap: .55rem; flex-wrap: wrap; }
.dish__cal {
  font-family: var(--font-label); font-weight: 600; font-size: .72rem;
  text-transform: uppercase; letter-spacing: .05em;
  color: var(--chrome);
  border: 2px solid rgba(6, 51, 26, .55); border-radius: 999px;
  padding: .2rem .6rem; white-space: nowrap;
}

/* ---------- integrated nutrition disclosure ---------- */
.nutri { margin-top: .55rem; border-top: 2px dashed rgba(6, 51, 26, .25); padding-top: .55rem; }
.nutri__summary {
  list-style: none; cursor: pointer; user-select: none;
  display: inline-flex; align-items: center; gap: .5rem;
  font-family: var(--font-label); font-weight: 600; font-size: .78rem;
  text-transform: uppercase; letter-spacing: .07em; color: var(--green);
  padding: .3rem .15rem;
}
.nutri__summary::-webkit-details-marker { display: none; }
.nutri__summary::marker { content: ""; }
.nutri__plus {
  display: grid; place-items: center;
  width: 20px; height: 20px;
  border: 2px solid var(--green); border-radius: 50%;
  font-size: .95rem; line-height: 1; font-family: var(--font-body); font-weight: 700;
  transition: transform .25s var(--ease-spring), background .18s, color .18s;
}
.nutri__summary:hover .nutri__plus { background: var(--green); color: var(--yellow); }
.nutri[open] .nutri__plus { transform: rotate(45deg); background: var(--green); color: var(--yellow); }
.nutri__summary:focus-visible {
  outline: 3px solid var(--yellow); outline-offset: 3px;
  box-shadow: 0 0 0 6px rgba(12, 11, 8, .55);
  border-radius: 999px;
}
.nutri__panel { margin-top: .7rem; display: grid; gap: .7rem; animation: nutri-in .3s var(--ease-out); }
@keyframes nutri-in { from { opacity: 0; translate: 0 -6px; } }
/* mini facts board: chrome-gap cells, Anton values */
.nutri__facts {
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 2px;
  background: var(--chrome);
  border: 2px solid var(--chrome); border-radius: 14px;
  overflow: hidden;
}
.nutri__facts > div { background: var(--cream); padding: .5rem .25rem .45rem; text-align: center; display: grid; gap: .15rem; align-content: start; }
.nutri__facts dt {
  font-family: var(--font-label); font-weight: 600; font-size: .58rem;
  text-transform: uppercase; letter-spacing: .06em; color: rgba(12, 11, 8, .6);
}
.nutri__facts dd { font-family: var(--font-display); font-size: .95rem; color: var(--green); }
.nutri__allergens { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem; }
.nutri__allergens-label {
  font-family: var(--font-label); font-weight: 600; font-size: .68rem;
  text-transform: uppercase; letter-spacing: .06em; color: rgba(12, 11, 8, .6);
  margin-right: .15rem;
}
.nutri__tag {
  font-family: var(--font-label); font-weight: 600; font-size: .65rem;
  text-transform: uppercase; letter-spacing: .05em;
  background: var(--cream-dim); color: var(--chrome);
  border: 1.5px solid rgba(6, 51, 26, .45); border-radius: 999px;
  padding: .18rem .55rem;
}
.nutri__tag--warn { background: var(--orange); color: var(--cream); border-color: var(--chrome); }
.nutri__note { font-size: .72rem; color: rgba(12, 11, 8, .55); }
.nutri__note a { color: var(--orange-deep); }

/* ---------- La Familia treatments ---------- */
.dish--kids { background: var(--yellow); rotate: -1deg; }
.dish--kids:hover { rotate: 0deg; }
.dish--kids .dish__name { color: var(--green); }
.dish--kids .dish__desc { color: rgba(12, 11, 8, .78); }
.dish--kids .nutri { border-top-color: rgba(6, 51, 26, .35); }
.dish--kids .nutri__facts > div { background: var(--cream); }
.kids-ico {
  position: absolute; z-index: 2; pointer-events: none;
  width: 96px; height: 96px; right: -20px; top: -16px;
  background: var(--green);
  -webkit-mask: url("../assets/icons/svg/fortune-cookie.svg") center / contain no-repeat;
  mask: url("../assets/icons/svg/fortune-cookie.svg") center / contain no-repeat;
  transform: rotate(16deg);
}

/* ---------- fine print (nutrition + allergen statements) ---------- */
.fine-print { max-width: 1200px; margin: 0 auto; padding: clamp(2.5rem, 6vw, 4.5rem) clamp(1rem, 4vw, 3rem) clamp(4rem, 8vw, 6rem); }
.fine-print__cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 2rem; margin-top: clamp(1.8rem, 4vw, 2.6rem); }
.fine-card {
  position: relative; overflow: hidden;
  background: var(--white);
  border: 3px solid var(--chrome); border-radius: var(--radius);
  box-shadow: 0 6px 0 var(--chrome);
  padding: clamp(1.6rem, 3vw, 2.2rem);
  display: grid; gap: .9rem; align-content: start;
  min-width: 0;
}
.fine-card h3 { font-family: var(--font-label); text-transform: uppercase; font-size: 1.15rem; color: var(--green); }
.fine-card p { font-size: .95rem; line-height: 1.6; color: rgba(12, 11, 8, .78); max-width: 52ch; }
.fine-card mark {
  background: var(--yellow); color: var(--ink);
  padding: .08em .3em; border-radius: 4px;
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
}
.fine-card__ico {
  position: absolute; right: -36px; bottom: -32px; z-index: 0; pointer-events: none;
  width: 160px; height: 160px; opacity: .14;
  background: var(--green); transform: rotate(-10deg);
}
.fine-card__ico--rice {
  -webkit-mask: url("../assets/icons/svg/rice-bowl.svg") center / contain no-repeat;
  mask: url("../assets/icons/svg/rice-bowl.svg") center / contain no-repeat;
}
.fine-card__ico--shrimp {
  -webkit-mask: url("../assets/icons/svg/shrimps.svg") center / contain no-repeat;
  mask: url("../assets/icons/svg/shrimps.svg") center / contain no-repeat;
}
.allergen-chips { list-style: none; display: flex; flex-wrap: wrap; gap: .4rem; }
.allergen-chips li {
  font-family: var(--font-label); font-weight: 600; font-size: .7rem;
  text-transform: uppercase; letter-spacing: .05em;
  background: var(--cream-dim); color: var(--chrome);
  border: 2px solid var(--chrome); border-radius: 999px;
  padding: .25rem .7rem;
}

/* ---------- come hungry CTA band ---------- */
.hungry {
  position: relative;
  background: var(--green); color: var(--cream);
  overflow: clip; text-align: center;
  padding: calc(clamp(4rem, 8vw, 6.5rem) + 24px) clamp(1rem, 4vw, 3rem) clamp(4.5rem, 9vw, 7rem);
}
.hungry::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 24px; z-index: 3;
  background: var(--zigzag-down-cream) repeat-x; background-size: 48px 24px;
  pointer-events: none;
}
.hungry__pattern {
  position: absolute; inset: 0; opacity: .05; pointer-events: none;
  background: url("../assets/pattern/PATTERN.svg") 0 0 / 640px repeat;
}
.hungry__inner { position: relative; z-index: 2; display: grid; justify-items: center; gap: 1rem; }
.hungry__kicker { font-size: clamp(1.5rem, 2.6vw, 2rem); color: var(--yellow); transform: rotate(-2deg); }
.hungry__title {
  font-family: var(--font-display); font-weight: 400;
  font-size: clamp(3.2rem, 10vw, 8rem);
  line-height: .93; text-transform: uppercase; letter-spacing: .01em;
}
.hungry__title span { display: block; text-shadow: 0.045em 0.045em 0 var(--chrome); }
.hungry__sub { color: rgba(253, 246, 227, .88); max-width: 46ch; font-size: 1.05rem; line-height: 1.6; }
.hungry__actions { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: center; margin-top: 1rem; }
.hungry__ico { position: absolute; pointer-events: none; z-index: 1; background: var(--yellow); }
.hungry__ico--wok {
  width: 280px; height: 280px; left: -80px; bottom: -60px; transform: rotate(-14deg);
  -webkit-mask: url("../assets/icons/svg/wok.svg") center / contain no-repeat;
  mask: url("../assets/icons/svg/wok.svg") center / contain no-repeat;
}
.hungry__ico--dumpling {
  width: 190px; height: 190px; right: -50px; top: 18%; transform: rotate(12deg);
  -webkit-mask: url("../assets/icons/svg/dumpling.svg") center / contain no-repeat;
  mask: url("../assets/icons/svg/dumpling.svg") center / contain no-repeat;
}
@media (max-width: 700px) {
  .hungry__ico--wok { width: 180px; height: 180px; left: -60px; }
  .hungry__ico--dumpling { width: 120px; height: 120px; right: -36px; }
}

/* ---------- motion guards ---------- */
html.capture .page-hero__pattern,
html.capture .nutri__panel { animation: none !important; }
@media (prefers-reduced-motion: reduce) {
  .page-hero__pattern { animation: none; }
  .nutri__panel { animation: none; }
  .dish--kids { rotate: none; }
}
