/* =====================================================================
   SugarPlumJelly Miami — styles
   ===================================================================== */

@font-face {
  font-family: "Gambarino";
  src: url("../assets/fonts/Gambarino-Regular.otf") format("opentype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Brand palette */
  --fantasy: #FCF5E8;      /* light beige */
  --fantasy-2: #F6EBD6;
  --lemongrass: #8AA183;   /* green */
  --grape: #6A3D5E;        /* purple */
  --moon-mist: #D5E3AE;    /* light green */
  --lilac: #8F76A9;        /* light purple */
  --lilac-soft: #E9E1F0;
  --baltic: #3C1C32;       /* dark purple */

  /* Semantic tokens */
  --bg: var(--fantasy);
  --surface: #FFFBF3;
  --ink: var(--baltic);
  --ink-soft: #5B3F52;
  --accent: var(--grape);
  --on-accent: var(--fantasy);   /* text on accent / dark fills */
  --deep: var(--baltic);         /* darkest fill: footer, toast */
  --chip-bg: var(--moon-mist);   /* little labels and badges */
  --field-bg: #fff;
  --field-line: rgba(60, 28, 50, .22);
  --paper: #fffdf6;
  --accent-ink: var(--on-accent);
  --line: rgba(60, 28, 50, .14);
  --focus: var(--lilac);

  --font-display: "Gambarino", "Cormorant Garamond", Georgia, serif;
  --font-accent: "Cormorant Garamond", Georgia, serif;
  --font-body: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;

  --radius: 22px;
  --radius-sm: 14px;
  --arch: 999px 999px 22px 22px;
  --shadow-sm: 0 2px 6px rgba(60, 28, 50, .06), 0 8px 18px rgba(60, 28, 50, .06);
  --shadow-md: 0 6px 14px rgba(60, 28, 50, .08), 0 22px 44px rgba(60, 28, 50, .12);
  --shadow-glow: 0 0 0 1px rgba(143, 118, 169, .25), 0 18px 50px rgba(106, 61, 94, .25);

  --ease-out: cubic-bezier(.22, 1, .36, 1);
  --ease-spring: cubic-bezier(.25, 1, .5, 1);   /* calm settle, no overshoot (everyday motion) */
  --ease-bounce: cubic-bezier(.34, 1.56, .64, 1); /* overshoot: only when something was thrown */
  --t-fast: 160ms;
  --t-med: 320ms;
  --t-slow: 700ms;

  --header-h: 72px;
  --gutter: clamp(16px, 4vw, 40px);

  --z-header: 40;
  --z-fab: 50;
  --z-toast: 60;

  color-scheme: light;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
img { max-width: 100%; display: block; }
svg { width: 1em; height: 1em; fill: currentColor; flex-shrink: 0; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 400; line-height: 1.05; margin: 0; text-wrap: balance; letter-spacing: .005em; }
h2 { font-size: clamp(2.2rem, 5.4vw, 3.9rem); }
h2 em, h1 em { font-family: var(--font-accent); font-style: italic; font-weight: 600; color: var(--grape); letter-spacing: 0; }
p { margin: 0; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 8px; }

.container { width: min(1200px, 100%); margin-inline: auto; padding-inline: var(--gutter); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--accent); color: var(--on-accent); padding: 10px 16px; border-radius: 12px; text-decoration: none; transition: top var(--t-fast); }
.skip-link:focus { top: 12px; }

.eyebrow {
  font-family: var(--font-body);
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--grape);
  display: inline-flex;
  align-items: center;
  gap: .6em;
}
.eyebrow::before, .eyebrow::after {
  content: "";
  width: 10px; height: 10px;
  background: var(--lemongrass);
  clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%);
}

/* ---------- Buttons ---------- */
.btn {
  --b-bg: var(--accent); --b-ink: var(--accent-ink);
  display: inline-flex; align-items: center; justify-content: center; gap: .55em;
  min-height: 48px; padding: .8em 1.5em;
  border-radius: 999px; border: 2px solid transparent;
  background: var(--b-bg); color: var(--b-ink);
  font-weight: 600; font-size: 1rem; text-decoration: none; cursor: pointer;
  transition: transform var(--t-fast) var(--ease-out), box-shadow var(--t-med) var(--ease-out), background-color var(--t-med);
  touch-action: manipulation;
  position: relative; isolation: isolate;
}
.btn svg { font-size: 1.15em; }
.btn-primary { box-shadow: 0 6px 20px rgba(106, 61, 94, .28); }
.btn-primary:hover { background: var(--deep); box-shadow: 0 10px 28px rgba(60, 28, 50, .35); transform: translateY(-2px); }
.btn-primary:hover svg use[href="#i-arrow"] { transform: translateX(3px); }
.btn:active { transform: scale(.97); }
.btn-ghost { --b-bg: transparent; --b-ink: var(--grape); border-color: currentColor; }
.btn-ghost:hover { --b-bg: var(--lilac-soft); transform: translateY(-2px); }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .45; cursor: not-allowed; transform: none; box-shadow: none; }
.link-btn { background: none; border: 0; color: var(--grape); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; padding: 10px; margin-top: 4px; }

.icon-btn {
  position: relative;
  display: inline-grid; place-items: center;
  width: 48px; height: 48px; border-radius: 50%;
  border: 0; background: transparent; color: var(--baltic); cursor: pointer;
  transition: background-color var(--t-fast), transform var(--t-fast);
}
.icon-btn svg { font-size: 1.5rem; }
.icon-btn:hover { background: var(--lilac-soft); }
.icon-btn:active { transform: scale(.94); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: var(--z-header);
  height: var(--header-h);
  transition: background-color var(--t-med), box-shadow var(--t-med), backdrop-filter var(--t-med);
}
.site-header.is-scrolled {
  background: rgba(252, 245, 232, .86);
  backdrop-filter: blur(12px) saturate(1.2);
  -webkit-backdrop-filter: blur(12px) saturate(1.2);
  box-shadow: 0 10px 30px rgba(60, 28, 50, .06);
}
.header-inner { height: 100%; display: flex; align-items: center; gap: 24px; }
.brand { display: block; margin-right: auto; border-radius: 8px; }
.brand img { height: 46px; width: auto; transition: transform var(--t-med) var(--ease-spring); }
.brand:hover img { transform: rotate(-2deg) scale(1.03); }
.primary-nav ul { list-style: none; display: flex; gap: 4px; margin: 0; padding: 0; }
.primary-nav a {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px;
  text-decoration: none; font-weight: 500; border-radius: 999px; position: relative;
  transition: color var(--t-fast), background-color var(--t-fast);
}
.primary-nav a::after {
  content: ""; position: absolute; left: 50%; bottom: 6px; width: 6px; height: 6px;
  background: var(--lilac); clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%);
  transform: translateX(-50%) scale(0); transition: transform var(--t-med) var(--ease-spring);
}
.primary-nav a:hover { color: var(--grape); }
.primary-nav a:hover::after, .primary-nav a[aria-current="true"]::after { transform: translateX(-50%) scale(1.6); }
.primary-nav a[aria-current="true"] { color: var(--grape); }
.header-actions { display: flex; align-items: center; gap: 4px; }
.cart-count {
  position: absolute; top: 4px; right: 2px;
  min-width: 20px; height: 20px; padding: 0 5px; border-radius: 999px;
  display: grid; place-items: center;
  background: var(--accent); color: var(--on-accent); font-size: .72rem; font-weight: 700;
  transform: scale(0); transition: transform var(--t-med) var(--ease-bounce);
}
.cart-count.has-items { transform: scale(1); }
.cart-toggle.bump { animation: bump 500ms var(--ease-bounce); }
@keyframes bump { 0% { transform: scale(1); } 30% { transform: scale(1.25) rotate(-8deg); } 60% { transform: scale(.95) rotate(4deg); } 100% { transform: scale(1); } }
.nav-toggle { display: none; }

@media (max-width: 900px) {
  .nav-toggle { display: inline-grid; }
  .primary-nav {
    position: absolute; top: calc(var(--header-h) - 6px); left: var(--gutter); right: var(--gutter);
    background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow-md);
    padding: 10px; opacity: 0; visibility: hidden; transform: translateY(-8px) scale(.98); transform-origin: top right;
    transition: opacity var(--t-fast), transform var(--t-med) var(--ease-out), visibility 0s linear var(--t-med);
  }
  .primary-nav.is-open { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
  .primary-nav ul { flex-direction: column; }
  .primary-nav a { width: 100%; min-height: 48px; font-size: 1.1rem; }
  .primary-nav a::after { left: auto; right: 18px; bottom: 50%; transform: translateY(50%) scale(0); }
  .primary-nav a:hover::after { transform: translateY(50%) scale(1.6); }
  .brand img { height: 38px; }
}

/* ---------- Hero: cookie burst ---------- */
.hero {
  --px: 0; --py: 0;                     /* pointer parallax, -0.5..0.5 (set by JS) */
  position: relative;
  margin-top: calc(var(--header-h) * -1);
  padding-top: calc(var(--header-h) + clamp(18px, 4vw, 40px));
  padding-bottom: clamp(70px, 9vw, 120px);
  min-height: min(100svh, 980px);
  display: flex; flex-direction: column; justify-content: center;
  color: var(--on-accent);
  background:
    radial-gradient(42% 46% at 50% 46%, rgba(213, 227, 174, .28), transparent 70%),
    radial-gradient(70% 70% at 50% 42%, #A48DC0 0%, var(--lilac) 32%, var(--grape) 72%, var(--baltic) 100%);
  overflow: hidden;
  isolation: isolate;
}
.hero-stage { position: relative; z-index: 2; display: grid; justify-items: center; text-align: center; }
.hero-eyebrow { color: var(--moon-mist); }
.hero-eyebrow::before, .hero-eyebrow::after { background: var(--chip-bg); }

.burst-wrap { position: relative; width: 100%; max-width: 1180px; margin: clamp(6px, 2vw, 18px) auto 0; }
.burst-title {
  position: relative; z-index: 1;
  display: grid; justify-items: center;
  font-size: clamp(3.6rem, 13.5vw, 11.5rem);
  line-height: .86; letter-spacing: -.01em;
  color: var(--on-accent);
  text-shadow: 0 6px 0 rgba(60, 28, 50, .18), 0 24px 60px rgba(60, 28, 50, .35);
}
.burst-title .bt { display: block; }
.burst-title .bt-1 { justify-self: start; margin-left: 4%; }
.burst-title .bt-2 { font-size: 1.04em; }
.burst-title .bt-2 em { color: var(--moon-mist); font-weight: 600; }
.burst-title .bt-3 { justify-self: end; margin-right: 6%; }

/* cookie layer: .ck (position) > .ck-enter (entrance) > .ck-move (parallax/scroll) > .ck-float (idle) > img */
.cookie-burst { position: absolute; inset: 0; z-index: 2; pointer-events: none; }
.ck { position: absolute; width: var(--w); left: var(--x); top: var(--y); transform: translate(-50%, -50%); }
.ck-move {
  transform: translate3d(calc(var(--px) * var(--depth) * 1px), calc(var(--py) * var(--depth) * 1px + var(--sy, 0px)), 0) rotate(var(--sr, 0deg));
  transition: transform 700ms var(--ease-out);
  will-change: transform;
}
.ck-float { animation: ck-float var(--dur, 6s) ease-in-out var(--delay, 0s) infinite; will-change: transform; }
.ck-shadow { position: absolute; left: 12%; right: 12%; bottom: -10%; height: 16%; border-radius: 50%; background: radial-gradient(closest-side, rgba(30, 10, 25, .38), transparent); filter: blur(2px); }
.ck img { position: relative; width: 100%; height: auto; display: block; transform: rotate(var(--r, 0deg)); }
@keyframes ck-float { 0%, 100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-14px) rotate(4deg); } }
.crumb {
  position: absolute; left: var(--x); top: var(--y); width: var(--s); height: calc(var(--s) * .8);
  background: var(--c); border-radius: 46% 54% 40% 60% / 55% 45% 55% 45%;
  box-shadow: inset -2px -2px 0 rgba(0, 0, 0, .15);
  animation: crumb var(--dur) ease-in-out var(--delay) infinite;
}
@keyframes crumb { 0%, 100% { transform: translate(-50%, -50%) rotate(0); } 50% { transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) rotate(160deg); } }

.pill {
  position: absolute; left: var(--x); top: var(--y); z-index: 3;
  font-family: var(--font-body); font-weight: 800; font-size: clamp(.7rem, 1.3vw, 1rem); letter-spacing: .08em; text-transform: uppercase;
  padding: .55em 1.1em; border-radius: 999px; white-space: nowrap;
  background: var(--bg-c); color: var(--fg-c);
  box-shadow: 0 8px 20px rgba(30, 10, 25, .25);
  transform: translate(calc(-50% + var(--px) * 26px), calc(-50% + var(--py) * 26px)) rotate(var(--r));
  transition: transform 700ms var(--ease-out), opacity 500ms;
}
.pill-in { display: inline-block; animation: pill-bob 4.5s ease-in-out var(--delay, 0s) infinite; }
@keyframes pill-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }

.order-badge {
  position: absolute; z-index: 4; right: 2%; top: 2%;
  width: clamp(92px, 11vw, 132px); aspect-ratio: 1; border-radius: 50%;
  display: grid; place-items: center; text-decoration: none;
  background: var(--chip-bg); color: var(--baltic);
  box-shadow: 0 12px 30px rgba(30, 10, 25, .3);
  transition: transform var(--t-med) var(--ease-spring), opacity 600ms;
}
.order-badge:hover { transform: scale(1.08) rotate(-6deg); }
.ob-ring { position: absolute; inset: 0; width: 100%; height: 100%; animation: spin 16s linear infinite; fill: var(--baltic); }
.ob-ring text { font-family: var(--font-body); font-weight: 800; font-size: 12.4px; letter-spacing: 2.2px; }
.ob-core { width: 44%; aspect-ratio: 1; border-radius: 50%; background: var(--accent); color: var(--on-accent); display: grid; place-items: center; font-size: 1.4rem; transform: rotate(-45deg); }

.hero-foot { position: relative; z-index: 3; margin-top: clamp(22px, 3vw, 36px); display: grid; justify-items: center; gap: 22px; }
.hero-lede { font-size: clamp(1.05rem, 1.5vw, 1.2rem); max-width: 46ch; color: rgba(252, 245, 232, .94); }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.btn-cream { --b-bg: var(--fantasy); --b-ink: var(--grape); box-shadow: 0 10px 26px rgba(30, 10, 25, .3); }
.btn-cream:hover { --b-bg: var(--chip-bg); --b-ink: var(--baltic); transform: translateY(-2px); }
.btn-ghost-cream { --b-bg: transparent; --b-ink: var(--on-accent); border-color: rgba(252, 245, 232, .7); }
.btn-ghost-cream:hover { --b-bg: rgba(252, 245, 232, .14); transform: translateY(-2px); }

.hero-sky { position: absolute; inset: 0; pointer-events: none; z-index: 0; }
.sparkle { position: absolute; color: var(--moon-mist); animation: twinkle 3.6s ease-in-out infinite; }
.s1 { width: 18px; height: 18px; left: 7%; top: 24%; }
.s2 { width: 12px; height: 12px; left: 44%; top: 13%; color: var(--on-accent); animation-delay: -1s; }
.s3 { width: 22px; height: 22px; left: 88%; top: 62%; animation-delay: -2.2s; }
.s4 { width: 14px; height: 14px; right: 9%; top: 20%; color: var(--on-accent); animation-delay: -.6s; }
.s5 { width: 10px; height: 10px; left: 18%; bottom: 22%; animation-delay: -1.7s; }
.s6 { width: 16px; height: 16px; left: 62%; top: 9%; color: #F3D58A; animation-delay: -3s; }
.moon { position: absolute; color: rgba(252, 245, 232, .12); }
.m1 { width: 140px; height: 140px; left: -36px; top: 30%; transform: rotate(-20deg); }
.m2 { width: 90px; height: 90px; right: 3%; bottom: 16%; transform: rotate(150deg); }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes twinkle { 0%, 100% { transform: scale(.4) rotate(0); opacity: .25; } 50% { transform: scale(1) rotate(45deg); opacity: 1; } }
@keyframes float { 0%, 100% { transform: translateY(0) rotate(var(--r, -6deg)); } 50% { transform: translateY(-14px) rotate(calc(var(--r, -6deg) * -1)); } }

/* scalloped edge into the next section */
.scallop {
  position: absolute; left: 0; right: 0; bottom: -1px; height: 44px; z-index: 3;
  background: var(--surface);
  -webkit-mask: radial-gradient(circle at 36px 0, transparent 35px, #000 36px) 0 0 / 72px 44px repeat-x;
  mask: radial-gradient(circle at 36px 0, transparent 35px, #000 36px) 0 0 / 72px 44px repeat-x;
}

/* Entrance (is-loaded added by JS once fonts are ready) */
.js .burst-title .bt { opacity: 0; transform: translateY(40%) scale(.9); }
.js .hero-eyebrow, .js .hero-foot { opacity: 0; transform: translateY(18px); }
.js .order-badge, .js .pill { opacity: 0; }
.js.is-loaded .burst-title .bt { opacity: 1; transform: none; transition: opacity 700ms var(--ease-out), transform 900ms var(--ease-spring); }
.js.is-loaded .burst-title .bt-2 { transition-delay: 120ms; }
.js.is-loaded .burst-title .bt-3 { transition-delay: 240ms; }
.js.is-loaded .hero-eyebrow { opacity: 1; transform: none; transition: opacity 700ms var(--ease-out), transform 700ms var(--ease-out); }
.js.is-loaded .hero-foot { opacity: 1; transform: none; transition: opacity 800ms var(--ease-out) 900ms, transform 800ms var(--ease-out) 900ms; }
.js.is-loaded .order-badge { opacity: 1; transition-delay: 1100ms; }
.js.is-loaded .pill { opacity: 1; transition-delay: var(--pd, 1000ms); }

@media (max-width: 760px) {
  .hero { min-height: auto; }
  .burst-title { font-size: clamp(3.3rem, 17vw, 5.4rem); line-height: .92; }
  .burst-title .bt-1 { margin-left: 0; }
  .burst-title .bt-3 { margin-right: 0; }
  .burst-wrap { padding-block: 8px 210px; }
  .order-badge { display: none; }
  .m1 { width: 90px; height: 90px; }
  .scallop { height: 30px; -webkit-mask: radial-gradient(circle at 24px 0, transparent 23px, #000 24px) 0 0 / 48px 30px repeat-x; mask: radial-gradient(circle at 24px 0, transparent 23px, #000 24px) 0 0 / 48px 30px repeat-x; }
}

/* ---------- Marquee ---------- */
.marquee { background: var(--surface); padding: 6px 0 28px; overflow: hidden; }
.marquee-track {
  display: flex; align-items: center; gap: 28px; width: max-content;
  font-family: var(--font-display); font-size: clamp(1.4rem, 3vw, 2.2rem); color: var(--lilac);
  animation: marquee 38s linear infinite;
}
.marquee-track svg { width: .6em; height: .6em; color: var(--lemongrass); }
.marquee:hover .marquee-track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- Sections ---------- */
.section { position: relative; padding-block: clamp(72px, 10vw, 128px); }
.section-head { text-align: center; max-width: 720px; margin: 0 auto clamp(36px, 5vw, 56px); display: grid; gap: 14px; justify-items: center; }
.section-head.left { text-align: left; justify-items: start; margin-inline: 0; }
.section-lede { color: var(--ink-soft); font-size: 1.1rem; max-width: 56ch; }

/* Scroll reveal */
.js .reveal { opacity: 0; transform: translateY(26px); transition: opacity 800ms var(--ease-out), transform 800ms var(--ease-out); transition-delay: var(--d, 0ms); }
.js .reveal.is-in { opacity: 1; transform: none; }

/* ---------- Menu ---------- */
.menu { background: var(--surface); padding-top: clamp(40px, 6vw, 72px); }
.filters { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-bottom: 36px; }
.filters:empty { display: none; }
.chip-btn {
  min-height: 44px; padding: 0 18px; border-radius: 999px;
  border: 1.5px solid var(--line); background: var(--fantasy); cursor: pointer; font-weight: 600; color: var(--ink-soft);
  transition: all var(--t-fast);
}
.chip-btn:hover { border-color: var(--lilac); color: var(--grape); }
.chip-btn[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }

.product-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: clamp(20px, 3vw, 34px); }
.card {
  --rx: 0deg; --ry: 0deg;
  position: relative;
  background: var(--fantasy);
  border-radius: var(--radius);
  padding: 14px 14px 20px;
  box-shadow: var(--shadow-sm);
  transform: perspective(900px) rotateX(var(--rx)) rotateY(var(--ry));
  transition: transform var(--t-med) var(--ease-out), box-shadow var(--t-med) var(--ease-out);
  display: flex; flex-direction: column;
}
.card:hover, .card:focus-within { box-shadow: var(--shadow-glow); }
.card-media {
  position: relative; display: block; width: 100%;
  aspect-ratio: 1; border-radius: 999px 999px var(--radius-sm) var(--radius-sm);
  overflow: hidden; background: var(--lilac-soft); border: 0; padding: 0; cursor: pointer;
  isolation: isolate;
}
.card-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: opacity 600ms var(--ease-out), transform 900ms var(--ease-out), filter var(--t-med); }
.card-media .img-alt { opacity: 0; transform: scale(1.08); }
.card:hover .img-main, .card.show-alt .img-main { transform: scale(1.06); }
.card:hover .card-media.has-alt .img-main, .card.show-alt .card-media.has-alt .img-main { opacity: 0; }
.card:hover .img-alt, .card.show-alt .img-alt { opacity: 1; transform: scale(1); }
.card-media::after { /* shimmer sweep */
  content: ""; position: absolute; inset: 0; z-index: 2;
  background: linear-gradient(115deg, transparent 35%, rgba(255,255,255,.45) 50%, transparent 65%);
  transform: translateX(-120%); transition: transform 0s;
}
.card:hover .card-media::after { transform: translateX(120%); transition: transform 900ms var(--ease-out); }
.card-sparks { position: absolute; inset: 0; pointer-events: none; z-index: 3; }
.card-sparks svg { position: absolute; width: 14px; height: 14px; color: var(--lilac); opacity: 0; transform: scale(0); }
.card-sparks svg:nth-child(1) { left: 8%; top: 10%; }
.card-sparks svg:nth-child(2) { right: 6%; top: 26%; color: var(--lemongrass); width: 18px; height: 18px; }
.card-sparks svg:nth-child(3) { left: 14%; top: 58%; width: 10px; height: 10px; color: var(--grape); }
.card:hover .card-sparks svg { animation: pop 900ms var(--ease-out) forwards; }
.card:hover .card-sparks svg:nth-child(2) { animation-delay: 120ms; }
.card:hover .card-sparks svg:nth-child(3) { animation-delay: 240ms; }
@keyframes pop { 0% { opacity: 0; transform: scale(0) rotate(0); } 40% { opacity: 1; transform: scale(1.2) rotate(45deg); } 100% { opacity: 0; transform: scale(.6) rotate(90deg) translateY(-10px); } }

.price-tag {
  position: absolute; top: 22px; right: 22px; z-index: 4;
  background: var(--surface); color: var(--grape); font-family: var(--font-display); font-size: 1.35rem;
  min-width: 58px; height: 58px; display: grid; place-items: center; border-radius: 50%;
  box-shadow: var(--shadow-sm);
  transition: transform var(--t-med) var(--ease-spring);
}
.card:hover .price-tag { transform: rotate(-12deg) scale(1.08); }
.tag-row { display: flex; flex-wrap: wrap; gap: 6px; position: absolute; left: 22px; top: 22px; z-index: 4; }
.tag { background: var(--chip-bg); color: var(--baltic); font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; padding: 4px 10px; border-radius: 999px; }

.card-body { padding: 16px 6px 0; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.card-title { font-size: 1.55rem; line-height: 1.1; }
.card-desc { color: var(--ink-soft); font-size: .98rem; flex: 1; }
.card-actions { margin-top: 14px; min-height: 48px; display: flex; align-items: center; }
.add-btn { width: 100%; }
.stepper { display: flex; align-items: center; justify-content: space-between; width: 100%; background: var(--lilac-soft); border-radius: 999px; padding: 4px; }
.stepper .icon-btn { width: 44px; height: 44px; background: var(--surface); box-shadow: var(--shadow-sm); }
.stepper .icon-btn svg { font-size: 1.15rem; }
.stepper output { font-weight: 700; font-size: 1.05rem; min-width: 7ch; text-align: center; }

.card.is-soldout .card-media img { filter: grayscale(.55) brightness(1.05); }
.ribbon {
  position: absolute; z-index: 5; left: 50%; bottom: 16px; transform: translateX(-50%) rotate(-3deg);
  background: var(--deep); color: var(--on-accent); font-family: var(--font-display); font-size: 1.1rem; white-space: nowrap;
  padding: 6px 18px; border-radius: 6px; box-shadow: var(--shadow-sm);
}
.menu-note { margin-top: 36px; display: flex; justify-content: center; align-items: center; gap: 8px; color: var(--ink-soft); text-align: center; }
.menu-note svg { color: var(--lilac); font-size: 1.2rem; }
.empty-state { grid-column: 1 / -1; text-align: center; color: var(--ink-soft); padding: 40px 0; }

/* Flying cookie into cart */
.fly { position: fixed; z-index: 70; width: 64px; height: 64px; border-radius: 50%; object-fit: cover; pointer-events: none; box-shadow: var(--shadow-md); }

/* ---------- Cakes ---------- */
.cakes { background: linear-gradient(180deg, var(--surface), var(--lilac-soft) 40%, var(--lilac-soft) 70%, var(--fantasy)); overflow: hidden; }
.cakes-bg { position: absolute; inset: 0; background: url("../assets/img/brand/pattern-light.webp") center / 540px auto repeat; opacity: .35; -webkit-mask: linear-gradient(180deg, transparent, #000 25%, #000 75%, transparent); mask: linear-gradient(180deg, transparent, #000 25%, #000 75%, transparent); pointer-events: none; }
.cakes .container { position: relative; }
.cake-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(6, 1fr); gap: clamp(18px, 2.4vw, 28px); }
.cake-card { grid-column: span 2; position: relative; background: var(--surface); border-radius: var(--radius); padding: 30px 26px 26px; box-shadow: var(--shadow-sm); border: 1.5px solid rgba(143, 118, 169, .25); transition: transform var(--t-med) var(--ease-out), box-shadow var(--t-med); }
.cake-card:nth-child(4) { grid-column: 2 / span 2; }
.cake-card:nth-child(5) { grid-column: 4 / span 2; }
.cake-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-glow); }
.cake-card .cake-icon { position: absolute; top: -26px; right: 18px; width: 70px; height: auto; transition: transform var(--t-med) var(--ease-spring); }
.cake-card:hover .cake-icon { transform: rotate(-12deg) scale(1.12) translateY(-4px); }
.cake-card h3 { font-size: 1.75rem; padding-right: 60px; }
.cake-from { margin: 10px 0 18px; display: flex; align-items: baseline; gap: 8px; color: var(--ink-soft); }
.cake-from strong { font-family: var(--font-display); font-weight: 400; font-size: 2.6rem; color: var(--grape); line-height: 1; }
.size-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.size-list li { display: flex; align-items: baseline; gap: 10px; font-size: .98rem; }
.size-list .dots { flex: 1; border-bottom: 2px dotted rgba(143, 118, 169, .5); transform: translateY(-4px); min-width: 12px; }
.size-list .serves { color: var(--ink-soft); white-space: nowrap; font-size: .92rem; }
.cake-note { margin-top: 14px; font-size: .92rem; background: var(--chip-bg); padding: 8px 12px; border-radius: 10px; display: inline-block; }
.cake-card.is-featured { background: var(--accent); color: var(--on-accent); border-color: transparent; }
.cake-card.is-featured h3, .cake-card.is-featured .cake-from strong { color: var(--on-accent); }
.cake-card.is-featured .cake-from, .cake-card.is-featured .serves { color: rgba(252, 245, 232, .78); }
.cake-card.is-featured .dots { border-color: rgba(213, 227, 174, .55); }
.cake-card.is-featured::before { content: "Showstopper"; position: absolute; top: -13px; left: 22px; background: var(--chip-bg); color: var(--baltic); font-size: .72rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; padding: 5px 12px; border-radius: 999px; }
.cake-card.is-heart h3::after { content: ""; display: inline-block; width: .6em; height: .6em; margin-left: .3em; background: var(--lilac); -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 21s-7.5-4.6-9.6-9.4C.9 8.2 3 4.5 6.6 4.5c2.1 0 3.6 1.2 5.4 3.2 1.8-2 3.3-3.2 5.4-3.2 3.6 0 5.7 3.7 4.2 7.1C19.5 16.4 12 21 12 21Z'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 21s-7.5-4.6-9.6-9.4C.9 8.2 3 4.5 6.6 4.5c2.1 0 3.6 1.2 5.4 3.2 1.8-2 3.3-3.2 5.4-3.2 3.6 0 5.7 3.7 4.2 7.1C19.5 16.4 12 21 12 21Z'/%3E%3C/svg%3E") center / contain no-repeat; animation: heartbeat 2.4s ease-in-out infinite; }
.cake-cta { margin-top: clamp(40px, 5vw, 56px); display: grid; justify-items: center; gap: 14px; text-align: center; color: var(--ink-soft); }

@media (max-width: 1000px) {
  .cake-grid { grid-template-columns: repeat(2, 1fr); row-gap: 40px; }
  .cake-card, .cake-card:nth-child(4), .cake-card:nth-child(5) { grid-column: auto; }
  .cake-card:last-child:nth-child(odd) { grid-column: 1 / -1; max-width: calc(50% - 14px); justify-self: center; width: 100%; }
}
@media (max-width: 640px) {
  .cake-grid { grid-template-columns: 1fr; }
  .cake-card:last-child:nth-child(odd) { max-width: none; }
}

/* ---------- Sweet Spot cart ---------- */
.sweet-spot { background: var(--fantasy); }
.spot-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 80px); align-items: center; }
.spot-photos { position: relative; aspect-ratio: 1 / 1.05; max-width: 520px; width: 100%; justify-self: center; }
.spot-photos figure { margin: 0; position: absolute; border-radius: var(--arch); overflow: hidden; box-shadow: 0 0 0 8px var(--surface), var(--shadow-md); background: var(--lilac-soft); transition: transform var(--t-slow) var(--ease-out); }
.spot-photos figure img { width: 100%; height: 100%; object-fit: cover; }
.spot-photos figure:nth-child(1) { width: 62%; height: 82%; left: 0; top: 0; transform: rotate(-4deg); }
.spot-photos figure:nth-child(2) { width: 52%; height: 66%; right: 0; bottom: 0; transform: rotate(5deg); }
.spot-photos:hover figure:nth-child(1) { transform: rotate(-6deg) translate(-6px, -6px); }
.spot-photos:hover figure:nth-child(2) { transform: rotate(7deg) translate(6px, 6px); }
.spot-photos .spot-sticker { position: absolute; left: 44%; top: 70%; width: 90px; z-index: 3; animation: float 7s ease-in-out infinite; }
.events-title { font-size: 1.6rem; margin: 6px 0 16px; }
.events { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.event {
  display: grid; grid-template-columns: 78px 1fr; gap: 18px; align-items: center;
  background: var(--surface); border-radius: var(--radius); padding: 14px; box-shadow: var(--shadow-sm);
  border: 1.5px solid transparent; transition: transform var(--t-med) var(--ease-out), border-color var(--t-med);
}
.event:hover { transform: translateX(6px); border-color: rgba(143, 118, 169, .4); }
.event-date { display: grid; place-items: center; text-align: center; background: var(--lilac-soft); border-radius: 16px; padding: 10px 4px; line-height: 1.05; }
.event-date .m { font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; font-weight: 700; color: var(--grape); }
.event-date .d { font-family: var(--font-display); font-size: 2rem; color: var(--baltic); }
.event-date .w { font-size: .75rem; color: var(--ink-soft); }
.event h4 { font-family: var(--font-display); font-weight: 400; font-size: 1.35rem; margin: 0 0 4px; }
.event-meta { display: flex; flex-wrap: wrap; gap: 4px 14px; color: var(--ink-soft); font-size: .93rem; }
.event-meta span, .event-meta a { display: inline-flex; align-items: center; gap: 5px; }
.event-meta svg { color: var(--lilac); }
.event-meta a { color: var(--grape); font-weight: 600; text-underline-offset: 3px; min-height: 32px; }
.event-note { font-size: .9rem; color: var(--ink-soft); margin-top: 2px; font-style: italic; font-family: var(--font-accent); font-size: 1.05rem; }
.event.is-next { background: var(--accent); color: var(--on-accent); box-shadow: var(--shadow-glow); }
.event.is-next .event-date { background: var(--chip-bg); }
.event.is-next .event-meta, .event.is-next .event-note { color: rgba(252, 245, 232, .82); }
.event.is-next .event-meta svg { color: var(--moon-mist); }
.event.is-next .event-meta a { color: var(--moon-mist); }
.next-pill { display: inline-block; font-family: var(--font-body); font-size: .68rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; background: var(--chip-bg); color: var(--baltic); padding: 3px 9px; border-radius: 999px; margin-left: 8px; vertical-align: middle; position: relative; }
.next-pill::before { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: 0 0 0 0 rgba(213, 227, 174, .8); animation: ping 2s ease-out infinite; }
@keyframes ping { 0% { box-shadow: 0 0 0 0 rgba(213, 227, 174, .7); } 100% { box-shadow: 0 0 0 10px rgba(213, 227, 174, 0); } }
.events-empty { background: var(--surface); border-radius: var(--radius); padding: 22px; color: var(--ink-soft); }
.events-empty a { color: var(--grape); font-weight: 600; }
@media (max-width: 860px) { .spot-grid { grid-template-columns: 1fr; } .spot-photos { max-width: 420px; } }

/* ---------- About ---------- */
.about { background: var(--surface); }
.about-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(32px, 6vw, 88px); align-items: center; }
.about-portrait { position: relative; max-width: 440px; width: 100%; justify-self: center; }
.portrait-frame { aspect-ratio: 4 / 5; border-radius: var(--arch); overflow: hidden; background: url("../assets/img/brand/pattern-dark.webp") center / 360px auto; box-shadow: 0 0 0 10px var(--fantasy), 0 0 0 12px rgba(143, 118, 169, .35), var(--shadow-md); display: grid; place-items: center; }
.portrait-frame img.photo { width: 100%; height: 100%; object-fit: cover; }
.portrait-frame img.badge { width: 62%; background: var(--fantasy); border-radius: 50%; padding: 6%; box-shadow: var(--shadow-md); animation: spin 40s linear infinite; }
.years-badge { position: absolute; right: -6%; bottom: 8%; width: 132px; height: 132px; display: grid; place-content: center; text-align: center; color: var(--baltic); }
.years-badge::before { content: ""; position: absolute; inset: 0; background: var(--chip-bg); -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cpath d='M50 2c6 0 9 6 14 8s11 0 15 4 2 10 4 15 8 8 8 14-6 9-8 14 0 11-4 15-10 2-15 4-8 8-14 8-9-6-14-8-11 0-15-4-2-10-4-15-8-8-8-14 6-9 8-14 0-11 4-15 10-2 15-4 8-8 14-8Z'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cpath d='M50 2c6 0 9 6 14 8s11 0 15 4 2 10 4 15 8 8 8 14-6 9-8 14 0 11-4 15-10 2-15 4-8 8-14 8-9-6-14-8-11 0-15-4-2-10-4-15-8-8-8-14 6-9 8-14 0-11 4-15 10-2 15-4 8-8 14-8Z'/%3E%3C/svg%3E") center / contain no-repeat; animation: spin 24s linear infinite; z-index: -1; }
.years-badge { isolation: isolate; }
.years-badge strong { font-family: var(--font-display); font-weight: 400; font-size: 2.8rem; line-height: .9; }
.years-badge span { font-size: .78rem; font-weight: 600; line-height: 1.2; }
.about-text { display: grid; gap: 16px; font-size: 1.1rem; color: var(--ink-soft); max-width: 58ch; }
.about-text p:last-child { font-family: var(--font-accent); font-style: italic; font-size: 1.4rem; color: var(--grape); line-height: 1.35; }
.chips { list-style: none; padding: 0; margin: 26px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chips li { background: var(--fantasy); border: 1.5px solid rgba(143, 118, 169, .35); padding: 7px 14px; border-radius: 999px; font-size: .92rem; font-weight: 500; }
@media (max-width: 860px) { .about-grid { grid-template-columns: 1fr; } .years-badge { right: 0; } }

/* ---------- Kind words ---------- */
.kind-words { background: radial-gradient(60% 60% at 50% 0%, rgba(213, 227, 174, .45), transparent 70%), var(--fantasy); }
.quotes { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(18px, 2.5vw, 28px); }
.quote {
  position: relative; background: var(--surface); border-radius: var(--radius); padding: 44px 28px 26px; box-shadow: var(--shadow-sm);
  transition: transform var(--t-med) var(--ease-out), box-shadow var(--t-med);
}
.quote:nth-child(3n+1) { transform: rotate(-1.2deg); }
.quote:nth-child(3n+3) { transform: rotate(1deg); }
.quote:hover { transform: rotate(0) translateY(-6px); box-shadow: var(--shadow-glow); }
.quote::before { content: "“"; position: absolute; top: -10px; left: 22px; font-family: var(--font-accent); font-size: 6rem; line-height: 1; color: var(--lilac); }
.quote blockquote { margin: 0; font-family: var(--font-accent); font-style: italic; font-weight: 500; font-size: 1.35rem; line-height: 1.4; color: var(--baltic); }
.quote figcaption { margin-top: 18px; display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: .95rem; }
.quote figcaption svg { color: var(--lemongrass); }
.quote .handle { color: var(--ink-soft); font-weight: 400; }
.sample-tag { margin-left: auto; font-size: .68rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-soft); border: 1px dashed var(--lilac); padding: 2px 8px; border-radius: 999px; }
@media (max-width: 900px) {
  .quotes { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: min(82%, 340px); overflow-x: auto; scroll-snap-type: x mandatory; padding: 16px 4px 24px; margin-inline: calc(var(--gutter) * -1); padding-inline: var(--gutter); scrollbar-width: none; }
  .quotes::-webkit-scrollbar { display: none; }
  .quote { scroll-snap-align: center; }
}

/* ---------- Instagram ---------- */
.insta { background: var(--surface); }
.insta-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(8px, 1.4vw, 16px); }
.insta-tile { position: relative; display: block; aspect-ratio: 1; border-radius: var(--radius-sm); overflow: hidden; background: var(--lilac-soft); }
.insta-tile img { width: 100%; height: 100%; object-fit: cover; transition: transform 900ms var(--ease-out); }
.insta-tile::after { content: ""; position: absolute; inset: 0; background: rgba(60, 28, 50, .45); opacity: 0; transition: opacity var(--t-med); }
.insta-tile svg { position: absolute; z-index: 2; left: 50%; top: 50%; font-size: 2.2rem; color: var(--on-accent); transform: translate(-50%, -50%) scale(.6); opacity: 0; transition: all var(--t-med) var(--ease-spring); }
.insta-tile:hover img { transform: scale(1.08); }
.insta-tile:hover::after { opacity: 1; }
.insta-tile:hover svg { opacity: 1; transform: translate(-50%, -50%) scale(1); }
@media (max-width: 640px) { .insta-grid { grid-template-columns: repeat(2, 1fr); } }

/* ---------- Footer ---------- */
.site-footer { background: var(--deep); color: var(--on-accent); position: relative; }
.footer-pattern { height: 64px; background: url("../assets/img/brand/pattern-dark.webp") center / 360px auto repeat-x; opacity: .9; }
.footer-inner { padding-block: 56px 120px; display: grid; justify-items: center; gap: 18px; text-align: center; }
.footer-logo { width: min(300px, 80%); height: auto; }
.footer-tag { font-family: var(--font-accent); font-style: italic; font-size: 1.3rem; color: var(--moon-mist); }
.footer-links { list-style: none; padding: 0; margin: 8px 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 8px; }
.footer-links a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px; text-decoration: none; border-radius: 999px; transition: background-color var(--t-fast); }
.footer-links a:hover { background: rgba(252, 245, 232, .12); }
.footer-small { font-size: .88rem; color: rgba(252, 245, 232, .7); }

/* ---------- Floating DM button (heartbeat) ---------- */
.dm-fab {
  position: fixed; z-index: var(--z-fab);
  right: max(16px, env(safe-area-inset-right)); bottom: max(16px, env(safe-area-inset-bottom));
  display: inline-flex; align-items: center; gap: 10px;
  min-height: 56px; padding: 0 22px 0 18px; border-radius: 999px;
  background: var(--accent); color: var(--on-accent); text-decoration: none; font-weight: 600;
  box-shadow: 0 10px 30px rgba(60, 28, 50, .35), 0 0 0 4px rgba(252, 245, 232, .9);
  isolation: isolate;
  transition: background-color var(--t-med), box-shadow var(--t-med), transform var(--t-med) var(--ease-out);
  -webkit-tap-highlight-color: transparent;
}
.dm-fab:hover, .dm-fab:focus-visible { background: var(--deep); }
.dm-heart { font-size: 1.45rem; color: #F3B6CF; transform-origin: center; }
.dm-fab.is-beating { animation: fab-beat 1.1s ease-in-out infinite; }
.dm-fab.is-beating .dm-heart { animation: heartbeat 1.1s ease-in-out infinite; }
.dm-fab.idle-beat .dm-heart { animation: heartbeat 1.1s ease-in-out 2; }
.dm-rings { position: absolute; inset: 0; pointer-events: none; z-index: -1; }
.dm-ring {
  position: absolute; left: var(--x); top: var(--y);
  width: 36px; height: 36px; margin: -18px 0 0 -18px; border-radius: 50%;
  border: 2px solid var(--lilac);
  background: radial-gradient(circle, rgba(143, 118, 169, .28), transparent 70%);
  animation: ring-out 1.2s cubic-bezier(.2, .7, .3, 1) forwards;
}
.dm-ring.dub { border-color: #F3B6CF; animation-duration: 1.05s; }
@keyframes ring-out { 0% { transform: scale(.3); opacity: .95; } 100% { transform: scale(7); opacity: 0; } }
@keyframes heartbeat { 0%, 100% { transform: scale(1); } 14% { transform: scale(1.28); } 28% { transform: scale(1); } 42% { transform: scale(1.2); } 60% { transform: scale(1); } }
@keyframes fab-beat { 0%, 100% { transform: scale(1); } 14% { transform: scale(1.06); } 28% { transform: scale(1); } 42% { transform: scale(1.04); } 60% { transform: scale(1); } }
@media (max-width: 420px) { .dm-fab { padding: 0 18px 0 16px; } }

/* ---------- Cart drawer ---------- */
.cart-drawer {
  margin: 0 0 0 auto; padding: 0; border: 0;
  width: min(460px, 100%); max-width: 100%; height: 100dvh; max-height: 100dvh;
  background: var(--surface); color: var(--ink);
  box-shadow: -20px 0 60px rgba(60, 28, 50, .25);
}
.cart-drawer { touch-action: pan-y; }  /* sideways swipes go to the drawer, up/down still scrolls */
.cart-drawer.is-dragging { cursor: grabbing; user-select: none; -webkit-user-select: none; }
.cart-drawer::backdrop { background: rgba(60, 28, 50, .45); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); opacity: var(--scrim, 1); }
.drawer-inner { display: flex; flex-direction: column; height: 100%; }
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 14px 14px 24px; border-bottom: 1px solid var(--line); background: var(--fantasy); }
.drawer-head h2 { font-size: 2rem; }
.drawer-body { flex: 1; overflow-y: auto; padding: 18px 24px 32px; overscroll-behavior: contain; }
.cart-items { list-style: none; margin: 0 0 18px; padding: 0; display: grid; gap: 12px; }
.cart-item { display: grid; grid-template-columns: 64px 1fr auto; gap: 12px; align-items: center; padding: 10px; border-radius: var(--radius-sm); background: var(--fantasy); }
.cart-item img { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; }
.cart-item .ci-name { font-weight: 600; line-height: 1.25; }
.cart-item .ci-price { color: var(--ink-soft); font-size: .9rem; }
.cart-item .stepper { width: auto; gap: 2px; padding: 3px; }
.cart-item .stepper .icon-btn { width: 36px; height: 36px; }
.cart-item .stepper output { min-width: 2.2ch; }
.cart-empty { text-align: center; padding: 40px 10px; display: grid; justify-items: center; gap: 16px; color: var(--ink-soft); }
.subtotal { display: flex; justify-content: space-between; align-items: baseline; padding: 14px 0; border-top: 1px dashed rgba(143, 118, 169, .5); margin-top: 4px; }
.subtotal strong { font-family: var(--font-display); font-weight: 400; font-size: 1.8rem; color: var(--grape); }
.form-hint { font-size: .92rem; color: var(--ink-soft); margin-bottom: 14px; }
.form-hint.small { font-size: .85rem; margin: 10px 0 0; text-align: center; }
.order-form { display: grid; gap: 4px; }
.field { display: grid; gap: 6px; margin-bottom: 12px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field label { font-weight: 600; font-size: .95rem; }
.field .opt { font-weight: 400; color: var(--ink-soft); }
.field input, .field select, .field textarea {
  width: 100%; min-height: 48px; padding: 10px 14px; border-radius: 12px;
  border: 1.5px solid var(--field-line); background: var(--field-bg); font-size: 1rem;
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
.field textarea { resize: vertical; min-height: 64px; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--lilac); box-shadow: 0 0 0 4px rgba(143, 118, 169, .22); }
.field [aria-invalid="true"] { border-color: #A12B4F; }
.field-error { color: #A12B4F; font-size: .88rem; font-weight: 500; }
.sent { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.sent-badge { width: 72px; height: 72px; border-radius: 50%; background: var(--chip-bg); display: grid; place-items: center; color: var(--baltic); font-size: 2.2rem; animation: pop-in 600ms var(--ease-spring); margin-top: 10px; }
@keyframes pop-in { from { transform: scale(0) rotate(-30deg); } to { transform: none; } }
.sent h3 { font-size: 2rem; }
.sent h3:focus { outline: none; }
.order-text { width: 100%; font-family: ui-monospace, Consolas, monospace; font-size: .85rem; border-radius: 12px; border: 1.5px solid var(--line); padding: 12px; background: var(--fantasy); resize: none; }
.sent-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
@media (max-width: 420px) { .field-row { grid-template-columns: 1fr; } .drawer-body { padding-inline: 16px; } }

/* ---------- Toast ---------- */
.toast {
  position: fixed; z-index: var(--z-toast); left: 50%; bottom: 92px;
  transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  background: var(--deep); color: var(--on-accent); padding: 12px 20px; border-radius: 999px; box-shadow: var(--shadow-md);
  font-weight: 500; max-width: calc(100% - 32px); text-align: center;
  transition: opacity var(--t-med), transform var(--t-med) var(--ease-out);
}
.toast.is-shown { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; transition-delay: 0ms !important; }
  .card { transform: none !important; }
  .marquee-track { animation: none; }
  .arch-slides img { transform: none !important; }
}

/* =====================================================================
   v2 additions: cut-out cookie cards, photo strip, 3D cart, baker photo,
   fairy glitter
   ===================================================================== */

/* ---------- Cut-out cookie cards ---------- */
.card-media.is-cutout {
  background:
    radial-gradient(60% 55% at 50% 45%, #fff 0%, rgba(255, 255, 255, 0) 70%),
    radial-gradient(90% 80% at 50% 100%, rgba(143, 118, 169, .28), transparent 70%),
    var(--lilac-soft);
}
.card-media.is-cutout::before { /* soft moon pattern behind the cookie */
  content: ""; position: absolute; inset: 0; z-index: 0;
  background: url("../assets/img/brand/pattern-light.webp") center / 260px auto;
  opacity: .35;
}
.card-media .cookie-solo {
  position: absolute; z-index: 1;
  inset: auto; left: 50%; top: 47%; width: 68%; height: auto;
  object-fit: contain;
  transform: translate(-50%, -50%) rotate(var(--tilt, -4deg));
  transition: transform 700ms var(--ease-spring), opacity 500ms var(--ease-out);
}
.card-media .cookie-shadow {
  position: absolute; z-index: 0; left: 22%; right: 22%; bottom: 9%; height: 9%;
  border-radius: 50%; background: radial-gradient(closest-side, rgba(60, 28, 50, .32), transparent);
  transition: transform 700ms var(--ease-spring), opacity 500ms;
}
.card:hover .cookie-solo, .card:focus-within .cookie-solo { transform: translate(-50%, -58%) rotate(calc(var(--tilt, -4deg) + 14deg)) scale(1.06); }
.card:hover .cookie-shadow, .card:focus-within .cookie-shadow { transform: scale(.78); opacity: .7; }
.card-media.is-cutout .img-alt { z-index: 2; }
.card.show-alt .card-media.is-cutout .cookie-solo,
.card.show-alt .card-media.is-cutout .cookie-shadow { opacity: 0; }
.card.show-alt .card-media.is-cutout .img-alt { opacity: 1; transform: scale(1); }
/* on cut-out cards the hover keeps the floating cookie; the inside photo is a tap/click away */
.card:hover .card-media.is-cutout .img-alt { opacity: 0; }
.card.show-alt:hover .card-media.is-cutout .img-alt { opacity: 1; }
.peek {
  position: absolute; z-index: 5; left: 50%; bottom: 12px; transform: translateX(-50%);
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(255, 251, 243, .92); color: var(--grape);
  font-size: .78rem; font-weight: 700; letter-spacing: .04em;
  padding: 6px 12px; border-radius: 999px; box-shadow: var(--shadow-sm);
  white-space: nowrap; pointer-events: none;
  transition: background-color var(--t-fast), color var(--t-fast);
}
.peek svg { font-size: .9rem; }
.card.show-alt .peek { background: var(--accent); color: var(--on-accent); }

/* ---------- Baker photo (background removed) ---------- */
.portrait-frame { position: relative; }
.portrait-frame::after { /* soften the pattern so she pops */
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(70% 60% at 50% 55%, rgba(252, 245, 232, .55), rgba(106, 61, 94, .25) 80%);
  pointer-events: none;
}
.portrait-frame img.photo { position: absolute; z-index: 1; left: 52%; bottom: 0; width: 94%; height: auto; max-width: none; transform: translateX(-50%); object-fit: contain; }
.portrait-sparkles { position: absolute; inset: 0; z-index: 2; pointer-events: none; }
.portrait-sparkles svg { position: absolute; color: #F3D58A; animation: twinkle 2.8s ease-in-out infinite; filter: drop-shadow(0 0 6px rgba(255, 246, 216, .9)); }
.portrait-sparkles svg:nth-child(1) { width: 22px; height: 22px; right: 10%; top: 40%; }
.portrait-sparkles svg:nth-child(2) { width: 14px; height: 14px; right: 26%; top: 34%; animation-delay: -.9s; color: var(--on-accent); }
.portrait-sparkles svg:nth-child(3) { width: 16px; height: 16px; right: 6%; top: 56%; animation-delay: -1.6s; color: var(--moon-mist); }
.portrait-sparkles svg:nth-child(4) { width: 12px; height: 12px; left: 12%; top: 22%; animation-delay: -2.2s; color: var(--on-accent); }

/* ---------- Fairy glitter ---------- */
.glitter { position: fixed; inset: 0; width: 100vw; height: 100vh; z-index: 45; pointer-events: none; }
.js .section-head.wand-ready h2 { clip-path: inset(-20% 100% -20% -2%); }
.js .section-head.wand-go h2 { clip-path: inset(-20% -2% -20% -2%); transition: clip-path 1000ms cubic-bezier(.45, .05, .25, 1); }

@media (prefers-reduced-motion: reduce) {
  .glitter { display: none; }
  .js .section-head.wand-ready h2 { clip-path: none; }
  .ck-move { transform: none !important; }
}

/* Header sitting on the purple hero (before scrolling) */
.brand { position: relative; }
.brand .logo-light { position: absolute; inset: 0; opacity: 0; transition: opacity var(--t-med); }
.brand .logo-dark { transition: opacity var(--t-med); }
.site-header:not(.is-scrolled) .brand .logo-light { opacity: 1; }
.site-header:not(.is-scrolled) .brand .logo-dark { opacity: 0; }
.site-header:not(.is-scrolled) .icon-btn { color: var(--on-accent); }
.site-header:not(.is-scrolled) .icon-btn:hover { background: rgba(252, 245, 232, .14); }
@media (min-width: 901px) {
  .site-header:not(.is-scrolled) .primary-nav a { color: var(--on-accent); }
  .site-header:not(.is-scrolled) .primary-nav a::after { background: var(--chip-bg); }
}
.ob-ring text { font-size: 12px; letter-spacing: 0; }

.years-badge { z-index: 3; }

/* =====================================================================
   v2 fixes
   ===================================================================== */

/* The "hidden" attribute must always win. Before this, .cart-empty
   (display:grid) stayed visible even with items in the order. */
[hidden] { display: none !important; }

/* Marquee: spacing lives on each item (not flex gap), so the duplicated
   half is exactly 50% wide and the loop restarts without a jump. */
.marquee-track { gap: 0; animation-duration: 42s; }
.marquee-track > * { margin-inline-end: 32px; }

/* Cookie cards: hover (or tap) swaps the floating cookie for its second photo */
.card .card-media.is-cutout.has-alt .img-alt { opacity: 0; transform: scale(1.06); }
.card:hover .card-media.is-cutout.has-alt .img-alt,
.card:focus-within .card-media.is-cutout.has-alt .img-alt,
.card.show-alt .card-media.is-cutout.has-alt .img-alt { opacity: 1; transform: scale(1); }
.card:hover .card-media.is-cutout.has-alt .cookie-solo,
.card:focus-within .card-media.is-cutout.has-alt .cookie-solo,
.card.show-alt .card-media.is-cutout.has-alt .cookie-solo,
.card:hover .card-media.is-cutout.has-alt .cookie-shadow,
.card.show-alt .card-media.is-cutout.has-alt .cookie-shadow { opacity: 0; }
/* cookies with only one photo just lift and turn */
.card:hover .card-media.is-cutout:not(.has-alt) .cookie-solo { opacity: 1; }
.peek, .card-sparks { display: none; }

/* Baker photo: fill the arch exactly, anchored to the bottom edge */
.portrait-frame img.photo { inset: 0; left: 0; bottom: 0; width: 100%; height: 100%; transform: none; object-fit: cover; object-position: 50% 100%; }


/* ---------- Cake gallery ---------- */
.cake-gallery-wrap { margin-top: clamp(48px, 7vw, 80px); }
.cake-gallery-title { font-size: clamp(1.7rem, 3vw, 2.3rem); margin-bottom: 20px; }
.cake-gallery { list-style: none; margin: 0; padding: 0; columns: 4 220px; column-gap: 16px; }
.cake-shot { break-inside: avoid; margin-bottom: 16px; }
.cake-shot figure { position: relative; margin: 0; border-radius: 18px; overflow: hidden; background: var(--lilac-soft); box-shadow: var(--shadow-sm); }
.cake-shot:nth-child(4n+1) figure { border-radius: 999px 999px 18px 18px; }
.cake-shot img { width: 100%; height: auto; display: block; transition: transform 900ms var(--ease-out); }
.cake-shot figcaption {
  position: absolute; left: 10px; right: 10px; bottom: 10px; padding: 7px 12px; border-radius: 12px;
  background: rgba(255, 251, 243, .94); color: var(--baltic); font-weight: 600; font-size: .9rem;
  transform: translateY(6px); opacity: .0; transition: opacity var(--t-med), transform var(--t-med) var(--ease-out);
}
.cake-shot:hover img { transform: scale(1.05); }
.cake-shot:hover figcaption, .cake-shot:focus-within figcaption { opacity: 1; transform: none; }
@media (hover: none) { .cake-shot figcaption { opacity: 1; transform: none; } }
.cake-more { display: flex; margin: 8px auto 0; }
@media (max-width: 640px) { .cake-gallery { columns: 2; column-gap: 10px; } .cake-shot { margin-bottom: 10px; } }

/* =====================================================================
   Polish pass (from the generic-pattern audit)
   ===================================================================== */
/* 1. Eyebrows: drop the stock sparkle bullets; one small crescent instead */
.eyebrow::after { display: none; }
.eyebrow::before {
  width: 12px; height: 12px; clip-path: none; border-radius: 50%;
  background: transparent; box-shadow: inset -4px 0 0 0 currentColor; transform: rotate(-20deg);
}
.hero-eyebrow::before { box-shadow: inset -4px 0 0 0 var(--moon-mist); background: transparent; }
/* 2. Numbers that change line up */
.price-tag, .subtotal strong, .cake-from strong, .stepper output, .cart-count, .event-date .d { font-variant-numeric: tabular-nums lining-nums; }
/* 3. Reviews read as handwritten notes taped up, not floating cards */
.quote { background: var(--paper); border-radius: 4px; box-shadow: 0 1px 2px rgba(60,28,50,.08), 0 12px 24px rgba(60,28,50,.08); padding-top: 38px; }
.quote::before { content: ""; top: -12px; left: 50%; width: 96px; height: 26px; margin-left: -48px; background: rgba(213, 227, 174, .8); font-size: 0; transform: rotate(-3deg); border-radius: 2px; }
.quote blockquote::before { content: "“"; font-size: 1.4em; line-height: 0; color: var(--lilac); margin-right: 2px; }
/* 4. One focus style everywhere, visible on purple and cream */
:focus-visible { outline: 3px solid var(--grape); outline-offset: 3px; }
.hero :focus-visible, .site-footer :focus-visible { outline-color: var(--moon-mist); }
/* 5. Cards: a single shadow scale instead of a glow on every hover */
.card:hover, .card:focus-within { box-shadow: var(--shadow-md); }
.cake-card:hover, .quote:hover, .event:hover { box-shadow: var(--shadow-md); }
