/* ==========================================================================
   INESJ — Motion states
   Entrances (reveal.js adds .is-revealed) and the reduced-motion contract.
   Hidden starting states only apply with html.js, so content is always
   visible without JavaScript.
   ========================================================================== */

/* Masthead: index fades, title lines rise out of their mask, deck follows. */
html.js .masthead[data-reveal] .chapter-index {
	opacity: 0;
	transition: opacity 600ms var(--ease-out);
}

html.js .masthead[data-reveal] .line__inner,
html.js .about__collabs-title[data-reveal] .line__inner,
html.js .contact__title[data-reveal] .line__inner {
	/* Fully below the mask, accents on capitals included. */
	transform: translate3d(0, calc(100% + 0.3em), 0);
	transition: transform var(--dur-reveal) var(--ease-out);
	transition-delay: calc(120ms + var(--i, 0) * 90ms);
}

html.js [data-reveal].is-revealed .chapter-index {
	opacity: 1;
}

html.js [data-reveal].is-revealed .line__inner {
	transform: none;
}

/* Paragraphs, categories, statements: a short rise + fade. */
html.js .statement[data-reveal],
html.js .lede[data-reveal],
html.js .category[data-reveal],
html.js .about__figure[data-reveal],
html.js .about__lead[data-reveal],
html.js .about__collabs-text[data-reveal],
html.js .contact__details[data-reveal] {
	opacity: 0;
	transform: translate3d(0, 28px, 0);
	transition:
		opacity 900ms var(--ease-out),
		transform 900ms var(--ease-out);
}

html.js .statement[data-reveal].is-revealed,
html.js .lede[data-reveal].is-revealed,
html.js .category[data-reveal].is-revealed,
html.js .about__figure[data-reveal].is-revealed,
html.js .about__lead[data-reveal].is-revealed,
html.js .about__collabs-text[data-reveal].is-revealed,
html.js .contact__details[data-reveal].is-revealed {
	opacity: 1;
	transform: none;
}

/* Reduced motion and the visitor's pause control ---------------------------- */

@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		animation-duration: 0.001ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.001ms !important;
		transition-delay: 0s !important;
		scroll-behavior: auto !important;
	}

	html.js [data-reveal],
	html.js [data-reveal] * {
		opacity: 1 !important;
		transform: none !important;
	}

	html.has-backdrops {
		transition-duration: 240ms !important;
	}
}

/* The drifting wall is moved by wall.js, which stops it when motion is paused
   or reduced. */
