/* Calm, once-only reveals follow the reference university's scrolling rhythm. */
body[data-page="home"] .motion-item {
  --motion-x: 0px;
  --motion-y: 38px;
  --motion-delay: 0ms;
}
body[data-page="home"] .motion-left { --motion-x: -42px; --motion-y: 0px; }
body[data-page="home"] .motion-right { --motion-x: 42px; --motion-y: 0px; }
body[data-page="home"] .motion-delay-1 { --motion-delay: 100ms; }
body[data-page="home"] .motion-delay-2 { --motion-delay: 200ms; }
body.motion-ready .motion-item {
  transition: opacity 900ms ease var(--motion-delay), transform 1100ms cubic-bezier(.22, 1, .36, 1) var(--motion-delay);
}
body.motion-ready .motion-item:not(.is-revealed) {
  opacity: 0;
  transform: translate3d(var(--motion-x), var(--motion-y), 0);
}
body.motion-ready .motion-item.is-revealed { opacity: 1; transform: none; }

body[data-page="home"] .about-section,
body[data-page="home"] .research-section,
body[data-page="home"] .events-section,
body[data-page="home"] .noticeboard-section,
body[data-page="home"] .campus-section { overflow-x: clip; }

@keyframes campus-copy-in {
  from { opacity: 0; transform: translate3d(0, 26px, 0); }
  to { opacity: 1; transform: none; }
}
@keyframes campus-photo-in {
  from { transform: scale(1.09); }
  to { transform: scale(1.03); }
}
body.motion-ready .hero-slide.is-active .hero-copy > * {
  animation: campus-copy-in 950ms cubic-bezier(.22, 1, .36, 1) both;
}
body.motion-ready .hero-slide.is-active .hero-copy > :nth-child(2) { animation-delay: 100ms; }
body.motion-ready .hero-slide.is-active .hero-copy > :nth-child(3) { animation-delay: 200ms; }
body.motion-ready .hero-slide.is-active .hero-copy > :nth-child(4) { animation-delay: 300ms; }
body.motion-ready .hero-slide.is-active .hero-photo { animation: campus-photo-in 10000ms ease-out both; }
body.motion-ready .hero:hover .hero-photo,
body.motion-ready .hero:focus-within .hero-photo { animation-play-state: paused; }

body[data-page="home"] .primary-nav .nav-item > a { position: relative; }
body[data-page="home"] .primary-nav .nav-item > a::after {
  position: absolute;
  right: 0;
  bottom: 9px;
  left: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--orange), var(--berry));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 250ms ease;
  content: "";
}
body[data-page="home"] .primary-nav .nav-item:hover > a::after,
body[data-page="home"] .primary-nav .nav-item:focus-within > a::after { transform: scaleX(1); }
body[data-page="home"] .text-link,
body[data-page="home"] .hero-link { transition: gap 250ms ease, color 250ms ease; }
body[data-page="home"] .text-link span,
body[data-page="home"] .hero-link span,
body[data-page="home"] .academic-links span,
body[data-page="home"] .campus-links span { transition: transform 250ms ease; }
body[data-page="home"] .text-link:hover span,
body[data-page="home"] .hero-link:hover span,
body[data-page="home"] .academic-links a:hover span,
body[data-page="home"] .campus-links a:hover span { transform: translateX(5px); }
body[data-page="home"] .events-grid h3,
body[data-page="home"] .news-card h3 { transition: color 250ms ease; }

@media (max-width: 760px) {
  body[data-page="home"] .motion-item { --motion-x: 0px; --motion-y: 26px; }
}
@media (prefers-reduced-motion: reduce) {
  body.motion-ready .motion-item,
  body.motion-ready .motion-item:not(.is-revealed) { opacity: 1; transform: none; transition: none; }
  body.motion-ready .hero-slide.is-active .hero-copy > *,
  body.motion-ready .hero-slide.is-active .hero-photo { animation: none; }
  body[data-page="home"] .text-link:hover span,
  body[data-page="home"] .hero-link:hover span,
  body[data-page="home"] .academic-links a:hover span,
  body[data-page="home"] .campus-links a:hover span { transform: none; }
}
