/* Fade in/out transitions for page backgrounds */

/* Initial fade-in on page load */
header.intro-header {
  animation: fadeInBackground 0.3s ease-in-out;
  -webkit-animation: fadeInBackground 0.3s ease-in-out;
}

@keyframes fadeInBackground {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@-webkit-keyframes fadeInBackground {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* Fade out when navigation is about to happen */
body.page-leaving header.intro-header {
  animation: fadeOutBackground 0.3s ease-in-out forwards;
  -webkit-animation: fadeOutBackground 0.3s ease-in-out forwards;
}

@keyframes fadeOutBackground {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}

@-webkit-keyframes fadeOutBackground {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}
