/* ------------------------------------------------------------------
   Smooth Navigation (React-like page transitions)
   - Fades the page in on load (no blank flash)
   - Shows a subtle progress bar + soft overlay during navigation
   - Pairs with instant.page preloading so clicks feel instant
------------------------------------------------------------------ */

/* Page fade-in on initial load */
html.sn-ready body {
    opacity: 1;
    transition: opacity 220ms ease;
}
html:not(.sn-ready) body {
    opacity: 0;
}

/* When navigating away – soft fade-out */
html.sn-leaving body {
    opacity: 0.35;
    transition: opacity 180ms ease;
    pointer-events: none;
}

/* Top progress bar */
#sn-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    width: 0;
    background: linear-gradient(90deg, #c8102e, #ff5a3c);
    box-shadow: 0 0 10px rgba(200, 16, 46, 0.6);
    z-index: 99999;
    transition: width 220ms ease, opacity 220ms ease;
    opacity: 0;
    pointer-events: none;
}
#sn-progress.active {
    opacity: 1;
}

/* Avoid affecting print */
@media print {
    html.sn-leaving body { opacity: 1 !important; }
    #sn-progress { display: none !important; }
}
