:root {
  --loading-duration: 1.8s;
  --brand-blue: #0080ff;
  --brand-cyan: #0cbdb2;
  --brand-green: #12d891;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  background: #fff;
  color: #102032;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.site {
  display: grid;
  min-height: 100vh;
  place-items: center;
  opacity: 0;
  animation: show-site 0.7s ease forwards var(--loading-duration);
}

.site__content {
  text-align: center;
}

.site__content img {
  width: 64px;
}

.site__content p {
  margin: 18px 0 0;
  color: #6b7785;
}

.loader {
    position: fixed;
    z-index: 9999;
    inset: 0;
    display: grid;
    place-content: center;
    justify-items: center;
    gap: 30px;
    background: #fff;
}

.loader__brand {
  position: relative;
  width: clamp(112px, 17vw, 168px);
  aspect-ratio: 839.55 / 645.81;
  filter: drop-shadow(0 12px 24px rgb(0 128 255 / 8%));
}

.loader__outline,
.loader__fill {
  position: absolute;
  inset: 0;
}

.loader__outline {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: grayscale(1) opacity(0.12);
}

.loader__fill {
  clip-path: inset(100% 0 0 0);
  overflow: hidden;
  animation: fill-logo var(--loading-duration) cubic-bezier(0.65, 0, 0.35, 1) forwards;
}

.loader__fill img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.loader__fill::after {
  content: "";
  position: absolute;
  right: -30%;
  bottom: 0;
  left: -30%;
  height: 12%;
  background: rgb(255 255 255 / 38%);
  filter: blur(8px);
  animation: rise-highlight var(--loading-duration) cubic-bezier(0.65, 0, 0.35, 1) forwards;
}

.loader__label {
  color: #80909f;
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.loader__label::after {
  content: "";
  animation: loading-dots 1.2s steps(4, end) infinite;
}

@keyframes fill-logo {
  0% {
    clip-path: inset(100% 0 0 0);
  }
  18% {
    clip-path: inset(82% 0 0 0);
  }
  72% {
    clip-path: inset(26% 0 0 0);
  }
  100% {
    clip-path: inset(0 0 0 0);
  }
}

@keyframes rise-highlight {
  from {
    transform: translateY(820%);
  }
  to {
    transform: translateY(-25%);
  }
}

@keyframes loading-dots {
  0% {
    content: "";
  }
  25% {
    content: ".";
  }
  50% {
    content: "..";
  }
  75%,
  100% {
    content: "...";
  }
}

@media (prefers-reduced-motion: reduce) {
  .loader__fill,
  .loader__fill::after,
  .loader__label::after {
    animation: none;
  }

  .loader__fill {
    clip-path: inset(0);
  }

  .loader {
    animation-duration: 0.01ms;
  }
}
