/* ==========================================================================
   Scroll reveal — panels fade and rise as they scroll into view.

   The hidden state is applied by wwwroot/js/reveal.js (which adds .gcn-reveal),
   never by the markup. A visitor with JS off, or a page where that script fails
   to load, therefore sees every panel exactly as it renders without this file.
   reveal.js runs at the end of <body>, before first paint, so nothing flashes.

   Both classes are stripped again once the transition ends, so a settled panel
   carries no leftover class, transition or inline custom property.

   Not loaded on /Admin, or on a view that sets ViewData["NoReveal"] = true.
   ========================================================================== */

.gcn-reveal {
	opacity: 0;
	transform: translateY(var(--gcn-reveal-rise, 28px));
}

.gcn-reveal.is-revealed {
	opacity: 1;
	/* `none`, not translateY(0): a settled panel must not leave a transform
	   behind, or it becomes the containing block for any position:fixed
	   descendant — the theme's own .card-expand among them. */
	transform: none;
	transition:
		opacity   var(--gcn-reveal-duration, .7s) cubic-bezier(.16, 1, .3, 1) var(--gcn-reveal-delay, 0ms),
		transform var(--gcn-reveal-duration, .7s) cubic-bezier(.16, 1, .3, 1) var(--gcn-reveal-delay, 0ms);
}

/* Items cascading inside a panel travel less than the panel itself. */
.gcn-reveal-item {
	--gcn-reveal-rise: 12px;
}

/* Belt and braces: reveal.js already returns early under this setting, but a
   cached page or a mid-session OS change must never leave content hidden. */
@media (prefers-reduced-motion: reduce) {
	.gcn-reveal,
	.gcn-reveal.is-revealed {
		opacity: 1;
		transform: none;
		transition: none;
	}
}
