/* Swup transition loader — a thin top progress bar (NProgress-style) in the
   brand coral→amber gradient. The current page stays fully visible and untouched
   while the next one loads; the bar trickles toward ~90%, then snaps to 100% and
   fades out as the new page is revealed. Driven by Swup lifecycle hooks in
   js/swup-init.js (is-active / is-done classes); enqueued in class-fl-child-theme.php. */

.loud-tl {
	position: fixed;
	inset-block-start: 0;
	inset-inline: 0;
	height: 4px;
	/* Brand logo gradient (coral → amber). */
	background: linear-gradient(90deg, #EF4D5E, #F9A41A);
	box-shadow: 0 0 8px rgba(249, 164, 26, 0.5);
	transform: scaleX(0);
	transform-origin: left center;
	/* Above everything, including the give-rail (100000) and the mobile
	   off-canvas panel (100002) — the two highest layers on the site. */
	z-index: 100010;
	opacity: 0;
	pointer-events: none;
	will-change: transform, opacity;
}

/* Loading: trickle from 0 toward 90% with a hard decelerating ease, so it shoots
   up then crawls — the classic "still working" feel without ever hitting 100%. */
.loud-tl.is-active {
	opacity: 1;
	transform: scaleX(0.9);
	transition: transform 10s cubic-bezier(0.1, 0.9, 0.2, 1), opacity 0.15s ease;
}

/* Done: complete to 100%, then fade out. JS removes the class after the fade,
   resetting to the base scaleX(0)/opacity:0 with no transition. */
.loud-tl.is-done {
	opacity: 0;
	transform: scaleX(1);
	transition: transform 0.2s ease, opacity 0.3s ease 0.1s;
}

/* Reduced motion: no horizontal trickle — a full-width bar simply fades in/out to
   signal loading, conveying progress by presence rather than movement. */
@media (prefers-reduced-motion: reduce) {
	.loud-tl.is-active { transform: scaleX(1); transition: opacity 0.15s ease; }
	.loud-tl.is-done   { transform: scaleX(1); transition: opacity 0.3s ease; }
}
