:root {
  --motion-settle: cubic-bezier(.2, .65, .3, 1);
  --motion-interact: cubic-bezier(.2, 0, .25, 1);
}
.reading-progress {
  position: fixed;
  inset: 0 0 auto;
  height: 3px;
  z-index: 50;
  pointer-events: none;
  background: #1db954;
  transform: scaleX(0);
  transform-origin: left;
}
@keyframes reading-distance { to { transform: scaleX(1); } }
@keyframes collage-depth { from { translate: 0 0; } to { translate: 0 22px; } }
@media (prefers-reduced-motion: no-preference) {
  /* Preparing offscreen items has no transition. The short entrance only
     becomes active when the item is released just below the viewport. */
  .reveal-ready { opacity: .68; translate: 0 10px; }
  :is(.reveal-first, .reveal-second, .reveal-third) {
    animation: enter-section 420ms var(--motion-settle) backwards;
  }
  .reveal-second { animation-delay: 36ms; }
  .reveal-third { animation-delay: 72ms; }
  @keyframes enter-section {
    from { opacity: .68; translate: 0 10px; }
    to { opacity: 1; translate: 0 0; }
  }
  :is(.reveal-first, .reveal-second, .reveal-third):focus-within { animation: none; }
  @supports (animation-timeline: scroll(root block)) and (animation-range: 0px 700px) {
    .reading-progress {
      animation: reading-distance auto linear both;
      animation-timeline: scroll(root block);
    }
    @media (min-width: 901px) and (pointer: fine) {
      .hero-collage {
        animation: collage-depth auto linear both;
        animation-timeline: scroll(root block);
        animation-range: 0px 700px;
      }
    }
  }
}
header nav a:not(.nav-contact) { position: relative; }
header nav a:not(.nav-contact)::after {
  content: '';
  position: absolute;
  inset: auto 0 2px;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 200ms var(--motion-interact);
}
header nav a:is(:hover, :focus-visible)::after { transform: scaleX(1); }

@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .services > article, .experience-panels > article, .apps > article, .media-row {
    transition: transform 240ms var(--motion-interact);
  }
  :is(.services, .experience-panels, .apps) > article:hover { transform: translateY(-3px); }
  .media-row:hover { transform: translateX(3px); }
  .media-row .arrow, .practice-grid h2 > span, .button > span {
    display: inline-block;
    transition: transform 210ms var(--motion-interact);
  }
  .media-row .arrow { display: grid; }
  .media-row:is(:hover, :focus-visible) .arrow,
  .practice-grid a:is(:hover, :focus-visible) h2 > span,
  .button:is(:hover, :focus-visible) > span { transform: scale(1.09); }
  .world-grid .world-key-art > img { transition: transform 520ms var(--motion-settle); }
  .world-key-art:hover > img { transform: scale(1.04); }
}
.motion-paused .reading-progress { display: none; }
.motion-paused .hero-collage { animation: none; }
.motion-paused *, .motion-paused *::before, .motion-paused *::after { transition: none !important; }
@media (prefers-reduced-motion: reduce) {
  .reading-progress { display: none; }
}

#cra-art .photo-outgoing {
  position: absolute;
  inset: 0;
  height: 100%;
  pointer-events: none;
}
.quote-stage.quote-slides {
  display: grid;
  align-items: center;
}
.quote-slides > figure {
  grid-area: 1 / 1;
  opacity: 1;
  transition: opacity 200ms ease-out 100ms;
}
.quote-slides > figure[aria-hidden="true"] {
  opacity: 0;
  pointer-events: none;
  transition: opacity 100ms ease-in;
}
@media (prefers-reduced-motion: reduce) {
  #cra-art .photo-outgoing { display: none; }
  .quote-slides > figure { transition: none; }
}

.ticker-track { animation-name: ticker-phrase; }
@keyframes ticker-phrase { to { transform: translateX(-12.5%); } }
@media (prefers-reduced-motion: reduce) {
  .ticker-track { animation: none; }
}
