/* Motion. Everything here stands still under prefers-reduced-motion (bottom of file). */
@keyframes slide { to { transform: translateX(calc(-50% - 8px)); } }
@keyframes drift { from { transform: scale(1.04) translate3d(0, 0, 0); } to { transform: scale(1.13) translate3d(-1.2%, -1%, 0); } }
@keyframes rise { from { opacity: 0; transform: translateY(46px); } to { opacity: 1; transform: none; } }
@keyframes cue { 0% { transform: scaleY(0); transform-origin: top; } 50% { transform: scaleY(1); transform-origin: top; } 51% { transform-origin: bottom; } 100% { transform: scaleY(0); transform-origin: bottom; } }
@keyframes halo { 0%, 100% { transform: rotate(0deg) scale(1); opacity: .45; } 50% { transform: rotate(180deg) scale(1.08); opacity: .7; } }
@keyframes talk { 0%, 100% { height: 22%; } 50% { height: 100%; } }
@keyframes arc { from { stroke-dashoffset: 326.7; } }
@keyframes hue { to { background-position: 200% 0; } }

.reel-track { animation: slide 46s linear infinite; }
@keyframes breathe { from { transform: scale(1); } to { transform: scale(1.045); } }
.scene img { animation: breathe 14s ease-in-out infinite alternate; }
.page-hero-bg { animation: drift 18s ease-in-out infinite alternate; }
/* The family photo has the father's head near its top edge: it is anchored to the top (style.css) and zooms from the top
   edge with no upward slide, so the drift never pushes a head under the header (About hero). */
@keyframes drift-top { from { transform: scale(1.04); } to { transform: scale(1.13); } }
.page-about .page-hero-bg { transform-origin: 50% 0; animation-name: drift-top; }
.scroll-cue span { animation: cue 2s ease-in-out infinite; }
.scene.is-on { transition: clip-path 1.5s cubic-bezier(.6, 0, .2, 1); }
h1 .line { animation: rise 1s cubic-bezier(.2, .8, .2, 1) both; }
h1 .line.out { background-size: 200% 100%; animation: rise 1s .14s cubic-bezier(.2, .8, .2, 1) both, hue 9s linear infinite; }
.beat-0 .kicker, .beat-0 .lede, .beat-0 .hero-actions, .page-hero .lede, .page-hero .jump { animation: rise 1s .32s cubic-bezier(.2, .8, .2, 1) both; }
.halo { animation: halo 9s ease-in-out infinite; }
.hope-wave i { animation: talk 1s ease-in-out infinite; }
.hope-wave i:nth-child(2n) { animation-duration: .7s; }
.hope-wave i:nth-child(3n) { animation-duration: 1.3s; }
.hope-wave i:nth-child(5n) { animation-duration: .9s; }
.hope-wave.is-quiet i { animation-play-state: paused; height: 22%; }
.js .stat.is-in .arc { animation: arc 1.6s cubic-bezier(.3, .7, .2, 1) both; }
.from-hope, .from-me { animation: rise .45s cubic-bezier(.2, .8, .2, 1) both; }
.mini-banner, .mini-toast { animation: rise .5s cubic-bezier(.2, .8, .2, 1) both; }

/* reveal on scroll (motion.js adds .is-in) */
.js .reveal { opacity: 0; transform: translateY(46px); transition: opacity .8s, transform .9s cubic-bezier(.2, .8, .2, 1); }
.js .reveal.from-left { transform: translateX(-70px) rotate(-2deg); }
.js .reveal.from-right { transform: translateX(70px) rotate(2deg); }
.js .reveal.is-in { opacity: 1; transform: none; }
.js .letter.reveal.is-in.is-lit { transform: translateY(-10px); }
.js :is(.stat-grid, .door-grid, .svc-grid, .team-grid, .prog-grid, .letter-row, .ways) > .reveal:nth-child(5n+2) { transition-delay: .08s; }
.js :is(.stat-grid, .door-grid, .svc-grid, .team-grid, .prog-grid, .letter-row, .ways) > .reveal:nth-child(5n+3) { transition-delay: .16s; }
.js :is(.stat-grid, .door-grid, .svc-grid, .team-grid, .prog-grid, .letter-row, .ways) > .reveal:nth-child(5n+4) { transition-delay: .24s; }
.js :is(.stat-grid, .door-grid, .svc-grid, .team-grid, .prog-grid, .letter-row, .ways) > .reveal:nth-child(5n) { transition-delay: .32s; }
.tilt img { transition: transform .5s cubic-bezier(.2, .8, .2, 1); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal, .js .reveal.from-left, .js .reveal.from-right { opacity: 1; transform: none; }
  .hero-beam { display: none; }
}
