/* Route changes fade the page's content in and out with a slight rise. The
   content moves, not main: main fills the panel, so moving it would push it
   past the panel's edge, make the panel briefly scrollable, and flash its
   scrollbar. main clips the moving content vertically instead (layout.css),
   and the entrance doesn't fill forwards, so nothing keeps a transform once
   it ends. */
.page-enter > * {
	animation: fadeSlideIn 260ms ease backwards;
}

.page-exit > * {
	animation: fadeOut 180ms ease forwards;
}

html.viewport-transition body > header,
html.viewport-transition #content > section,
html.viewport-transition body > footer {
	animation: viewportReflow 220ms ease-in-out both;
}

@keyframes fadeSlideIn {
	from {
		opacity: 0;
		transform: translateY(4px);
	}
}

@keyframes fadeOut {
	to {
		opacity: 0;
		transform: translateY(2px);
	}
}

@keyframes viewportReflow {
	0%, 100% {
		opacity: 1;
	}

	35% {
		opacity: 0.72;
	}
}

@media (prefers-reduced-motion: reduce) {
	html.viewport-transition body > header,
	html.viewport-transition #content > section,
	html.viewport-transition body > footer {
		animation: none;
	}
}
