.hero-pin {
  height: 340vh;
  position: relative;
}

.hero-sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Yellow glow blob behind the box */
.hero-blob {
  position: absolute;
  width: 720px;
  height: 720px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--yellow), transparent 62%);
  opacity: 0.5;
  filter: blur(20px);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 1;
  pointer-events: none;
}

/* Three.js canvas — subtle floating accent */
#hero-canvas {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  display: block;
}

/* ── 3D box scene ──────────────────────────────────── */
.hero-scene {
  position: absolute;
  inset: 0;
  z-index: 3;
  perspective: 1600px;
  perspective-origin: 50% 45%;
  pointer-events: none;
}

.box-wrapper {
  position: absolute;
  left: 50%;
  top: 50%;
  width: var(--bw);
  height: var(--bh);
  --bw: 320px;
  --bh: 440px;
  --bd: 132px;
  transform-style: preserve-3d;
  transform: translate(-50%, -50%) rotateX(-8deg) rotateY(-22deg);
  will-change: transform;
  cursor: grab;
  pointer-events: auto;
}
.box-wrapper:active { cursor: grabbing; }

.box-shadow-floor {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 360px;
  height: 80px;
  transform: translate(-50%, 240px) rotateX(80deg);
  background: radial-gradient(ellipse, rgba(44,32,22,0.28), transparent 70%);
  filter: blur(8px);
  border-radius: 50%;
  z-index: 2;
  pointer-events: none;
}

/* Faces */
.box-face {
  position: absolute;
  backface-visibility: hidden;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.06);
}
.box-face.front, .box-face.back {
  width: var(--bw); height: var(--bh);
  left: 0; top: 0;
}
.box-face.front { transform: translateZ(calc(var(--bd) / 2)); }
.box-face.back  { transform: rotateY(180deg) translateZ(calc(var(--bd) / 2)); }
.box-face.right, .box-face.left {
  width: var(--bd); height: var(--bh);
  left: calc(var(--bw)/2 - var(--bd)/2); top: 0;
}
.box-face.right { transform: rotateY(90deg)  translateZ(calc(var(--bw) / 2)); }
.box-face.left  { transform: rotateY(-90deg) translateZ(calc(var(--bw) / 2)); }
.box-face.top, .box-face.bottom {
  width: var(--bw); height: var(--bd);
  left: 0; top: calc(var(--bh)/2 - var(--bd)/2);
}
.box-face.top    { transform: rotateX(90deg)  translateZ(calc(var(--bh) / 2)); }
.box-face.bottom { transform: rotateX(-90deg) translateZ(calc(var(--bh) / 2)); }

/* ── FRONT label ── */
.bf {
  width: 100%; height: 100%;
  background: linear-gradient(165deg, var(--red) 0%,
    color-mix(in srgb, var(--red) 78%, #FFC53A) 70%,
    color-mix(in srgb, var(--red) 60%, #FFC53A) 100%);
  color: var(--cream);
  padding: 22px 20px;
  display: flex;
  flex-direction: column;
}
.bf-top {
  display: flex; justify-content: space-between; align-items: center;
  font-family: var(--font-mono); font-size: 9px; letter-spacing: 0.1em;
  text-transform: uppercase; opacity: 0.9;
}
.bf-badge {
  background: var(--yellow); color: var(--ink); border-radius: 100px;
  padding: 3px 8px; font-weight: 500;
}
.bf-brand {
  font-family: var(--font-display); font-weight: 700;
  font-size: 46px; line-height: 0.86; letter-spacing: -0.02em;
  margin-top: 14px;
  text-shadow: 0 2px 0 rgba(0,0,0,0.12);
}
.bf-brand .pop { color: var(--yellow); display: block; }
.bf-sub {
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.05em;
  margin-top: 8px; opacity: 0.95;
}
.bf-bowl {
  margin-top: auto; align-self: center;
  width: 190px; height: 120px; position: relative;
}
.bf-bowl .bowl {
  position: absolute; bottom: 0; left: 0; right: 0; height: 78px;
  background: var(--cream); border-radius: 0 0 100px 100px;
  box-shadow: inset 0 -8px 0 rgba(0,0,0,0.06);
}
.bf-bowl .milk {
  position: absolute; bottom: 56px; left: 8px; right: 8px; height: 30px;
  background: #FFF6E6; border-radius: 50%;
}
.bf-bowl .o {
  position: absolute; width: 22px; height: 22px; border-radius: 50%;
  border: 6px solid var(--yellow); box-sizing: border-box;
}
.bf-flag {
  position: absolute; bottom: 16px; right: -6px;
  background: var(--ink); color: var(--cream);
  font-family: var(--font-mono); font-size: 9px;
  padding: 4px 9px; border-radius: 6px; transform: rotate(-6deg);
}
.bf-net {
  font-family: var(--font-mono); font-size: 9px; text-align: center;
  margin-top: 10px; letter-spacing: 0.15em; opacity: 0.9;
}

/* ── Side panels (left/right) ── */
.bside {
  width: 100%; height: 100%;
  background: linear-gradient(180deg,
    color-mix(in srgb, var(--red) 92%, #000),
    color-mix(in srgb, var(--red) 68%, #000));
  color: var(--cream);
  padding: 18px 10px; display: flex; flex-direction: column; gap: 8px;
}
.bside h5 { font-family: var(--font-display); font-weight: 600; font-size: 13px; letter-spacing: 0.04em; }
.bside .row {
  font-family: var(--font-mono); font-size: 8.5px; line-height: 1.5;
  display: flex; justify-content: space-between;
  border-bottom: 1px dashed rgba(255,255,255,0.25); padding-bottom: 3px;
}

/* ── Back panel ── */
.bback {
  width: 100%; height: 100%;
  background: linear-gradient(180deg, var(--cream), var(--cream-2));
  color: var(--ink); padding: 22px 20px;
  display: flex; flex-direction: column; gap: 10px;
}
.bback h4 { font-family: var(--font-display); font-weight: 700; font-size: 22px; }
.bback p  { font-size: 11px; line-height: 1.5; color: var(--ink-soft); }
.bback .fact {
  font-family: var(--font-mono); font-size: 9px;
  background: var(--paper); border: 1px solid var(--line); border-radius: 6px;
  padding: 6px 8px;
}

/* ── Top / bottom ── */
.btop, .bbot {
  width: 100%; height: 100%;
  background: linear-gradient(90deg, color-mix(in srgb, var(--red) 80%, #000), var(--red));
  display: flex; align-items: center; justify-content: center;
  color: var(--cream); font-family: var(--font-display); font-weight: 600;
  font-size: 13px; letter-spacing: 0.15em;
}

/* ── Captions (left, vertically centered) ── */
.hero-captions {
  position: absolute;
  left: 7vw; top: 50%;
  transform: translateY(-50%);
  max-width: 460px;
  z-index: 4;
  pointer-events: none;
}

.hero-caption {
  position: absolute;
  top: 0;
  transition: opacity 0.5s var(--ease-out), transform 0.5s var(--ease-out);
  opacity: 0;
  transform: translateY(16px);
}
.hero-caption.active {
  opacity: 1;
  transform: translateY(0);
  position: relative;
}

.caption-eyebrow {
  font-family: var(--font-mono); font-size: 13px; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--red); margin-bottom: 8px;
}
.caption-head {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(56px, 8vw, 104px); line-height: 0.9;
  letter-spacing: -0.03em; margin-bottom: 18px; color: var(--ink);
}
.caption-head em { font-style: normal; color: var(--red); display: block; }
.caption-sub {
  font-size: 19px; line-height: 1.5; color: var(--ink-soft); margin-bottom: 22px;
}
.caption-tag {
  font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.1em;
  color: var(--ink); background: var(--paper); border: 1px solid var(--line);
  display: inline-block; padding: 8px 14px; border-radius: 100px;
}

/* ── Side badges (right) ── */
.hero-side-badges {
  position: absolute;
  right: 6vw; top: 50%;
  transform: translateY(-50%);
  display: flex; flex-direction: column; gap: 14px;
  z-index: 4;
}
.hsb {
  background: var(--paper); border: 2px solid var(--ink); border-radius: 14px;
  padding: 12px 16px; box-shadow: 4px 4px 0 var(--ink); width: 180px;
  transform: rotate(var(--r));
}
.hsb b { font-family: var(--font-display); font-weight: 700; font-size: 26px; display: block; }
.hsb span {
  font-family: var(--font-mono); font-size: 10px; color: var(--ink-soft);
  letter-spacing: 0.08em; text-transform: uppercase;
}
.hsb.red { background: var(--red); color: var(--cream); border-color: var(--ink); }
.hsb.red span { color: rgba(255,255,255,0.85); }

/* ── Scroll rail ── */
.hero-scroll-rail {
  position: absolute;
  bottom: 26px; left: 50%;
  transform: translateX(-50%);
  z-index: 5;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.2em;
  color: var(--ink-soft);
}
.hero-scroll-rail .rail-bar {
  width: 2px; height: 40px; background: var(--line);
  border-radius: 2px; overflow: hidden; position: relative;
}
.hero-scroll-rail .rail-fill {
  position: absolute; inset: 0; background: var(--red);
  transform-origin: top; transform: scaleY(0);
}

/* ── Responsive ── */
@media (max-width: 900px) {
  .hero-side-badges { display: none; }
  .hero-captions {
    left: 24px; right: 24px; max-width: none;
    top: auto; bottom: 12vh; transform: none;
  }
  .box-wrapper { --bw: 260px; --bh: 360px; --bd: 108px; }
}

@media (max-width: 560px) {
  .box-wrapper { --bw: 210px; --bh: 290px; --bd: 88px; }
  .bf-brand { font-size: 34px; }
  .caption-head { font-size: clamp(44px, 12vw, 64px); }
}
