/* ==========================================================
   Grammies · prelaunch site
   Colours sampled from the approved Original + Protein pouches.
   ========================================================== */

/* Registered so mood colours can crossfade when flavour/range change */
@property --wall    { syntax: '<color>'; inherits: true; initial-value: #f4e2bf; }
@property --wall-2  { syntax: '<color>'; inherits: true; initial-value: #ead09c; }
@property --surface { syntax: '<color>'; inherits: true; initial-value: #e3bf8a; }
@property --surface-2 { syntax: '<color>'; inherits: true; initial-value: #c99d66; }
@property --ink     { syntax: '<color>'; inherits: true; initial-value: #4a1d0a; }
@property --ink-soft{ syntax: '<color>'; inherits: true; initial-value: #7b4a2b; }
@property --glow    { syntax: '<color>'; inherits: true; initial-value: rgba(255,248,226,.75); }
@property --c1 { syntax: '<color>'; inherits: true; initial-value: #f5e4c3; }
@property --c2 { syntax: '<color>'; inherits: true; initial-value: #e3c08b; }
@property --mx { syntax: '<number>'; inherits: true; initial-value: 0; }
@property --my { syntax: '<number>'; inherits: true; initial-value: 0; }
@property --shade   { syntax: '<color>'; inherits: true; initial-value: rgba(74,35,10,.42); }

:root {
  --cream: #fbf5ea;
  --paper: #f6ecdc;
  --brown: #4a1d0a;          /* pack ink */
  --brown-2: #6a3417;
  --gold: #c98a3e;           /* toasted edge */
  --line: rgba(74, 29, 10, .16);
  --header-h: 68px;
  --gutter: clamp(16px, 4.5vw, 64px);
  --serif: 'Fraunces', 'Iowan Old Style', Georgia, serif;
  --sans: 'DM Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --ease: cubic-bezier(.22, .7, .2, 1);
  --mood-t: .6s;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 8px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--cream); color: var(--brown);
  font-family: var(--sans); font-size: 17px; line-height: 1.55;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3, p { margin: 0; }
a { color: inherit; }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; border-radius: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--brown); color: var(--cream); padding: 10px 16px; border-radius: 999px; text-decoration: none; }
.skip:focus { top: 10px; }

.eyebrow {
  font-size: 12px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase;
}

/* ---------- Buttons ---------- */
.btn {
  --b: var(--brown); --bi: var(--cream);
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 28px; border: 0; border-radius: 999px;
  background: var(--b); color: var(--bi); text-decoration: none;
  font-weight: 600; font-size: 16px; letter-spacing: .01em; white-space: nowrap;
  transition: transform .2s var(--ease), background-color var(--mood-t), color var(--mood-t), box-shadow .2s;
  box-shadow: 0 1px 0 rgba(255,255,255,.12) inset, 0 6px 16px -8px rgba(40,15,0,.5);
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 1px 0 rgba(255,255,255,.12) inset, 0 10px 22px -10px rgba(40,15,0,.6); }
.btn:active { transform: translateY(0); }
.btn-sm { min-height: 40px; padding: 0 18px; font-size: 14px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 20; height: var(--header-h);
  display: flex; align-items: center; gap: 28px; padding: 0 var(--gutter);
  background: rgba(251, 245, 234, .9);
  -webkit-backdrop-filter: saturate(1.4) blur(14px); backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid var(--line);
}
.brand { display: block; width: 132px; flex: none; }
.brand img { width: 100%; }
.site-nav { display: flex; gap: 28px; margin-left: auto; font-size: 15px; font-weight: 500; }
.site-nav a { text-decoration: none; padding: 8px 0; background: linear-gradient(currentColor,currentColor) 0 100%/0 1.5px no-repeat; transition: background-size .25s var(--ease); }
.site-nav a:hover { background-size: 100% 1.5px; }

/* ==========================================================
   HERO
   ========================================================== */
.hero {
  /* mood tokens: set per flavour × range below */
  position: relative; overflow: hidden; isolation: isolate;
  color: var(--ink);
  transition: --wall var(--mood-t) var(--ease), --wall-2 var(--mood-t) var(--ease),
              --surface var(--mood-t) var(--ease), --surface-2 var(--mood-t) var(--ease),
              --ink var(--mood-t), --ink-soft var(--mood-t), --glow var(--mood-t), --shade var(--mood-t);
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  grid-template-rows: auto auto 1fr;
  grid-template-areas: "head stage" "body stage" ". stage";
  column-gap: clamp(24px, 4vw, 72px);
  padding: clamp(28px, 4vh, 56px) var(--gutter) clamp(24px, 3.5vh, 44px);
  min-height: min(calc(100svh - var(--header-h)), 940px);
  min-height: max(640px, min(calc(100svh - var(--header-h)), 940px));
}

/* Original */
.hero[data-range="original"][data-flavour="vanilla"]   { --wall:#f5e4c3; --wall-2:#ecd3a3; --surface:#e6c48f; --surface-2:#cfa06a; --ink:#4a1d0a; --ink-soft:#7b4a2b; --glow:rgba(255,249,230,.8); --shade:rgba(92,46,10,.42); }
.hero[data-range="original"][data-flavour="chocolate"] { --wall:#3e251c; --wall-2:#2a1813; --surface:#c09074; --surface-2:#946349; --ink:#fbebd8; --ink-soft:#e3c4a8; --glow:rgba(255,196,150,.34); --shade:rgba(30,12,6,.55); }
.hero[data-range="original"][data-flavour="birthday"]  { --wall:#f6e6ee; --wall-2:#ecd3e0; --surface:#e9cedb; --surface-2:#d4afc3; --ink:#4a1d0a; --ink-soft:#7b4a4b; --glow:rgba(255,250,252,.85); --shade:rgba(96,48,74,.34); }
/* Protein: richer, saturated versions of the same moods */
.hero[data-range="protein"][data-flavour="vanilla"]    { --wall:#f8c96a; --wall-2:#f0b048; --surface:#eaa64a; --surface-2:#c9822c; --ink:#3f1806; --ink-soft:#6a3410; --glow:rgba(255,238,190,.7); --shade:rgba(110,50,0,.42); }
.hero[data-range="protein"][data-flavour="chocolate"]  { --wall:#5c2c19; --wall-2:#3f1c0f; --surface:#cd8157; --surface-2:#a65c37; --ink:#fde9d4; --ink-soft:#f0c6a5; --glow:rgba(255,170,120,.36); --shade:rgba(40,12,2,.55); }
.hero[data-range="protein"][data-flavour="birthday"]   { --wall:#dcaad2; --wall-2:#c98fbf; --surface:#cf95c4; --surface-2:#ad6fa3; --ink:#3d1407; --ink-soft:#5e2c3c; --glow:rgba(255,236,250,.6); --shade:rgba(80,24,70,.38); }

/* The photographic set: wall + window light. Surface lives inside the cluster so it meets the product base exactly. */
.scene {
  position: absolute; inset: 0; z-index: -2;
  background:
    radial-gradient(120% 90% at 18% 8%, var(--glow), transparent 60%),
    linear-gradient(180deg, var(--wall) 0%, var(--wall-2) 100%);
}
/* soft window-frame shadows, light from upper left */
.scene-light {
  position: absolute; inset: -10% -10% 0 -10%;
  background:
    linear-gradient(112deg, transparent 0 46%, var(--shade) 46.5% 49%, transparent 49.5% 58%, var(--shade) 58.5% 60.5%, transparent 61%);
  opacity: .22; filter: blur(22px); mix-blend-mode: multiply;
}
.scene::after { /* fine paper grain */
  content: ""; position: absolute; inset: 0; opacity: .22; mix-blend-mode: soft-light; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.5 0 0 0 0 0.4 0 0 0 0 0.3 0 0 0 .9 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.hero-head { grid-area: head; align-self: start; padding: clamp(16px, 6vh, 72px) 0 22px; position: relative; z-index: 3; }
.hero-head .eyebrow { color: var(--ink-soft); margin-bottom: 20px; }
.hero h1 {
  font-family: var(--serif); font-weight: 600; font-variation-settings: "SOFT" 60, "opsz" 144;
  font-size: clamp(52px, 6.3vw, 104px); line-height: .98; letter-spacing: -.035em;
}
.hero-body { grid-area: body; align-self: start; position: relative; z-index: 3; }
.lede { font-size: clamp(17px, 1.35vw, 20px); line-height: 1.5; max-width: 30ch; color: var(--ink-soft); margin-bottom: 28px; transition: color var(--mood-t); }
.hero .btn { --b: var(--ink); --bi: var(--wall); }

/* ---------- Stage ---------- */
.stage {
  grid-area: stage; position: relative; /* no z-index: layers join the hero's stacking so the big word can sit between table and pack */
  display: flex; flex-direction: column; align-items: center; justify-content: flex-end;
  min-height: 0;
}
.range-toggle {
  display: inline-flex; align-items: center; gap: 4px; padding: 4px;
  border-radius: 999px; background: color-mix(in srgb, var(--wall) 70%, white 30%);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--ink) 14%, transparent) inset;
  font-size: 14px; font-weight: 600; transition: background-color var(--mood-t);
}
.hero .range-toggle { position: absolute; top: 0; right: 0; z-index: 5; }
.range-label { padding: 0 8px 0 12px; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; opacity: .7; }
.range-toggle button {
  border: 0; background: transparent; padding: 9px 16px; border-radius: 999px; min-height: 38px;
  transition: background-color .25s, color .25s;
}
.range-toggle button[aria-pressed="true"] { background: var(--ink); color: var(--wall); }
.range-toggle button:not([aria-pressed="true"]):hover { background: color-mix(in srgb, var(--ink) 10%, transparent); }
.hero[data-flavour="chocolate"] .range-toggle { background: color-mix(in srgb, var(--wall) 75%, white 10%); }

/* The art box: square-ish product composition, sized off the available height */
.art {
  position: relative; width: 100%; flex: 1 1 auto; min-height: 380px;
  display: flex; align-items: flex-end; justify-content: center;
  touch-action: pan-y; user-select: none; -webkit-user-select: none;
}
.cluster {
  --h: min(100%, 760px);
  position: relative; height: var(--h); aspect-ratio: 1 / 1; max-width: 100%;
}
.cluster img { -webkit-user-drag: none; pointer-events: none; }

/* table surface: starts at the horizon behind the product and runs off-screen */
.surface {
  position: absolute; left: -100vw; right: -100vw; top: 79%; height: 200vh; z-index: 0;
  background:
    linear-gradient(180deg, rgba(255,255,255,.38) 0, rgba(255,255,255,0) 2px),
    linear-gradient(180deg, var(--surface) 0%, var(--surface-2) 34%);
  box-shadow: 0 -1px 0 rgba(0,0,0,.06);
}
.surface::after {
  content: ""; position: absolute; inset: 0; opacity: .35; mix-blend-mode: soft-light;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.55' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.5 0 0 0 0 0.42 0 0 0 0 0.33 0 0 0 1 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* product geometry, as % of the square cluster */
.pouch { position: absolute; z-index: 3; left: 50%; bottom: 9%; height: 82%; aspect-ratio: 456 / 738; transform: translateX(-50%) translate(calc(var(--mx) * 7px), calc(var(--my) * 4px)); transition: transform .5s var(--ease); animation: rise 1s var(--ease) .05s both; }
.pouch img, .cookie img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; object-position: bottom center; }
.pouch img { filter: drop-shadow(-1px -1px 0 rgba(255,250,240,.18)) drop-shadow(0 2px 2px rgba(40,15,0,.18)); }

.cast-shadow { /* light from upper-left -> long soft shadow falling right */
  position: absolute; z-index: 1; left: 50%; bottom: 9%; height: 82%; aspect-ratio: 456/738;
  transform: translateX(-38%) skewX(-38deg) scaleY(.32); transform-origin: bottom center;
  background: var(--shade); border-radius: 6% 6% 0 0; filter: blur(14px); opacity: .55;
}
.contact { position: absolute; z-index: 2; border-radius: 50%; background: radial-gradient(closest-side, var(--shade), transparent); }
.contact-pouch { left: 50%; bottom: 6.8%; width: 55%; height: 5.5%; transform: translateX(-50%); }
.contact-front { left: 7%; bottom: -1.5%; width: 26%; height: 5%; z-index: 4; }

.cookie { position: absolute; }
.cookie-front { z-index: 5; left: 4%; bottom: 0; height: 32%; aspect-ratio: 313 / 375; transform: translate(calc(var(--mx) * 20px), calc(var(--my) * 10px)) rotate(-9deg); transform-origin: 50% 100%; transition: transform .5s var(--ease); animation: drop .9s cubic-bezier(.3,1.35,.5,1) .45s both; }
.cookie-front.tumble { animation: tumble .7s cubic-bezier(.3,1.3,.5,1) both; }
.cookie-front img { filter: drop-shadow(6px 9px 7px var(--shade)); }
.cookie-back  { z-index: 1; left: 72%; bottom: 15.5%; height: 17%; aspect-ratio: 245 / 284; transform: translate(calc(var(--mx) * 3px), calc(var(--my) * 2px)) rotate(14deg); transition: transform .5s var(--ease); animation: drop .9s cubic-bezier(.3,1.35,.5,1) .6s both; }
.cookie-back.tumble { animation: tumble .7s cubic-bezier(.3,1.3,.5,1) .08s both; }
.cookie-back img { filter: drop-shadow(4px 6px 5px var(--shade)) brightness(.97); }

/* crossfade of stacked artwork */
.pouch img, .cookie img {
  opacity: 0; transform: translateY(10px) scale(.985);
  transition: opacity .38s var(--ease), transform .55s var(--ease);
}
.pouch img.is-active, .cookie img.is-active { opacity: 1; transform: none; }
.hero.is-turning-prev .pouch img:not(.is-active) { transform: translateX(14px); }
.hero.is-turning-next .pouch img:not(.is-active) { transform: translateX(-14px); }

/* birthday sprinkles, colours taken from the cookie's own sprinkles */
.sprinkles { position: absolute; inset: 0; z-index: 6; pointer-events: none; }
.sprinkles i {
  position: absolute; width: 1.1%; height: 2.6%; border-radius: 99px; opacity: 0;
  transition: opacity .4s var(--ease), transform .6s var(--ease); transform: translateY(6px) rotate(var(--r));
  box-shadow: 0 1px 1px rgba(80,30,40,.25);
}
.sprinkles i:nth-child(1) { left: 38%; bottom: 3%;  background: #f4a3c0; --r: 64deg; }
.sprinkles i:nth-child(2) { left: 44%; bottom: 6%;  background: #f8d65b; --r: -28deg; }
.sprinkles i:nth-child(3) { left: 79%; bottom: 7%;  background: #fff7ef; --r: 18deg; }
.sprinkles i:nth-child(4) { left: 86%; bottom: 3.5%; background: #f4a3c0; --r: -60deg; }
.sprinkles i:nth-child(5) { left: 4%;  bottom: 9%;  background: #f8d65b; --r: 80deg; }
.sprinkles i:nth-child(6) { left: 60%; bottom: 2%;  background: #c9a6e6; --r: 40deg; }
.hero[data-flavour="birthday"] .sprinkles i { opacity: 1; transform: rotate(var(--r)); }


/* ---------- The big word: flavour name set into the table, bleeding off the bottom ---------- */
.bigword {
  position: absolute; z-index: 1; left: 0; right: 0; top: var(--horizon, 70%); bottom: 0;
  overflow: hidden; pointer-events: none;
  transform: translateX(calc(var(--mx) * -16px)); transition: transform .6s var(--ease);
}
.bigword span {
  position: absolute; left: 50%; top: 0; white-space: nowrap;
  font-family: var(--serif); font-weight: 700; font-variation-settings: "SOFT" 100, "opsz" 144, "WONK" 0;
  letter-spacing: -.045em; line-height: 1;
  /* debossed: a shade darker than the table, lit lip on the lower edge */
  color: color-mix(in srgb, var(--surface) 87%, #6b3510 13%);
  text-shadow: 0 2px 0 rgba(255,255,255,.32), 0 -1px 1px rgba(80,35,5,.18);
  opacity: 0; transform: translate(-50%, calc(var(--lift, -.13em) + 22%));
  transition: opacity .45s var(--ease), transform .7s var(--ease), color var(--mood-t);
}
.bigword span.is-active { opacity: 1; transform: translate(-50%, var(--lift, -.13em)); }
.hero[data-flavour="chocolate"] .bigword span { color: color-mix(in srgb, var(--surface) 88%, #2a1208 12%); text-shadow: 0 2px 0 rgba(255,225,200,.22), 0 -1px 1px rgba(0,0,0,.25); }
/* phones: the word stands on the table, behind the pack */
.bigword.on-wall span { top: auto; bottom: 0; color: color-mix(in srgb, var(--wall-2) 84%, var(--ink) 16%); text-shadow: none; transform: translate(-50%, calc(.2em + 22%)); }
.bigword.on-wall span.is-active { transform: translate(-50%, .2em); }
.bigword-intro span.is-active { animation: wordUp 1.1s var(--ease) .15s both; }

@keyframes rise { from { opacity: 0; translate: 0 48px; } to { opacity: 1; translate: 0 0; } }
@keyframes drop { from { opacity: 0; translate: 0 -120px; rotate: -24deg; } 60% { opacity: 1; } to { opacity: 1; translate: 0 0; rotate: 0deg; } }
@keyframes tumble { from { translate: calc(var(--dir, 1) * 70px) -40px; rotate: calc(var(--dir, 1) * 50deg); } to { translate: 0 0; rotate: 0deg; } }
@keyframes wordUp { from { opacity: 0; translate: 0 40%; } to { opacity: 1; translate: 0 0; } }
.hero-head, .hero-body { animation: fadeUp .8s var(--ease) both; }
.hero-body { animation-delay: .12s; }
@keyframes fadeUp { from { opacity: 0; translate: 0 18px; } to { opacity: 1; translate: 0 0; } }

/* ---------- Flavour switcher (sits on the surface, under the product) ---------- */
.switcher {
  position: relative; z-index: 6; margin-top: clamp(10px, 2vh, 22px);
  display: grid; grid-template-columns: auto minmax(11ch, auto) auto; align-items: center; gap: clamp(14px, 2vw, 28px);
}
.arrow {
  width: 56px; height: 56px; border-radius: 50%; border: 1.5px solid color-mix(in srgb, var(--ink) 45%, transparent);
  background: color-mix(in srgb, var(--surface) 55%, white 45%);
  display: grid; place-items: center; color: var(--ink);
  box-shadow: 0 6px 14px -8px rgba(40,15,0,.45);
  transition: transform .2s var(--ease), background-color var(--mood-t), border-color var(--mood-t);
}
.hero[data-flavour="chocolate"] .arrow { background: color-mix(in srgb, var(--wall) 82%, white 6%); }
.arrow:hover { transform: scale(1.06); }
.arrow:active { transform: scale(.96); }
.arrow svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.flavour-label { text-align: center; display: grid; gap: 2px; min-width: 11ch; }
.flavour-range { font-size: 12px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-soft); }
.flavour-name {
  font-family: var(--serif); font-weight: 600; font-variation-settings: "SOFT" 50, "opsz" 72;
  font-size: clamp(30px, 2.8vw, 42px); line-height: 1.05; letter-spacing: -.02em; white-space: nowrap;
}
.flavour-desc, .flavour-count { position: relative; z-index: 6; }
.flavour-desc { margin-top: 10px; text-align: center; max-width: 38ch; font-size: 15px; line-height: 1.45; color: var(--ink-soft); min-height: 2.9em; }
.flavour-count { margin-top: 4px; font-size: 12px; letter-spacing: .14em; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.swap-in { animation: swapIn .42s var(--ease); }
@keyframes swapIn { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: none; } }

/* Text on the chocolate surface needs the cream ink to sit on the darker part of the table */
.hero[data-flavour="chocolate"] .flavour-desc,
.hero[data-flavour="chocolate"] .flavour-range,
.hero[data-flavour="chocolate"] .flavour-count { color: #fff3e4; }
.hero[data-flavour="chocolate"] .switcher, .hero[data-flavour="chocolate"] .flavour-desc { text-shadow: 0 1px 10px rgba(40,15,5,.45); }

/* ==========================================================
   LINE-UP
   ========================================================== */
.lineup { padding: clamp(72px, 10vw, 136px) var(--gutter); background: var(--cream); }
.section-head { display: grid; grid-template-columns: 1fr 1.3fr; column-gap: 48px; row-gap: 18px; align-items: end; margin-bottom: clamp(36px, 5vw, 64px); }
.section-head .eyebrow { grid-column: 1 / -1; color: var(--brown-2); }
.section-head h2, .story h2, .join h2 {
  font-family: var(--serif); font-weight: 600; font-variation-settings: "SOFT" 60, "opsz" 120;
  font-size: clamp(38px, 4.6vw, 68px); line-height: 1.02; letter-spacing: -.03em;
}
h2 em { font-style: italic; font-weight: 500; color: var(--gold); }
.section-sub { max-width: 46ch; color: #6d4630; }
.lineup .range-toggle { grid-column: 2; justify-self: start; --wall: #f6ecdc; --ink: var(--brown); background: #fff; }

.cards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(14px, 2vw, 28px); }
.card-hit { display: block; width: 100%; padding: 0; border: 0; background: none; text-align: left; border-radius: 18px; }
.card-art {
  position: relative; display: block; aspect-ratio: 4 / 4.4; border-radius: 18px; overflow: hidden;
  background: linear-gradient(180deg, var(--c1) 0 74%, var(--c2) 74% 100%);
  transition: --c1 .5s, --c2 .5s;
}
.card[data-card="vanilla"]   { --c1:#f5e4c3; --c2:#e3c08b; }
.card[data-card="chocolate"] { --c1:#3e251c; --c2:#c09074; }
.card[data-card="birthday"]  { --c1:#f6e6ee; --c2:#e6c9d7; }
.lineup[data-range="protein"] .card[data-card="vanilla"]   { --c1:#f8c96a; --c2:#e7a247; }
.lineup[data-range="protein"] .card[data-card="chocolate"] { --c1:#5c2c19; --c2:#cd8157; }
.lineup[data-range="protein"] .card[data-card="birthday"]  { --c1:#dcaad2; --c2:#cb91c0; }
.card-pouch { position: absolute; left: 50%; bottom: 13%; height: 72%; width: auto; transform: translateX(-50%); filter: drop-shadow(0 14px 12px rgba(40,15,0,.28)); transition: transform .5s var(--ease), opacity .3s; }
.card-bear { position: absolute; left: 12%; bottom: 5%; height: 25%; width: auto; transform: rotate(-12deg); filter: drop-shadow(4px 7px 5px rgba(40,15,0,.35)); transition: transform .5s var(--ease); }
.card-hit:hover .card-pouch { transform: translateX(-50%) translateY(-6px); }
.card-hit:hover .card-bear { transform: rotate(-4deg) translateY(-4px); }
.card-title { display: block; margin-top: 18px; font-family: var(--serif); font-weight: 600; font-size: clamp(22px, 2vw, 28px); letter-spacing: -.015em; font-variation-settings: "SOFT" 50; }
.card-range { display: block; font-family: var(--sans); font-size: 12px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--brown-2); margin-bottom: 2px; }
.card-desc { margin-top: 6px; font-size: 15px; color: #6d4630; }
.card-hit:focus-visible { outline-offset: 6px; }

/* ==========================================================
   STORY
   ========================================================== */
.story {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center;
  gap: clamp(32px, 6vw, 96px); padding: clamp(64px, 9vw, 120px) var(--gutter);
  background: var(--paper);
}
.story-figure { margin: 0; justify-self: end; width: 100%; max-width: 550px; }
.story-figure img { width: 100%; border-radius: 20px; aspect-ratio: 1; object-fit: cover; }
.story-figure figcaption { margin-top: 12px; font-size: 13px; color: #7a5640; }
.story-copy { max-width: 32rem; }
.story-copy .eyebrow { color: var(--brown-2); margin-bottom: 18px; }
.story-text { margin-top: 22px; font-size: clamp(18px, 1.5vw, 21px); line-height: 1.6; color: #5b3520; }

/* ==========================================================
   JOIN
   ========================================================== */
.join {
  text-align: center; padding: clamp(72px, 10vw, 128px) var(--gutter);
  background: radial-gradient(80% 70% at 50% 0%, #fff6e2 0%, transparent 70%), #f2dfb9;
}
.join-bear { width: 76px; margin: 0 auto 22px; filter: drop-shadow(0 6px 8px rgba(70,30,0,.2)); }
.join h2 { max-width: 16ch; margin: 0 auto; }
.join-sub { margin: 16px auto 0; color: #6d4630; max-width: 40ch; }
.join-form { max-width: 540px; margin: 34px auto 0; text-align: left; }
.field label { display: block; font-size: 14px; font-weight: 600; margin: 0 0 8px 20px; }
.field-row { display: flex; gap: 8px; padding: 6px; background: #fffaf1; border-radius: 999px; box-shadow: 0 0 0 1.5px rgba(74,29,10,.22) inset, 0 12px 28px -18px rgba(74,29,10,.5); transition: box-shadow .2s; }
.field-row:focus-within { box-shadow: 0 0 0 2px var(--brown) inset, 0 12px 28px -18px rgba(74,29,10,.5); }
.field-row input {
  flex: 1; min-width: 0; border: 0; background: transparent; padding: 0 16px; font: inherit; font-size: 17px; color: var(--brown);
  min-height: 52px; border-radius: 999px;
}
.field-row input:focus { outline: none; }
.field-row input::placeholder { color: #a88a74; }
.field-row .btn { flex: none; }
.join-form[data-state="invalid"] .field-row { box-shadow: 0 0 0 2px #b3261e inset; }
.field-error { margin: 10px 0 0 20px; color: #a1231b; font-size: 14px; font-weight: 600; }
.join-note { margin: 12px 0 0 20px; font-size: 13px; color: #7a5640; }
.join-status:not(:empty) { margin-top: 14px; padding: 12px 16px; border-radius: 14px; background: #fff3ef; color: #8f241c; font-size: 14px; display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; }
.join-status button { border: 0; background: var(--brown); color: var(--cream); border-radius: 999px; padding: 8px 14px; font-size: 14px; font-weight: 600; }
.btn[aria-busy="true"] { cursor: progress; opacity: .85; }
.btn[aria-busy="true"] .btn-text::before { content: ""; display: inline-block; width: 14px; height: 14px; margin-right: 10px; vertical-align: -2px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.join-success { max-width: 460px; margin: 34px auto 0; padding: 28px; border-radius: 22px; background: #fffaf1; box-shadow: 0 16px 36px -24px rgba(74,29,10,.55); }
.join-success:focus { outline: none; }
.success-mark { width: 44px; height: 44px; margin: 0 auto 12px; border-radius: 50%; display: grid; place-items: center; background: var(--brown); color: var(--cream); font-weight: 700; }
.join-success h3 { font-family: var(--serif); font-size: 28px; font-weight: 600; margin-bottom: 6px; }
.join-success p { color: #6d4630; overflow-wrap: anywhere; }

/* ==========================================================
   FOOTER
   ========================================================== */
.site-footer {
  display: grid; grid-template-columns: auto 1fr; gap: 24px 48px; align-items: center;
  padding: 48px var(--gutter) 36px; background: var(--cream); border-top: 1px solid var(--line);
}
.footer-brand { display: flex; align-items: center; gap: 18px; }
.footer-brand img { width: 120px; }
.footer-brand p { font-family: var(--serif); font-size: 18px; font-weight: 500; }
.footer-nav { display: flex; gap: 28px; justify-self: end; font-weight: 500; font-size: 15px; }
.footer-nav a { text-decoration: none; }
.footer-nav a:hover { text-decoration: underline; text-underline-offset: 4px; }
.footer-contact { font-size: 15px; }
.footer-contact a { font-weight: 600; text-underline-offset: 4px; }
.join-contact { margin-top: 28px; font-size: 14px; color: #6d4630; }
.join-contact a { color: var(--brown); font-weight: 600; text-underline-offset: 3px; }
.footer-fine { grid-column: 1 / -1; font-size: 13px; color: #7a5640; border-top: 1px solid var(--line); padding-top: 20px; }

/* ==========================================================
   RESPONSIVE
   ========================================================== */
@media (max-width: 1100px) {
  .hero { grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); }
}

/* Tablet + phone: art-directed stack. Headline, then product + controls, then copy + CTA. */
@media (max-width: 860px) {
  :root { --header-h: 58px; }
  .site-nav { display: none; }
  .site-header { justify-content: space-between; gap: 12px; }
  .brand { width: 112px; }

  .hero {
    display: flex; flex-direction: column; align-items: stretch;
    min-height: 0; padding-top: 18px; padding-bottom: 28px;
  }
  .hero-head { padding-bottom: 0; text-align: left; }
  .hero-head .eyebrow { font-size: 11px; margin-bottom: 10px; }
  .hero h1 { font-size: clamp(40px, 11vw, 64px); line-height: 1; }
  .stage { order: 2; margin-top: 12px; }
  .hero-body {
    order: 3; text-align: center; z-index: 7;
    margin: 20px calc(-1 * var(--gutter)) -28px; padding: 26px var(--gutter) 32px;
    /* front edge of the table: a lip of light, then the face falling into shade */
    background:
      linear-gradient(180deg, rgba(255,255,255,.28) 0, rgba(255,255,255,0) 2px),
      linear-gradient(180deg, color-mix(in srgb, var(--surface-2) 70%, black 8%) 0, var(--wall-2) 40px);
    transition: --surface-2 var(--mood-t), --wall-2 var(--mood-t);
  }
  .lede { margin: 0 auto 18px; font-size: 16px; max-width: 34ch; }
  .hero .btn { width: 100%; max-width: 360px; }
  .hero .range-toggle { position: relative; align-self: flex-end; margin-bottom: -6px; font-size: 13px; }
  .range-toggle button { padding: 7px 13px; min-height: 36px; }
  .art { flex: none; min-height: 0; height: min(96vw, 420px); }
  .cluster { --h: 100%; }
  .switcher { margin-top: 6px; }
  .arrow { width: 52px; height: 52px; }
  .flavour-name { font-size: 30px; }
  .flavour-desc { font-size: 14px; margin-top: 6px; min-height: 0; }
  .flavour-count { display: none; }

  .section-head { grid-template-columns: 1fr; }
  .lineup .range-toggle { grid-column: 1; }
  .cards { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 74%; overflow-x: auto; scroll-snap-type: x mandatory; margin: 0 calc(-1 * var(--gutter)); padding: 0 var(--gutter) 6px; scroll-padding: 0 var(--gutter); scrollbar-width: none; }
  .cards::-webkit-scrollbar { display: none; }
  .card { scroll-snap-align: start; }

  .story { grid-template-columns: 1fr; }
  .story-figure { justify-self: stretch; max-width: none; order: 2; }
  .story-copy { order: 1; }

  .site-footer { grid-template-columns: 1fr; }
  .footer-nav { justify-self: start; flex-wrap: wrap; gap: 14px 24px; }
}

@media (max-width: 480px) {
  body { font-size: 16px; }
  .field-row { flex-direction: column; border-radius: 22px; padding: 6px; }
  .field-row input { min-height: 50px; }
  .field-row .btn { width: 100%; }
  .footer-brand img { width: 96px; }
}

/* Short, wide screens: keep the whole hero in view */
@media (min-width: 861px) and (max-height: 760px) {
  .hero h1 { font-size: clamp(48px, 5.4vw, 84px); }
  .lede { margin-bottom: 20px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; }
  .pouch img, .cookie img, .sprinkles i { transform: none !important; transition: opacity .2s linear; }
  .hero { --mx: 0 !important; --my: 0 !important; }
  .bigword span { transition: opacity .2s linear; }
  .hero { --mood-t: .2s; }
  .card-pouch, .card-bear, .btn, .arrow { transition: none; }
}
