/* Content remains readable unless the entrance controller has initialized. */
[data-reveal], [data-reveal].visible { opacity: 1; transform: none; }
.page-enter { animation: none; }
:root { --motion-duration: 760ms; --motion-distance: 30px; --motion-inline: 24px; --motion-ease: cubic-bezier(.22,.68,.18,1); }
[data-motion] { --motion-x: 0px; --motion-y: var(--motion-distance); --motion-scale: 1; }
[dir="rtl"] [data-motion-direction="inline"] { --motion-x: var(--motion-inline); --motion-y: 0px; }
[dir="ltr"] [data-motion-direction="inline"] { --motion-x: calc(var(--motion-inline) * -1); --motion-y: 0px; }
html[data-site-motion="active"]:not([data-motion-paused="true"]) [data-motion="pending"] { opacity: 0; }
html[data-site-motion="active"]:not([data-motion-paused="true"]) [data-motion-running="true"] {
  animation: swaj-content-enter var(--motion-duration) var(--motion-ease) var(--motion-delay,0ms) backwards;
}
@keyframes swaj-content-enter {
  from { opacity: 0; translate: var(--motion-x) var(--motion-y); scale: var(--motion-scale); }
  to { opacity: 1; translate: 0 0; scale: 1; }
}
/* Number, rule and content arrive as one composed strategy card. */
.strategy-heading > [data-motion] { --motion-duration: 820ms; }
.strategy-compass[data-motion], .strategy-pillar[data-motion] { --motion-y: 30px; --motion-x: 0px; }
.strategy-axis-label[data-motion] { --motion-y: 14px; --motion-x: 0px; }
.strategy-pillar[data-motion-running="true"] .pillar-number { animation: swaj-pillar-number 820ms var(--motion-ease) var(--motion-delay,0ms) backwards; }
.strategy-axis-label[data-motion-running="true"]::before { transform-origin: top; animation: swaj-strategy-line 700ms var(--motion-ease) var(--motion-delay,0ms) backwards; }
@keyframes swaj-pillar-number { from { opacity: 0; translate: 0 10px; } to { opacity: 1; translate: 0 0; } }
@keyframes swaj-strategy-line { from { scale: 1 0; } to { scale: 1 1; } }
.home-pathway[data-motion], .home-news-card[data-motion], .program-card[data-motion], .media-card[data-motion] { --motion-scale: .98; }
@media (hover:hover) and (pointer:fine) {
  .home-pathway img, .home-news-image, .program-media img { transition: scale 650ms var(--motion-ease), opacity .3s, filter .3s; }
  .home-pathway:hover img, .home-news-card:hover .home-news-image, .program-card:hover .program-media img { scale: 1.035; }
  .editorial-link, .directory-link, .page-subnav a, .team-page-nav a { transition: color 220ms, border-color 220ms, background-color 220ms; }
}
/* The overlay opens once; its links follow in short, readable steps. */
.nav-open .menu-entry { animation: swaj-menu-enter 460ms var(--motion-ease) backwards; }
.nav-open .menu-entry:nth-child(2) { animation-delay: 35ms; }
.nav-open .menu-entry:nth-child(3) { animation-delay: 70ms; }
.nav-open .menu-entry:nth-child(4) { animation-delay: 105ms; }
.nav-open .menu-entry:nth-child(5) { animation-delay: 140ms; }
.nav-open .menu-entry:nth-child(6) { animation-delay: 175ms; }
.nav-open .menu-entry:nth-child(n+7) { animation-delay: 210ms; }
@keyframes swaj-menu-enter { from { opacity: 0; translate: 0 12px; } to { opacity: 1; translate: 0 0; } }
@view-transition { navigation: auto; }
::view-transition-old(root) { animation: swaj-page-out 160ms ease-out both; }
::view-transition-new(root) { animation: swaj-page-in 160ms ease-out both; }
@keyframes swaj-page-out { to { opacity: 0; } }
@keyframes swaj-page-in { from { opacity: 0; } }
@media (max-width:760px) {
  :root { --motion-duration: 500ms; --motion-distance: 16px; --motion-inline: 14px; }
  [data-motion] { --motion-delay: var(--motion-delay-mobile,0ms) !important; }
  .strategy-heading > [data-motion] { --motion-duration: 540ms; }
  .strategy-compass[data-motion], .strategy-pillar[data-motion] { --motion-y: 16px; }
  .strategy-pillar[data-motion-running="true"] .pillar-number { animation-duration: 500ms; }
  .strategy-axis-label[data-motion-running="true"]::before { animation-duration: 450ms; }
}
html[data-motion-paused="true"] [data-motion],
html[data-motion-paused="true"] [data-motion]::before,
html[data-motion-paused="true"] .pillar-number,
html[data-motion-paused="true"] .menu-entry { animation: none !important; opacity: 1; translate: none; }
html[data-motion-paused="true"] .partner-ribbon-track,
html[data-motion-paused="true"] .hero-media img { animation-play-state: paused !important; }
html[data-motion-paused="true"] :is(.home-pathway, .team-directory-card, .home-pathway img, .home-news-image, .program-media img, .main-nav, .menu-toggle i) { transition: none !important; }
html[data-motion-paused="true"] :is(.home-pathway img, .home-news-image, .program-media img) { scale: none !important; }
html[data-motion-paused="true"]::view-transition-old(root),
html[data-motion-paused="true"]::view-transition-new(root) { animation: none; }
@media (prefers-reduced-motion: reduce) {
  html[data-site-motion="active"] [data-motion="pending"] { opacity: 1; }
  [data-motion], [data-motion]::before, .pillar-number, .nav-open .menu-entry { animation: none !important; translate: none; }
  .home-pathway img, .home-news-image, .program-media img { transition: none; scale: none !important; }
  ::view-transition-old(root), ::view-transition-new(root) { animation: none; }
}
