:root {
  --cream: #f6f1e9;
  --cream-2: #efe7da;
  --paper: #fffdf9;
  --ink: #141622;
  --ink-2: #353849;
  --mute: #6a6e7f;
  --cobalt: #1f4fd8;
  --cobalt-d: #1538a6;
  --tang: #ff7a1a;
  --tang-d: #e2600b;
  --glass: rgba(252, 249, 243, 0.74);
  --line: rgba(20, 22, 34, 0.1);
  --display: "Bricolage Grotesque", ui-sans-serif, system-ui, sans-serif;
  --mono: "DM Mono", ui-monospace, SFMono-Regular, monospace;
  --gutter: clamp(16px, 4.5vw, 72px);
  --ease: cubic-bezier(.2, .8, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; overflow-x: clip; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--display);
  font-size: 17px;
  line-height: 1.5;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 3px solid var(--tang); outline-offset: 3px; border-radius: 8px; }

.skip {
  position: fixed; left: 16px; top: -60px; z-index: 200;
  background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 10px; text-decoration: none;
}
.skip:focus { top: 12px; }

/* ---------- Loader ---------- */
.loader {
  position: fixed; inset: 0; z-index: 150;
  display: grid; place-content: center; justify-items: center; gap: 18px;
  background: var(--cream);
  transition: opacity .8s var(--ease), visibility .8s;
  animation: loaderFailsafe .6s 9s forwards;
}
.loader.is-done { opacity: 0; visibility: hidden; }
@keyframes loaderFailsafe { to { opacity: 0; visibility: hidden; } }
.loader-mark { animation: bob 1.2s ease-in-out infinite; }
.loader-text { margin: 0; font-family: var(--mono); font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); }
.loader-count { color: var(--cobalt); margin-left: .6em; }
.loader-bar { width: 160px; height: 3px; border-radius: 3px; background: rgba(31, 79, 216, .14); overflow: hidden; }
.loader-bar span { display: block; height: 100%; width: 40%; background: var(--tang); border-radius: 3px; animation: bar 1.1s ease-in-out infinite; }
@keyframes bar { 0% { transform: translateX(-100%); } 100% { transform: translateX(260%); } }
@keyframes bob { 50% { transform: translateY(-6px) rotate(-3deg); } }

/* ---------- Scene ---------- */
#scene {
  position: fixed; inset: 0; width: 100%; height: 100vh; height: 100lvh;
  display: block; z-index: 0; outline: none;
  touch-action: pan-y;
}
.veil {
  position: fixed; inset: 0; z-index: 1; pointer-events: none;
  background:
    linear-gradient(180deg, rgba(246, 241, 233, .78) 0%, rgba(246, 241, 233, 0) 18%),
    radial-gradient(120% 70% at 50% 120%, rgba(246, 241, 233, .35), transparent 60%);
}

/* ---------- Nav ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 60;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 18px var(--gutter);
  transition: background .4s, box-shadow .4s, padding .4s;
}
.nav.is-solid {
  background: rgba(246, 241, 233, .82); box-shadow: 0 1px 0 var(--line);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
}
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 800; font-size: 22px; letter-spacing: .14em; }
.brand svg { filter: drop-shadow(0 6px 14px rgba(31, 79, 216, .3)); }
.nav-links {
  display: flex; gap: 4px; padding: 5px;
  background: var(--glass); border: 1px solid var(--line); border-radius: 999px;
  backdrop-filter: blur(14px) saturate(1.4); -webkit-backdrop-filter: blur(14px) saturate(1.4);
}
.nav-links a {
  text-decoration: none; font-size: 14px; font-weight: 600; padding: 8px 16px; border-radius: 999px;
  transition: background .3s, color .3s;
}
.nav-links a:hover, .nav-links a.is-active { background: var(--ink); color: var(--cream); }
.nav-right { display: flex; align-items: center; gap: 14px; }
.nav-eta { font-family: var(--mono); font-size: 12px; letter-spacing: .04em; color: var(--ink-2); display: inline-flex; align-items: center; gap: 8px; }
.nav-eta i { width: 8px; height: 8px; border-radius: 50%; background: #2fbf71; box-shadow: 0 0 0 4px rgba(47, 191, 113, .18); }
.cart-btn {
  position: relative; display: inline-flex; align-items: center; gap: 9px;
  border: 0; background: var(--cobalt); color: #fff; padding: 10px 14px 10px 14px; border-radius: 999px;
  font-weight: 600; font-size: 14px;
  box-shadow: 0 10px 24px -8px rgba(31, 79, 216, .6), inset 0 1px 0 rgba(255, 255, 255, .25);
  transition: transform .3s var(--ease), background .3s;
}
.cart-btn:hover { background: var(--cobalt-d); transform: translateY(-1px); }
.cart-count {
  min-width: 24px; height: 24px; padding: 0 7px; border-radius: 999px;
  display: inline-grid; place-items: center;
  background: var(--tang); color: #fff; font-family: var(--mono); font-size: 12px; font-weight: 500;
  box-shadow: 0 0 0 2px var(--cobalt);
}

/* ---------- Rail ---------- */
.rail {
  position: fixed; right: var(--gutter); top: 50%; z-index: 40; transform: translateY(-50%);
  display: flex; gap: 12px; align-items: stretch; pointer-events: none;
  padding: 16px 18px 16px 14px; border-radius: 18px;
  background: var(--glass); border: 1px solid rgba(255, 255, 255, .7);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  transition: opacity .5s;
}
.rail.is-hidden { opacity: 0; }
.rail-track { width: 2px; background: rgba(20, 22, 34, .12); border-radius: 2px; position: relative; overflow: hidden; }
.rail-fill { position: absolute; inset: 0; background: var(--tang); transform-origin: top; transform: scaleY(0); }
.rail ol { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 22px; }
.rail li { font-family: var(--mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--mute); transition: color .3s; }
.rail li.is-active { color: var(--ink); }

/* ---------- Track / overlays ---------- */
main { position: relative; z-index: 2; pointer-events: none; }
.cta { pointer-events: auto; }
#track { position: relative; pointer-events: none; }
#track a, #track button { pointer-events: auto; }

.hero {
  position: relative; height: 100vh; height: 100svh; min-height: 560px;
  display: flex; align-items: flex-end;
  padding: 0 var(--gutter) clamp(72px, 12vh, 130px);
}
.hero-inner { max-width: 820px; position: relative; }
.hero-inner::before {
  content: ""; position: absolute; inset: -18% -12% -20% -20%; z-index: -1;
  background: radial-gradient(closest-side, rgba(246, 241, 233, .92), rgba(246, 241, 233, .6) 55%, rgba(246, 241, 233, 0));
  pointer-events: none;
}
.eyebrow {
  margin: 0 0 18px; display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--mono); font-size: 12.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-2);
}
.eyebrow .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--tang); box-shadow: 0 0 0 5px rgba(255, 122, 26, .18); }
h1 {
  margin: 0; font-weight: 800; letter-spacing: -.035em; line-height: .92;
  font-size: clamp(46px, 6.6vw, 108px);
}
h1 .line { display: block; }
h1 .accent { color: var(--cobalt); }
h1 .accent::after { content: "."; color: var(--tang); margin-left: -.18em; opacity: 0; }
.lede { margin: 22px 0 0; max-width: 520px; font-size: clamp(16px, 1.3vw, 19px); color: var(--ink-2); }
.hero-actions { margin-top: 30px; display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.tip { font-size: 14px; color: var(--mute); }
kbd { font-family: var(--mono); font-size: 12px; padding: 3px 7px; border-radius: 6px; background: var(--paper); border: 1px solid var(--line); box-shadow: 0 2px 0 var(--line); color: var(--ink); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 16px 24px; border-radius: 999px; border: 0; text-decoration: none;
  font-weight: 600; font-size: 16px;
  transition: transform .35s var(--ease), box-shadow .35s var(--ease), background .3s;
}
.btn-primary {
  background: var(--tang); color: #fff;
  box-shadow: 0 16px 34px -12px rgba(255, 122, 26, .75), inset 0 1px 0 rgba(255, 255, 255, .35);
}
.btn-primary:hover { transform: translateY(-2px); background: var(--tang-d); box-shadow: 0 22px 40px -14px rgba(255, 122, 26, .85); }

.scroll-cue {
  position: absolute; right: var(--gutter); bottom: 36px;
  display: flex; align-items: center; gap: 12px;
  font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: .14em; color: var(--ink-2);
}
.scroll-cue span { width: 22px; height: 34px; border: 1.5px solid currentColor; border-radius: 12px; position: relative; }
.scroll-cue span::after { content: ""; position: absolute; left: 50%; top: 7px; width: 3px; height: 7px; margin-left: -1.5px; border-radius: 2px; background: var(--tang); animation: cue 1.6s var(--ease) infinite; }
@keyframes cue { 0% { transform: translateY(0); opacity: 1; } 80% { transform: translateY(12px); opacity: 0; } 100% { opacity: 0; } }

.chapter { position: relative; height: 160vh; }
.chapter-inner {
  position: sticky; top: 0; height: 100vh; height: 100svh;
  display: flex; align-items: center; padding: 0 var(--gutter);
}
.chapter[data-side="right"] .chapter-inner { justify-content: flex-end; padding-right: calc(var(--gutter) + 130px); }
.chapter[data-side="center"] .chapter-inner { justify-content: center; align-items: flex-end; padding-bottom: 12vh; }
.chapter[data-side="center"] .chapter-card { text-align: center; }
.chapter[data-side="center"] .chips { justify-content: center; }
.chapter-card {
  width: min(440px, 100%);
  padding: 30px 30px 26px;
  background: var(--glass);
  border: 1px solid rgba(255, 255, 255, .7);
  border-radius: 26px;
  box-shadow: 0 40px 80px -40px rgba(20, 22, 34, .35), 0 1px 0 rgba(255, 255, 255, .8) inset;
  backdrop-filter: blur(18px) saturate(1.5); -webkit-backdrop-filter: blur(18px) saturate(1.5);
  pointer-events: auto;
}
.ch-num { margin: 0; font-family: var(--mono); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--tang-d); }
.chapter-card h2 {
  margin: 6px 0 12px; font-weight: 800; letter-spacing: -.04em; line-height: .9;
  font-size: clamp(56px, 7vw, 104px); color: var(--cobalt);
}
.chapter-card p:not(.ch-num) { margin: 0; color: var(--ink-2); font-size: 16.5px; }
.chips { list-style: none; padding: 0; margin: 18px 0 0; display: flex; gap: 8px; flex-wrap: wrap; }
.chips li { font-family: var(--mono); font-size: 11.5px; padding: 6px 10px; border-radius: 999px; background: rgba(31, 79, 216, .08); color: var(--cobalt-d); }
.pick {
  margin-top: 20px; width: 100%;
  display: flex; align-items: center; gap: 12px; text-align: left;
  padding: 10px 10px 10px 12px; border-radius: 16px;
  background: var(--paper); border: 1px solid var(--line);
  transition: transform .3s var(--ease), border-color .3s, box-shadow .3s;
}
.pick:hover { transform: translateY(-2px); border-color: rgba(255, 122, 26, .5); box-shadow: 0 14px 26px -16px rgba(255, 122, 26, .7); }
.pick-sw { flex: none; width: 30px; height: 30px; border-radius: 50%; background: radial-gradient(circle at 34% 30%, rgba(255, 255, 255, .85), transparent 32%), radial-gradient(circle at 60% 70%, rgba(0, 0, 0, .25), transparent 60%), var(--c); }
.pick-txt { flex: 1; font-weight: 600; font-size: 14.5px; }
.pick-price { font-family: var(--mono); font-size: 13px; color: var(--mute); }
.pick-plus { flex: none; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 11px; background: var(--tang); color: #fff; font-size: 20px; line-height: 1; }

/* ---------- Product card ---------- */
.pcard {
  position: fixed; left: 0; top: 0; z-index: 70;
  width: 272px; padding: 14px; border-radius: 22px;
  display: grid; grid-template-columns: 64px 1fr; grid-template-rows: auto auto; gap: 12px 14px;
  background: rgba(255, 253, 249, .9);
  border: 1px solid rgba(255, 255, 255, .9);
  box-shadow: 0 30px 60px -24px rgba(20, 22, 34, .45), 0 2px 0 rgba(255, 255, 255, .7) inset;
  backdrop-filter: blur(16px) saturate(1.4); -webkit-backdrop-filter: blur(16px) saturate(1.4);
  will-change: transform;
}
.pcard[hidden] { display: none; }
.pcard::after {
  content: ""; position: absolute; left: 50%; bottom: -7px; width: 14px; height: 14px; margin-left: -7px;
  background: inherit; border-right: 1px solid rgba(255, 255, 255, .9); border-bottom: 1px solid rgba(255, 255, 255, .9);
  transform: rotate(45deg); border-radius: 0 0 4px 0;
}
.pc-close {
  position: absolute; right: 10px; top: 10px; width: 28px; height: 28px; border-radius: 50%;
  border: 0; background: rgba(20, 22, 34, .06); display: grid; place-items: center; color: var(--ink-2);
}
.pc-close:hover { background: rgba(20, 22, 34, .12); }
.pc-swatch {
  grid-row: 1; width: 64px; height: 64px; border-radius: 16px;
  background: linear-gradient(160deg, #fff, var(--cream-2));
  display: grid; place-items: center; overflow: hidden;
}
.pc-swatch span {
  width: 34px; height: 46px; border-radius: 6px;
  background:
    linear-gradient(180deg, transparent 38%, rgba(251, 248, 242, .95) 38%, rgba(251, 248, 242, .95) 64%, transparent 64%),
    linear-gradient(90deg, rgba(0, 0, 0, .18), transparent 30%, rgba(255, 255, 255, .35) 55%, rgba(0, 0, 0, .14)),
    var(--c, #ff7a1a);
  box-shadow: 0 8px 14px -6px rgba(0, 0, 0, .35);
}
.pc-swatch[data-type="fruit"] span { width: 42px; height: 42px; border-radius: 50%; background: radial-gradient(circle at 34% 30%, rgba(255, 255, 255, .8), transparent 30%), radial-gradient(circle at 62% 72%, rgba(0, 0, 0, .3), transparent 62%), var(--c); }
.pc-swatch[data-type="can"] span { width: 32px; height: 44px; border-radius: 6px / 4px; }
.pc-swatch[data-type="bottle"] span { width: 24px; height: 52px; border-radius: 40% 40% 6px 6px / 22% 22% 6px 6px; }
.pc-body { grid-row: 1; min-width: 0; padding-right: 26px; align-self: center; }
.pc-zone { margin: 0; font-family: var(--mono); font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--tang-d); }
.pcard h3 { margin: 2px 0 4px; font-size: 19px; line-height: 1.1; letter-spacing: -.02em; }
.pc-meta { margin: 0; display: flex; gap: 8px; align-items: baseline; }
.pc-price { font-family: var(--mono); font-size: 15px; font-weight: 500; color: var(--cobalt); }
.pc-unit { font-size: 12.5px; color: var(--mute); }
.pc-add {
  grid-column: 1 / -1; border: 0; border-radius: 14px; padding: 12px;
  background: var(--ink); color: var(--cream); font-weight: 600; font-size: 15px;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  transition: background .3s, transform .3s var(--ease);
}
.pc-add span { color: var(--tang); font-size: 20px; line-height: 1; }
.pc-add:hover { background: var(--cobalt); transform: translateY(-1px); }
.pc-add.is-added { background: #2fbf71; }

.fly-dot {
  position: fixed; left: 0; top: 0; z-index: 120; width: 16px; height: 16px; margin: -8px 0 0 -8px;
  border-radius: 50%; pointer-events: none;
  box-shadow: 0 0 0 3px #fff, 0 8px 18px rgba(0, 0, 0, .25);
}

/* ---------- CTA / till ---------- */
.cta {
  position: relative; z-index: 3;
  background:
    radial-gradient(60% 50% at 85% 0%, rgba(255, 122, 26, .12), transparent 70%),
    radial-gradient(50% 40% at 0% 30%, rgba(31, 79, 216, .1), transparent 70%),
    var(--cream);
  border-radius: 40px 40px 0 0;
  box-shadow: 0 -40px 80px -30px rgba(20, 22, 34, .25);
  padding: clamp(80px, 12vw, 150px) var(--gutter) 0;
}
.cta-inner {
  max-width: 1240px; margin: 0 auto;
  display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(40px, 6vw, 100px); align-items: start;
}
.cta h2 { margin: 0; font-weight: 800; letter-spacing: -.04em; line-height: .95; font-size: clamp(44px, 6vw, 92px); }
.cta h2 em { font-style: normal; color: var(--cobalt); }
.stats { margin: 48px 0 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.stats div { padding: 18px 0 0; border-top: 1px solid var(--line); }
.stats dt { font-family: var(--mono); font-size: 11.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--mute); }
.stats dd { margin: 6px 0 0; font-size: clamp(30px, 3.4vw, 46px); font-weight: 800; letter-spacing: -.03em; color: var(--ink); }

.receipt {
  position: relative; background: var(--paper); border-radius: 22px 22px 0 0;
  padding: 26px 26px 34px;
  box-shadow: 0 40px 70px -40px rgba(20, 22, 34, .45), 0 0 0 1px var(--line);
}
.receipt-zig {
  position: absolute; left: 0; right: 0; bottom: -12px; height: 12px;
  background: linear-gradient(-45deg, transparent 8px, var(--paper) 0) 0 0 / 16px 12px repeat-x,
              linear-gradient(45deg, transparent 8px, var(--paper) 0) 0 0 / 16px 12px repeat-x;
  filter: drop-shadow(0 1px 0 var(--line));
}
.receipt-head { display: flex; justify-content: space-between; font-family: var(--mono); font-size: 12px; color: var(--mute); padding-bottom: 14px; border-bottom: 1.5px dashed var(--line); text-transform: uppercase; letter-spacing: .08em; }
.receipt-list { list-style: none; margin: 0; padding: 8px 0; max-height: 260px; overflow: auto; }
.receipt-list li { display: grid; grid-template-columns: 14px 1fr auto auto; gap: 10px; align-items: center; padding: 9px 0; font-size: 15px; border-bottom: 1px solid rgba(20, 22, 34, .05); }
.receipt-list .sw { width: 12px; height: 12px; border-radius: 50%; background: var(--c); }
.receipt-list .q { font-family: var(--mono); font-size: 12px; color: var(--mute); }
.receipt-list .pr { font-family: var(--mono); font-size: 13.5px; }
.receipt-empty { margin: 16px 0; color: var(--mute); font-size: 15px; }
.receipt-empty[hidden] { display: none; }
.slots { display: flex; gap: 8px; flex-wrap: wrap; margin: 16px 0 18px; }
.slot { border: 1px solid var(--line); background: transparent; padding: 8px 12px; border-radius: 999px; font-size: 13px; font-weight: 600; transition: background .3s, color .3s, border-color .3s; }
.slot[aria-pressed="true"] { background: var(--cobalt); color: #fff; border-color: var(--cobalt); }
.receipt-total { display: flex; justify-content: space-between; align-items: baseline; padding: 14px 0 18px; border-top: 1.5px dashed var(--line); }
.receipt-total strong { font-family: var(--mono); font-size: 26px; font-weight: 500; }
.btn-wide { width: 100%; }
#checkoutAmt { font-family: var(--mono); font-size: 14px; opacity: .85; }
.receipt-note { margin: 12px 0 0; min-height: 1.4em; font-size: 14px; color: var(--ink-2); text-align: center; }

.foot {
  max-width: 1240px; margin: clamp(80px, 10vw, 140px) auto 0;
  display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap;
  padding: 26px 0 30px; border-top: 1px solid var(--line);
  font-size: 13.5px; color: var(--mute);
}
.foot p { margin: 0; }
.foot a { text-decoration-color: rgba(31, 79, 216, .4); text-underline-offset: 3px; }
.foot a:hover { color: var(--cobalt); }
.foot-back { font-family: var(--mono); font-size: 13px; text-decoration: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .nav-links { display: none; }
  .rail { display: none; }
  .chapter[data-side="right"] .chapter-inner { padding-right: var(--gutter); }
}
@media (max-width: 860px) {
  .cta-inner { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  body { font-size: 16px; }
  .nav { padding: 14px 16px; }
  .nav-eta { display: none; }
  .cart-label { display: none; }
  .hero { align-items: flex-start; padding: 104px 16px 0; }
  .hero-inner::before { inset: -10% -4% -10% -10%; }
  .lede { margin-top: 16px; }
  .tip { display: none; }
  .scroll-cue { left: 16px; right: auto; bottom: 28px; }
  .chapter { height: 140vh; }
  .chapter-inner, .chapter[data-side] .chapter-inner { align-items: flex-end; justify-content: center; padding: 0 16px 20px; }
  .chapter-card { padding: 22px 20px 18px; border-radius: 22px; }
  .chapter-card h2 { font-size: 56px; margin-bottom: 8px; }
  .chapter-card p:not(.ch-num) { font-size: 15px; }
  .chips { margin-top: 12px; }
  .pick { margin-top: 14px; }
  .pcard { width: min(272px, calc(100vw - 32px)); }
  .cta { border-radius: 28px 28px 0 0; padding-top: 72px; }
  .stats { grid-template-columns: 1fr 1fr 1fr; gap: 10px; }
  .receipt { padding: 22px 18px 30px; }
  .foot { flex-direction: column; align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .loader { animation: loaderFailsafe .01s 1.5s forwards; }
}
