/* ==========================================================================
   Block 04 — 3D setup animation
   The 3D stage sticks to the screen while you scroll through the section;
   the text blocks scroll over it normally. The animation starts as soon as
   the section enters the screen, so the box flies in before it pins.
   ========================================================================== */

.setup3d {
  position: relative;
  height: 1080vh;   /* 26 timeline units x ~41.5vh */
  background: #fff;   /* matches the intro block, so the white void is seamless */
  color: #fff;
}

.setup3d__stage {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
}

.setup3d__canvas {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.6s;
}

.setup3d.is-ready .setup3d__canvas { opacity: 1; }


/* ---------- scrolling text ---------- */

.setup3d__content {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}

.setup3d__intro,
.setup3d__block {
  position: absolute;
  left: var(--gutter);
  width: min(480px, calc(100% - var(--gutter) * 2));
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.6);
}

.setup3d__intro { width: calc(100% - var(--gutter) * 2); }

/* blocks that sit over the white void use dark text */
.setup3d__intro,
.setup3d__block--dark { color: var(--c-ink); text-shadow: none; }
.setup3d__block.setup3d__block--dark p { color: rgba(0, 0, 0, 0.65); }

.setup3d__intro .eyebrow { color: rgba(0, 0, 0, 0.6); }

.setup3d__intro .display {
  font-size: clamp(72px, 13vw, 200px);
  line-height: 0.9;
}

.setup3d__intro .display em {
  display: inline-block;
  margin-top: 0.06em;
  padding: 0.04em 0.08em 0;
  line-height: 1;
  background: var(--c-accent);
  color: var(--c-ink);
}

.setup3d__num {
  display: inline-block;
  padding: 3px 7px;
  border-radius: 4px;
  background: var(--c-accent);
  color: var(--c-ink);
  font: 700 12px/1 var(--font-mono);
  text-shadow: none;
}

.setup3d__block h3 {
  margin: 12px 0 8px;
  font-family: var(--font-display);
  font-size: clamp(40px, 5vw, 72px);
  font-weight: 400;
  line-height: 0.95;
  text-transform: uppercase;
}

.setup3d__block p {
  max-width: 36ch;
  margin: 0;
  font-size: 17px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.8);
}

/* ---------- progress bar ---------- */

.setup3d__bar {
  position: absolute;
  z-index: 2;
  left: var(--gutter);
  right: var(--gutter);
  bottom: 24px;
  height: 2px;
  background: rgba(255, 255, 255, 0.15);
  transition: background-color 0.4s;
}

.setup3d.is-void .setup3d__bar { background: rgba(0, 0, 0, 0.1); }
.setup3d.is-void .setup3d__bar span { background: var(--c-ink); }

.setup3d__bar span {
  display: block;
  height: 100%;
  background: var(--c-accent);
  transform: scaleX(0);
  transform-origin: left;
}

/* ---------- no WebGL ---------- */

.setup3d__fallback {
  display: none;
  position: absolute;
  inset: 0;
  place-items: center;
  color: rgba(255, 255, 255, 0.5);
}

.setup3d.is-fallback .setup3d__fallback { display: grid; }

/* small label above the showcase captions */
.setup3d__eyebrow { margin: 0; color: var(--c-accent); }
.setup3d__block .setup3d__eyebrow { font-size: 12px; color: var(--c-accent); }

/* ==========================================================================
   Block 05 — What's in the box (lives in the pinned stage, fades in at the end)
   ========================================================================== */

.inbox {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  color: var(--c-ink);
}

.inbox__figure {
  position: absolute;
  right: var(--gutter);
  top: 50%;
  width: min(58vw, 1040px);
  margin: 0;
  opacity: 0;
  transform: translateY(-46%);
}

.inbox__figure img {
  display: block;
  width: 100%;
  height: auto;
  /* soften the photo edges into the white void */
  -webkit-mask-image: radial-gradient(ellipse 72% 72% at 50% 50%, #000 62%, transparent 100%);
  mask-image: radial-gradient(ellipse 72% 72% at 50% 50%, #000 62%, transparent 100%);
}

/* numbered markers on the items in the photo */
.inbox__marker {
  position: absolute;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  margin: -14px 0 0 -14px;
  border-radius: 50%;
  background: var(--c-accent);
  color: var(--c-ink);
  box-shadow: 0 0 0 4px rgba(212, 255, 0, 0.3);
  font: 700 13px/1 var(--font-mono);
}

.inbox__copy {
  position: absolute;
  left: var(--gutter);
  top: 50%;
  width: min(34vw, 440px);
  transform: translateY(-46%);
}

.inbox__copy .display { font-size: clamp(48px, 5.4vw, 88px); margin-bottom: 28px; }
.inbox__copy .eyebrow { color: rgba(0, 0, 0, 0.6); }

.inbox__list {
  display: grid;
  gap: 18px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.inbox__list li {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 14px;
  align-items: start;
}

.inbox__num {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--c-ink);
  color: var(--c-accent);
  font: 700 14px/1 var(--font-mono);
}

.inbox__list h3 {
  margin: 4px 0 2px;
  font-size: 16px;
  font-weight: 700;
}

.inbox__list p {
  margin: 0;
  font-size: 14px;
  line-height: 1.45;
  color: rgba(0, 0, 0, 0.62);
}

/* appear one by one (class toggled by the timeline) */
.inbox [data-step] {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.5s var(--ease), transform 0.6s var(--ease);
}

.inbox .inbox__marker[data-step] { transform: scale(0.4); }
.inbox [data-step].is-active { opacity: 1; transform: none; }

/* phones/tablets: photo on top, list underneath */
@media (max-width: 989px) {
  .inbox__figure {
    top: calc(var(--header-h) + 8px);
    left: var(--gutter);
    right: var(--gutter);
    width: auto;
    transform: none;
  }
  .inbox__copy {
    top: auto;
    bottom: 48px;
    width: calc(100% - var(--gutter) * 2);
    transform: none;
  }
  .inbox__copy .display { font-size: 44px; margin-bottom: 16px; }
  .inbox__list { gap: 12px; }
  .inbox__list p { font-size: 13px; }
  .inbox__marker { width: 22px; height: 22px; margin: -11px 0 0 -11px; font-size: 11px; }
}
