/* Masked text, layered artwork and a shared scroll rhythm. */
.word-mask { display: inline-block; vertical-align: bottom; overflow: clip; padding-bottom: .12em; margin-bottom: -.12em; }
.word-content { display: inline-block; transform-origin: 0 100%; }
.motion-ready [data-mask] .word-content {
  transform: translate3d(0, 118%, 0) rotate(3deg);
  transition: transform 1100ms cubic-bezier(.16, 1, .3, 1) var(--reveal-delay, 0ms);
}
.motion-ready [data-mask].is-visible .word-content,
.motion-ready a:focus-visible [data-mask] .word-content { transform: none; }
.motion-ready [data-reveal] {
  opacity: 0; transform: translate3d(0, 25px, 0);
  transition: opacity 850ms ease var(--item-delay, 0ms), transform 1100ms cubic-bezier(.16, 1, .3, 1) var(--item-delay, 0ms);
}
.motion-ready [data-reveal].is-visible, .motion-ready [data-reveal]:focus-within { opacity: 1; transform: none; }
.hero-description { --item-delay: 180ms; }
.hero .button { --item-delay: 250ms; }
.hero-note { --item-delay: 320ms; }
.principles article:nth-child(2) { --item-delay: 100ms; }
.principles article:nth-child(3) { --item-delay: 200ms; }
.project-visual { position: absolute; inset: 0; display: grid; place-items: center; }
.project-art::after { content: ""; position: absolute; z-index: 4; inset: -1px; background: var(--paper); pointer-events: none; transform: scaleY(0); transform-origin: 50% 100%; }
@media (min-width: 801px) {
  .motion-ready .project-art::after { transform: scaleY(1); transition: transform 1250ms cubic-bezier(.76, 0, .24, 1); }
  .motion-ready .project-art.is-visible::after, .motion-ready .project-link:focus-visible .project-art::after { transform: scaleY(0); }
  .project-index a { position: relative; }
  .project-index a::before { content: ""; position: absolute; inset: 0; z-index: -1; background: #e7ebe0; transform: scaleX(0); transform-origin: 0 50%; transition: transform 600ms cubic-bezier(.16, 1, .3, 1); }
  .project-index a[aria-current]::before { transform: scaleX(1); }
}
@media (max-width: 800px) {
  /* The horizontal travel is already a reveal: keep the text readable during it. */
  .motion-ready .project [data-mask] .word-content { transform: none; transition: none; }
  .has-wire-gallery::after { content: ""; position: absolute; z-index: 3; bottom: 0; left: 0; right: 0; height: 2px; background: var(--accent); transform: scaleX(var(--project-progress, 0)); transform-origin: 0 50%; pointer-events: none; }
  .is-scroll-story .project-info > div { opacity: calc(1 - var(--card-distance, 0) * .55); transform: translate3d(0, calc(var(--card-distance, 0) * 22px), 0); }
  .is-scroll-story .project-info h3 { transform: translate3d(0, calc(var(--card-distance, 0) * 8px), 0); }
}
html[data-artwork-paused="true"] .is-scroll-story .project-info > div,
html[data-artwork-paused="true"] .is-scroll-story .project-info h3 { transform: none; opacity: 1; }
@media (prefers-reduced-motion: reduce) {
  .motion-ready [data-mask] .word-content, .motion-ready [data-reveal] { transform: none; opacity: 1; transition: none; }
  .motion-ready .project-art::after { transform: scaleY(0); transition: none; }
  .project-visual, .is-scroll-story .project-info > div, .is-scroll-story .project-info h3 { transform: none !important; opacity: 1; }
  .project-index a::before { transition: none; }
}
