/*
 * GPIPL motion foundation (Phase 3, global).
 *
 * Principles
 * - One orchestrated moment per page (e.g. the hero); everything else is still.
 * - Motion answers the user (hover, open, submit) or draws attention once. No looping.
 * - Durations/easing come from tokens: --dur-fast 140ms, --dur-base 240ms,
 *   --dur-slow 480ms, --dur-draw 1100ms; --ease-out for entrances.
 * - Everything is visible without JS. JS arms an element only when it can also
 *   reveal it, so a script failure never leaves content hidden.
 * - prefers-reduced-motion: no transforms or entrances; instant state changes.
 *
 * Reveal (opt-in, use sparingly): add data-reveal to an element. The reveal
 * module in main.js adds .is-armed, then .is-revealed when it scrolls into view.
 */
@layer utilities {
	[data-reveal].is-armed:not(.is-revealed) {
		opacity: 0;
		transform: translateY(12px);
	}
	[data-reveal].is-armed {
		transition:
			opacity var(--dur-slow) var(--ease-out) var(--reveal-delay, 0ms),
			transform var(--dur-slow) var(--ease-out) var(--reveal-delay, 0ms);
	}
	[data-reveal="fade"].is-armed:not(.is-revealed) { transform: none; }
}

/* Printing (and PDF export) must show everything, including items never scrolled into view. */
@media print {
	[data-reveal] { opacity: 1 !important; transform: none !important; }
	.spectral-band .spectral-band__line,
	.spectral-band .spectral-band__label { opacity: 1 !important; transform: none !important; animation: none !important; }
}

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	*, *::before, *::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		animation-delay: 0ms !important;
		transition-duration: 0.01ms !important;
		transition-delay: 0ms !important;
		scroll-behavior: auto !important;
	}
	[data-reveal] { opacity: 1 !important; transform: none !important; }
}
