/**
 * Reveal animations — word-by-word headings and card entrances.
 */

/* ---- Word reveal (headings) ---- */

.has-word-reveal .word {
	display: inline; /* preserve natural line-wrapping */
}

.has-word-reveal .word__inner {
	display: inline-block;
	opacity: 0;
	transform: translateY(0.2em);
	transition: opacity 0.4s ease, transform 0.4s ease;
	transition-delay: calc(var(--word-i, 0) * 0.045s);
}

.has-word-reveal.is-revealed .word__inner {
	opacity: 1;
	transform: translateY(0);
}

/* ---- Card reveal (At Source) ---- */

/*
 * Cards start hidden via CSS (no JS dependency) so there's no
 * flash of visible content before JS initialises.
 * The .is-cards-ready class is added by JS after setup to
 * activate transitions (prevents transition on initial hide).
 */
.at-source-block__grid .origin-card {
	opacity: 0;
	transform: translateY(30px);
}

.at-source-block__grid.is-cards-ready .origin-card {
	transition: opacity 0.45s ease, transform 0.45s ease;
	transition-delay: calc(var(--card-i, 0) * 0.08s);
}

.at-source-block__grid.is-revealed .origin-card {
	opacity: 1;
	transform: translateY(0);
}

/* Block interaction during entrance animation */
.at-source-block__grid.is-animating {
	pointer-events: none;
}

/*
 * Once animation is done, .is-cards-done replaces the reveal
 * rules with clean state so hover/active opacity works freely.
 */
.at-source-block__grid.is-cards-done .origin-card {
	opacity: 1;
	transform: none;
	transition: box-shadow 0.2s ease, opacity 0.3s ease;
	transition-delay: 0s;
}
