/*
 * A move to another page of the site that loads a new page (Get Started,
 * Log in, a form page) plays the app's drill as ONE move: the page you leave
 * goes past, the new one comes in from far, the top bar holds still (Michael,
 * 2026-11-24: "then i click start and its a flash. i need a generalized
 * solution"). The page you leave stays on screen, still, until the new one
 * has drawn itself (page_moves.js), so nothing in between is seen. Moves
 * within a page (Discover's own) are the page's.
 *
 * The drill: shared/theme/motion.ts DRILL_FAR / DRILL_PAST / DRILL_REST,
 * DRILL_OUT_S 0.2 s, DRILL_IN_S 0.46 s overlapping by half the way out.
 * Linked from every site page (landing_base.html).
 */
@view-transition {
  navigation: auto;
  types: cn-page-move;
}

html:active-view-transition-type(cn-page-move) [data-app-bar] {
  view-transition-name: cn-page-bar;
}

html:active-view-transition-type(cn-page-move)::view-transition-old(root) {
  animation: cnPageMovePast 200ms cubic-bezier(0.22, 1, 0.36, 1) both;
}
html:active-view-transition-type(cn-page-move)::view-transition-new(root) {
  animation: cnPageMoveIn 460ms cubic-bezier(0.22, 1, 0.36, 1) 100ms both;
}

@keyframes cnPageMovePast {
  to { opacity: 0; transform: scale(1.015); }
}
@keyframes cnPageMoveIn {
  from { opacity: 0; transform: translateY(12px) scale(0.965); }
}

@media (prefers-reduced-motion: reduce) {
  html:active-view-transition-type(cn-page-move)::view-transition-group(*),
  html:active-view-transition-type(cn-page-move)::view-transition-old(*),
  html:active-view-transition-type(cn-page-move)::view-transition-new(*) {
    animation: none;
  }
}
