// source --> /files/code/js/softtransitions.js 
/* Page reveal transition.
 * Reveals the page by fading out the white #pagefader overlay on arrival (entry fade).
 * 2026-06-17 changes (backup: softtransitions_old.js):
 *   - Entry fade trimmed from 400ms -> 200ms (set inline so it overrides the CSS duration).
 *   - Exit fade (fade-to-white on link click) REMOVED: it delayed every internal navigation
 *     by ~200ms before the next page even started loading, for an effect not worth the cost.
 *   - Fail-safe: if CSS animations are unsupported, reveal the page directly instead of
 *     leaving it hidden behind the white overlay.
 */
function softTransitions() {
	var fader = document.getElementById('pagefader');
	if (!fader) { return; }
	if (!window.AnimationEvent) { fader.style.opacity = '0'; return; } // reveal without animation
	fader.style.animationDuration = '200ms'; // entry fade duration (overrides CSS 400ms)
	fader.classList.add('fade-out');
};