/* The illustrated group stays in view while the first orbit unfolds. */
.scroll-motion .home-hero {
  --hero-progress: 0;
  --hero-rise: 5rem;
  --hero-side: 2.2rem;
}

.scroll-motion .home-hero__frame {
  overflow: clip;
}

.scroll-motion .home-hero.is-pinned {
  background: var(--paper);
}

.scroll-motion .home-hero.is-pinned::after {
  display: block;
  block-size: clamp(14rem, 47svh, 28rem);
  content: '';
}

.scroll-motion .home-hero.is-pinned .home-hero__frame {
  position: sticky;
  top: var(--hero-top, 5.75rem);
}

.scroll-motion .home-hero__copy {
  translate: calc(var(--hero-progress) * -1.1rem) calc(var(--hero-progress) * -2.5rem);
}

.scroll-motion .home-hero__visual {
  overflow: visible;
  clip-path: inset(0 0 0 -4rem);
}

.scroll-motion .home-hero__visual img {
  translate: calc(var(--hero-progress) * -1 * var(--hero-side)) calc(var(--hero-progress) * -1 * var(--hero-rise));
  scale: calc(1 + var(--hero-progress) * .085);
}

.scroll-motion .hero-disc--sky {
  translate: calc(var(--hero-progress) * -4.5rem) calc(var(--hero-progress) * -3.8rem);
  rotate: calc(var(--hero-progress) * -20deg);
  scale: calc(1 + var(--hero-progress) * .18);
}

.scroll-motion .hero-disc--mint {
  translate: calc(var(--hero-progress) * 4.7rem) calc(var(--hero-progress) * -1.1rem);
  rotate: calc(var(--hero-progress) * 24deg);
  scale: calc(1 + var(--hero-progress) * .22);
}

.scroll-motion .hero-orbit {
  translate: 0 calc(var(--hero-progress) * -3.6rem);
  rotate: calc(var(--hero-progress) * -9deg);
  scale: calc(1 + var(--hero-progress) * .09);
}

.scroll-motion .hero-orbit__trace {
  stroke: var(--petrol);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-dasharray: 1;
  stroke-dashoffset: calc(.66 - var(--hero-progress) * .6);
  opacity: calc(var(--hero-progress) * .75);
}

.hero-scroll-track {
  position: absolute;
  z-index: 2;
  inset: auto auto 1.4rem clamp(1.25rem, 5vw, 5rem);
  width: clamp(3.25rem, 6vw, 5rem);
  height: 2px;
  background: #98c3cd;
}

.hero-scroll-track::after {
  position: absolute;
  inset: 0;
  background: var(--petrol);
  content: '';
  transform: scaleX(var(--hero-progress, 0));
  transform-origin: left;
}

/* The path carries across the principles and expands into the care network. */
.scroll-motion .opening,
.scroll-motion .network,
.scroll-motion .directory,
.scroll-motion .content-split,
.scroll-motion .editorial-list article,
.scroll-motion .callout {
  --distance: calc(1 - var(--scroll-progress, 1));
}

.scroll-motion .opening__text h2,
.scroll-motion .directory > h2,
.scroll-motion .content-split > h2 {
  position: relative;
  justify-self: start;
  translate: 0 calc(var(--distance) * 2.25rem);
}

.scroll-motion .opening__text h2::after,
.scroll-motion .directory > h2::after,
.scroll-motion .content-split > h2::after {
  position: absolute;
  inset: auto auto -.5rem 0;
  width: min(3.6rem, 100%);
  height: 2px;
  background: var(--petrol);
  content: '';
  transform: scaleX(var(--scroll-progress, 1));
  transform-origin: left;
}

.scroll-motion .opening__text > div {
  translate: 0 calc(var(--distance) * 3.4rem);
}

.scroll-motion .tenets {
  border-top-color: transparent;
  position: relative;
}

.scroll-motion .tenets::before {
  position: absolute;
  inset: -1px 0 auto;
  height: 1px;
  background: var(--petrol);
  content: '';
  transform: scaleX(var(--values-progress, 1));
  transform-origin: left;
}

.scroll-motion .tenets li span {
  scale: calc(.4 + .6 * clamp(0, (var(--values-progress, 1) * 1.7 - var(--delay, 0)), 1));
}

.scroll-motion .tenets li:nth-child(2) { --delay: .3; }
.scroll-motion .tenets li:nth-child(3) { --delay: .6; }

.scroll-motion .network__intro {
  translate: 0 calc(var(--distance) * 2.8rem);
}

.scroll-motion .directory__links a {
  --card-distance: clamp(0, calc(1 + var(--delay, 0) - var(--scroll-progress, 1) * 1.3), 1);
  translate: 0 calc(var(--card-distance) * var(--lift, 2.35rem));
}

.scroll-motion .directory__links a:nth-child(2) {
  --delay: .16;
  --lift: 4.1rem;
}

.scroll-motion .directory__links a:nth-child(3) {
  --delay: .3;
  --lift: 5.1rem;
}

/* The inner pages reuse the moving line at their editorial breaks. */
.scroll-motion .page-hero {
  --exit-progress: 0;
  overflow: clip;
}

.scroll-motion .page-hero__copy {
  translate: 0 calc(var(--exit-progress) * 2.6rem);
}

.scroll-motion .inner-art {
  translate: 0 calc(var(--exit-progress) * -3.3rem);
  scale: calc(1 + var(--exit-progress) * .06);
}

.scroll-motion .inner-art::before {
  rotate: calc(var(--exit-progress) * -22deg);
  scale: calc(1 + var(--exit-progress) * .16);
}

.scroll-motion .editorial-list article {
  position: relative;
  translate: 0 calc(var(--distance) * 1.65rem);
}

.scroll-motion .editorial-list article::before {
  position: absolute;
  inset: -1px 0 auto;
  height: 1px;
  background: var(--petrol);
  content: '';
  transform: scaleX(var(--scroll-progress, 1));
  transform-origin: left;
}

.scroll-motion .callout {
  overflow: clip;
}

.scroll-motion .callout__layout {
  translate: 0 calc(var(--distance) * 2rem);
}

.scroll-motion :is(.home-hero__copy, .opening__text > div, .directory__links a, .page-hero__copy, .editorial-list article, .callout__layout):focus-within {
  translate: none;
}

@media (min-width: 46rem) and (min-height: 41rem) {
  .scroll-motion .home-hero__frame {
    min-height: min(76svh, 46rem);
  }
}

@media (max-width: 53rem) {
  .scroll-motion .home-hero {
    --hero-rise: 3rem;
    --hero-side: 1rem;
  }

  .scroll-motion .home-hero__visual {
    clip-path: inset(0 0 0 -1.5rem);
  }
}

@media (max-width: 39rem) {
  .scroll-motion .home-hero {
    --hero-rise: 2.05rem;
    --hero-side: .55rem;
  }

  .scroll-motion .home-hero__visual {
    clip-path: inset(-.65rem 0 0 -.45rem);
  }

  .scroll-motion .home-hero__visual img {
    scale: calc(1 + var(--hero-progress) * .045);
  }

  .scroll-motion .home-hero__copy {
    translate: 0 calc(var(--hero-progress) * -.95rem);
  }

  .scroll-motion .hero-disc--sky {
    translate: calc(var(--hero-progress) * -2rem) calc(var(--hero-progress) * -2rem);
  }

  .scroll-motion .hero-disc--mint {
    translate: calc(var(--hero-progress) * 2.2rem) calc(var(--hero-progress) * -1.4rem);
  }

  .scroll-motion .hero-orbit {
    translate: 0 calc(var(--hero-progress) * -2.2rem);
  }

  .scroll-motion .opening__text h2::after,
  .scroll-motion .content-split > h2::after {
    bottom: -.4rem;
  }

  .scroll-motion .opening__text > div {
    translate: 0 calc(var(--distance) * 1.85rem);
  }

  .scroll-motion .page-hero__copy {
    translate: 0 calc(var(--exit-progress) * 1.5rem);
  }

  .scroll-motion .inner-art {
    translate: 0 calc(var(--exit-progress) * -2rem);
  }

  .scroll-motion .directory__links a {
    --lift: 1.35rem;
  }
}
