/* Branded page-to-page transition */
.page-wipe {
  position: fixed;
  inset: 0;
  z-index: 999;
  pointer-events: none;
  background: transparent !important;
  transform: none !important;
  transform-origin: initial !important;
  visibility: hidden;
  overflow: hidden;
}
.transition-panels {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  background: transparent;
}
.transition-panels i {
  display: block;
  width: calc(100% + 2px);
  margin-left: -1px;
  height: 100%;
  border: 0;
  outline: 0;
  background: var(--blue);
  transform: translateY(105%);
  will-change: transform;
  backface-visibility: hidden;
}
.transition-panels i:nth-child(2),
.transition-panels i:nth-child(3),
.transition-panels i:nth-child(4) {
  background: var(--blue);
}
.transition-brand {
  position: absolute;
  z-index: 2;
  inset: 0;
  color: #fff;
  display: grid;
  place-content: center;
  text-align: center;
  opacity: 0;
}
.transition-brand strong {
  font: 700 clamp(50px, 8vw, 110px)/0.8 'Space Grotesk';
  letter-spacing: -0.075em;
}
.transition-brand strong span {
  color: var(--acid);
}
.transition-brand small {
  margin-top: 25px;
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.6px;
}
.transition-brand b {
  width: 150px;
  height: 2px;
  background: rgba(255, 255, 255, 0.25);
  margin: 20px auto 0;
  position: relative;
  overflow: hidden;
}
.transition-brand b::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--acid);
  transform: translateX(-100%);
}
.page-wipe.exit {
  visibility: visible;
  animation: none !important;
}
.page-wipe.exit .transition-panels i {
  animation: panelEnter 0.65s cubic-bezier(0.76, 0, 0.24, 1) forwards;
}
.page-wipe.exit .transition-panels i:nth-child(2) {
  animation-delay: 0.055s;
}
.page-wipe.exit .transition-panels i:nth-child(3) {
  animation-delay: 0.11s;
}
.page-wipe.exit .transition-panels i:nth-child(4) {
  animation-delay: 0.165s;
}
.page-wipe.exit .transition-brand {
  animation: brandIn 0.32s 0.4s ease forwards;
}
.page-wipe.exit .transition-brand b::after {
  animation: loadLine 0.35s 0.45s ease forwards;
}
.page-wipe.arriving {
  visibility: visible;
}
.page-wipe.arriving .transition-panels i {
  transform: translateY(0);
  animation: panelLeave 0.7s cubic-bezier(0.76, 0, 0.24, 1) 0.28s forwards;
}
.page-wipe.arriving .transition-panels i:nth-child(2) {
  animation-delay: 0.34s;
}
.page-wipe.arriving .transition-panels i:nth-child(3) {
  animation-delay: 0.4s;
}
.page-wipe.arriving .transition-panels i:nth-child(4) {
  animation-delay: 0.46s;
}
.page-wipe.arriving .transition-brand {
  opacity: 1;
  animation: brandOut 0.24s 0.2s ease forwards;
}
.page-wipe.arriving .transition-brand b::after {
  transform: none;
}
@keyframes panelEnter {
  to {
    transform: translateY(0);
  }
}
@keyframes panelLeave {
  to {
    transform: translateY(-105%);
  }
}
@keyframes brandIn {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes brandOut {
  to {
    opacity: 0;
    transform: translateY(-12px);
  }
}
@keyframes loadLine {
  to {
    transform: translateX(0);
  }
}
@media (max-width: 600px) {
  .transition-panels {
    grid-template-columns: repeat(3, 1fr);
  }
  .transition-panels i:nth-child(4) {
    display: none;
  }
  .transition-brand strong {
    font-size: 18vw;
  }
}
@media (prefers-reduced-motion: reduce) {
  .page-wipe.exit,
  .page-wipe.arriving {
    display: none !important;
  }
}
