/* matter of taste. & baked. — page styles. The engine (scrollcraft.css) is untouched. */

/* ---------- brand tokens: the whole site re-themes from html[data-brand] ---------- */
:root {
  --sc-font-text: "Plus Jakarta Sans", system-ui, sans-serif;
  --sc-ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
  --radius: 22px;
}
html[data-brand="mot"] {
  --b-primary: #52B3DB;   /* turquoise */
  --b-deep:    #1F3566;   /* navy */
  --b-paper:   #F6F4EE;   /* cream */
  --b-soft:    #FFFFFF;
  --b-ink:     #1F3566;
  --b-ink-soft:#3D5384;
  --b-on-deep: #F6F4EE;
  --b-on-primary: #13254A;
  --b-accent:  #1F3566;
  --b-accent-ink: #F6F4EE;
  --d-font: "Plus Jakarta Sans", system-ui, sans-serif;
  --d-weight: 800; --d-style: italic; --d-track: -0.045em; --d-case: lowercase; --d-lead: 0.95;
  --sc-canvas: #52B3DB; --sc-ink: #1F3566; --sc-accent: #1F3566; --sc-accent-ink: #F6F4EE;
  --shadow-tint: 214 60% 18%;
}
html[data-brand="baked"] {
  --b-primary: #C63F84;   /* hot pink */
  --b-deep:    #6E1240;   /* berry */
  --b-paper:   #F8E7EF;   /* pink cream */
  --b-soft:    #FFFFFF;
  --b-ink:     #8E1D57;
  --b-ink-soft:#9C3A6C;
  --b-on-deep: #FFF4F8;
  --b-on-primary: #FFFFFF;
  --b-accent:  #8E1D57;
  --b-accent-ink: #FFFFFF;
  --d-font: "Fredoka", "Plus Jakarta Sans", system-ui, sans-serif;
  --d-weight: 700; --d-style: normal; --d-track: -0.025em; --d-case: none; --d-lead: 0.96;
  --sc-canvas: #C63F84; --sc-ink: #FFFFFF; --sc-accent: #8E1D57; --sc-accent-ink: #FFFFFF;
  --shadow-tint: 330 70% 20%;
}

html { background: var(--b-primary); }
body {
  margin: 0;
  background: var(--page-ground, var(--b-primary));
  color: var(--b-ink);
  font-family: var(--sc-font-text);
  overflow-x: clip;
}
html.is-switching body, html.is-switching main > section, html.is-switching .bar__cta, html.is-switching .btn--solid {
  transition: background-color 520ms var(--sc-ease-out), color 320ms;
}
::selection { background: var(--b-deep); color: var(--b-on-deep); }
:focus-visible { outline: 3px solid var(--b-deep); outline-offset: 3px; border-radius: 6px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* display type swaps family, weight and case with the brand */
.display-l, .display-m, .hero__title, .second__big, .peak__to, .hero__word, .bar__mark, .lineup__card h3 {
  font-family: var(--d-font);
  font-weight: var(--d-weight);
  font-style: var(--d-style);
  letter-spacing: var(--d-track);
  line-height: var(--d-lead);
  text-wrap: balance;
}
.display-l { font-size: clamp(2.3rem, 1.4rem + 3.6vw, 5rem); margin: 0; }
.display-m { font-size: clamp(1.9rem, 1.3rem + 2.2vw, 3.4rem); margin: 0; }
.kicker { font-size: var(--sc-t-sm); font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; margin: 0 0 var(--sc-4); }

/* ---------- the fixed 3D stage ---------- */
.stage3d {
  position: fixed; inset: 0; width: 100vw; height: 100vh; height: 100lvh;
  z-index: 1; pointer-events: none; display: block;
}
/* section grounds paint below the canvas; their content sits above it */
main > section { position: relative; overflow-x: clip; }
html { overflow-x: clip; }
:where(main > section > *:not(.dock)) { position: relative; z-index: 2; }
.peak__pin { z-index: auto; }
.bar__count[hidden] { display: none; }
html[data-bar="deep"] .bar__mark { color: var(--b-on-deep); }
html[data-bar="deep"] .bar__cta { background: var(--b-paper); color: var(--b-ink); }
html[data-bar="deep"] .bar__count { background: var(--b-deep); color: var(--b-on-deep); }
html[data-bar="paper"] .bar__mark { color: var(--b-ink); }
.dock { position: absolute; pointer-events: none; z-index: 0 !important; }

/* ---------- bar ---------- */
.bar {
  position: fixed; inset: 0 0 auto; z-index: 20;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: var(--sc-4);
  padding: max(env(safe-area-inset-top), 14px) var(--sc-gutter) 14px;
  pointer-events: none;
}
.bar > * { pointer-events: auto; }
.bar::before {
  content: ""; position: absolute; inset: 0 0 -18px; z-index: -1; pointer-events: none;
  background: linear-gradient(var(--bar-bg, transparent) 72%, transparent);
}
.bar__mark { font-size: 1.35rem; color: var(--bar-ink, var(--b-on-primary)); text-decoration: none; justify-self: start; white-space: nowrap; transition: color 300ms; }
.bar__cta {
  justify-self: end; display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 20px; border-radius: 999px; background: var(--b-deep); color: var(--b-on-deep);
  font-weight: 800; text-decoration: none; box-shadow: 0 6px 18px -6px hsl(var(--shadow-tint) / 0.5);
  transition: transform 140ms var(--sc-ease-out), background-color 300ms;
}
.bar__cta:active { transform: scale(0.97); }
.bar__count {
  min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; display: inline-grid; place-items: center;
  background: var(--b-paper); color: var(--b-ink); font-size: 0.8rem; font-variant-numeric: tabular-nums;
}
.bar__count.is-bump { animation: bump 380ms var(--bounce); }
@keyframes bump { 0% { transform: scale(0.6); } 100% { transform: scale(1); } }

.switch {
  position: relative; display: grid; grid-template-columns: 1fr 1fr;
  padding: 5px; border-radius: 999px;
  background: color-mix(in oklab, var(--b-paper) 88%, transparent);
  box-shadow: 0 8px 24px -10px hsl(var(--shadow-tint) / 0.55), inset 0 1px 0 #ffffff80;
}
.switch__opt {
  position: relative; z-index: 1; border: 0; background: none; cursor: pointer;
  padding: 9px 16px; border-radius: 999px; font: 800 italic 0.95rem/1 "Plus Jakarta Sans", sans-serif;
  letter-spacing: -0.03em; color: var(--b-ink); white-space: nowrap; transition: color 260ms;
}
.switch__opt[data-set-brand="baked"] { font-family: "Fredoka", sans-serif; font-style: normal; font-weight: 700; letter-spacing: -0.01em; font-size: 1.02rem; }
.switch__opt[aria-pressed="true"] { color: var(--b-on-deep); }
.switch__knob {
  position: absolute; top: 5px; bottom: 5px; left: 5px; width: calc(50% - 5px);
  border-radius: 999px; background: var(--b-deep);
  transition: transform 420ms var(--bounce), background-color 300ms;
}
html[data-brand="baked"] .switch__knob { transform: translateX(100%); }
@media (hover: hover) and (pointer: fine) {
  .switch__opt[aria-pressed="false"]:hover { color: var(--b-ink-soft); }
  .bar__cta:hover { transform: translateY(-1px); }
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 15px 28px; border-radius: 999px; border: 0; cursor: pointer;
  font: 800 1rem/1 var(--sc-font-text); text-decoration: none; white-space: nowrap;
  transition: transform 140ms var(--sc-ease-out), background-color 300ms, color 300ms;
}
.btn:active { transform: scale(0.97); }
.btn--solid { background: var(--b-deep); color: var(--b-on-deep); box-shadow: 0 10px 24px -10px hsl(var(--shadow-tint) / 0.6), inset 0 1px 0 #ffffff30; }
.btn--ghost { background: transparent; color: var(--b-ink); box-shadow: inset 0 0 0 2px currentColor; padding: 11px 20px; font-size: 0.9rem; }
.btn--wide { width: 100%; }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; }

/* ---------- 1 hero ---------- */
.hero {
  min-height: 100svh; display: grid; align-items: end;
  padding: 0 var(--sc-gutter) clamp(2rem, 6vh, 4.5rem);
  overflow: clip;
}
.hero__word {
  position: absolute !important; z-index: 0 !important; inset: 12vh 0 auto; margin: 0;
  font-size: clamp(5rem, 15.5vw, 17rem); color: var(--b-paper);
  text-align: center; line-height: 0.82; pointer-events: none; user-select: none;
  will-change: transform; opacity: 0.96;
}
html[data-brand="baked"] .hero__word { font-size: clamp(6rem, 26vw, 26rem); line-height: 0.9; inset-block-start: 16vh; }
.dock--hero { right: 4vw; top: 16vh; width: 40vw; height: 74vh; }
.hero__copy { max-width: 34rem; color: var(--b-on-primary); }
.hero__title { font-size: clamp(2.4rem, 1.4rem + 3.4vw, 4.6rem); margin: 0 0 var(--sc-4); }
.hero__title em { font-style: inherit; display: block; color: var(--b-paper); }
.hero__sub { font-size: var(--sc-t-lg); font-weight: 600; line-height: 1.45; margin: 0 0 var(--sc-6); max-width: 26ch; }

/* ---------- 2 story ---------- */
.story { background: var(--b-paper); color: var(--b-ink); padding: clamp(5rem, 12vh, 9rem) var(--sc-gutter); }
.dock--away { right: -120vw; top: 30%; width: 30vw; height: 50vh; }
.story__grid {
  max-width: 78rem; margin: 0 auto; display: grid; gap: var(--sc-7) var(--sc-8);
  grid-template-columns: 1.15fr 1fr; grid-template-areas: "head fig" "text fig";
}
.story__head { grid-area: head; }
.story__text { grid-area: text; font-size: var(--sc-t-lg); line-height: 1.6; max-width: 38ch; }
.story__text p { margin: 0 0 var(--sc-5); }
.story__both { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; font-size: var(--sc-t-base); font-weight: 600; }
.tag { padding: 6px 14px; border-radius: 999px; font-weight: 800; font-size: 1rem; }
.tag--mot { background: #52B3DB; color: #13254A; font-style: italic; letter-spacing: -0.03em; }
.tag--baked { background: #C63F84; color: #fff; font-family: "Fredoka", sans-serif; font-weight: 700; }
.story__fig { grid-area: fig; margin: 0; align-self: center; }
.stack { position: relative; aspect-ratio: 1; }
.stack img { position: absolute; width: 62%; height: auto; filter: drop-shadow(0 22px 26px hsl(var(--shadow-tint) / 0.35)); }
.stack img:nth-child(1) { left: 0; top: 4%; transform: rotate(-8deg); }
.stack img:nth-child(2) { right: 0; top: 22%; transform: rotate(10deg); }
.stack img:nth-child(3) { left: 18%; bottom: 0; transform: rotate(-2deg); }
.story__fig figcaption { font-size: var(--sc-t-sm); color: var(--b-ink-soft); margin-top: var(--sc-4); text-align: center; }

/* ---------- 3 lineup ---------- */
.lineup { background: var(--b-deep); color: var(--b-on-deep); height: 300vh; }
.lineup__pin { position: sticky; top: 0; height: 100svh; overflow: hidden; display: grid; grid-template-rows: auto 1fr; padding-top: clamp(6rem, 14vh, 8rem); }
.lineup__head { padding: 0 var(--sc-gutter); display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: var(--sc-4) var(--sc-7); }
.lineup__lede { font-size: var(--sc-t-lg); max-width: 30ch; margin: 0; color: color-mix(in oklab, var(--b-on-deep) 82%, var(--b-deep)); }
.lineup__rail {
  display: flex; gap: clamp(1.5rem, 4vw, 4rem); align-items: center;
  padding: 0 var(--sc-gutter); width: max-content;
  transform: translate3d(var(--lx, 0px), 0, 0); will-change: transform;
}
.lineup__rail:focus-visible { outline-color: var(--b-on-deep); }
.lineup__card { width: clamp(17rem, 30vw, 27rem); flex: none; }
.lineup__card img { width: 100%; height: auto; display: block; filter: drop-shadow(0 30px 34px rgb(0 0 0 / 0.35)); transition: transform 500ms var(--bounce); }
.lineup__card h3 { font-size: clamp(1.7rem, 1.2rem + 1.4vw, 2.5rem); margin: var(--sc-3) 0 var(--sc-2); }
.lineup__card p { margin: 0; line-height: 1.5; max-width: 32ch; color: color-mix(in oklab, var(--b-on-deep) 84%, var(--b-deep)); }
@media (hover: hover) and (pointer: fine) { .lineup__card:hover img { transform: rotate(-12deg) scale(1.04); } }

/* ---------- 4 hush ---------- */
.hush { height: 130vh; background: var(--b-primary); }
.hush__inner { position: sticky; top: 0; height: 100svh; display: grid; place-items: end center; padding-bottom: 16vh; }
.dock--hush { left: 50%; top: 22vh; width: 18vw; height: 34vh; transform: translateX(-50%); }
.hush__line { margin: 0; font-size: var(--sc-t-xl); font-weight: 700; font-style: italic; color: var(--b-on-primary); letter-spacing: -0.02em; text-align: center; }

/* ---------- 5 peak ---------- */
.peak { height: 340vh; background: transparent; }
.peak__pin { position: sticky; top: 0; height: 100svh; overflow: hidden; display: grid; place-items: center; }
.dock--peak { left: 50%; top: 18vh; width: 30vw; height: 60vh; transform: translateX(-50%); }
.peak__from, .peak__to {
  position: absolute; margin: 0; text-align: center; pointer-events: none; white-space: nowrap;
  will-change: transform, opacity;
}
.peak__from {
  font: 800 italic clamp(4rem, 14vw, 15rem)/0.9 "Plus Jakarta Sans", sans-serif; letter-spacing: -0.05em;
  color: #F6F4EE; z-index: 0 !important;
  transform: scale(calc(1 + var(--pf, 0) * 0.9)); opacity: calc(1 - var(--pf, 0));
}
.peak__from.is-baked { font-family: "Fredoka", sans-serif; font-style: normal; font-weight: 700; letter-spacing: -0.02em; }
.peak__to {
  font-size: clamp(5rem, 22vw, 22rem); color: #FFFFFF;
  transform: translate3d(0, calc((1 - var(--pt, 0)) * 18vh), 0) scale(calc(0.7 + var(--pt, 0) * 0.3));
  opacity: var(--pt, 0);
  text-shadow: 0 0.06em 0 hsl(var(--shadow-tint) / 0.35);
}

/* ---------- 6 second world ---------- */
.second { min-height: 110svh; background: var(--b-primary); color: var(--b-on-primary); display: grid; align-items: center; padding: 14vh var(--sc-gutter); }
.dock--second { right: 6vw; top: 26%; width: 24vw; height: 52vh; }
.second__copy { max-width: 46rem; }
.second__tag { font-weight: 800; text-transform: uppercase; letter-spacing: 0.14em; font-size: var(--sc-t-sm); margin: 0 0 var(--sc-4); }
.second__big { font-size: clamp(2.6rem, 1.4rem + 5vw, 6rem); margin: 0 0 var(--sc-6); }
.second__body { font-size: var(--sc-t-lg); line-height: 1.55; max-width: 36ch; margin: 0; font-weight: 600; }

/* ---------- 7 pick ---------- */
.pick { background: var(--b-paper); color: var(--b-ink); padding: clamp(5rem, 13vh, 9rem) var(--sc-gutter); }
.pick__grid { max-width: 80rem; margin: 0 auto; display: grid; grid-template-columns: 1.25fr 1fr; gap: var(--sc-8); align-items: center; }
.pick__lede { font-size: var(--sc-t-lg); line-height: 1.55; max-width: 40ch; margin: var(--sc-4) 0 var(--sc-6); color: var(--b-ink-soft); }
.pick__cookies { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--sc-4); }
.cookie-btn {
  display: grid; justify-items: center; gap: 8px; padding: 12px 8px 14px; border: 0; cursor: pointer;
  background: var(--b-soft); border-radius: var(--radius); color: var(--b-ink);
  font: 700 0.95rem/1.2 var(--sc-font-text); text-align: center;
  box-shadow: 0 1px 2px hsl(var(--shadow-tint) / 0.12), 0 10px 22px -12px hsl(var(--shadow-tint) / 0.4), inset 0 1px 0 #fff;
  transition: transform 160ms var(--sc-ease-out), box-shadow 160ms var(--sc-ease-out);
}
.cookie-btn img { width: 100%; max-width: 128px; aspect-ratio: 1; height: auto; transition: transform 380ms var(--bounce); }
.cookie-btn:active { transform: scale(0.96); }
.cookie-btn .count { font-size: 0.8rem; color: var(--b-ink-soft); font-variant-numeric: tabular-nums; min-height: 1em; }
@media (hover: hover) and (pointer: fine) {
  .cookie-btn:hover { transform: translateY(-3px); }
  .cookie-btn:hover img { transform: rotate(14deg); }
}
.pick__tray { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sc-4); margin-top: var(--sc-6); }
.pick__summary { margin: 0; font-weight: 700; }
.pick__jar { position: relative; height: min(70vh, 640px); }
.dock--pick { inset: 0; }

/* ---------- 8 occasions ---------- */
.occasions { background: var(--b-soft); color: var(--b-ink); padding: clamp(5rem, 13vh, 9rem) var(--sc-gutter); }
.occasions__wrap { max-width: 64rem; margin: 0 auto; }
.occasions__wrap h2 { max-width: 18ch; }
.occasions__list { list-style: none; padding: 0; margin: var(--sc-7) 0 var(--sc-6); display: grid; grid-template-columns: 1fr 1fr; gap: 0 var(--sc-8); }
.occasions__list li { padding: var(--sc-5) 0; border-top: 2px solid color-mix(in oklab, var(--b-ink) 16%, transparent); }
.occasions__list h3 { margin: 0 0 6px; font-size: var(--sc-t-xl); font-weight: 800; letter-spacing: -0.02em; }
.occasions__list p { margin: 0; line-height: 1.55; color: var(--b-ink-soft); max-width: 40ch; }
.occasions__note { margin: 0; font-weight: 600; color: var(--b-ink-soft); }

/* ---------- 9 order ---------- */
.order { background: var(--b-primary); min-height: 100svh; padding: clamp(6rem, 13vh, 8rem) var(--sc-gutter) var(--sc-5); display: grid; grid-template-rows: 1fr auto; }
.order__grid { max-width: 76rem; width: 100%; margin: 0 auto; display: grid; grid-template-columns: 1fr 1fr; gap: var(--sc-8); align-items: center; }
.order__jar { position: relative; height: min(72vh, 640px); }
.dock--order { inset: 0; }
.order__card {
  background: var(--b-soft); color: var(--b-ink); border-radius: 28px; padding: clamp(1.5rem, 3vw, 2.5rem);
  display: grid; gap: var(--sc-4);
  box-shadow: 0 2px 4px hsl(var(--shadow-tint) / 0.18), 0 30px 60px -20px hsl(var(--shadow-tint) / 0.5), inset 0 1px 0 #fff;
}
.order__picks { margin: 0; line-height: 1.5; font-weight: 600; color: var(--b-ink-soft); }
.order__picks a { color: var(--b-ink); }
.field { display: grid; gap: 6px; font-weight: 700; font-size: 0.9rem; }
.field input, .field select, .field textarea {
  font: 500 1rem/1.4 var(--sc-font-text); color: var(--b-ink); background: var(--b-paper);
  border: 2px solid transparent; border-radius: 14px; padding: 12px 14px; min-height: 48px; box-sizing: border-box; width: 100%;
  transition: border-color 160ms;
}
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--b-deep); }
.field input[aria-invalid="true"] { border-color: #B3261E; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sc-4); }
.order__status { margin: 0; font-size: 0.9rem; color: var(--b-ink-soft); line-height: 1.45; }
.order__status.is-done { color: var(--b-ink); font-weight: 700; }
.order__ig { display: flex; flex-wrap: wrap; gap: var(--sc-5); margin: 0; font-weight: 800; }
.order__ig a { color: var(--b-ink); text-underline-offset: 4px; }
.foot { display: flex; justify-content: space-between; gap: var(--sc-4); flex-wrap: wrap; padding-top: var(--sc-7); color: var(--b-on-primary); font-weight: 700; font-size: var(--sc-t-sm); }

/* ---------- no WebGL: CSS jar fallback ---------- */
.no-gl .stage3d { display: none; }

/* ---------- phones: native flow, no pinning ---------- */
@media (max-width: 860px) {
  .bar { grid-template-columns: 1fr auto; padding-inline: 14px; gap: 10px; }
  .bar__mark { display: none; }
  .switch { justify-self: start; }
  .switch__opt { padding: 9px 12px; font-size: 0.85rem; }
  .bar__cta { padding: 10px 16px; }

  .hero { align-items: end; padding-bottom: 7vh; }
  .hero__word { inset-block-start: 11vh; font-size: 19vw; }
  html[data-brand="baked"] .hero__word { font-size: 30vw; inset-block-start: 13vh; }
  .dock--hero { left: 50%; right: auto; transform: translateX(-50%); top: 15vh; width: 80vw; height: 42vh; }
  .hero__title { font-size: clamp(2.1rem, 9.4vw, 3rem); }
  .hero__sub { font-size: 1.05rem; margin-bottom: var(--sc-5); }

  .story__grid { grid-template-columns: 1fr; grid-template-areas: "head" "fig" "text"; gap: var(--sc-6); }
  .stack { max-width: 22rem; margin: 0 auto; }

  .lineup { height: auto; }
  .lineup__pin { position: relative; height: auto; padding: 5rem 0 4rem; gap: var(--sc-6); }
  .lineup__rail { width: auto; overflow-x: auto; scroll-snap-type: x mandatory; transform: none; padding-bottom: 1rem; scrollbar-width: none; }
  .lineup__rail::-webkit-scrollbar { display: none; }
  .lineup__card { width: 74vw; scroll-snap-align: center; }

  .hush { height: 90svh; }
  .hush__inner { position: relative; height: 90svh; padding-bottom: 12vh; }
  .dock--hush { width: 38vw; height: 30vh; top: 18vh; }

  .peak { height: 100svh; }
  .peak__pin { position: relative; height: 100svh; }
  .dock--peak { width: 64vw; height: 44vh; top: 20vh; }
  .peak__from { font-size: 17vw; }
  .peak__from, .peak__to { top: 64%; }
  .peak__to { font-size: 26vw; }

  .second { min-height: 100svh; align-items: end; padding-bottom: 10vh; }
  .dock--second { right: 4vw; top: 10vh; width: 40vw; height: 30vh; }

  .pick__grid { grid-template-columns: 1fr; gap: var(--sc-5); }
  .pick__jar { order: -1; height: 36vh; }
  .pick__cookies { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
  .cookie-btn { font-size: 0.85rem; padding: 10px 6px 12px; }

  .occasions__list { grid-template-columns: 1fr; }

  .order__grid { grid-template-columns: 1fr; gap: var(--sc-4); }
  .order__jar { height: 34vh; }
  .field-row { grid-template-columns: 1fr; }
}
@media (max-width: 380px) {
  .switch__opt { padding: 8px 9px; font-size: 0.78rem; }
  .bar__cta { padding: 9px 12px; }
}

@media (prefers-reduced-motion: reduce) {
  .switch__knob { transition-duration: 1ms; }
  .peak { height: 160vh; }
}
