/* edgi/motion.css — site-wide motion pass (M7). Transform/opacity only; nothing
 * hidden at rest, so content is fully visible with JS off or reduced motion.
 * Enqueued alongside assets/js/motion.js (see inc/assets.php). */

/* Word spans from SplitText / the manual splitter: inline-block so lifts and
 * slight rotations apply per word. No hidden state here. */
.edgi-word {
	display: inline-block;
	/* No permanent will-change: every word would hold its own GPU layer for the life of the
	   page. GSAP promotes words only while they move. */
}

/* Timeline: the orange rule draws left to right. motion.js scrubs
 * --edgi-line 0→1; unset (no JS) shows the full rule. */
ol.wp-block-edgi-timeline.tl {
	perspective: 900px;
}

ol.wp-block-edgi-timeline.tl::before {
	transform: scaleX(var(--edgi-line, 1));
	transform-origin: left center;
}

/* TOC marker: slide + recolour when scroll-spy moves .on. */
.wp-block-edgi-toc .po-toc-list a {
	transition: border-color 0.3s ease, color 0.3s ease, padding-left 0.3s ease;
}

.wp-block-edgi-toc .po-toc-list a.on {
	padding-left: 16px;
}

/* Paper-confetti burst pieces (motion.js removes them after ~1s). */
.edgi-burst-bit {
	position: fixed;
	z-index: 9999;
	pointer-events: none;
	border-radius: 1px;
	margin: 0;
}

/* Belt and braces: never leave motion artefacts under reduced motion. */
@media (prefers-reduced-motion: reduce) {
	.edgi-burst-bit {
		display: none;
	}
	ol.wp-block-edgi-timeline.tl::before {
		transform: none;
	}
}
