/* ==========================================================================
   B. FEATURED MENU · "Order Up" (Version B, approved iteration 05)
   One focused dish at a time: plate stage, counter + arrows, ticket selector.
   Shares tokens, .wrap, .eyebrow, .display and .btn with styles.css.
   Iteration 05 compaction: tighter padding and headline, plate sized by the
   viewport height, and on desktop the controls sit under the copy instead of
   under the plate. Version A ("The Lineup") lives in archive/iteration-04/.
   ========================================================================== */
.lb {
  position: relative;
  padding-block: calc(var(--section-y) * .5 + var(--angle)) calc(var(--section-y) * .45 + var(--angle) * .5);
  background: var(--bone);
  color: var(--ink-text);
  clip-path: polygon(0 var(--angle), 100% 0, 100% calc(100% - var(--angle)), 0 100%);
  margin-block: calc(var(--angle) * -.5);
}
.lb :focus-visible { outline-color: var(--ink-0); }
.lb-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 10px 48px; margin-bottom: clamp(18px, 2.6vw, 34px); }
.lb-head .eyebrow { margin-bottom: 10px; }
.lb-head__title { font-size: clamp(3rem, 1.4rem + 5.6vw, 6.25rem); color: var(--ink-0); }
.lb-head__intro { max-width: 26rem; color: var(--ink-mute); font-size: .98rem; line-height: 1.5; }

/* ---------- Stage: all six panels share one grid cell, so its height never jumps ---------- */
.lb-stage { display: grid; touch-action: pan-y; }
.lb-panel {
  grid-area: 1 / 1;
  display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; align-content: start;
  visibility: hidden; opacity: 0;
  transition: opacity .3s var(--ease), visibility 0s linear .3s;
}
.lb-panel.is-active { visibility: visible; opacity: 1; transition: opacity .45s var(--ease), visibility 0s; }

/* Plate size follows the viewport height so the name and controls stay close on short screens */
.lb-panel__media { position: relative; width: min(78%, 320px, 40svh); margin-inline: auto; aspect-ratio: 1; }
.lb-panel__disc {
  position: absolute; left: 4%; top: 3%; width: 76%; aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle at 34% 30%, #f2393e 0%, var(--red-ui) 46%, var(--red-deep) 100%);
  box-shadow: inset 0 -18px 50px rgba(80, 6, 9, .35);
  transform: scale(.82); transition: transform .9s var(--ease-out);
}
.lb-panel__disc::after { /* thin offset ring, printed-ticket feel */
  content: ""; position: absolute; inset: -12px; border-radius: 50%; border: 1.5px dashed rgba(20, 17, 17, .22);
}
.lb-panel__num {
  position: absolute; right: -10%; top: -8%;
  font-family: var(--f-display); font-size: clamp(4.6rem, 22vw, 6.5rem); line-height: 1;
  color: transparent; -webkit-text-stroke: 2px rgba(20, 17, 17, .14);
  transform: translateY(18px); opacity: 0; transition: transform .7s var(--ease-out), opacity .5s var(--ease);
}
.lb-panel__media picture { position: absolute; inset: 0; display: block; }
.lb-panel__img {
  width: 100%; height: 100%; object-fit: contain;
  filter: drop-shadow(0 22px 26px rgba(70, 28, 10, .26));
  transform: rotate(-14deg) scale(.86); opacity: 0;
  transition: transform .9s var(--ease-out), opacity .4s var(--ease);
}
.lb-panel.is-active .lb-panel__disc { transform: none; }
.lb-panel.is-active .lb-panel__num { transform: none; opacity: 1; }
.lb-panel.is-active .lb-panel__img { transform: none; opacity: 1; }

.lb-panel__copy { transform: translateY(14px); transition: transform .6s var(--ease-out); }
.lb-panel.is-active .lb-panel__copy { transform: none; }
.lb-panel__cat {
  display: flex; align-items: center; gap: 12px;
  font-size: .72rem; font-weight: 800; font-variation-settings: "wdth" 75; letter-spacing: .2em; text-transform: uppercase; color: var(--red-deep);
}
.lb-panel__cat span {
  display: inline-grid; place-items: center; min-width: 32px; height: 22px; padding: 0 6px;
  background: var(--ink-0); color: var(--white); border-radius: 2px; letter-spacing: .06em;
}
.lb-panel__name {
  margin: 8px 0 8px;
  font-family: var(--f-display); font-weight: 400; font-size: clamp(2.2rem, 1.3rem + 4vw, 3rem); line-height: .94; text-transform: uppercase; color: var(--ink-0);
}
.lb-panel__desc { max-width: 32rem; font-size: .97rem; line-height: 1.5; color: #3d3534; }
.lb-panel__sizes { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0 0; padding: 0; list-style: none; }
.lb-panel__sizes li {
  padding: 6px 10px; border: 1px solid rgba(20, 17, 17, .28); border-radius: 2px;
  font-size: .7rem; font-weight: 800; font-variation-settings: "wdth" 78; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-0);
}

/* ---------- Counter, progress, prev / next ---------- */
.lb-nav { display: flex; align-items: center; gap: 16px; margin-top: 18px; }
.lb-nav__count { font-family: var(--f-display); font-size: 1.2rem; letter-spacing: .04em; color: var(--ink-mute); white-space: nowrap; }
.lb-nav__count b { font-weight: 400; color: var(--ink-0); }
.lb-nav__bar { position: relative; flex: 1; height: 2px; background: var(--line-ink); overflow: hidden; }
.lb-nav__bar span { position: absolute; inset: 0; background: var(--red-ui); transform-origin: 0 50%; transform: scaleX(calc(1 / 6)); transition: transform .6s var(--ease-out); }
.lb-nav__arrows { display: flex; gap: 8px; }
.lb-arrow {
  display: grid; place-items: center; width: 46px; height: 46px;
  background: none; border: 1px solid rgba(20, 17, 17, .3); border-radius: 50%; color: var(--ink-0); cursor: pointer;
  transition: background-color .2s, color .2s, border-color .2s;
}
.lb-arrow:hover { background: var(--ink-0); border-color: var(--ink-0); color: var(--white); }

/* ---------- Ticket selector (ARIA tablist) ---------- */
.lb-rail { margin-top: 10px; }
.lb-tickets {
  display: flex; gap: 8px;
  margin-inline: calc(var(--gutter) * -1);
  padding: 8px var(--gutter) 10px;
  overflow-x: auto; overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory; scroll-padding-inline: var(--gutter);
  scrollbar-width: none;
}
.lb-tickets::-webkit-scrollbar { display: none; }
.lb-ticket {
  position: relative; flex: 0 0 156px; scroll-snap-align: start;
  display: grid; grid-template-columns: 44px minmax(0, 1fr); grid-template-areas: "img num" "img name"; align-items: center; column-gap: 10px;
  min-height: 64px; padding: 8px 10px 8px 8px; text-align: left;
  background: rgba(255, 255, 255, .6); border: 1px solid var(--line-ink); border-radius: var(--radius-lg);
  color: var(--ink-text); cursor: pointer;
  transition: background-color .25s, color .25s, border-color .25s, transform .35s var(--ease-out);
}
.lb-ticket::before { /* red tab on the active ticket */
  content: ""; position: absolute; left: 14px; right: 14px; top: -1px; height: 4px; border-radius: 0 0 2px 2px;
  background: var(--red-ui); transform: scaleX(0); transition: transform .35s var(--ease-out);
}
.lb-ticket picture { grid-area: img; display: block; width: 44px; height: 44px; }
.lb-ticket img { width: 100%; height: 100%; object-fit: contain; transition: transform .5s var(--ease-out); }
.lb-ticket__num { grid-area: num; align-self: end; font-size: .66rem; font-weight: 800; letter-spacing: .1em; color: var(--red-deep); }
.lb-ticket__name { grid-area: name; align-self: start; font-family: var(--f-display); font-size: .98rem; line-height: 1.02; text-transform: uppercase; }
.lb-ticket:hover { border-color: rgba(20, 17, 17, .45); }
.lb-ticket:hover img { transform: rotate(-8deg) scale(1.06); }
.lb-ticket[aria-selected="true"] { background: var(--ink-0); border-color: var(--ink-0); color: var(--white); transform: translateY(-3px); }
.lb-ticket[aria-selected="true"]::before { transform: none; }
.lb-ticket[aria-selected="true"] .lb-ticket__num { color: #ff6a6e; }

/* ---------- Footer: facts + full-menu link ---------- */
.lb-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px 28px; margin-top: 20px; padding-top: 20px; border-top: 2px solid var(--ink-0); }
.lb-foot__facts { display: grid; gap: 10px 40px; }
.lb-foot__facts dt { font-size: .68rem; font-weight: 800; letter-spacing: .2em; text-transform: uppercase; color: var(--red-deep); }
.lb-foot__facts dd { font-weight: 600; font-size: .95rem; color: var(--ink-0); }

/* Phones: the two facts stack as compact rows, then a full-width menu button */
@media (max-width: 767px) {
  .lb-foot { gap: 16px; }
  .lb-foot__facts { width: 100%; gap: 0; }
  .lb-foot__facts > div { display: grid; gap: 3px; padding-block: 10px; }
  .lb-foot__facts > div + div { border-top: 1px solid rgba(20, 17, 17, .14); }
  .lb-foot__facts > div:first-child { padding-top: 0; }
  .lb-foot__facts dd { font-size: .92rem; line-height: 1.45; }
  .lb-foot > .btn { width: 100%; }
}

/* ---------- Tablet: plate beside the copy, tickets below ---------- */
@media (min-width: 768px) {
  .lb-panel { grid-template-columns: minmax(0, .9fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 56px); align-items: center; }
  .lb-panel__media { width: min(100%, 360px, 46svh); }
  .lb-panel__num { right: -8%; top: -4%; font-size: clamp(5.5rem, 11vw, 7.5rem); }
  .lb-panel__name { font-size: clamp(2.6rem, 4.6vw, 3.6rem); }
  .lb-foot__facts { grid-template-columns: auto auto; }
}

/* ---------- Desktop: plate left; copy, counter and tickets stacked on the right ---------- */
@media (min-width: 1024px) {
  .lb-main {
    --lb-cols: minmax(0, 1fr) minmax(0, 1fr); --lb-gap: clamp(32px, 4vw, 64px);
    display: grid; grid-template-columns: var(--lb-cols); grid-template-rows: 1fr auto; column-gap: var(--lb-gap);
  }
  .lb-stage { grid-column: 1 / -1; grid-row: 1 / 3; }
  .lb-panel { grid-template-columns: var(--lb-cols); column-gap: var(--lb-gap); align-items: center; }
  /* The copy reserves room for the controls that sit beneath it (height set by lineup-b.js) */
  .lb-panel__copy { align-self: start; padding: 8px 0 calc(var(--lb-ctrl-h, 230px) + 22px); }
  .lb-ctrl { grid-column: 2; grid-row: 2; align-self: end; position: relative; z-index: 2; }
  .lb-nav { margin-top: 0; }
  .lb-panel__media { width: min(100%, 540px, calc(100svh - 250px)); }
  .lb-panel__num { right: -6%; top: 0; font-size: clamp(7.5rem, 10vw, 11rem); }
  .lb-panel__name { font-size: clamp(2.8rem, 3.8vw, 4.4rem); margin: 10px 0; }
  .lb-panel__desc { font-size: 1.02rem; }
  .lb-tickets { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-inline: 0; padding: 6px 0 2px; overflow: visible; }
  .lb-ticket { grid-template-columns: 40px minmax(0, 1fr); column-gap: 8px; }
  .lb-ticket picture { width: 40px; height: 40px; }
  .lb-ticket__name { font-size: .94rem; }
  .lb-foot { margin-top: clamp(22px, 2.6vw, 36px); }
}
@media (min-width: 1280px) {
  .lb-main { --lb-cols: minmax(0, 1.08fr) minmax(0, 1fr); }
  .lb-ticket { grid-template-columns: 48px minmax(0, 1fr); column-gap: 10px; }
  .lb-ticket picture { width: 48px; height: 48px; }
  .lb-ticket__name { font-size: 1rem; }
}

@media (prefers-reduced-motion: reduce) {
  .lb-panel, .lb-panel.is-active, .lb-panel__disc, .lb-panel__num, .lb-panel__img, .lb-panel__copy,
  .lb-nav__bar span, .lb-ticket, .lb-ticket::before, .lb-ticket img { transition: none; }
  .lb-panel__disc, .lb-panel__num, .lb-panel__img, .lb-panel__copy, .lb-ticket:hover img { transform: none; }
  .lb-ticket[aria-selected="true"] { transform: none; }
}
