.handoff {
  --scene-tail: clamp(2.2rem, 6.5vw, 6rem);
  position: relative;
  padding-bottom: var(--scene-tail);
  overflow: clip;
  color: var(--pale);
  background: #131419;
}
.handoff::after {
  content: "";
  position: absolute;
  z-index: 1;
  inset: auto 0 0;
  height: var(--scene-tail);
  background: linear-gradient(180deg, #131419, #303654 32%, #8995c2 69%, #d7daf2);
  pointer-events: none;
}
.handoff-pin {
  position: relative;
  isolation: isolate;
  overflow: clip;
  padding-block: clamp(3rem, 6vw, 6rem) clamp(4rem, 8vw, 7rem);
}
.handoff-title {
  text-align: center;
  font-size: clamp(2.7rem, 5.25vw, 6rem);
  line-height: .98;
  letter-spacing: -.068em;
  font-weight: 590;
}
.handoff-glow {
  position: absolute;
  z-index: -1;
  inset: -19% -25% -18%;
  transform: translate3d(calc(13% - var(--scene-progress, 0) * 26%), 0, 0) rotate(-7deg);
  background:
    radial-gradient(ellipse at 64% 57%, #6479dd92, #3f50a859 25%, transparent 55%),
    radial-gradient(ellipse at 43% 48%, #aeb8fc35, transparent 58%);
  mask-image: linear-gradient(transparent, #000 25%, #000 69%, transparent);
}
.handoff-glow::after {
  content: "";
  position: absolute;
  inset: 44% -12% auto;
  height: 25%;
  transform: rotate(-12deg);
  background: linear-gradient(90deg, transparent 25%, #87a1ff59 64%, transparent);
  filter: blur(3vw);
}
.handoff-stage {
  width: min(calc(100% - 2 * var(--gutter)), 78rem);
  margin: clamp(2.45rem, 5vw, 5rem) auto 0;
}
.handoff-world {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(.85rem, 2.1vw, 2.2rem);
  margin: 0;
  padding: 0;
  list-style: none;
}
.paper {
  position: relative;
  display: flex;
  flex-direction: column;
  container-type: inline-size;
  min-height: clamp(14rem, 21vw, 20rem);
  padding: clamp(1.05rem, 2.3vw, 2.3rem);
  color: #202125;
  background: linear-gradient(135deg, #fffefa, #e5e5df);
  opacity: var(--paper-opacity, 1);
  box-shadow: 0 1px 0 #f4f1e1a6, 0 2.35rem 4.25rem -1.9rem #03040d94;
  backface-visibility: hidden;
}
.paper::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(140deg, #ffffff60, transparent 60%, #05070e55);
  opacity: var(--paper-sheen, .17);
}
.paper-header {
  padding-bottom: .8rem;
  border-bottom: 1px solid #292d4950;
  font-size: clamp(.84rem, 2.75cqw, 1.08rem);
  line-height: 1.22;
  font-weight: 620;
}
.paper h3 {
  margin-block: clamp(.74rem, 4.5cqw, 2rem) clamp(.51rem, 2.4cqw, 1.2rem);
  font-size: clamp(1.72rem, 8.6cqw, 4.65rem);
  font-weight: 610;
  line-height: .99;
  letter-spacing: -.068em;
}
.paper > p { max-width: 33ch; font-size: clamp(.98rem, 3.45cqw, 1.51rem); line-height: 1.31; letter-spacing: -.023em; }
.paper-assets { display: none; background: linear-gradient(115deg, #d3dbf7, #afbde1); }
.paper-review {
  color: #f9f9f4;
  background: linear-gradient(130deg, #4159fa, #2838c3);
  box-shadow: 0 1px 0 #ffffff45, 0 2.35rem 5rem -1.6rem #030821aa;
}
.paper-review .paper-header { border-color: #ffffff62; }
.handoff-meter { display: none; }

.handoff-animated {
  min-height: 180vh;
  min-height: 180svh;
  overflow: visible;
}
.handoff-animated .handoff-pin {
  position: sticky;
  top: var(--header-height);
  height: calc(100vh - var(--header-height));
  height: calc(100svh - var(--header-height));
  padding: 0;
}
.handoff-animated .handoff-title {
  position: absolute;
  top: clamp(2.1rem, 9.8vh, 6.5rem);
  left: 50%;
  z-index: 1;
  transform: translateX(-50%);
}
.handoff-animated .handoff-stage {
  position: absolute;
  inset: 0;
  width: 100%;
  margin: 0;
  perspective: clamp(600px, 97vw, 1690px);
  perspective-origin: 50% 55%;
}
.handoff-animated .handoff-world {
  position: absolute;
  display: block;
  top: 55.8%;
  left: 50%;
  width: clamp(23rem, 46vw, 46rem);
  aspect-ratio: 1.72;
  transform: translate(-50%, -50%);
  transform-style: preserve-3d;
}
.handoff-animated .paper {
  position: absolute;
  inset: 0;
  min-height: 0;
  padding: 5.5%;
}
.handoff-animated .paper-assets { display: block; }
.handoff-animated .handoff-meter {
  position: absolute;
  z-index: 2;
  inset: auto 0 clamp(1.2rem, 4.5vh, 3.4rem);
  display: flex;
  justify-content: center;
  gap: .45rem;
  pointer-events: none;
}
.handoff-meter i {
  position: relative;
  height: 2px;
  width: clamp(1.35rem, 4vw, 3.45rem);
  transform-origin: left;
  background: #777b9c;
}
.handoff-meter i::after {
  content: "";
  position: absolute;
  inset: 0;
  transform-origin: left;
  transform: scaleX(var(--step-progress, 0));
  background: #d6dfff;
}

@media (max-width: 760px) {
  .handoff-world { grid-template-columns: 1fr; }
  .handoff-stage { max-width: 31rem; }
  .paper { min-height: 0; padding: 1.3rem; }
  .handoff-animated { min-height: 158vh; min-height: 158svh; }
  .handoff-animated .handoff-title { top: clamp(2rem, 10vh, 5rem); }
  .handoff-animated .handoff-stage { max-width: none; }
  .handoff-animated .handoff-world { top: 55%; width: min(78%, 34rem); aspect-ratio: 1.48; }
  .handoff-animated .paper { padding: 6%; }
  .paper-header { padding-bottom: .57rem; }
  .handoff-glow { inset: 4% -70% -7%; }
}
@media (max-width: 350px) {
  .handoff-animated .handoff-world { aspect-ratio: 1.27; }
  .paper > p { font-size: .91rem; }
}
