/* ── How it works: the split stage ────────────────────────────
   Desktop: the phone holds still in the left column (sticky, one viewport tall)
   while the three steps scroll by on the right, each tall enough to own the screen
   for a moment; the phone's screen crossfades to the step being read. Phone and
   narrow screens: no stickiness — each step carries its own screen inline, so
   nothing depends on scroll position (see .stage--static, set by stage.js below
   900px and the default without script). */

.stage__grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1fr);
  gap: clamp(32px, 6vw, 96px);
  align-items: start;
}

.stage__fixed {
  position: sticky;
  top: 0;
  height: 100svh;
  display: grid;
  place-items: center;
}
.stage__phone {
  position: relative;
  width: min(300px, 76%);
  aspect-ratio: 9 / 19.5;
  border-radius: 40px;
  background: var(--ink);
  padding: 12px;
}
.stage__screen {
  position: absolute;
  inset: 12px;
  border-radius: 30px;
  overflow: hidden;
  background: #fff;
  opacity: 0;
  transform: scale(.97);
  transition: opacity .5s ease-out, transform .6s cubic-bezier(.2, .8, .2, 1);
}
.stage__screen.is-on { opacity: 1; transform: none; }

/* Screen 1: the store listing being read. */
.stage__screen[data-screen='1'] { padding: 36px 18px 18px; display: flex; flex-direction: column; gap: 14px; }
.stage__store { display: flex; gap: 12px; align-items: center; }
.stage__storeIcon { width: 64px; height: 64px; border-radius: 15px; }
.stage__store b { display: block; font-family: var(--display); font-weight: 900; font-size: 19px; color: var(--ink); }
.stage__store span { display: block; font-size: 13px; color: var(--ink-50); }
.stage__store .stage__get {
  display: inline-block; margin-top: 6px; padding: 3px 14px;
  border-radius: 999px; background: var(--blue-deep); color: #fff; font-weight: 800; font-size: 13px;
}
.stage__rating { margin: 0; font-size: 13px; color: var(--ink); }
.stage__rating b { font-weight: 800; }
.stage__rating span { color: var(--ink-50); margin-left: 4px; }
.stage__desc { margin: 0; font-size: 14px; line-height: 1.5; color: var(--ink); }
.stage__read {
  margin: auto 0 0; padding: 10px 12px; border-radius: 12px;
  background: var(--cream-2); font-size: 13px; font-weight: 700; color: var(--ink);
}
.stage__read::before {
  content: ''; display: inline-block; width: 8px; height: 8px; margin-right: 8px;
  border-radius: 50%; background: var(--blue-deep); animation: stage-pulse 1.2s ease-in-out infinite;
}

/* Screen 2: the slides building, one after another. */
.stage__screen[data-screen='2'] { padding: 32px 14px 14px; background: var(--ink); }
.stage__label { margin: 0 0 12px; font-size: 13px; font-weight: 700; color: #fff; }
.stage__slides { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.stage__slides span {
  position: relative; display: block; aspect-ratio: 9 / 16; overflow: hidden; border-radius: 8px;
  background: #2A2D32; opacity: .15; transform: translateY(6px);
}
.stage__slides img { width: 100%; height: 100%; object-fit: cover; }
.stage__slides i {
  position: absolute; left: 6px; right: 6px; top: 40%;
  padding: 3px 4px; border-radius: 3px; background: #fff; color: #111;
  font: 700 8px/1.2 'TikTok Sans', var(--sans); text-align: center; font-style: normal;
}
.stage__screen[data-screen='2'].is-on .stage__slides span {
  animation: stage-slide-in .5s cubic-bezier(.2, .8, .2, 1) forwards;
  animation-delay: calc(var(--i) * 140ms + 150ms);
}

/* Screen 3: the post, waiting in the inbox. */
.stage__screen--post { background: #000; }
.stage__postImg { width: 100%; height: 100%; object-fit: cover; }
.stage__hook {
  position: absolute; left: 14px; right: 14px; top: 26%;
  margin: 0; text-align: center;
  font: 700 16px/1.35 'TikTok Sans', var(--sans); color: #111;
}
.stage__hook span {
  padding: 2px 7px; border-radius: 4px; background: #fff;
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
}
.stage__toast {
  position: absolute; left: 12px; right: 12px; bottom: 14px; margin: 0;
  padding: 10px 12px; border-radius: 12px; background: #fff; color: var(--ink);
  font-size: 13px; font-weight: 700; text-align: center;
  transform: translateY(16px); opacity: 0;
  transition: transform .5s cubic-bezier(.2, .8, .2, 1) .35s, opacity .4s ease-out .35s;
}
.stage__screen--post.is-on .stage__toast { transform: none; opacity: 1; }

/* The reading column: each step owns most of a screen on desktop. */
.stage__copy { padding-top: 18vh; }
.stage__copy .lede { margin-top: 18px; }
.stage__steps { list-style: none; margin: 0; padding: 0; counter-reset: step; }
.stage__step {
  min-height: 62vh;
  display: flex; flex-direction: column; justify-content: center;
  max-width: 44ch;
  opacity: .38;
  transition: opacity .4s ease-out;
}
.stage__step.is-on { opacity: 1; }
.stage__step .h3 { font-size: clamp(26px, 2.6vw, 36px); margin-bottom: 14px; }
.stage__step p { margin: 0 0 14px; font-size: 18px; line-height: 1.55; color: var(--ink); }
.stage__step small { font-size: 15px; font-weight: 700; color: var(--ink-50); font-variant-numeric: tabular-nums; }
.stage__more { margin: 0 0 18vh; }

@keyframes stage-slide-in { to { opacity: 1; transform: none; } }
@keyframes stage-pulse { 50% { opacity: .3; } }

/* Static layout: no sticky phone. Each step is fully legible (no dimming), and a
   phone sits in its own step. Used below 900px and when script never runs. */
.stage--static .stage__grid { grid-template-columns: 1fr; }
.stage--static .stage__fixed { display: none; }
.stage--static .stage__copy { padding-top: 0; }
.stage--static .stage__step { min-height: 0; opacity: 1; margin-top: 36px; }
.stage--static .stage__more { margin: 32px 0 0; }

@media (max-width: 899px) {
  .stage__grid { grid-template-columns: 1fr; }
  .stage__fixed { display: none; }
  .stage__copy { padding-top: 0; }
  .stage__step { min-height: 0; opacity: 1; margin-top: 32px; }
  .stage__more { margin: 28px 0 0; }
}

@media (prefers-reduced-motion: reduce) {
  .stage__screen, .stage__step, .stage__toast { transition: none; }
  .stage__slides span { opacity: 1; transform: none; animation: none !important; }
  .stage__read::before { animation: none; }
}
