/*
 * Paganini Congressi — motion system (scroll reveal contract).
 *
 * The canonical .pc-reveal / .pc-reveal--visible vocabulary. These classes are
 * added BY JS only — they never appear in markup/DB/patterns. Every hidden
 * start-state is scoped under html.pc-js AND prefers-reduced-motion: no-preference,
 * so:
 *   - without JS (or before it runs) everything is fully visible — no flash, no CLS;
 *   - reduced-motion users see content at full opacity instantly.
 *
 * Carta Tecnica §6 KEEPS: scroll reveal, count-up (main.js), header scroll state
 * (header.css), button/link hover micro-interactions. REMOVED here: marquee,
 * custom cursor + ring + image preview + magnetic, ken-burns, theatre rail —
 * client-rejected AI-slop / removed set pieces (§5).
 *
 * Tokens (--pc-ease / --pc-dur / --pc-rise / --pc-stagger) come from base.css :root
 * (foundations); fallbacks here keep the system coherent if the token layer is late.
 */

@media (prefers-reduced-motion: no-preference) {
	/* Hidden start-state — opacity + transform only (never layout) to guarantee no
	   cumulative layout shift; elements occupy their final box at all times. */
	html.pc-js .pc-reveal {
		opacity: 0;
		transform: translateY(var(--pc-rise, 20px));
		transition:
			opacity var(--pc-dur, 0.7s) var(--pc-ease, cubic-bezier(0.16, 1, 0.3, 1)),
			transform var(--pc-dur, 0.7s) var(--pc-ease, cubic-bezier(0.16, 1, 0.3, 1));
		transition-delay: calc(var(--pc-i, 0) * var(--pc-stagger, 70ms));
		will-change: opacity, transform;
	}

	html.pc-js .pc-reveal--visible {
		opacity: 1;
		transform: none;
	}
}

/* Explicit reduced-motion reset (belt-and-braces over the base.css duration guard):
   neutralise the transform so reduced-motion users never get a translateY jump, and
   keep everything at full opacity regardless of the reveal state. */
@media (prefers-reduced-motion: reduce) {
	html.pc-js .pc-reveal,
	html.pc-js .pc-reveal--visible {
		opacity: 1;
		transform: none;
		transition: none;
		will-change: auto;
	}
}
