/* Maris page gate: a short, branded transition while critical media is ready. */
.maris-page-loader {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: grid;
  place-items: center;
  background: #f7fbfc;
  color: #102d3b;
  opacity: 1;
  visibility: visible;
  transition: opacity .42s ease, visibility .42s ease;
}

.maris-page-loader.is-ready {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.maris-page-loader__content {
  display: grid;
  justify-items: center;
  gap: 22px;
  transform: translateY(-4vh);
}

.maris-page-loader__brand {
  width: min(150px, 38vw);
  height: auto;
  object-fit: contain;
}

.loader {
  position: relative;
  width: 174px;
  height: 126px;
  perspective: 520px;
}

.loader .box {
  position: absolute;
  left: 50%;
  bottom: 28px;
  width: 24px;
  height: 24px;
  transform: translateX(-50%) rotate(45deg);
  transform-origin: 50% 100%;
  animation: maris-tile-hop 1.5s cubic-bezier(.45, .05, .55, .95) infinite;
}

.loader .box > div {
  width: 100%;
  height: 100%;
  border: 2px solid rgba(16, 45, 59, .18);
  border-radius: 5px;
  background: linear-gradient(135deg, #176486 0 48%, #77c7d5 49% 72%, #dff28f 73%);
  box-shadow: 5px 8px 14px rgba(16, 45, 59, .14);
}

.loader .box:nth-child(1) { margin-left: -70px; animation-delay: -.18s; }
.loader .box:nth-child(2) { margin-left: -50px; animation-delay: -.36s; }
.loader .box:nth-child(3) { margin-left: -30px; animation-delay: -.54s; }
.loader .box:nth-child(4) { margin-left: -10px; animation-delay: -.72s; }
.loader .box:nth-child(5) { margin-left: 10px; animation-delay: -.90s; }
.loader .box:nth-child(6) { margin-left: 30px; animation-delay: -1.08s; }
.loader .box:nth-child(7) { margin-left: 50px; animation-delay: -1.26s; }
.loader .box:nth-child(8) { margin-left: 70px; animation-delay: -1.44s; }
.loader .box:nth-child(2) > div { background: linear-gradient(135deg, #102d3b 0 48%, #77c7d5 49%); }
.loader .box:nth-child(3) > div { background: linear-gradient(135deg, #176486 0 48%, #dff28f 49%); }
.loader .box:nth-child(4) > div { background: linear-gradient(135deg, #d9694b 0 48%, #f4d6a6 49%); }
.loader .box:nth-child(5) > div { background: linear-gradient(135deg, #77c7d5 0 48%, #176486 49%); }
.loader .box:nth-child(6) > div { background: linear-gradient(135deg, #dff28f 0 48%, #102d3b 49%); }

.loader .ground {
  position: absolute;
  right: 12px;
  bottom: 16px;
  left: 12px;
  height: 2px;
  overflow: hidden;
  border-radius: 9px;
  background: rgba(16, 45, 59, .13);
}

.loader .ground > div {
  width: 34%;
  height: 100%;
  border-radius: inherit;
  background: #176486;
  animation: maris-loader-line 1.5s ease-in-out infinite;
}

.maris-page-loader__status {
  margin: 0;
  color: #6a7f8a;
  font-size: .75rem;
  font-weight: 800;
}

@keyframes maris-tile-hop {
  0%, 100% { transform: translateX(-50%) translateY(0) rotate(45deg) scale(1); }
  18% { transform: translateX(-50%) translateY(-15px) rotate(45deg) scale(1.04); }
  34% { transform: translateX(-50%) translateY(0) rotate(45deg) scale(.96); }
}

@keyframes maris-loader-line {
  0%, 100% { transform: translateX(-120%); }
  50% { transform: translateX(330%); }
}

@media (max-width: 560px) {
  .loader { transform: scale(.84); }
  .maris-page-loader__content { gap: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  .maris-page-loader { transition: none; }
  .loader .box,
  .loader .ground > div { animation: none; }
  .loader .box { transform: translateX(-50%) rotate(45deg); }
  .loader .ground > div { transform: translateX(95%); }
}
