/* Page-switch loader (includes/page-transition.php, novalis-transitions.js): a navy sheet with a
   gold top edge sweeps up over the page while the tagline fades in. The next page opens with the
   sheet and tagline exactly as they were left, waits until it has finished loading, then lifts the
   sheet away. If the script never runs, a delayed fallback still lifts it, so the page can never be
   left covered. Only transform and opacity animate, so the motion stays on the GPU. */
.nv-transition {
  position: fixed;
  inset: 0;
  z-index: 10002;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 1.5rem;
  background: var(--nv-navy, #263450);
  border-top: 3px solid var(--nv-gold, #ba8d40);
  transform: translate3d(0, 105%, 0);
  pointer-events: none;
  visibility: hidden;
  will-change: transform;
}

.nv-transition__tagline {
  margin: 0;
  font-family: var(--nv-font-display, Luxia, Georgia, serif);
  font-size: clamp(1.5rem, 3vw, 2.5rem);
  font-weight: 400;
  line-height: 1.3;
  text-align: center;
  text-align-last: center;
  color: #fff;
  text-transform: capitalize; /* "Designed To Inspire. Built To Last." like the headings */
  will-change: opacity, transform;
}

.nv-transition__line {
  display: block;
  text-align: center;
  text-align-last: center;
}

.nv-transition__tagline em {
  font-style: normal;
  color: var(--nv-gold, #ba8d40);
}

/* Leaving: the sheet sweeps up and both lines are fully in before the browser moves on (600ms). */
html.nv-leaving .nv-transition {
  visibility: visible;
  pointer-events: all;
  animation: nv-sheet-in 0.5s cubic-bezier(0.65, 0, 0.35, 1) both;
}

html.nv-leaving .nv-transition__line {
  animation: nv-line-in 0.32s cubic-bezier(0.2, 0.8, 0.2, 1) 0.2s both;
}

html.nv-leaving .nv-transition__line + .nv-transition__line {
  animation-delay: 0.26s;
}

/* Arriving: the sheet and tagline start exactly as they were left. The script adds nv-reveal once
   the page has loaded; the fallback lifts the sheet after 2.5s if it never does. */
html.nv-arrive .nv-transition {
  visibility: visible;
  transform: none;
  animation: nv-sheet-out 0.7s cubic-bezier(0.65, 0, 0.35, 1) 2.5s both;
}

html.nv-arrive .nv-transition__tagline {
  animation: nv-tagline-out 0.3s ease 2.5s both;
}

html.nv-arrive.nv-reveal .nv-transition {
  animation: nv-sheet-lift 0.75s cubic-bezier(0.65, 0, 0.35, 1) 0.15s both;
}

html.nv-arrive.nv-reveal .nv-transition__tagline {
  animation: nv-tagline-lift 0.3s ease both;
}

@keyframes nv-sheet-in {
  from { transform: translate3d(0, 105%, 0); }
  to { transform: translate3d(0, 0, 0); }
}

@keyframes nv-sheet-out {
  from { transform: translate3d(0, 0, 0); }
  to { transform: translate3d(0, -105%, 0); visibility: hidden; }
}

/* Same motion as above under new names, so the browser starts it fresh rather than treating it as
   the fallback animation already part-way through. */
@keyframes nv-sheet-lift {
  from { transform: translate3d(0, 0, 0); }
  to { transform: translate3d(0, -105%, 0); visibility: hidden; }
}

@keyframes nv-tagline-lift {
  from { opacity: 1; transform: translate3d(0, 0, 0); }
  to { opacity: 0; transform: translate3d(0, -0.4em, 0); }
}

@keyframes nv-line-in {
  from { opacity: 0; transform: translate3d(0, 0.5em, 0); }
  to { opacity: 1; transform: translate3d(0, 0, 0); }
}

@keyframes nv-tagline-out {
  from { opacity: 1; transform: translate3d(0, 0, 0); }
  to { opacity: 0; transform: translate3d(0, -0.4em, 0); }
}

/* Reduced motion: no sweep; pages change normally. */
@media (prefers-reduced-motion: reduce) {
  html.nv-leaving .nv-transition,
  html.nv-arrive .nv-transition {
    visibility: hidden;
    animation: none;
  }
}
