/**
 * Scroll reveal — a gentle fade + rise as blocks enter the viewport.
 *
 * Everything is gated on the `nabsa-anim` class, which reveal.js only puts on
 * <html> when IntersectionObserver exists and the visitor hasn't asked for
 * reduced motion. If JS fails or is blocked, no element is ever hidden — the
 * page just renders normally. Nothing is hidden by CSS alone.
 *
 * @package astra-child
 */
.nabsa-anim .nabsa-reveal {
	opacity: 0;
	transform: translate3d(0, 16px, 0);
	will-change: opacity, transform;
}
.nabsa-anim .nabsa-reveal.is-in {
	opacity: 1;
	transform: translate3d(0, 0, 0);
	/* soft ease-out; 600ms reads as "settled" without feeling slow */
	transition: opacity 600ms cubic-bezier(.22, .61, .36, 1),
	            transform 600ms cubic-bezier(.22, .61, .36, 1);
	transition-delay: var(--nabsa-reveal-delay, 0ms);
}
/* once played, drop the compositing hint */
.nabsa-anim .nabsa-reveal.is-done { will-change: auto; }

/* Belt and braces: anyone preferring reduced motion sees everything, always. */
@media (prefers-reduced-motion: reduce) {
	.nabsa-anim .nabsa-reveal,
	.nabsa-anim .nabsa-reveal.is-in {
		opacity: 1;
		transform: none;
		transition: none;
	}
}

/* --- Hero entrance ---
   PURE CSS on purpose: reveal.js is a footer script, so anything it hid would
   already have painted — the hero would flash then fade, looking broken. A
   keyframe declared in the stylesheet applies at first paint, needs no JS, and
   always runs to completion, so the hero can never be left invisible.
   Two beats: the photo settles, then the copy arrives just behind it. */
@keyframes nabsa-hero-in   { from { opacity: 0; } to { opacity: 1; } }
@keyframes nabsa-hero-rise { from { opacity: 0; transform: translate3d(0, 14px, 0); }
                             to   { opacity: 1; transform: translate3d(0, 0, 0); } }

@media (prefers-reduced-motion: no-preference) {
	.nabsa-hero, .nabsa-pagehero { animation: nabsa-hero-in 900ms ease both; }
	.nabsa-hero__box > *, .nabsa-pagehero h1, .nabsa-pagehero__intro {
		animation: nabsa-hero-rise 700ms cubic-bezier(.22,.61,.36,1) both;
		animation-delay: 220ms;
	}
	.nabsa-hero__box > *:nth-child(2) { animation-delay: 300ms; }
	.nabsa-hero__box > *:nth-child(3) { animation-delay: 380ms; }
	.nabsa-pagehero__intro { animation-delay: 320ms; }
}
