:root {
  color-scheme: dark;
  /* TicketLink organiser settings: accent-raw + dark background; a box's
     backend colours override these two via an inline style block */
  --accent-raw: #fae900;
  --bg: #000000;
  --accent: var(--accent-raw);
  --accent2: color-mix(in srgb, var(--accent) 60%, #000);
  --gold: color-mix(in srgb, var(--accent) 75%, #fff);
  --bg2: color-mix(in srgb, var(--accent) 8%, var(--bg));
  --card: rgba(255, 255, 255, 0.05);
  --border: rgba(255, 255, 255, 0.1);
  --text: #f5f2ea;
  --muted: color-mix(in srgb, var(--accent) 22%, #9b96a8);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }
html {
  scroll-behavior: smooth;
  /* solid canvas only: any gradient on the document shows a seam against the
     overscroll area on iOS; all glow lives in the fixed .bg-glow layer */
  background: var(--bg);
}
html, body { overflow-x: clip; }
body {
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
}
body {
  font-family: "Space Grotesk", system-ui, sans-serif;
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
}
.bg-glow {
  display: none;
}
/* the main light pool scrolls with the page; masked to zero at the top edge
   so there is never a seam against the browser bars or overscroll */
body { position: relative; }
body::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 950px;
  pointer-events: none; z-index: 0;
  background:
    radial-gradient(500px 400px at 12% 240px, color-mix(in srgb, var(--accent) 10%, transparent), transparent 70%),
    radial-gradient(600px 500px at 88% 620px, color-mix(in srgb, var(--accent2) 12%, transparent), transparent 70%),
    radial-gradient(1100px 760px at 50% 320px,
      color-mix(in srgb, #fff 15%, var(--bg2)), transparent 78%);
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 240px, #000 70%, transparent 100%);
  mask-image: linear-gradient(to bottom, transparent 0, #000 240px, #000 70%, transparent 100%);
}
header.top {
  position: relative; z-index: 2;
  display: flex; justify-content: space-between; align-items: center;
  padding: 20px clamp(16px, 5vw, 48px);
}
.brand { font-weight: 700; font-size: 20px; letter-spacing: 0.5px; }
.brand span { color: var(--accent); }
.lang {
  color: var(--muted); text-decoration: none; font-weight: 500;
  border: 1px solid var(--border); border-radius: 999px; padding: 6px 14px;
}
.lang:hover { color: var(--text); border-color: var(--accent); }

main { position: relative; z-index: 1; max-width: 960px; margin: 0 auto; padding: 0 16px 80px; }

/* ================= stage: the one desirable box ================= */
.stage { text-align: center; padding-top: 2vh; min-height: calc(100svh - 90px); position: relative; }
/* spotlight cone from above */
.stage::before {
  content: ""; position: absolute; left: 50%; top: -90px;
  width: 560px; height: 480px; transform: translateX(-50%);
  background: radial-gradient(ellipse 50% 60% at 50% 0%,
    rgba(255, 255, 255, 0.1), rgba(200, 160, 255, 0.05) 45%, transparent 70%);
  pointer-events: none;
}
.scene {
  position: relative; width: 300px; height: 320px; margin: 0 auto;
  perspective: 900px;
}
/* periodic corner glint */
.scene .glint {
  position: absolute; left: 24%; top: 18%; width: 34px; height: 34px;
  pointer-events: none; opacity: 0; z-index: 3;
  background:
    radial-gradient(circle, #fff 0 3px, transparent 4px),
    conic-gradient(from 0deg, transparent 0 40deg, rgba(255,255,255,0.95) 45deg, transparent 50deg,
      transparent 130deg, rgba(255,255,255,0.95) 135deg, transparent 140deg,
      transparent 220deg, rgba(255,255,255,0.95) 225deg, transparent 230deg,
      transparent 310deg, rgba(255,255,255,0.95) 315deg, transparent 320deg);
  border-radius: 50%;
  filter: blur(0.4px) drop-shadow(0 0 8px rgba(255, 255, 255, 0.9));
  animation: glint 4.5s ease-in-out infinite;
}
@keyframes glint {
  0%, 78%, 100% { opacity: 0; transform: scale(0.2) rotate(0deg); }
  84% { opacity: 1; transform: scale(1) rotate(40deg); }
  92% { opacity: 0; transform: scale(0.3) rotate(80deg); }
}
.halo {
  position: absolute; inset: -60px; border-radius: 50%;
  background: radial-gradient(circle,
    color-mix(in srgb, var(--accent) 45%, transparent), color-mix(in srgb, var(--accent2) 22%, transparent) 45%, transparent 70%);
  filter: blur(22px);
  animation: halo 3.2s ease-in-out infinite;
}
@keyframes halo { 0%,100% { opacity: 0.6; transform: scale(0.94); } 50% { opacity: 1; transform: scale(1.08); } }

.cube-float {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  animation: floaty 4.5s ease-in-out infinite;
}
@keyframes floaty { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-16px); } }

/* drag wrapper so the visitor can spin the box */
.spinner {
  transform-style: preserve-3d;
  transform: rotateY(var(--drag, 0deg));
}
.cube {
  position: relative; width: 170px; height: 170px;
  transform-style: preserve-3d;
  animation: spin 20s linear infinite;
}
/* dark ground shadow under the box (filter on the cube would flatten the 3D) */
.scene::after {
  content: ""; position: absolute; left: 50%; bottom: 22px;
  width: 250px; height: 46px; transform: translateX(-50%);
  background: radial-gradient(ellipse, rgba(0, 0, 0, 0.65), rgba(0, 0, 0, 0.3) 55%, transparent 72%);
  filter: blur(9px);
}
@keyframes spin {
  from { transform: rotateX(-20deg) rotateY(0deg); }
  to   { transform: rotateX(-20deg) rotateY(360deg); }
}
.face {
  position: absolute; width: 170px; height: 170px;
  display: flex; align-items: center; justify-content: center;
  transform-style: preserve-3d;
  border: 1px solid rgba(90, 60, 30, 0.28);
  /* solid kraft paper: one soft sheet light over a smooth tan gradient */
  background:
    radial-gradient(130% 100% at 30% 15%, rgba(255, 246, 228, 0.1), transparent 65%),
    linear-gradient(160deg, #c79d6f 0%, #b4875a 55%, #9d7148 100%);
  box-shadow: inset 0 0 30px rgba(70, 40, 10, 0.16);
}
.front  { transform: translateZ(85px); }
.back   { transform: rotateY(180deg) translateZ(85px); }
.left   { transform: rotateY(-90deg) translateZ(85px); }
.right  { transform: rotateY(90deg) translateZ(85px); }
/* dark interior: a flipped liner on every wall, visible only from inside */
.face::after {
  content: ""; position: absolute; inset: 0;
  transform: rotateY(180deg) translateZ(0.3px);
  backface-visibility: hidden;
  background: rgba(32, 19, 6, 0.55);
  pointer-events: none;
}
/* side shading as an overlay: a filter here would flatten the 3D children */
.left::before, .right::before {
  content: ""; position: absolute; inset: 0;
  background: rgba(55, 32, 10, 0.16); pointer-events: none;
}
.bottom { transform: rotateX(-90deg) translateZ(85px); filter: brightness(0.55); }

.tape { display: none; }

/* open lid flaps, hinged on each wall's top rim; bottom colour matches the
   wall's top (#c79d6f) so the hinge line is seamless */
.flap {
  position: absolute; left: 0; top: -69px; width: 100%; height: 70px;
  transform-origin: 50% 100%;
  border: 1px solid rgba(90, 60, 30, 0.28); border-bottom: none;
  background:
    radial-gradient(140% 130% at 50% 100%, rgba(255, 246, 228, 0.08), transparent 70%),
    linear-gradient(0deg, #c79d6f 0%, #c39668 100%);
  box-shadow: inset 0 -8px 14px rgba(70, 40, 10, 0.14);
}
/* all four lids identical, splayed at the same angle */
.flap { transform: rotateX(-98deg); }


/* shipping marks (single-sided: invisible from inside the box) */
.sticker {
  backface-visibility: hidden;
  position: absolute; left: 16px; bottom: 20px; z-index: 2;
  transform: rotate(-7deg);
  background: #f5efe3; color: #c3342b; border: 2px solid #c3342b;
  border-radius: 4px; padding: 3px 10px;
  font-weight: 700; font-size: 13px; letter-spacing: 2.5px;
  opacity: 0.95;
}
.ship-label {
  backface-visibility: hidden;
  position: absolute; right: 14px; top: 18px; width: 86px; height: 58px;
  background: #f7f2e8; border-radius: 3px; transform: rotate(4deg);
}
.ship-label::before {
  /* address lines */
  content: ""; position: absolute; left: 9px; right: 9px; top: 8px; height: 22px;
  background: repeating-linear-gradient(#b9b2a4 0 2.5px, transparent 2.5px 8px);
}
.ship-label::after {
  /* barcode */
  content: ""; position: absolute; left: 9px; right: 9px; bottom: 7px; height: 16px;
  background: repeating-linear-gradient(90deg,
    #2b2622 0 2px, transparent 2px 4px, #2b2622 4px 7px, transparent 7px 9px);
}
/* printed "Mystery Box" label sitting behind the question-mark stamp */
.mb-label {
  position: absolute; left: 0; right: 0; bottom: 17%;
  transform: rotate(-8deg);
  text-align: center; text-transform: uppercase;
  font-weight: 700; font-size: 15px; letter-spacing: 2.5px;
  color: #58381a; mix-blend-mode: multiply; opacity: 0.8;
  backface-visibility: hidden; z-index: 1;
  pointer-events: none;
}

/* ink-stamped question mark */
.qmark {
  backface-visibility: hidden;
  position: relative; z-index: 2; font-size: 72px; font-weight: 700;
  color: #4a2c12; opacity: 0.75; transform: rotate(-8deg);
  text-shadow: 0 1px 0 rgba(255, 240, 215, 0.25);
}

/* logo printed on the outside of the front/back walls */
.logo-print {
  position: absolute; left: 15%; top: 16%; width: 70%; height: 62%;
  backface-visibility: hidden;
  /* eco ink: flat brown, multiplied into the kraft so the paper shows through */
  background: #58381a;
  -webkit-mask: url('/static/bp-logo.png') center / contain no-repeat;
  mask: url('/static/bp-logo.png') center / contain no-repeat;
  mix-blend-mode: multiply;
  opacity: 0.85;
  pointer-events: none;
}

/* the logo floating inside the open box */
.logo3d, .logo3d-back {
  position: absolute; left: 0; top: 0; width: 170px; height: 170px;
  display: flex; align-items: flex-start; justify-content: center;
  pointer-events: none;
}
.logo3d-back { display: none; }
/* gradient-tinted logo: the white PNG acts as a mask over a moving
   gold-pink gradient, swaying in 3D so it stops reading flat */
.logo-wrap {
  --la: 0deg; --lz: 0deg; /* random per-visit tilt, set by JS */
  display: flex; justify-content: center; width: 100%;
  transform-style: preserve-3d;
  /* fixed to the box: it turns together with the carton */
  transform: rotateY(var(--la)) rotateZ(var(--lz));
}
/* extruded logo: darker masked layers stacked behind the gradient face */
.logo-stack {
  position: relative; width: 118px; height: 111px; margin-top: -52px;
  transform-style: preserve-3d;
  animation: logobob 3.4s ease-in-out infinite;
}
.logo-mask, .logo-layer {
  position: absolute; inset: 0;
  -webkit-mask: url('/static/bp-logo.png') center / contain no-repeat;
  mask: url('/static/bp-logo.png') center / contain no-repeat;
}
.logo-layer { background: color-mix(in srgb, var(--accent) 50%, #000); }
.logo-layer:nth-child(1) { transform: translateZ(-1.2px); background: color-mix(in srgb, var(--accent) 62%, #000); }
.logo-layer:nth-child(2) { transform: translateZ(-2.4px); }
.logo-layer:nth-child(3) { transform: translateZ(-3.6px); background: color-mix(in srgb, var(--accent) 42%, #000); }
.logo-layer:nth-child(4) { transform: translateZ(-4.8px); background: color-mix(in srgb, var(--accent) 34%, #000); }
.logo-mask {
  backface-visibility: hidden; /* from behind you see the dark extrusion, not a mirrored face */
  transform: translateZ(0.5px);
  background: linear-gradient(115deg,
    color-mix(in srgb, var(--accent) 55%, #fff) 0%,
    var(--accent) 35%,
    color-mix(in srgb, var(--accent) 70%, #fff) 50%,
    var(--accent) 68%,
    color-mix(in srgb, var(--accent) 62%, #000) 100%);
  background-size: 150% 150%;
  filter:
    drop-shadow(0 0 5px color-mix(in srgb, var(--accent) 28%, transparent))
    drop-shadow(0 0 14px color-mix(in srgb, var(--accent) 16%, transparent));
  animation: logosheen 4.5s ease-in-out infinite;
}
@keyframes logosheen { 0%, 100% { background-position: 0% 0%; } 50% { background-position: 100% 100%; } }
@keyframes logobob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-9px); } }

/* light spilling out of the opening */
.beam, .beam-x {
  position: absolute; left: 25px; top: -108px; width: 120px; height: 125px;
  background: linear-gradient(to top, color-mix(in srgb, var(--gold) 18%, transparent), color-mix(in srgb, var(--gold) 4%, transparent) 70%, transparent);
  filter: blur(7px);
  pointer-events: none;
  animation: halo 3.2s ease-in-out infinite;
}
.beam-x { transform: rotateY(90deg); }
.ribbon-v { display: none; }

/* sparkles */
.sparks i {
  position: absolute; width: 6px; height: 6px; border-radius: 50%;
  background: #fff; box-shadow: 0 0 10px 2px rgba(255, 255, 255, 0.8);
  opacity: 0; animation: spark 3.6s linear infinite;
}
.sparks i:nth-child(1) { left: 8%;  top: 22%; animation-delay: 0s; }
.sparks i:nth-child(2) { left: 88%; top: 30%; animation-delay: 0.5s; background: var(--gold); }
.sparks i:nth-child(3) { left: 16%; top: 72%; animation-delay: 1s; }
.sparks i:nth-child(4) { left: 80%; top: 78%; animation-delay: 1.4s; background: color-mix(in srgb, var(--accent) 55%, #fff); }
.sparks i:nth-child(5) { left: 50%; top: 4%;  animation-delay: 1.8s; background: var(--gold); }
.sparks i:nth-child(6) { left: 4%;  top: 48%; animation-delay: 2.2s; background: color-mix(in srgb, var(--accent2) 55%, #fff); }
.sparks i:nth-child(7) { left: 94%; top: 55%; animation-delay: 2.7s; }
.sparks i:nth-child(8) { left: 68%; top: 10%; animation-delay: 3.1s; background: color-mix(in srgb, var(--accent) 55%, #fff); }
.sparks i:nth-child(odd) { width: 4px; height: 4px; }
.sparks i:nth-child(2), .sparks i:nth-child(5) { width: 8px; height: 8px; }
@keyframes spark {
  0%, 100% { opacity: 0; transform: scale(0.3); }
  12% { opacity: 1; transform: scale(1.15); }
  28% { opacity: 0; transform: scale(0.4); }
}
.scene.dim .cube { animation-duration: 18s; }
.scene.dim .face { border-color: rgba(60, 40, 18, 0.3); }
.scene.dim .face::after { background: rgba(25, 15, 5, 0.35); transform: translateZ(0.4px); backface-visibility: visible; }
.scene.dim .halo, .scene.dim .sparks { display: none; }

h1 {
  font-size: clamp(34px, 7vw, 60px); font-weight: 700; line-height: 1.05;
  background: linear-gradient(100deg, #fff, var(--accent) 55%, var(--accent2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
  margin: 18px 0 12px;
}
.tagline { color: var(--muted); font-size: clamp(16px, 2.5vw, 20px); max-width: 560px; margin: 0 auto; }
.event { margin-top: 14px; color: var(--muted); }
.event strong { color: var(--gold); font-weight: 600; }

/* --- CTA --- */
.cta { text-align: center; margin-top: 30px; }
.price {
  font-size: 34px; font-weight: 700; margin-bottom: 8px;
  background: linear-gradient(100deg, color-mix(in srgb, var(--gold) 55%, #000) 0%, var(--gold) 25%, color-mix(in srgb, var(--gold) 35%, #fff) 50%, var(--gold) 75%, color-mix(in srgb, var(--gold) 55%, #000) 100%);
  background-size: 200% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: shimmer 3.5s linear infinite;
}
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
.scarcity { color: var(--accent); font-weight: 600; margin-bottom: 14px; }
.soldout {
  display: inline-block; padding: 12px 30px; border-radius: 999px;
  background: rgba(255, 255, 255, 0.07); color: var(--muted);
  font-weight: 700; text-transform: uppercase; letter-spacing: 2px;
}
.buyform { display: inline-flex; gap: 10px; align-items: stretch; }
.buyform select {
  background: var(--card); border: 1px solid var(--border); color: var(--text);
  border-radius: 999px; padding: 0 16px; font-size: 16px; font-family: inherit;
}
.buy {
  display: inline-block; padding: 16px 44px; border-radius: 999px; border: none;
  background: linear-gradient(100deg, var(--accent), var(--accent2));
  color: #fff; text-decoration: none; font-weight: 700; font-size: 18px;
  font-family: inherit; cursor: pointer;
  box-shadow: 0 10px 30px color-mix(in srgb, var(--accent) 40%, transparent);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  animation: beat 2.6s ease-in-out infinite;
}
@keyframes beat {
  0%, 100% { box-shadow: 0 10px 30px color-mix(in srgb, var(--accent) 40%, transparent); }
  50% { box-shadow: 0 10px 44px color-mix(in srgb, var(--accent) 75%, transparent), 0 0 0 6px color-mix(in srgb, var(--accent) 12%, transparent); }
}
.buy:hover { transform: translateY(-2px); box-shadow: 0 14px 38px color-mix(in srgb, var(--accent) 55%, transparent); }
.buy.ghost { background: transparent; border: 1px solid var(--border); box-shadow: none; color: var(--muted); }
.buy.ghost:hover { color: var(--text); border-color: var(--accent); }
.reveal-btn {
  display: block; margin: 26px auto 0; background: none; border: none;
  color: var(--muted); font-family: inherit; font-size: 15px; cursor: pointer;
  border-bottom: 1px dashed var(--muted); padding-bottom: 2px;
}
.reveal-btn:hover { color: var(--gold); border-color: var(--gold); }
.pickup { color: var(--muted); font-size: 14px; margin-top: 22px; text-align: center; }

/* --- contents (revealed) --- */
.contents { padding: 10px 0 40px; opacity: 0; transform: translateY(24px); transition: opacity 0.6s ease, transform 0.6s ease; }
.contents.shown { opacity: 1; transform: none; }
h2 {
  text-align: center; margin: 24px 0 20px; font-size: 22px;
  letter-spacing: 2px; text-transform: uppercase; color: var(--muted); font-weight: 500;
}
.grid {
  display: grid; gap: 14px;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
}
.card {
  background: var(--card); border: 1px solid var(--border); border-radius: 16px;
  padding: 14px; text-align: center;
  transition: transform 0.2s ease, border-color 0.2s ease;
}
.card:hover { transform: translateY(-4px); border-color: color-mix(in srgb, var(--accent) 50%, transparent); }
.thumb {
  aspect-ratio: 1; border-radius: 12px; overflow: hidden;
  background: rgba(255, 255, 255, 0.04);
  display: flex; align-items: center; justify-content: center; margin-bottom: 10px;
}
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb .mark { font-size: 44px; color: var(--accent2); opacity: 0.8; }
.label { font-weight: 600; font-size: 15px; }
.sub { color: var(--muted); font-size: 12.5px; margin-top: 3px; }
.card.secret {
  border-style: dashed; border-color: color-mix(in srgb, var(--gold) 35%, transparent);
  background: linear-gradient(180deg, color-mix(in srgb, var(--gold) 5%, transparent), rgba(255, 255, 255, 0.02));
}
.card.secret .mark {
  color: var(--gold); text-shadow: 0 0 22px color-mix(in srgb, var(--gold) 60%, transparent);
  animation: pulse 2.2s ease-in-out infinite;
}
@keyframes pulse { 0%,100% { opacity: 0.55; } 50% { opacity: 1; } }

footer {
  position: relative; z-index: 1; text-align: center; padding: 26px 16px 40px;
  border-top: 1px solid var(--border); color: var(--muted); font-size: 14px;
}
footer a { color: var(--muted); text-decoration: none; }
footer a:hover { color: var(--text); }

/* ============ post-purchase unboxing reveal ============ */
.reveal .cube {
  animation: none;
  transform: rotateX(-18deg) rotateY(33deg);
}
.reveal.closed .cube { animation: boxshake 2.4s ease-in-out infinite; }
@keyframes boxshake {
  0%, 100% { transform: rotateX(-18deg) rotateY(33deg); }
  12% { transform: rotateX(-19deg) rotateY(29deg) translateX(-2px); }
  24% { transform: rotateX(-17deg) rotateY(37deg) translateX(2px); }
  32% { transform: rotateX(-18deg) rotateY(33deg); }
}
.flap { transition: transform 1.1s cubic-bezier(0.34, 1.45, 0.64, 1); }
.closed .front .flap,
.closed .back .flap { transform: rotateX(82deg); }
.closed .left .flap,
.closed .right .flap { transform: rotateX(87deg); }
.closed .beam, .closed .beam-x, .closed .logo3d { display: none; }
.reveal .beam, .reveal .beam-x { display: none; }

.prize3d {
  position: absolute; left: 0; top: 0; width: 170px; height: 170px;
  display: flex; align-items: flex-start; justify-content: center;
  pointer-events: none;
  transform: rotateY(-33deg); /* counter the cube so the prize faces the viewer */
}
.prize3d img {
  width: 128px; max-height: 128px; object-fit: contain; border-radius: 12px;
  opacity: 0;
  transform: translateY(6px) scale(0.96);
  transition: transform 0.9s 1.2s cubic-bezier(0.34, 1.5, 0.64, 1), opacity 0.3s 0.35s;
  filter:
    drop-shadow(0 0 12px color-mix(in srgb, var(--gold) 60%, transparent))
    drop-shadow(0 0 30px color-mix(in srgb, var(--accent) 40%, transparent));
}
.reveal.open .prize3d img {
  opacity: 1;
  transform: translateY(-62px) scale(1.05);
  animation: prizebob 3.4s 2.2s ease-in-out infinite;
}
/* placeholder tile for the future 3D glyph icon */
.glyph-ph {
  width: 108px; height: 108px; border-radius: 24px;
  display: flex; align-items: center; justify-content: center;
  font-size: 62px; font-weight: 700; color: #141005;
  background: linear-gradient(145deg,
    color-mix(in srgb, var(--accent) 80%, #fff),
    var(--accent) 45%,
    color-mix(in srgb, var(--accent) 55%, #000));
  transform: rotate(-6deg);
}

/* no-prize fallback: the placeholder pops out instead of a photo */
.prize-wrap {
  display: flex; justify-content: center; width: 100%;
  opacity: 0;
  transform: translateY(6px) scale(0.96);
  transition: transform 0.9s 1.2s cubic-bezier(0.34, 1.5, 0.64, 1), opacity 0.3s 0.35s;
}
.reveal.open .prize-wrap { opacity: 1; transform: translateY(-62px) scale(1.05); }
.prize-wrap .logo-stack { margin-top: 0; }
@keyframes prizebob {
  0%, 100% { transform: translateY(-62px) scale(1.05); }
  50% { transform: translateY(-71px) scale(1.05); }
}

/* reveal page: headroom above the box for the jump arcs */
.reveal-stage { padding-top: 130px; }
.reveal-stage h1 { margin-top: 34px; }

/* products jumping out of the opened box */
.product {
  position: absolute; left: 50%; top: 36%;
  width: 78px; height: 78px; margin: -39px 0 0 -39px;
  opacity: 0; pointer-events: none;
}
.product img {
  width: 100%; height: 100%; object-fit: contain; border-radius: 12px;
}
.reveal.open .product { animation: productjump 1.3s cubic-bezier(0.34, 1.35, 0.64, 1) forwards; }
.reveal.open .product img { animation: producthover 3.2s 1.8s ease-in-out infinite; }
.reveal.open .product.p1 { --px: -124px; --py: -112px; --pr: -14deg; animation-delay: 1.2s; }
.reveal.open .product.p2 { --px: 124px;  --py: -122px; --pr: 12deg;  animation-delay: 1.35s; }
.reveal.open .product.p3 { --px: -156px; --py: -22px;  --pr: -8deg;  animation-delay: 1.5s; }
.reveal.open .product.p4 { --px: 156px;  --py: -34px;  --pr: 10deg;  animation-delay: 1.65s; }
@keyframes productjump {
  0% { opacity: 0; transform: translate(0, 46px) scale(0.25) rotate(0deg); }
  25% { opacity: 1; }
  60% { transform: translate(calc(var(--px) * 0.55), calc(var(--py) - 56px)) scale(1.08) rotate(var(--pr)); }
  100% { opacity: 1; transform: translate(var(--px), var(--py)) scale(1) rotate(var(--pr)); }
}
@keyframes producthover {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-10px) rotate(5deg); }
}

/* full-screen eruption layer: foam peanuts + confetti fall to the bottom */
.fx-layer { position: fixed; inset: 0; overflow: hidden; pointer-events: none; z-index: 5; }
.fx { position: absolute; opacity: 0; will-change: transform; }
.fx.confetti {
  width: var(--s, 9px); height: calc(var(--s, 9px) * var(--ar, 1.5));
  border-radius: var(--br, 2px);
  background: var(--c);
}
.fx.run { animation: fxpop var(--dur) cubic-bezier(0.32, 0.12, 0.6, 1) var(--delay) forwards; }
@keyframes fxpop {
  0% { opacity: 0; transform: translate(0, 0) rotate(0deg); }
  7% { opacity: 1; }
  26% { transform: translate(calc(var(--dx) * 0.3), var(--uy)) rotate(var(--hr)); }
  100% { opacity: 1; transform: translate(var(--dx), var(--dy)) rotate(var(--fr)); }
}

/* confetti burst on open */
.burst { position: absolute; inset: 0; pointer-events: none; }
.burst i {
  position: absolute; left: 50%; top: 32%; width: 8px; height: 8px;
  border-radius: 2px; opacity: 0; background: var(--gold);
}
.burst i:nth-child(3n) { background: var(--accent); border-radius: 50%; }
.burst i:nth-child(4n) { background: #fff; }
.burst i:nth-child(5n) { background: var(--accent2); }
.reveal.open .burst i { animation: burstfly 1s 0.5s ease-out forwards; }
.burst i:nth-child(1)  { --dx: -96px;  --dy: -120px; }
.burst i:nth-child(2)  { --dx: 84px;   --dy: -140px; }
.burst i:nth-child(3)  { --dx: -140px; --dy: -60px; }
.burst i:nth-child(4)  { --dx: 130px;  --dy: -82px; }
.burst i:nth-child(5)  { --dx: -50px;  --dy: -160px; }
.burst i:nth-child(6)  { --dx: 44px;   --dy: -170px; }
.burst i:nth-child(7)  { --dx: -120px; --dy: -110px; }
.burst i:nth-child(8)  { --dx: 112px;  --dy: -120px; }
.burst i:nth-child(9)  { --dx: -20px;  --dy: -185px; }
.burst i:nth-child(10) { --dx: 20px;   --dy: -150px; }
@keyframes burstfly {
  0% { opacity: 1; transform: translate(0, 0) scale(1) rotate(0deg); }
  100% { opacity: 0; transform: translate(var(--dx), var(--dy)) scale(0.4) rotate(220deg); }
}
.prize-caption { margin-top: 6px; }

@media (prefers-reduced-motion: reduce) {
  .cube, .cube-float, .halo, .sparks i, .glint, .price, .buy, .scene::after,
  .prize3d img, .burst i, .logo-wrap, .logo-mask, .logo-stack { animation: none !important; }
  .reveal.open .prize3d img, .reveal.open .prize-wrap { opacity: 1; transform: translateY(-62px) scale(1.05); }
}
@media (max-width: 420px) {
  .scene { width: 240px; height: 270px; perspective: 720px; }
  .cube, .face, .logo3d, .logo3d-back { width: 140px; height: 140px; }
  .front { transform: translateZ(70px); } .back { transform: rotateY(180deg) translateZ(70px); }
  .left { transform: rotateY(-90deg) translateZ(70px); } .right { transform: rotateY(90deg) translateZ(70px); }
  .bottom { transform: rotateX(-90deg) translateZ(70px); }
  .flap { height: 58px; top: -57px; }
  .logo-stack { width: 96px; height: 90px; margin-top: -44px; }
  .prize-wrap .logo-stack { margin-top: 0; }
  .beam, .beam-x { left: 20px; width: 100px; top: -92px; height: 105px; }
  .ship-label { width: 70px; height: 48px; right: 10px; top: 14px; }
  .sticker { font-size: 11px; left: 10px; bottom: 14px; }
  .qmark { font-size: 58px; }
}
