/* =========================================================
   BEST BAKES — Sweeter days ahead
   Mobile-first. Tuned for iPhone, then iPad & laptop.
   ========================================================= */

:root {
  --cream: #F6EADD;
  --cream-2: #EFDFCF;
  --paper: #FBF5EE;
  --card: #FFFaf4;
  --cocoa: #5A3322;
  --cocoa-2: #6E4330;
  --ink: #2C1A12;
  --ink-soft: #6B5446;
  --blush: #C98E80;
  --blush-2: #E6C2B6;
  --blush-3: #F3DDD5;
  --line: rgba(90, 51, 34, .16);
  --shadow-sm: 0 2px 10px rgba(60, 30, 15, .07);
  --shadow: 0 14px 40px -12px rgba(60, 30, 15, .28);
  --shadow-lg: 0 30px 80px -20px rgba(45, 22, 10, .45);

  --f-display: "Playfair Display", "Times New Roman", serif;
  --f-serif: "Cormorant Garamond", Georgia, serif;
  --f-script: "Pinyon Script", "Snell Roundhand", cursive;
  --f-sans: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --gutter: 20px;
  --radius: 22px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --spring: cubic-bezier(.34, 1.56, .64, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: auto; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--f-sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
}
body.locked { overflow: hidden; }
img { display: block; max-width: 100%; }
button { font: inherit; color: inherit; cursor: pointer; }
a { color: inherit; }
em { font-style: italic; }
[hidden] { display: none !important; }

/* ---------- Buttons ---------- */
.btn {
  --h: 52px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: var(--h); padding: 0 24px;
  border-radius: 999px; border: 1.5px solid transparent;
  font-family: var(--f-sans); font-weight: 600; font-size: 15px; letter-spacing: .01em;
  text-decoration: none; white-space: nowrap;
  transition: transform .25s var(--spring), background .2s, color .2s, box-shadow .25s, opacity .2s;
  touch-action: manipulation;
}
.btn:active { transform: scale(.96); }
.btn--primary { background: var(--cocoa); color: #FFF6EE; box-shadow: 0 10px 24px -10px rgba(90, 51, 34, .7); }
.btn--primary:hover { background: #4a2a1b; }
.btn--ghost { background: rgba(255, 250, 244, .55); border-color: rgba(90, 51, 34, .35); color: var(--cocoa); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.btn--ghost:hover { background: rgba(255, 250, 244, .85); }
.btn--block { width: 100%; }
.btn[disabled] { opacity: .45; pointer-events: none; }
.icon-btn {
  width: 42px; height: 42px; border-radius: 50%;
  display: grid; place-items: center;
  border: 0; background: rgba(90, 51, 34, .07); color: var(--cocoa);
  transition: background .2s, transform .2s var(--spring);
}
.icon-btn:active { transform: scale(.9); }

.eyebrow {
  font-family: var(--f-serif); font-weight: 600;
  text-transform: uppercase; letter-spacing: .32em; font-size: 12px;
  color: var(--cocoa-2); margin: 0;
}
.eyebrow i { font-style: normal; color: var(--blush); margin: 0 .35em; }
@media (max-width: 420px) { .eyebrow { font-size: 10.5px; letter-spacing: .22em; } }
.script { font-family: var(--f-script); color: var(--blush); font-size: 40px; line-height: 1; margin: 0; }
.display {
  font-family: var(--f-display); font-weight: 700; color: var(--cocoa);
  font-size: clamp(40px, 11vw, 76px); line-height: .95; margin: 0; letter-spacing: -.01em;
}

/* ---------- Preloader ---------- */
.preloader {
  position: fixed; inset: 0; z-index: 100;
  display: grid; place-items: center;
  background: var(--cream);
  transition: opacity .8s var(--ease), visibility .8s;
}
.preloader.done { opacity: 0; visibility: hidden; }
.preloader__inner { display: grid; justify-items: center; gap: 18px; }
.preloader__logo { width: 150px; height: 150px; border-radius: 50%; box-shadow: var(--shadow); animation: bob 2.4s ease-in-out infinite; }
.preloader__text { margin: 0; font-family: var(--f-serif); font-style: italic; font-size: 20px; color: var(--cocoa-2); }
.preloader__bar { width: 160px; height: 3px; border-radius: 3px; background: rgba(90, 51, 34, .12); overflow: hidden; }
.preloader__bar i { display: block; height: 100%; width: 0; background: var(--blush); border-radius: inherit; transition: width .4s var(--ease); }
@keyframes bob { 50% { transform: translateY(-8px) rotate(-3deg); } }

/* ---------- Nav ---------- */
.nav {
  position: fixed; z-index: 40; top: 0; left: 0; right: 0;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: calc(var(--safe-t) + 10px) var(--gutter) 10px;
  transition: background .35s, box-shadow .35s, color .35s, transform .4s var(--ease);
  color: var(--cocoa);
}
.nav.solid { background: rgba(246, 234, 221, .82); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px); box-shadow: 0 1px 0 var(--line); }
.nav.on-dark:not(.solid) { color: #F6E7D8; }
.nav__brand { display: flex; align-items: center; gap: 10px; text-decoration: none; transition: opacity .4s; }
.nav:not(.show-word):not(.solid) .nav__brand { opacity: 0; pointer-events: none; }
.nav__brand img { width: 40px; height: 40px; border-radius: 50%; box-shadow: 0 2px 8px rgba(0,0,0,.12); }
.nav__word { white-space: nowrap; font-family: var(--f-display); font-weight: 700; font-size: 17px; letter-spacing: .14em; text-transform: uppercase; opacity: 0; transform: translateX(-6px); transition: opacity .4s, transform .4s var(--ease); }
.nav.solid .nav__word, .nav.show-word .nav__word { opacity: 1; transform: none; }
.nav__links { display: none; }
.nav__right { display: flex; align-items: center; gap: 6px; }
.nav__menu { height: 42px; display: inline-flex; align-items: center; padding: 0 14px; border-radius: 999px; font-weight: 600; font-size: 14px; text-decoration: none; }
.nav__menu:active { background: rgba(90, 51, 34, .08); }
@media (max-width: 430px) { .nav__word { display: none; } }
.nav__cart {
  position: relative; display: inline-flex; align-items: center; gap: 8px;
  height: 42px; padding: 0 16px 0 13px; border-radius: 999px;
  border: 1.5px solid currentColor; background: rgba(255, 250, 244, .35);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  font-weight: 600; font-size: 14px;
  transition: transform .25s var(--spring);
}
.nav.on-dark:not(.solid) .nav__cart { background: rgba(40, 20, 12, .25); }
.nav__cart.bump { animation: bump .5s var(--spring); }
@keyframes bump { 30% { transform: scale(1.14) rotate(-4deg); } }
.badge {
  position: absolute; top: -6px; right: -6px;
  min-width: 21px; height: 21px; padding: 0 6px; border-radius: 999px;
  display: grid; place-items: center;
  background: var(--blush); color: #fff; font-size: 11.5px; font-weight: 700;
  box-shadow: 0 0 0 2px var(--cream);
}

/* ---------- Story / 3D ---------- */
.story { position: relative; height: 1100vh; background: var(--cream); }
.story__stage {
  --sbg: #F3E8DC;
  --sink: var(--ink);
  --ssub: var(--ink-soft);
  position: sticky; top: 0;
  height: 100vh; height: 100lvh;
  overflow: hidden;
  background: var(--sbg);
}
.story__stage.dark { --sink: #F7E9DB; --ssub: rgba(247, 233, 219, .78); }
#scene { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: pan-y; outline: none; }
.story__fallback { display: none; }
.no-webgl #scene { display: none; }
.no-webgl .story__fallback { display: block; position: absolute; inset: 0; }
.no-webgl .story__fallback img { width: 100%; height: 100%; object-fit: cover; opacity: .9; }

.story__shade {
  position: absolute; inset: 0 0 auto; height: 52%;
  background: linear-gradient(to bottom, var(--sbg) 0%, color-mix(in srgb, var(--sbg) 80%, transparent) 38%, transparent 100%);
  pointer-events: none;
}
@supports not (background: color-mix(in srgb, red 50%, transparent)) {
  .story__shade { background: linear-gradient(to bottom, var(--sbg) 0%, transparent 100%); opacity: .85; }
}

.story__rail {
  position: absolute; z-index: 3;
  top: calc(var(--safe-t) + 66px); left: var(--gutter); right: var(--gutter);
  display: flex; gap: 5px; pointer-events: none;
  opacity: 0; transition: opacity .5s;
}
.story__rail.on { opacity: 1; }
.story__rail button {
  flex: 1; height: 18px; padding: 0; border: 0; background: none; pointer-events: auto;
  position: relative;
}
.story__rail button::before, .story__rail button i {
  content: ""; position: absolute; left: 0; right: 0; top: 7.5px; height: 3px; border-radius: 3px;
}
.story__rail button::before { background: color-mix(in srgb, var(--sink) 16%, transparent); }
.story__rail button i { right: auto; width: 0; background: var(--blush); }

.caps { position: absolute; inset: 0; z-index: 2; pointer-events: none; }
.cap {
  position: absolute; left: 0; right: 0;
  top: calc(var(--safe-t) + 96px);
  padding: 0 calc(var(--gutter) + 4px);
  text-align: center; color: var(--sink);
  opacity: 0; visibility: hidden;
  will-change: opacity, transform;
}
.cap.vis { visibility: visible; }
.cap.live { pointer-events: auto; }
.cap h1, .cap h2 {
  font-family: var(--f-display); font-weight: 700;
  font-size: clamp(31px, 8.6vw, 60px); line-height: 1.04; letter-spacing: -.012em;
  margin: 0 auto; max-width: 13em; text-wrap: balance;
}
.cap h1 em, .cap h2 em { font-weight: 600; color: var(--blush); }
.story__stage.dark .cap h2 em { color: #F2B8A4; }
.cap__step {
  margin: 0 0 12px; display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--f-serif); font-weight: 600; font-size: 13px; letter-spacing: .3em; text-transform: uppercase;
  color: var(--ssub);
}
.cap__step span { font-family: var(--f-script); font-size: 30px; letter-spacing: 0; text-transform: none; color: var(--blush); line-height: .6; }
.cap__sub { margin: 12px auto 0; max-width: 26em; font-size: 15.5px; color: var(--ssub); text-wrap: balance; }

.cap--hero { top: 0; bottom: 0; display: flex; flex-direction: column; justify-content: space-between; padding-top: calc(var(--safe-t) + 70px); padding-bottom: calc(100lvh - 100svh + var(--safe-b) + 22px); }
.cap--hero .cap__top { display: grid; justify-items: center; gap: 14px; }
.cap__logo { width: 116px; height: 116px; border-radius: 50%; box-shadow: var(--shadow); }
.cap__ctas { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.cap__bottom { display: grid; justify-items: center; gap: 18px; }
.scroll-cue { display: grid; justify-items: center; gap: 8px; font-family: var(--f-serif); font-style: italic; font-size: 16px; color: var(--ssub); }
.scroll-cue i { width: 22px; height: 34px; border: 1.5px solid currentColor; border-radius: 12px; position: relative; opacity: .7; }
.scroll-cue i::after { content: ""; position: absolute; left: 50%; top: 6px; width: 3px; height: 7px; margin-left: -1.5px; border-radius: 2px; background: currentColor; animation: wheel 1.6s ease-in-out infinite; }
@keyframes wheel { 0% { transform: translateY(0); opacity: 1; } 70% { transform: translateY(10px); opacity: 0; } 100% { opacity: 0; } }

.cap--final { top: 0; bottom: 0; display: flex; flex-direction: column; justify-content: space-between; padding-top: calc(var(--safe-t) + 96px); padding-bottom: calc(100lvh - 100svh + var(--safe-b) + 22px); }
.cap__drag { margin: 0; font-family: var(--f-serif); font-style: italic; color: var(--ssub); font-size: 15px; }

.timer {
  position: absolute; z-index: 3; left: 50%; bottom: calc(100lvh - 100svh + var(--safe-b) + 28px);
  transform: translate(-50%, 20px); opacity: 0;
  display: flex; align-items: center; gap: 14px;
  padding: 10px 20px; border-radius: 999px;
  background: rgba(30, 16, 10, .55); color: #FFE7D2;
  border: 1px solid rgba(255, 190, 150, .25);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  font-variant-numeric: tabular-nums;
  transition: opacity .4s, transform .5s var(--ease);
  pointer-events: none;
}
.timer.on { opacity: 1; transform: translate(-50%, 0); }
.timer__temp { font-family: var(--f-serif); font-style: italic; font-size: 18px; color: #FFB48A; }
.timer__time { font-family: var(--f-display); font-size: 26px; font-weight: 700; letter-spacing: .04em; }
.ding {
  position: absolute; z-index: 4; left: 50%; top: 46%;
  font-family: var(--f-script); font-size: 84px; color: var(--blush); line-height: 1;
  transform: translate(-50%, -50%) scale(.3) rotate(-10deg); opacity: 0; pointer-events: none;
  text-shadow: 0 6px 30px rgba(255, 255, 255, .7);
}
.ding.pop { animation: ding 1.4s var(--ease) forwards; }
@keyframes ding {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(.3) rotate(-10deg); }
  20% { opacity: 1; transform: translate(-50%, -50%) scale(1.12) rotate(4deg); }
  35% { transform: translate(-50%, -50%) scale(.96) rotate(-2deg); }
  70% { opacity: 1; transform: translate(-50%, -60%) scale(1) rotate(0); }
  100% { opacity: 0; transform: translate(-50%, -80%) scale(1) rotate(0); }
}
.story__hint {
  position: absolute; z-index: 3; left: 50%; bottom: calc(100lvh - 100svh + var(--safe-b) + 24px);
  transform: translateX(-50%); margin: 0;
  padding: 8px 16px; border-radius: 999px; white-space: nowrap;
  background: rgba(255, 250, 244, .72); color: var(--cocoa);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  font-size: 13px; font-weight: 600; letter-spacing: .02em;
  box-shadow: var(--shadow-sm);
  opacity: 0; transition: opacity .5s; pointer-events: none;
}
.story__hint.on { opacity: 1; }

/* ---------- Marquee ---------- */
.marquee { overflow: hidden; background: var(--cocoa); color: #F7E6D6; padding: 15px 0; position: relative; z-index: 2; }
.marquee__track { display: flex; width: max-content; gap: 22px; align-items: center; animation: marquee 38s linear infinite; }
.marquee span { font-family: var(--f-display); font-style: italic; font-size: 22px; white-space: nowrap; }
.marquee b { color: var(--blush); font-size: 13px; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- Sections ---------- */
.section-head { text-align: center; display: grid; justify-items: center; gap: 10px; padding: 0 var(--gutter); }
.section-head .script { margin-bottom: -8px; }

[data-reveal] { opacity: 0; transform: translateY(28px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
[data-reveal].in { opacity: 1; transform: none; }

/* ---------- Menu ---------- */
.menu { padding: 76px 0 70px; background: var(--paper); position: relative; }
.menu::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background-image: radial-gradient(rgba(201, 142, 128, .18) 1px, transparent 1.2px);
  background-size: 22px 22px;
}
.chips {
  position: sticky; z-index: 20; top: calc(var(--safe-t) + 62px);
  display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none;
  padding: 14px var(--gutter); margin: 26px 0 8px;
  background: linear-gradient(var(--paper) 70%, transparent);
  scroll-snap-type: x proximity;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 14px, #000 calc(100% - 14px), transparent);
          mask-image: linear-gradient(to right, transparent, #000 14px, #000 calc(100% - 14px), transparent);
}
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none; scroll-snap-align: start;
  height: 38px; padding: 0 16px; border-radius: 999px;
  border: 1.5px solid var(--line); background: var(--card);
  font-size: 14px; font-weight: 600; color: var(--cocoa-2);
  transition: background .2s, color .2s, border-color .2s, transform .2s var(--spring);
  box-shadow: var(--shadow-sm);
}
.chip:active { transform: scale(.95); }
.chip[aria-selected="true"] { background: var(--cocoa); border-color: var(--cocoa); color: #FFF4EA; }

.grid { position: relative; display: grid; grid-template-columns: 1fr; gap: 18px; padding: 10px var(--gutter) 0; max-width: 1240px; margin: 0 auto; }
.card {
  background: var(--card); border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow-sm), 0 0 0 1px rgba(90, 51, 34, .07);
  display: flex; flex-direction: column;
  transition: transform .5s var(--ease), box-shadow .4s, opacity .4s;
}
.card.hide { display: none; }
.card__media { position: relative; aspect-ratio: 16 / 10; background: var(--blush-3); overflow: hidden; }
.card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
.card:hover .card__media img { transform: scale(1.05); }
.card__badge {
  position: absolute; left: 12px; top: 12px;
  padding: 6px 11px; border-radius: 999px;
  background: rgba(255, 250, 244, .92); color: var(--cocoa);
  font-size: 11.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  box-shadow: var(--shadow-sm);
}
.card__body { padding: 18px 18px 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.card__title { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.card h3 { font-family: var(--f-display); font-weight: 700; font-size: 25px; margin: 0; color: var(--cocoa); letter-spacing: -.005em; }
.card__desc { margin: 0 0 6px; color: var(--ink-soft); font-size: 14.5px; }
.variants { list-style: none; margin: 0; padding: 0; display: grid; }
.variant { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 0; border-top: 1px dashed var(--line); min-height: 60px; }
.variant__name { display: block; font-weight: 600; font-size: 15px; color: var(--ink); line-height: 1.25; }
.variant__price { display: block; font-family: var(--f-serif); font-style: italic; font-weight: 600; font-size: 17.5px; color: var(--blush); }

.add {
  flex: none; height: 40px; min-width: 40px; border-radius: 999px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1.5px solid var(--cocoa); background: transparent; color: var(--cocoa);
  font-weight: 700; font-size: 14px; padding: 0 16px; gap: 6px;
  transition: background .2s, color .2s, transform .2s var(--spring);
  touch-action: manipulation;
}
.add:active { transform: scale(.92); }
.add:hover { background: var(--cocoa); color: #FFF4EA; }
.stepper {
  flex: none; display: inline-flex; align-items: center; height: 40px; border-radius: 999px;
  background: var(--cocoa); color: #FFF4EA; overflow: hidden;
  animation: pop .35s var(--spring);
}
.stepper button { width: 40px; height: 40px; border: 0; background: transparent; color: inherit; font-size: 20px; line-height: 1; display: grid; place-items: center; touch-action: manipulation; }
.stepper button:active { background: rgba(255, 255, 255, .15); }
.stepper output { min-width: 22px; text-align: center; font-weight: 700; font-variant-numeric: tabular-nums; }
@keyframes pop { from { transform: scale(.7); opacity: 0; } }

.flavours { display: flex; flex-wrap: wrap; gap: 6px; margin: 2px 0 12px; padding: 0; list-style: none; }
.flavours li { font-size: 12.5px; font-weight: 600; padding: 5px 10px; border-radius: 999px; background: var(--blush-3); color: var(--cocoa-2); }
.boxrow { display: flex; align-items: center; justify-content: space-between; gap: 12px; border-top: 1px dashed var(--line); padding-top: 12px; margin-top: auto; }
.boxrow .btn { --h: 44px; padding: 0 18px; font-size: 14px; }
.boxrow small { color: var(--ink-soft); font-size: 13px; }

.menu__foot { position: relative; text-align: center; margin: 44px auto 0; padding: 0 var(--gutter); font-family: var(--f-serif); font-style: italic; font-size: 19px; color: var(--cocoa-2); letter-spacing: .06em; }
.menu__foot i { font-style: normal; color: var(--blush); margin: 0 .4em; }
.menu__foot small { display: block; margin-top: 8px; font-family: var(--f-sans); font-style: normal; font-size: 13.5px; letter-spacing: 0; color: var(--ink-soft); }
.heart { color: var(--blush); font-style: normal; }

/* ---------- Kitchen ---------- */
.kitchen { padding: 80px 0 70px; background: linear-gradient(var(--cream), var(--blush-3)); overflow: hidden; }
.polaroids {
  display: flex; gap: 18px; overflow-x: auto; scroll-snap-type: x mandatory;
  padding: 36px var(--gutter) 26px; scrollbar-width: none;
}
.polaroids::-webkit-scrollbar { display: none; }
.polaroid {
  flex: 0 0 72%; max-width: 340px; margin: 0; scroll-snap-align: center;
  background: #fff; padding: 10px 10px 0; border-radius: 6px;
  box-shadow: var(--shadow);
  transform: rotate(var(--r));
  transition: transform .5s var(--ease);
}
.polaroid:hover { transform: rotate(0) translateY(-6px); }
.polaroid img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 3px; }
.polaroid figcaption { font-family: var(--f-script); font-size: 26px; color: var(--cocoa); text-align: center; padding: 10px 4px 12px; line-height: 1.1; }
.quote { margin: 26px auto 0; padding: 0 var(--gutter); text-align: center; max-width: 640px; }
.quote p { margin: 0; font-family: var(--f-display); font-style: italic; font-size: clamp(30px, 8vw, 46px); color: var(--cocoa); line-height: 1.1; }
.quote cite { display: block; margin-top: 12px; font-style: normal; font-family: var(--f-serif); letter-spacing: .25em; text-transform: uppercase; font-size: 12px; color: var(--ink-soft); }

/* ---------- How ---------- */
.how { padding: 80px var(--gutter) 90px; background: var(--paper); }
.steps { list-style: none; margin: 38px auto 0; padding: 0; display: grid; gap: 14px; max-width: 1100px; }
.steps li { position: relative; background: var(--card); border-radius: var(--radius); padding: 24px 22px 22px 84px; box-shadow: var(--shadow-sm), 0 0 0 1px rgba(90, 51, 34, .07); }
.steps__n { position: absolute; left: 22px; top: 20px; width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; background: var(--blush-3); color: var(--cocoa); font-family: var(--f-display); font-weight: 700; font-size: 22px; }
.steps h3 { margin: 0 0 4px; font-family: var(--f-display); font-size: 21px; color: var(--cocoa); }
.steps p { margin: 0; color: var(--ink-soft); font-size: 15px; }
.how__cta { display: flex; justify-content: center; margin-top: 34px; }

/* ---------- Footer ---------- */
.footer { background: var(--cocoa); color: #F3E2D2; text-align: center; padding: 60px var(--gutter) calc(var(--safe-b) + 110px); display: grid; justify-items: center; gap: 14px; }
.footer img { border-radius: 50%; box-shadow: 0 10px 30px rgba(0, 0, 0, .3); }
.footer .script { color: var(--blush-2); font-size: 38px; }
.footer__ig { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; font-weight: 600; padding: 10px 18px; border-radius: 999px; border: 1.5px solid rgba(243, 226, 210, .4); transition: background .2s; }
.footer__ig:hover { background: rgba(255, 255, 255, .08); }
.footer__small { font-family: var(--f-serif); letter-spacing: .14em; font-size: 14px; opacity: .75; margin: 6px 0 0; }
.footer__small i { font-style: normal; color: var(--blush-2); margin: 0 .4em; }

/* ---------- Floating order bar ---------- */
.orderbar {
  position: fixed; z-index: 45; left: 12px; right: 12px;
  bottom: calc(var(--safe-b) + 12px);
  display: flex; align-items: center; gap: 12px;
  height: 60px; padding: 0 20px 0 10px; border: 0; border-radius: 999px;
  background: var(--cocoa); color: #FFF4EA;
  box-shadow: var(--shadow-lg);
  font-weight: 600;
  transform: translateY(0); transition: transform .5s var(--spring), opacity .3s;
  animation: barIn .6s var(--spring);
}
.orderbar.away { transform: translateY(140%); }
@keyframes barIn { from { transform: translateY(140%); } }
.orderbar__count { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--blush); font-weight: 700; }
.orderbar__label { flex: 1; text-align: left; font-size: 15.5px; }
.orderbar__total { font-family: var(--f-serif); font-style: italic; font-weight: 600; font-size: 21px; }

/* ---------- Sheets ---------- */
.scrim { position: fixed; inset: 0; z-index: 60; background: rgba(35, 18, 10, .42); opacity: 0; transition: opacity .35s; backdrop-filter: blur(2px); -webkit-backdrop-filter: blur(2px); }
.scrim.on { opacity: 1; }
.sheet {
  position: fixed; z-index: 70; left: 0; right: 0; bottom: 0;
  max-height: calc(100svh - var(--safe-t) - 28px); height: calc(100svh - var(--safe-t) - 28px);
  display: flex; flex-direction: column;
  background: var(--paper); border-radius: 26px 26px 0 0;
  box-shadow: var(--shadow-lg);
  transform: translateY(105%); transition: transform .5s cubic-bezier(.2, .9, .25, 1);
  overscroll-behavior: contain;
}
.sheet.on { transform: none; }
.sheet--box { height: auto; }
.sheet__grab { width: 42px; height: 5px; border-radius: 5px; background: rgba(90, 51, 34, .2); margin: 9px auto 0; flex: none; }
.sheet__head { flex: none; display: flex; align-items: center; gap: 10px; padding: 10px 16px 12px 22px; }
.sheet__head h2 { flex: 1; margin: 0; font-family: var(--f-display); font-size: 25px; color: var(--cocoa); }
.sheet__back { margin-left: -8px; }
.sheet__view { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.sheet__scroll { flex: 1; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 4px 22px 20px; overscroll-behavior: contain; }
.sheet__foot { flex: none; padding: 14px 22px calc(var(--safe-b) + 16px); border-top: 1px solid var(--line); background: var(--paper); display: grid; gap: 12px; }
.total { display: flex; align-items: baseline; justify-content: space-between; font-weight: 600; }
.total strong { font-family: var(--f-serif); font-style: italic; font-size: 28px; color: var(--cocoa); }

.lines { list-style: none; margin: 0; padding: 0; }
.line { display: flex; gap: 14px; align-items: center; padding: 14px 0; border-bottom: 1px dashed var(--line); animation: pop .3s var(--ease); }
.line img { width: 58px; height: 58px; border-radius: 14px; object-fit: cover; flex: none; background: var(--blush-3); }
.line__info { flex: 1; min-width: 0; }
.line__name { font-weight: 600; font-size: 15px; line-height: 1.25; }
.line__meta { font-size: 13px; color: var(--ink-soft); }
.line__price { font-family: var(--f-serif); font-style: italic; font-weight: 600; font-size: 18px; color: var(--cocoa); }
.line .stepper { height: 36px; }
.line .stepper button { width: 34px; height: 36px; font-size: 18px; }
.empty { display: grid; justify-items: center; gap: 12px; text-align: center; padding: 50px 0; color: var(--ink-soft); font-family: var(--f-serif); font-style: italic; font-size: 20px; }
.empty img { border-radius: 50%; opacity: .9; }
.empty p { margin: 0; }

/* Forms */
.field-group { border: 0; margin: 0 0 18px; padding: 0; display: grid; gap: 12px; }
.field-group legend { padding: 0; margin-bottom: 10px; font-family: var(--f-serif); font-weight: 600; text-transform: uppercase; letter-spacing: .24em; font-size: 12.5px; color: var(--blush); }
.field { display: grid; gap: 6px; }
.field span { font-size: 13.5px; font-weight: 600; color: var(--cocoa-2); }
.field small { font-weight: 500; color: var(--ink-soft); }
.field input, .field select, .field textarea {
  width: 100%; font: inherit; font-size: 16px; /* 16px stops iOS zoom */
  color: var(--ink); background: #fff;
  border: 1.5px solid var(--line); border-radius: 14px;
  padding: 13px 14px; min-height: 50px;
  -webkit-appearance: none; appearance: none;
  transition: border-color .2s, box-shadow .2s;
}
.field select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%235A3322' stroke-width='1.6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 34px; }
.field textarea { resize: vertical; min-height: 0; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 0; border-color: var(--blush); box-shadow: 0 0 0 4px rgba(201, 142, 128, .18); }
.field.invalid input, .field.invalid textarea { border-color: #C0473A; }
.row { display: grid; grid-template-columns: 1.3fr 1fr; gap: 10px; }
.hint { margin: 0; font-size: 13.5px; color: var(--ink-soft); }
.seg { display: grid; grid-template-columns: 1fr 1fr; padding: 4px; border-radius: 16px; background: rgba(90, 51, 34, .07); }
.seg label { position: relative; }
.seg input { position: absolute; opacity: 0; inset: 0; }
.seg span { display: grid; place-items: center; height: 44px; border-radius: 12px; font-weight: 600; font-size: 15px; color: var(--cocoa-2); transition: background .2s, color .2s, box-shadow .2s; }
.seg input:checked + span { background: #fff; color: var(--cocoa); box-shadow: var(--shadow-sm); }
.seg input:focus-visible + span { outline: 2px solid var(--blush); }
.summary { margin-top: 6px; padding: 16px; border-radius: 18px; background: var(--blush-3); font-size: 14px; }
.summary ul { list-style: none; margin: 0 0 10px; padding: 0; display: grid; gap: 4px; }
.summary li { display: flex; justify-content: space-between; gap: 10px; }
.summary .total { border-top: 1px dashed rgba(90, 51, 34, .25); padding-top: 10px; }
.summary .total strong { font-size: 24px; }
.form-error { margin: 0; color: #B23C2F; font-weight: 600; font-size: 14px; text-align: center; }

/* Done */
.done { text-align: center; padding-top: 10px; }
.done__icon { width: 92px; height: 92px; margin: 6px auto 14px; border-radius: 50%; display: grid; place-items: center; background: var(--blush-3); font-size: 42px; animation: pop .6s var(--spring); }
.done h3 { font-family: var(--f-display); font-size: 30px; color: var(--cocoa); margin: 0 0 6px; }
.done p { color: var(--ink-soft); margin: 0 auto 18px; max-width: 26em; }
.done__id { display: inline-block; font-family: var(--f-serif); font-style: italic; font-weight: 600; font-size: 19px; color: var(--blush); margin-bottom: 18px; }
.done__actions { display: grid; gap: 10px; margin: 0 0 18px; }
.done__steps { text-align: left; margin: 0 0 18px; padding: 16px 16px 16px 36px; border-radius: 16px; background: #fff; box-shadow: 0 0 0 1px var(--line); font-size: 14.5px; color: var(--ink-soft); }
.done__steps li + li { margin-top: 6px; }
.done pre { text-align: left; white-space: pre-wrap; font-family: var(--f-sans); font-size: 13.5px; background: #fff; border-radius: 16px; padding: 16px; margin: 0 0 16px; box-shadow: 0 0 0 1px var(--line); color: var(--ink); }
.confetti { position: fixed; inset: 0; z-index: 90; pointer-events: none; }

/* Box builder */
.box__lead { margin: 0 0 14px; color: var(--ink-soft); }
.box__slots { display: flex; gap: 12px; justify-content: center; margin: 4px 0 16px; }
.slot { width: 64px; height: 64px; border-radius: 50%; border: 2px dashed var(--blush-2); display: grid; place-items: center; transition: all .35s var(--spring); }
.slot.full { border: 0; background: radial-gradient(circle at 35% 35%, #E3B583, #B9804E 70%, #9B6438); box-shadow: inset -4px -6px 10px rgba(80, 40, 15, .35), var(--shadow-sm); transform: rotate(-8deg) scale(1.04); }
.slot.full::after { content: ""; width: 60%; height: 60%; background: radial-gradient(circle, #3b2015 18%, transparent 21%) 0 0 / 14px 14px; opacity: .85; border-radius: 50%; }
.slot[data-f="Funfetti"].full { background: radial-gradient(circle at 35% 35%, #F7E2BE, #E8C48E 70%); }
.slot[data-f="Funfetti"].full::after { background: radial-gradient(circle, #E86A8A 16%, transparent 19%) 0 0 / 12px 12px, radial-gradient(circle, #59B5E8 16%, transparent 19%) 6px 6px / 12px 12px; }
.slot[data-f="Red Velvet White Chocolate"].full { background: radial-gradient(circle at 35% 35%, #C2443E, #8E1F22 75%); }
.slot[data-f="Red Velvet White Chocolate"].full::after { background: radial-gradient(circle, #FFF6EA 18%, transparent 21%) 0 0 / 14px 14px; }
.slot[data-f="Biscoff White Chocolate"].full { background: radial-gradient(circle at 35% 35%, #D9A06A, #A7652F 75%); }
.slot[data-f="Biscoff White Chocolate"].full::after { background: radial-gradient(circle, #FFF6EA 18%, transparent 21%) 0 0 / 14px 14px; }
.slot[data-f="Bueno"].full { background: radial-gradient(circle at 35% 35%, #D9AE7E, #A97A4C 75%); }
.slot[data-f="Bueno"].full::after { background: linear-gradient(115deg, transparent 40%, #4a2618 41% 52%, transparent 53%); }
.box__list { list-style: none; margin: 0; padding: 0; }
.box__list li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-top: 1px dashed var(--line); font-weight: 600; }
.box__list .stepper { background: transparent; color: var(--cocoa); border: 1.5px solid var(--line); animation: none; }
.box__list .stepper button[disabled] { opacity: .3; }

/* Toast */
.toast {
  position: fixed; z-index: 95; left: 50%; top: calc(var(--safe-t) + 14px);
  transform: translate(-50%, -140%); transition: transform .5s var(--spring);
  padding: 12px 20px; border-radius: 999px;
  background: var(--ink); color: #FFF4EA; font-weight: 600; font-size: 14.5px;
  box-shadow: var(--shadow-lg); white-space: nowrap;
}
.toast.on { transform: translate(-50%, 0); }

/* =========================================================
   Tablet
   ========================================================= */
@media (min-width: 640px) {
  :root { --gutter: 32px; }
  .grid { grid-template-columns: repeat(2, 1fr); gap: 22px; }
  .polaroid { flex-basis: 44%; }
  .steps { grid-template-columns: repeat(3, 1fr); }
  .steps li { padding: 84px 22px 26px; }
  .steps__n { top: 24px; }
  .orderbar { left: auto; right: 24px; width: 380px; }
  .sheet { left: auto; right: 0; top: 0; bottom: 0; width: min(460px, 100%); height: 100%; max-height: none; border-radius: 26px 0 0 26px; transform: translateX(105%); }
  .sheet.on { transform: none; }
  .sheet--box { height: auto; top: auto; bottom: 50%; right: 50%; border-radius: 26px; transform: translate(50%, 50%) scale(.94); opacity: 0; pointer-events: none; transition: transform .45s var(--spring), opacity .3s; max-height: 90vh; }
  .sheet--box.on { transform: translate(50%, 50%); opacity: 1; pointer-events: auto; }
  .sheet__grab { display: none; }
  .sheet__head { padding-top: 18px; }
  .cap h1, .cap h2 { font-size: clamp(36px, 6vw, 62px); }
  .cap__logo { width: 132px; height: 132px; }
}

/* =========================================================
   Laptop / desktop
   ========================================================= */
@media (min-width: 1000px) {
  :root { --gutter: 48px; }
  .nav { padding-top: 18px; }
  .nav__word { opacity: 1; transform: none; }
  .nav__links { display: flex; gap: 6px; position: absolute; left: 50%; transform: translateX(-50%); }
  .nav__links a { text-decoration: none; font-weight: 600; font-size: 14.5px; padding: 9px 16px; border-radius: 999px; transition: background .2s; }
  .nav__links a:hover { background: rgba(90, 51, 34, .08); }
  .nav__menu { display: none; }

  .story__shade {
    inset: 0 auto 0 0; height: auto; width: 56%;
    background: linear-gradient(to right, var(--sbg) 0%, color-mix(in srgb, var(--sbg) 75%, transparent) 50%, transparent 100%);
  }
  .story__rail { top: 50%; bottom: auto; left: auto; right: 34px; width: 18px; flex-direction: column; transform: translateY(-50%); gap: 8px; }
  .story__rail button { width: 18px; height: 46px; flex: none; }
  .story__rail button::before, .story__rail button i { left: 7.5px; right: auto; top: 0; bottom: 0; width: 3px; height: auto; }
  .story__rail button i { bottom: auto; height: 0; width: 3px; }

  .cap { top: 50%; left: var(--gutter); right: auto; width: min(40vw, 520px); padding: 0; text-align: left; transform: translateY(-50%); }
  .cap h1, .cap h2 { margin: 0; font-size: clamp(42px, 4.2vw, 66px); }
  .cap__sub { margin-left: 0; font-size: 17px; }
  .cap--hero, .cap--final { top: 0; bottom: 0; transform: none; justify-content: center; gap: 34px; padding: 0; }
  .cap--hero .cap__top, .cap--final .cap__top { justify-items: start; }
  .cap__ctas { justify-content: flex-start; }
  .cap__bottom { justify-items: start; }
  .scroll-cue { justify-items: start; grid-auto-flow: column; align-items: center; gap: 12px; }
  .timer { bottom: 40px; }
  .story__hint { left: auto; right: 80px; transform: none; bottom: 40px; }

  .grid { grid-template-columns: repeat(3, 1fr); gap: 26px; }
  .chips { justify-content: center; }
  .polaroids { justify-content: center; overflow: visible; flex-wrap: nowrap; padding-top: 50px; }
  .polaroid { flex: 0 1 260px; }
  .menu, .kitchen, .how { padding-top: 120px; padding-bottom: 110px; }
  .script { font-size: 48px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  [data-reveal] { opacity: 1; transform: none; }
}

/* lift story overlays above the floating order bar */
body.has-bar .timer, body.has-bar .story__hint { bottom: calc(100lvh - 100svh + var(--safe-b) + 92px); }
body.has-bar .cap--hero, body.has-bar .cap--final { padding-bottom: calc(100lvh - 100svh + var(--safe-b) + 88px); }
@media (min-width: 1000px) {
  body.has-bar .timer, body.has-bar .story__hint { bottom: 40px; }
  body.has-bar .cap--hero, body.has-bar .cap--final { padding-bottom: 0; }
}
