/* Moving between the public home page and the sign-in pages.
 * Loaded by layouts/landing.php and layouts/auth.php. A cross-document
 * view transition needs both pages to opt in, and its animations are drawn
 * from the stylesheets of the page being opened, so both load this file.
 *
 * The page being left slides up and fades, the new one rises in, and the
 * school's logo and name move from the home page's top bar into the
 * sign-in card (and back), because both carry the same transition names.
 * Browsers without cross-document transitions get landing.js's short
 * fade-out and the card's own entrance in auth.css instead. */

@view-transition { navigation: auto; }

.lp-logo, .auth-logo { view-transition-name: school-logo; }
.lp-brand-name, .auth-brand { view-transition-name: school-name; }

::view-transition-group(*) { animation-duration: 460ms; animation-timing-function: var(--ease-out, cubic-bezier(.2, .8, .2, 1)); }
::view-transition-old(root) { animation: 240ms ease-in both sims-page-out; }
::view-transition-new(root) { animation: 460ms var(--ease-out, cubic-bezier(.2, .8, .2, 1)) 60ms both sims-page-in; }
@keyframes sims-page-out { to { opacity: 0; transform: translateY(-14px) scale(.99); } }
@keyframes sims-page-in { from { opacity: 0; transform: translateY(18px); } }

@media (prefers-reduced-motion: reduce) {
  @view-transition { navigation: none; }
}
