/* CR!SP — The Red Box. Base DNA: kremkanel. Donors: brars M01-b / M01-c, mistral M05-a. */

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--color-background); color: var(--color-surface-espresso);
  font: 400 var(--type-body)/1.34 var(--font-body); letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased; overflow-x: clip;
}
section[id] { scroll-margin-top: var(--header-h); }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3, p, ol, ul, figure { margin: 0; padding: 0; }
ol, ul { list-style: none; }
:focus-visible { outline: 3px solid var(--color-accent); outline-offset: 3px; border-radius: 6px; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--color-accent); padding: 10px 14px; }
.skip:focus { left: 8px; }

.display-xl, .display-l, .display-m, .display-s, .price { font-family: var(--font-display); font-weight: 400; text-transform: uppercase; }
.display-xl { font-size: var(--type-display-xl); line-height: 1; }
.display-l  { font-size: var(--type-display-l); line-height: .9; letter-spacing: -0.01em; }
.display-m  { font-size: var(--type-display-m); line-height: .95; letter-spacing: -0.01em; }
.display-s  { font-size: var(--type-display-s); line-height: 1.07; letter-spacing: -0.01em; }
.label-l, .label, .label-s {
  font-family: var(--font-body); font-weight: 700; font-stretch: 125%; text-transform: uppercase;
  letter-spacing: var(--tracking-label);
}
.label-l { font-size: var(--type-label-l); line-height: 1.17; }
.label { font-size: var(--type-label); line-height: 1; }
.label-s { font-size: var(--type-label-s); line-height: 1.07; }
.num { font-variant-numeric: tabular-nums; }

/* ---------- buttons — kremkanel MH-a: fill breathes, label still ---------- */
.btn {
  position: relative; isolation: isolate; display: inline-flex; align-items: center; justify-content: center;
  height: 48px; padding: 0 26px; border-radius: 999px; text-decoration: none; white-space: nowrap;
  font: 800 var(--type-button)/1 var(--font-body); font-stretch: 125%; text-transform: uppercase; letter-spacing: .08em;
}
.btn__bg { position: absolute; inset: 0; z-index: -1; border-radius: inherit; transition: transform 600ms var(--ease-expo-out), background-color 300ms; }
.btn:hover .btn__bg { transform: scale(1.05); transition-duration: 800ms; }
.btn--l { height: 60px; padding: 0 32px; font-size: 15px; }
.btn--xl { height: 88px; padding: 0 48px; font-size: 20px; }
.btn--cream { color: var(--color-surface); } .btn--cream .btn__bg { background: var(--color-cream); }
.btn--red { color: var(--color-background); } .btn--red .btn__bg { background: var(--color-surface-deep); }
.btn--line { color: var(--color-background); } .btn--line .btn__bg { box-shadow: inset 0 0 0 2px var(--color-background); }
.btn--line:hover { color: var(--color-surface); } .btn--line:hover .btn__bg { background: var(--color-cream); }

/* stamp — the one tilted stamp (kremkanel "À propos" stamp → Sticker Yellow) */
.stamp {
  display: inline-block; padding: 10px 16px 9px; border-radius: var(--radius-stamp);
  background: var(--color-accent); color: var(--color-surface);
  font: 800 16px/1 var(--font-body); font-stretch: 125%; text-transform: uppercase; letter-spacing: var(--tracking-label);
  transform: rotate(-8deg);
}

/* ---------- §00 loader — kremkanel §00 ---------- */
.loader { display: none; }
.has-loader .loader {
  display: grid; place-items: center; position: fixed; inset: 0; z-index: 90;
  background: var(--color-surface-deep); clip-path: inset(0 0 round 0);
}
.loader__disc { width: min(34vmin, 260px); }
.loader__disc svg { width: 100%; animation: spin var(--dur-spin) linear infinite; transform-origin: 50% 50%; }   /* M00-a */
.loader__ring { font: 800 13px var(--font-body); font-stretch: 125%; letter-spacing: .2em; fill: var(--color-surface-deep); }
.loader__mark { font: 44px var(--font-display); fill: var(--color-surface-deep); }
.loader.is-going { transition: clip-path var(--dur-loader) var(--ease-quint-inout) 100ms; clip-path: var(--clip-to); }  /* M00-b */
.loader.is-going .loader__disc { transition: transform var(--dur-loader) var(--ease-quint-inout) 100ms, opacity 400ms linear 900ms; transform: scale(.35); opacity: 0; } /* M00-c */
@keyframes spin { to { transform: rotate(1turn); } }

/* ---------- chrome: header ---------- */
.header {
  position: sticky; top: 0; z-index: 40; height: var(--header-h);
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 20px;
  padding: 0 calc(var(--card-margin) + 16px); background: var(--color-background);
}
.brand { justify-self: start; text-decoration: none; }
.brand__disc {
  display: flex; align-items: center; justify-content: center; width: 72px; height: 72px; border-radius: 50%; white-space: nowrap;
  background: var(--color-surface-deep); color: var(--color-background);
  font: 14px/1 var(--font-display); letter-spacing: -.03em;
}
.brand__disc i { font-style: normal; color: var(--color-cream); }
.nav { display: flex; gap: 36px; }
.nav a, .footer__bottom a {
  font: 700 var(--type-label)/1 var(--font-body); font-stretch: 125%; text-transform: uppercase; letter-spacing: var(--tracking-label);
  text-decoration: none; padding: 6px 0;
  background: linear-gradient(currentColor, currentColor) 0 100% / 0 2px no-repeat;
}
.nav a:hover, .footer__bottom a:hover { animation: linkRedraw 1s var(--ease-quint-inout) both; }   /* MH-b */
@keyframes linkRedraw { 0% { background-size: 100% 2px; background-position: 100% 100%; } 50% { background-size: 0 2px; background-position: 100% 100%; } 50.01% { background-position: 0 100%; } 100% { background-size: 100% 2px; background-position: 0 100%; } }
.header > .btn { justify-self: end; }
.header > .btn { color: var(--color-background); } .header > .btn .btn__bg { background: var(--color-surface-deep); }

/* ---------- §01 hero — kremkanel §01 ---------- */
.hero { padding: 0 var(--card-margin); }
.hero__tray {
  position: relative; height: calc(100svh - var(--header-h) - var(--card-margin)); min-height: 600px; max-height: 1000px;
  border-radius: var(--radius-frame) var(--radius-frame) var(--radius-swoosh) var(--radius-frame);
  background: var(--color-surface-deep); color: var(--color-cream);
  padding: clamp(28px, 3.4vw, 52px) clamp(24px, 3.9vw, 56px);
  display: grid; grid-template-rows: auto 1fr auto;
}
.hero__title {
  position: relative; z-index: 4; pointer-events: none; font: 400 min(9.3vw, 16.5vh)/.86 var(--font-display); text-transform: uppercase; letter-spacing: -.02em;
}
.hero__line { display: block; white-space: nowrap; }
.hero__line--b { padding-left: .9em; }
.hero__food { position: absolute; z-index: 3; right: 2%; bottom: -3%; width: min(44%, 72vh); aspect-ratio: 1; pointer-events: none; }
.hero__burger { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; object-position: 50% 100%; }
.hero__piece { position: absolute; }
.hero__piece--a { width: 28%; left: -14%; top: 52%; rotate: -32deg; z-index: 1; }
.hero__piece--b { width: 22%; right: -1%; top: -6%; rotate: 18deg; }
.hero__shake { position: absolute; width: 16%; right: 4%; top: 8%; fill: none; stroke: var(--color-cream); stroke-width: 5; stroke-linecap: round; }
.hero__foot { grid-row: 3; position: relative; z-index: 2; display: flex; flex-direction: column; gap: 22px; max-width: 52%; }
.hero__lead { color: var(--color-background); font-size: var(--type-lead); line-height: 1.15; font-weight: 600; max-width: 22ch; letter-spacing: -.01em; }
.hero__ctas { display: flex; gap: 12px; flex-wrap: wrap; }
.hero__stamp { position: absolute; z-index: 4; right: 33%; bottom: 17%; }

/* ---------- §01b find — kremkanel §01b hours cards ---------- */
.find { padding: 72px var(--card-margin) 120px; }
.find__title { text-align: center; margin-bottom: 36px; }
.find__cards { display: grid; gap: 10px; max-width: 1120px; margin: 0 auto; }
.fcard {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 24px;
  padding: 32px 32px 30px; border-radius: var(--radius-card); text-decoration: none; color: var(--color-surface-espresso);
  transition: transform 600ms var(--ease-expo-out);
}
.fcard:nth-child(odd) { background: var(--color-crust); margin-right: 8%; } .fcard:nth-child(even) { background: var(--color-pith); margin-left: 8%; }
.fcard:hover { transform: translateY(-6px) rotate(-1deg); }
.fcard__k { color: var(--color-surface); }
.fcard__v { display: flex; align-items: center; gap: 28px; text-align: right; }
.fcard__arrow { font: 40px/1 var(--font-display); color: var(--color-surface); transition: transform 600ms var(--ease-expo-out); }
.fcard:hover .fcard__arrow { transform: translateX(8px); }
.fcard .open { display: inline-block; margin-top: 6px; }

/* ---------- §02 flavours — brars M01-b flood + direction A poster prices ---------- */
.flavours {
  --fl-bg: var(--color-crust); --fl-ink: var(--color-surface);   /* Fryer Red on Crust 7.4:1 (Box Red would be 2.9) */ --fl-text: var(--color-surface-espresso);
  position: relative; z-index: 2; overflow-x: clip; background: var(--fl-bg); color: var(--fl-text);
  min-height: 100svh; padding: 56px var(--outer-margin) 140px;
}
.flavours[data-flavour="lemony"] { --fl-bg: var(--color-pith); --fl-ink: var(--color-surface-deep); }
.flavours[data-flavour="grilled"] { --fl-bg: var(--color-grill); --fl-ink: var(--color-crust); --fl-text: var(--color-background); }
.flavours__flood { position: absolute; inset: 0; clip-path: circle(0% at 50% 50%); pointer-events: none; }
.flavours__inner { z-index: 1; }
.flavours__inner { position: relative; display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 24px; max-width: 1560px; margin: 0 auto; }
.flavours__tabs { display: flex; gap: 10px; }
.flavours__tabs button {
  appearance: none; cursor: pointer; height: 48px; padding: 0 22px; border-radius: 999px; border: 0;
  box-shadow: inset 0 0 0 2px currentColor; background: transparent; color: var(--fl-text);
  font: 800 14px/1 var(--font-body); font-stretch: 125%; text-transform: uppercase; letter-spacing: .08em;
  transition: background-color 300ms, color 300ms;
}
.flavours__tabs button[aria-selected="true"] { background: var(--fl-ink); color: var(--fl-bg); box-shadow: none; }
.flavours__stage {
  grid-column: 1 / -1; position: relative; display: grid;
  grid-template-columns: 1fr 1fr; grid-template-rows: auto 1fr; align-items: end; column-gap: 24px;
  min-height: calc(100svh - 240px);
}
.flavours__word {
  grid-column: 1 / -1; grid-row: 1; text-align: center; color: var(--fl-ink);
  font: 400 clamp(92px, 21vw, 340px)/.8 var(--font-display); text-transform: uppercase; letter-spacing: -.035em;
  margin-top: 3vh;
}
.flavours__img {
  position: absolute; left: 47%; top: 30%; width: min(40vw, 56vh); translate: -50% 0; z-index: 2;
  filter: drop-shadow(0 0 0 transparent);
}
.flavours__line { grid-row: 2; align-self: end; max-width: 16ch; font: 600 var(--type-lead)/1.15 var(--font-body); letter-spacing: -.01em; }
.flavours__prices { grid-row: 2; justify-self: end; align-self: end; display: grid; gap: 4px; text-align: right; }
.flavours__prices li { display: grid; justify-items: end; gap: 2px; }
.flavours__prices li + li { margin-top: 14px; }
.flavours__prices .price { font-size: var(--type-display-xl); line-height: .9; color: var(--fl-ink); }
.flavours__prices .cur { font-size: .3em; vertical-align: .9em; margin-right: .15em; }

/* ---------- crinkle edge — kremkanel M01-c jelly, re-cut as a fry-box crinkle ---------- */
.crinkle { position: absolute; left: 0; right: 0; height: 90px; pointer-events: none; z-index: 1; overflow: hidden; }
.crinkle svg { width: 100%; height: 100%; display: block; }
.menu > .crinkle { top: -89px; }
.crinkle__back { fill: var(--color-cream); }
.crinkle__front { fill: var(--color-surface-deep); }
.crinkle--down .crinkle__front { fill: var(--color-background); }

/* ---------- §03 menu — kremkanel §02/§03 trays ---------- */
.menu { position: relative; background: var(--color-surface-deep); color: var(--color-cream); padding: 56px 0 var(--card-margin); z-index: 1; }
.menu__head { padding: 0 var(--outer-margin); display: grid; grid-template-columns: 1fr auto; grid-template-areas: "title box" "note box"; align-items: end; column-gap: 24px; }
.menu__title { grid-area: title; } .menu__note { grid-area: note; margin-top: 16px; }
.menu__box { grid-area: box; position: relative; width: clamp(150px, 20vw, 290px); aspect-ratio: 1; margin-bottom: -40px; }
.menu__box img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.menu__box img { transition: opacity 150ms linear 250ms; }          /* closing: the lid swaps back part-way through the shrink */
.menu__box-open { opacity: 0; }
.menu__box.is-inview .menu__box-closed { opacity: 0; transition-delay: 450ms; }
.menu__box.is-inview .menu__box-open { opacity: 1; transition-delay: 450ms; }
.menu__note { max-width: 34ch; color: var(--color-background); font-size: 15px; }
.menu__index {
  position: sticky; top: var(--header-h); z-index: 20; display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none;
  padding: 14px var(--outer-margin); margin: 28px 0 8px; background: var(--color-surface-deep);
}
.menu__index a {
  flex: none; display: inline-flex; align-items: center; height: 40px; padding: 0 18px; border-radius: 999px; text-decoration: none;
  background: var(--color-surface); color: var(--color-cream);
  font: 800 13px/1 var(--font-body); font-stretch: 125%; text-transform: uppercase; letter-spacing: .08em;
  transition: background-color 300ms, color 300ms;
}
.menu__index a:hover, .menu__index a.is-active { background: var(--color-cream); color: var(--color-surface-deep); }
.menu__trays { display: grid; gap: var(--card-margin); padding: 0 var(--card-margin); }
.tray {
  border-radius: var(--radius-frame) var(--radius-swoosh) var(--radius-frame) var(--radius-frame);
  padding: 30px 20px 40px; display: grid; grid-template-columns: repeat(12, 1fr); column-gap: var(--grid-gap);
}
.tray--hot { background: var(--color-surface); color: var(--color-cream); }
.tray--cold { background: var(--color-pith); color: var(--color-surface-espresso); border-radius: var(--radius-swoosh) var(--radius-frame) var(--radius-frame) var(--radius-frame); }
.tray__title { grid-column: 1 / -1; padding: 10px 20px 40px; }
.tray--cold .tray__title { color: var(--color-surface-deep); }
.tray__media { grid-column: 1 / 6; }
.tray__sticky { position: sticky; top: calc(var(--header-h) + 90px); display: grid; }
.tray__photo {
  position: relative; grid-area: 1 / 1; aspect-ratio: 1; min-width: 0; min-height: 0; overflow: hidden; border-radius: var(--radius-frame);
  transform-origin: 50% 50%;
}
.tray--hot .tray__photo { background: var(--color-surface-deep); }
.tray--cold .tray__photo { background: var(--color-background); }
.tray__photo:nth-child(2) { background: var(--color-crust); }
.tray__photo img { position: absolute; inset: 9%; width: 82%; height: 82%; object-fit: contain; }
.tray__photo figcaption { position: absolute; left: 20px; bottom: 16px; }
.tray__list { grid-column: 7 / -1; }
.group { padding-top: 80px; scroll-margin-top: calc(var(--header-h) + 90px); }
.group:first-child { padding-top: 0; }
.group__title { font: 400 var(--type-price)/1 var(--font-display); text-transform: uppercase; margin-bottom: 12px; }
.tray--cold .group__title { color: var(--color-surface-deep); }
.item { display: grid; grid-template-columns: 1fr auto; align-items: baseline; gap: 4px 20px; padding: 20px 0; }
.item + .item { box-shadow: 0 -2px 0 0 color-mix(in srgb, currentColor 14%, transparent); }
.item__name { grid-column: 1; font: 700 var(--type-item)/1.2 var(--font-body); font-stretch: 112%; text-transform: uppercase; letter-spacing: -.01em; }
.item__desc { grid-column: 1; font-size: 15px; opacity: .9; }
.item__price { grid-column: 2; grid-row: 1 / span 2; text-align: right; font: 400 var(--type-price)/1 var(--font-display); font-variant-numeric: tabular-nums; }
.tray--cold .item__price { color: var(--color-surface); }
.item__price small { font: 800 11px/1 var(--font-body); font-stretch: 125%; letter-spacing: .1em; vertical-align: .9em; margin-right: 4px; }
.item--addon .item__name::before { content: "+ "; }
.item--addon .item__price::before { content: "+"; }
.save {
  display: inline-grid; place-items: center; width: 64px; height: 64px; margin-left: 10px; vertical-align: middle; flex: none;
  background: var(--color-accent); color: var(--color-surface); clip-path: url(#burst);
  font: 800 9px/1 var(--font-body); font-stretch: 112%; text-align: center; letter-spacing: .04em; rotate: -10deg;
}
.save b { display: block; margin-top: 2px; font: 16px/1 var(--font-display); letter-spacing: -.04em; }
.tray__rail { display: none; }

/* ---------- §04 buckets — mistral M05-a fall, brars M01-c stickers ---------- */
.buckets {
  display: grid; grid-template-columns: repeat(12, 1fr); column-gap: var(--grid-gap);
  padding: 140px var(--outer-margin) 120px;
}
.buckets__visual { grid-column: 1 / 6; }
.bucket { position: sticky; top: calc(var(--header-h) + 60px); width: min(100%, 480px); margin: 0 auto; aspect-ratio: 1073 / 1380; }
.bucket__body { position: absolute; left: 0; bottom: 0; width: 100%; z-index: 1; }
.bucket__pile { position: absolute; inset: 0 0 45% 0; z-index: 2; }   /* pieces land on the heap already in the bucket */
.bucket__pile img { position: absolute; left: var(--x); top: var(--y); width: var(--w); rotate: var(--r); transform-origin: 50% 100%; }
.buckets__copy { grid-column: 7 / -1; }
.buckets__title { color: var(--color-surface-deep); letter-spacing: -.02em; font-size: min(var(--type-display-xl), 6.4vw); }
.buckets__lead { margin: 20px 0 56px; font: 600 var(--type-lead)/1.15 var(--font-body); max-width: 24ch; }
.deal { position: relative; display: grid; grid-template-columns: 1fr auto; gap: 8px 24px; padding: 34px 0; }
.deal + .deal { box-shadow: 0 -3px 0 0 var(--color-surface-espresso); }
.deal__name { font: 400 var(--type-display-s)/1 var(--font-display); text-transform: uppercase; letter-spacing: -.01em; }
.deal__desc { grid-column: 1; max-width: 42ch; font-size: 16px; }
.deal__price { grid-column: 2; grid-row: 1 / span 2; text-align: right; color: var(--color-surface-deep); }
.deal__price .price { font-size: clamp(56px, 6.2vw, 96px); line-height: .9; display: block; font-variant-numeric: tabular-nums; }
.deal__price .price small { font: 800 .2em/1 var(--font-body); font-stretch: 125%; letter-spacing: .1em; vertical-align: 1.9em; margin-right: .4em; }
.deal__sizes { display: grid; gap: 10px; }
.deal__sizes .price { font-size: clamp(48px, 5vw, 80px); }
.deal__sizes span.label-s { display: block; color: var(--color-surface-espresso); }
.deal .save { position: absolute; left: -92px; top: 26px; width: 80px; height: 80px; }
.deal .save { font-size: 11px; } .deal .save b { font-size: 20px; }
.buckets__cta { margin-top: 40px; }

/* ---------- §05 statement — kremkanel §04 ---------- */
.statement { padding: 0 var(--card-margin) 120px; }
.statement__card {
  position: relative; overflow: hidden; background: var(--color-surface); color: var(--color-cream);
  border-radius: var(--radius-frame); padding: 160px 10px; display: grid; place-items: center;
}
.statement__burst { position: absolute; width: 110vw; left: 50%; top: 50%; translate: -50% -50%; fill: var(--color-swirl-stripe); animation: spin var(--dur-spin) linear infinite paused; }
.statement.is-onscreen .statement__burst { animation-play-state: running; }   /* M04-a */
.statement__text { position: relative; text-align: center; font: 400 var(--type-display-xl)/1 var(--font-display); text-transform: uppercase; letter-spacing: -.02em; }
.statement__text .line { display: block; }
.inline { display: inline-block; width: 1.05em; height: .88em; vertical-align: -.06em; border-radius: var(--radius-inline); overflow: hidden; background: var(--color-crust); }
.inline img { width: 100%; height: 100%; object-fit: contain; padding: 6%; }

/* ---------- §06 footer — kremkanel §06 sticky uncover ---------- */
.main-end { position: relative; z-index: 3; }
.main-end .crinkle { top: -2px; }
main { position: relative; z-index: 2; background: var(--color-background); }
.footer { position: relative; z-index: 1; height: min(100svh, 760px); clip-path: inset(0); }
.footer__wrap {
  position: fixed; left: 0; right: 0; bottom: 0; height: min(100svh, 760px);
  background: var(--color-surface-deep); color: var(--color-cream);
  display: grid; grid-template-rows: 1fr auto auto; padding: 96px var(--outer-margin) 28px;
}
.footer__top { display: flex; justify-content: space-between; align-items: end; gap: 24px; flex-wrap: wrap; }
.footer__mark {
  display: flex; justify-content: center; font: 400 27vw/.78 var(--font-display); letter-spacing: -.04em; margin: 4vh 0 3vh; white-space: nowrap;
}
.footer__mark .g { display: inline-block; }
.footer__mark .g--bang { color: var(--color-accent); }
.footer__bottom { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 18px; }
.footer__legal { margin-left: auto; font-size: 13px; color: var(--color-background); }
.badge { display: inline-grid; place-items: center; width: 16px; height: 16px; border-radius: 50%; background: var(--color-cream); color: var(--color-surface-deep); font: 11px/1 var(--font-display); animation: spin var(--dur-badge-spin) linear infinite paused; }
.footer__bottom.is-onscreen .badge { animation-play-state: running; }   /* M06-c */

/* ---------- chrome: mobile action bar ---------- */
.bar { display: none; }

/* ============ entrance motion (only with motion allowed + JS) ============ */
@media (prefers-reduced-motion: no-preference) {
  .still * { transition: none !important; animation-duration: 0s !important; animation-delay: 0s !important; }
  /* M01-b adapted — the headline assembles: letters blink on 40ms apart, lines squash in from their sides */
  .js .hero__title .c { opacity: .0001; }
  .js.is-ready .hero__title .c { opacity: 1; transition: opacity 120ms linear calc(var(--i) * 40ms + var(--md, 0ms)); }
  .js .hero__line--a { transform-origin: 0 50%; transform: translateX(-7vw) scale(1.8, 1); }
  .js .hero__line--b { transform-origin: 100% 50%; transform: translateX(7vw) scale(1.8, 1); }
  .js.is-ready .hero__line { transform: none; transition: transform var(--dur-logo-groups) var(--ease-bounce) var(--md, 0ms); }
  .js .hero__title .dot { display: inline-block; transform: translateY(-9vw) scale(1, 1.8); }
  .js.is-ready .hero__title .dot { transform: none; transition: transform 1.3s var(--ease-bounce-more) calc(var(--md, 0ms) + 200ms); }
  /* food arrives on the house bounce */
  .js .hero__food > * { transform: translateY(40%) scale(.6); opacity: 0; }
  .js.is-ready .hero__food > * { transform: none; opacity: 1; transition: transform 1.2s var(--ease-bounce), opacity 200ms linear; transition-delay: calc(var(--md, 0ms) + 250ms + var(--k, 0) * 90ms); }
  .hero__piece--a { --k: 1; } .hero__piece--b { --k: 2; } .hero__shake { --k: 3; }
  .js .hero__stamp { transform: rotate(-8deg) scale(0); }
  .js.is-ready .hero__stamp { transform: rotate(-8deg) scale(1); transition: transform 1.3s var(--ease-bounce-more) calc(var(--md, 0ms) + 700ms); }
  /* M01-a — header items drop in */
  .js .header > * { translate: 0 -60px; opacity: 0; }
  .js.is-ready .header > * { translate: 0 0; opacity: 1; transition: translate 1.1s var(--ease-bounce), opacity 200ms linear; transition-delay: calc(var(--n) * 100ms + var(--md, 0ms)); }
  .header > :nth-child(1) { --n: 0; } .header > :nth-child(2) { --n: 1; } .header > :nth-child(3) { --n: 2; }

  /* M01-d — cards swing in from alternate sides */
  .js .find__cards .fcard { translate: 10vw 0; opacity: 0; }
  .js .find__cards .fcard:nth-child(even) { translate: -10vw 0; }
  .js .find__cards.is-inview .fcard { translate: 0 0; opacity: 1; transition: translate 1500ms var(--ease-bounce-more), opacity 450ms linear, transform 600ms var(--ease-expo-out); transition-delay: calc(var(--n) * 100ms), calc(var(--n) * 100ms), 0ms; }

  /* M02-a — characters drop into clipped words, random order, lines 120ms apart */
  .js [data-chars] .word { display: inline-block; clip-path: inset(-.1em -.05em); }
  .js [data-chars] .char { display: inline-block; translate: 0 -120%; }
  .js [data-chars].is-inview .char { translate: 0 0; transition: translate var(--dur-char-drop) var(--ease-bounce) var(--d); }

  /* M04-b — inline photos open from a slit after the text */
  .js .statement .inline { clip-path: inset(50% 0 50% 0 round var(--radius-inline)); }
  .js .statement .inline img { scale: 1.7; }
  .js .statement.is-inview .inline { clip-path: inset(0 round var(--radius-inline)); transition: clip-path 800ms var(--ease-quint-out) var(--d); }
  .js .statement.is-inview .inline img { scale: 1; transition: scale 1.1s var(--ease-expo-out) calc(var(--d) + 100ms); }

  /* the box opens: pops on the bounce-more curve while the lid swaps */
  .js .menu__box { scale: .88; transition: scale .6s var(--ease-expo-out); }
  .js .menu__box.is-inview { scale: 1; transition: scale 1.2s var(--ease-bounce-more) 400ms; }

  /* mistral M05-a — pieces fall and squash into the bucket, last one first */
  .js .bucket__pile img { opacity: 0; }
  .js .bucket.is-inview .bucket__pile img { animation: fall .5s ease-in forwards; animation-delay: calc((var(--n) - 1 - var(--i)) * 60ms); }
  @keyframes fall { 0% { opacity: 0; translate: 0 -300px; scale: 1 1; } 50% { opacity: 1; translate: 0 0; scale: 1 1; } 65% { opacity: 1; translate: 0 0; scale: 1 .95; } 80% { opacity: 1; translate: 0 0; scale: 1 1.02; } 100% { opacity: 1; translate: 0 0; scale: 1 1; } }

  /* brars M01-c — SAVE stickers burst out from behind the price */
  .js .deal .save { transform: translate(120%, 0) scale(.8); opacity: 0; }
  .js .deal.is-inview .save { transform: none; opacity: 1; transition: transform .5s var(--ease-brars-custom), opacity .2s linear; transition-delay: calc(.1s * var(--i, 0)); }
  .js .deal__price { opacity: 0; translate: 0 60px; }
  .js .deal.is-inview .deal__price { opacity: 1; translate: 0 0; transition: opacity 1.25s var(--ease-brars-custom), translate 1.25s var(--ease-brars-custom); }

  /* M06-a — the wordmark re-assembles */
  .js .footer__mark .g--cr { transform-origin: 0 50%; transform: translateX(-7vw) scale(1.8, 1); }
  .js .footer__mark .g--sp { transform-origin: 100% 50%; transform: translateX(7vw) scale(1.8, 1); }
  .js .footer__mark .g--bang { transform: translateY(-40vh) scale(1, 1.8); }
  .js .footer__mark.is-inview .g { transform: none; transition: transform var(--dur-logo-groups) var(--ease-bounce); }
  .js .footer__mark.is-inview .g--bang { transition: transform 1.3s var(--ease-bounce-more) 250ms; }
}

/* ============ tablet ============ */
@media (max-width: 1199px) {
  .nav { gap: 22px; }
  .tray__media { grid-column: 1 / -1; }
  .tray__sticky { display: none; }
  .tray__rail { display: flex; grid-column: 1 / -1; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; margin: 0 -20px 16px; padding: 0 20px; }
  .tray__rail .tray__photo { flex: 0 0 min(58vw, 360px); scroll-snap-align: start; }
  .tray__list { grid-column: 1 / -1; padding: 0 12px; }
  .buckets__visual { grid-column: 1 / -1; margin-bottom: 40px; }
  .bucket { position: relative; top: 0; width: min(70vw, 380px); }
  .buckets__copy { grid-column: 1 / -1; }
  .deal .save { left: auto; right: 0; top: -18px; }
}

/* ============ phone — art-directed, not stacked ============ */
@media (max-width: 767px) {
  body { padding-bottom: calc(var(--bar-h) + env(safe-area-inset-bottom)); }
  .nav, .header > .btn { display: none; }
  .header { grid-template-columns: 1fr auto; padding: 0 20px; }
  .brand__disc { width: 52px; height: 52px; font-size: 10px; }
  .header::after { content: "Fried chicken · Bangladesh"; justify-self: end; white-space: nowrap; font: 700 10px/1 var(--font-body); font-stretch: 125%; text-transform: uppercase; letter-spacing: .14em; }

  .hero__tray { height: calc(100svh - var(--header-h) - var(--bar-h) - var(--card-margin) * 2 - env(safe-area-inset-bottom)); min-height: 560px; padding: 26px 20px 22px; }
  .hero__title { font-size: min(16vw, 9.6vh); line-height: .84; }
  .hero__line { white-space: normal; }
  .hero__line--b { padding-left: 0; }
  .hero__line .w { display: block; }
  .hero__line--b .w { text-align: right; }
  .hero__food { width: min(74vw, 40vh); right: 6vw; bottom: 92px; }
  .hero__piece--a { width: 34%; left: -26%; top: 46%; }
  .hero__piece--b { right: -8%; top: -4%; }
  .hero__foot { max-width: none; gap: 14px; }
  .hero__lead { display: none; }
  .hero__ctas .js-order { display: none; }
  .hero__ctas .btn { height: 52px; }
  .hero__stamp { right: auto; left: 20px; bottom: 170px; font-size: 13px; }

  .find { padding: 48px var(--card-margin) 72px; }
  .find__title { font-size: 15px; margin-bottom: 20px; }
  .find__cards { grid-template-columns: 1fr; gap: 10px; }
  .fcard { gap: 14px; padding: 22px 20px 20px; margin: 0 !important; grid-template-columns: 1fr; }
  .fcard__v { text-align: left; justify-content: space-between; }

  .flavours { padding: 36px 20px 96px; min-height: 0; }
  .flavours__inner { grid-template-columns: 1fr; }
  .flavours__label { font-size: 15px; }
  .flavours__tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
  .flavours__tabs button { padding: 0 6px; font-size: 12px; }
  .flavours__stage { grid-template-columns: 1fr; min-height: 0; }
  .flavours__word { font-size: 16.4vw; margin-top: 28px; }
  .flavours__img { position: relative; left: auto; top: auto; translate: 0 0; width: 100%; margin: -9vw auto 8px; grid-row: 2; }
  .flavours__line { grid-row: 3; max-width: none; font-size: 19px; }
  .flavours__prices { grid-row: 4; justify-self: stretch; margin-top: 18px; }
  .flavours__prices li { justify-content: space-between; }
  .flavours__prices .price { font-size: 64px; }

  .menu { padding-top: 36px; }
  .menu > .crinkle { height: 60px; top: -59px; }
  .menu__index { margin: 20px 0 6px; padding: 12px 20px; }
  .menu__head { grid-template-columns: 1fr 112px; grid-template-areas: "title title" "note box"; }
  .menu__box { width: 112px; margin-bottom: 0; }
  .tray { padding: 22px 14px 28px; }
  .tray__title { padding: 6px 6px 22px; }
  .tray__list { padding: 0 6px; }
  .group { padding-top: 48px; }
  .item { padding: 16px 0; }

  .buckets { padding: 88px 20px 72px; }
  .bucket { width: 66vw; }
  .buckets__title { font-size: 13.5vw; }
  .buckets__lead { margin: 14px 0 28px; }
  .deal { grid-template-columns: 1fr; padding: 26px 0; }
  .deal__price { grid-column: 1; grid-row: auto; text-align: left; }
  .deal__price .price { font-size: 64px; }
  .deal .save { top: 20px; right: 0; }
  .deal__name { padding-right: 76px; }

  .statement { padding-bottom: 96px; }
  .statement__card { padding: 96px 8px; }
  .statement__text { font-size: 13.5vw; line-height: 1.05; }

  .footer, .footer__wrap { height: calc(100svh - var(--bar-h)); }
  .footer__wrap { padding: 88px 20px calc(var(--bar-h) + 20px); bottom: var(--bar-h); }
  .footer__top { flex-direction: column; align-items: start; }
  .btn--xl { height: 68px; padding: 0 34px; font-size: 16px; }
  .footer__legal { margin-left: 0; }

  .bar {
    display: grid; grid-template-columns: 1fr 1.4fr 1fr; align-items: center; gap: 8px;
    position: fixed; z-index: 50; left: 0; right: 0; bottom: 0; height: calc(var(--bar-h) + env(safe-area-inset-bottom));
    padding: 10px 10px calc(10px + env(safe-area-inset-bottom)); background: var(--color-surface);
  }
  .bar a {
    display: grid; place-items: center; height: 100%; border-radius: 999px; text-decoration: none; color: var(--color-cream);
    font: 800 12px/1 var(--font-body); font-stretch: 125%; text-transform: uppercase; letter-spacing: .1em;
  }
  .bar .bar__order { background: var(--color-cream); color: var(--color-surface); font-size: 14px; }
}

/* ============ Foundry ============ */

/* §01c The crunch — scroll scrubs a real tear-open film; CRACK. lands as the crust breaks */
.crunch { position: relative; z-index: 1; height: 260vh; background: var(--color-surface-deep); color: var(--color-cream); }
.crunch__stage { position: sticky; top: var(--header-h); height: calc(100svh - var(--header-h)); overflow: hidden; display: grid; place-items: center; }
.crunch__video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: var(--color-surface-deep); }
.crunch__word {
  position: absolute; z-index: 2; font: 400 min(20vw, 34vh)/.8 var(--font-display); text-transform: uppercase; letter-spacing: -.04em;
  color: var(--color-cream); scale: calc(.72 + var(--p2, 0) * .28); opacity: var(--p2, 0);
}
.crunch__cue { position: absolute; z-index: 2; bottom: 7vh; padding: 10px 16px; border-radius: 999px; background: var(--color-surface); opacity: calc(1 - var(--p1, 0) * 3); }
.crunch__after {
  position: absolute; z-index: 4; bottom: 8vh; max-width: 22ch; text-align: center; padding: 14px 22px; border-radius: var(--radius-card); background: var(--color-surface);
  font: 600 var(--type-lead)/1.15 var(--font-body); color: var(--color-background); opacity: var(--p4, 0);
}
.crunch__sound {
  position: absolute; z-index: 5; top: 24px; right: var(--outer-margin); display: inline-flex; align-items: center; gap: 10px;
  height: 40px; padding: 0 16px; border-radius: 999px; border: 0; cursor: pointer;
  background: var(--color-surface); color: var(--color-cream); font-family: var(--font-body);
}
.crunch__dot { width: 10px; height: 10px; border-radius: 50%; box-shadow: inset 0 0 0 2px currentColor; }
.crunch__sound[aria-pressed="true"] .crunch__dot { background: var(--color-accent); box-shadow: none; }
@media (prefers-reduced-motion: reduce) {
  .crunch { height: auto; } .crunch__stage { position: relative; top: 0; height: 90svh; }
  .crunch__word { opacity: 1; scale: 1; } .crunch__cue, .crunch__sound { display: none; } .crunch__after { opacity: 1; }
}
@media (max-width: 767px) {
  .crunch { height: 220vh; }
  .crunch__stage { height: calc(100svh - var(--header-h) - var(--bar-h)); }
  .crunch__word { font-size: 19vw; }
  .crunch__sound { top: 16px; right: 16px; }
}

/* Box lid — each tray opens like a CR!SP box when it enters (rotateX on the house bounce) */
.tray { position: relative; perspective: 1400px; }
.tray__lid { display: none; }
@media (prefers-reduced-motion: no-preference) {
  .js .tray__lid {
    display: flex; align-items: end; justify-content: space-between; position: absolute; z-index: 5; left: 0; right: 0; top: 0; height: 240px;
    padding: 0 28px 22px; border-radius: inherit; border-bottom-left-radius: 0; border-bottom-right-radius: 0;
    background: var(--color-surface-deep); color: var(--color-cream); transform-origin: 50% 0; backface-visibility: hidden;
    transition: transform .9s var(--ease-bounce), opacity 120ms linear;   /* closing: reappear, then swing shut */
    font: 800 13px/1 var(--font-body); font-stretch: 125%; text-transform: uppercase; letter-spacing: var(--tracking-label);
    background-image: linear-gradient(90deg, var(--color-cream) 50%, transparent 0); background-size: 18px 2px; background-repeat: repeat-x; background-position: 0 calc(100% - 64px);
  }
  .js .tray--cold .tray__lid { background-color: var(--color-crust); color: var(--color-surface-deep); background-image: linear-gradient(90deg, var(--color-surface-deep) 50%, transparent 0); }
  .js .tray__lid b { font: 44px/1 var(--font-display); letter-spacing: -.02em; }
  .js .tray.is-open .tray__lid { transform: rotateX(-104deg); opacity: 0; transition: transform 1.2s var(--ease-bounce), opacity 300ms linear 700ms; }
  .js .tray .tray__title .char { transition-delay: calc(var(--d) + 450ms) !important; }
}

/* Magnetic ORDER (desktop pointers) — the button leans toward the cursor */
.btn.is-magnetic { transition: translate 600ms var(--ease-expo-out); }

/* ============ Flow pass ============ */
/* crinkle seams: Liner → red (crunch), red → Liner (buckets) */
.crunch > .crinkle, .buckets > .crinkle { top: -89px; }
.crinkle--liner .crinkle__front { fill: var(--color-background); }
.crinkle--liner .crinkle__back { fill: var(--color-crust); }
.buckets { position: relative; z-index: 1; }
.menu { padding-bottom: 110px; }
/* where am I: header link + menu chip follow the scroll */
.nav a.is-active { background-size: 100% 2px; }
@media (max-width: 767px) {
  .crunch > .crinkle, .buckets > .crinkle { height: 60px; top: -59px; }
  .menu { padding-bottom: 80px; }
}
.menu__fail { padding: 40px var(--outer-margin); font: 600 var(--type-lead)/1.2 var(--font-body); color: var(--color-cream); }

/* no scrolling while the loader panel travels into the hero tray (kremkanel compensates live; we simply hold) */
html.is-locked, html.is-locked body { overflow: hidden; }

/* Crunch → Flavours: Flavours rises over the last of the film (the steam), led by a crinkle in the
   current flavour colour. It overlaps the pinned stage by exactly one stage height, so the film is
   fully covered at the moment the stage releases: no empty screen between them. Motion only. */
.crinkle--flavour { top: -89px; }
.crinkle--flavour .crinkle__front { fill: var(--fl-bg); }
.crinkle--flavour .crinkle__back { fill: var(--color-cream); }
@media (prefers-reduced-motion: no-preference) {
  .js:not(.still) .crunch { height: 340vh; }
  .js:not(.still) .crunch + .flavours { margin-top: calc(var(--header-h) - 100svh); }
}
@media (prefers-reduced-motion: no-preference) and (max-width: 767px) {
  .crinkle--flavour { height: 60px; top: -59px; }
  .js:not(.still) .crunch { height: 300vh; }
  .js:not(.still) .crunch + .flavours { margin-top: calc(var(--header-h) + var(--bar-h) - 100svh); }
}
