/**
 * BRED scroll-reveal.
 *
 * Each top-level section fades + rises as it enters the viewport (mobile and
 * desktop). The hidden state is gated on `html.bred-reveal-init`, which
 * scroll-reveal.js adds in the <head> — before first paint — only when the
 * effect can actually run. So sections are hidden from the very first frame (no
 * flash), and a JS or asset failure can never leave the content hidden, because
 * the class is simply never added. scroll-reveal.js then adds `.is-revealed` to
 * each section as it scrolls into view.
 */

html.bred-reveal-init .wp-block-post-content > * {
	opacity: 0;
	transform: translateY(28px);
	transition:
		opacity 0.7s cubic-bezier(0.22, 0.61, 0.36, 1),
		transform 0.7s cubic-bezier(0.22, 0.61, 0.36, 1);
}

html.bred-reveal-init .wp-block-post-content > *.is-revealed {
	opacity: 1;
	transform: none;
}

/* Belt-and-braces: even if the class is present, never animate for visitors who
   prefer reduced motion (the script already bails out in this case). */
@media (prefers-reduced-motion: reduce) {
	html.bred-reveal-init .wp-block-post-content > * {
		opacity: 1;
		transform: none;
		transition: none;
	}
}
