/*
 * Smoother page changes and page loads (added after the move off WordPress).
 * Loaded last in <head>, so it overrides the theme where needed.
 */

/* 1. Page changes cross-fade instead of cutting to a blank page.
 *    (Chrome, Edge, Safari 18.2+. Other browsers just navigate as before.) */
@view-transition {
  navigation: auto;
}
::view-transition-group(root),
::view-transition-old(root),
::view-transition-new(root) {
  animation-duration: 280ms;
  animation-timing-function: ease;
}

/* 2. The header stays put across page changes instead of fading with the page. */
#Top_bar {
  view-transition-name: site-header;
}
::view-transition-group(site-header) {
  animation-duration: 280ms;
  animation-timing-function: ease;
}

/* 3. Show the header straight away. The theme hid it on wide screens until
 *    all of its scripts had run, so it blinked in on every page. */
#Top_bar.loading {
  display: block !important;
}

/* 4. Slider images fade in instead of popping in once the slider is ready. */
@keyframes geo-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}
sr7-module sr7-bg {
  animation: geo-fade-in 600ms ease-out;
}

/* Visitors who ask their device for less motion get none of the above. */
@media (prefers-reduced-motion: reduce) {
  @view-transition {
    navigation: none;
  }
  sr7-module sr7-bg {
    animation: none;
  }
}
