/* A finite brand introduction, independent of the site's animation library. */
#preloader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  place-items: center;
  overflow: hidden;
  background: #070b14;
  opacity: 1;
  transition: opacity 560ms ease, visibility 560ms;
}

html.intro-pending #preloader { display: grid; }
html.intro-pending { overflow: hidden; }
html.intro-pending body { overflow: hidden; }
#preloader.is-leaving { opacity: 0; visibility: hidden; pointer-events: none; }

.intro-grid {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(114, 149, 197, .055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(114, 149, 197, .055) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse at center, #000, transparent 65%);
  -webkit-mask-image: radial-gradient(ellipse at center, #000, transparent 65%);
}

.intro-aura {
  position: absolute;
  width: min(740px, 140vw);
  aspect-ratio: 1;
  mask-image: radial-gradient(ellipse, #000 25%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse, #000 25%, transparent 70%);
  background: radial-gradient(ellipse at 40% 40%, rgba(0, 212, 255, .12), transparent 55%),
    radial-gradient(ellipse at 65% 60%, rgba(160, 112, 255, .12), transparent 55%);
  animation: intro-aura 2600ms ease-out both;
}

.intro-composition {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: min(520px, 100vw);
  padding: 24px;
  transform: translateY(-14px);
}

.intro-symbol {
  position: relative;
  width: min(360px, 74vw, 52vh);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
}

#intro-mesh { position: absolute; width: 100%; height: 100%; inset: 0; }

.intro-orbit {
  position: absolute;
  inset: 9%;
  border: 1px solid rgba(120, 171, 208, .13);
  border-radius: 50%;
  opacity: 0;
}
.intro-orbit::before, .intro-orbit::after {
  content: '';
  position: absolute;
  left: calc(50% - 2px);
  top: -2px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #70e7fa;
  box-shadow: 0 0 12px rgba(0, 212, 255, .5);
}
.intro-orbit::after { top: auto; bottom: -2px; background: #b997ff; }
.intro-orbit--inner { inset: 15%; border-style: dashed; border-color: rgba(160, 112, 255, .16); }

.intro-logo {
  display: block;
  width: 52%;
  height: 52%;
  object-fit: contain;
  opacity: 0;
  filter: drop-shadow(0 0 22px rgba(0, 212, 255, .22));
}

.intro-wordmark {
  display: flex;
  align-items: baseline;
  margin-top: -12px;
  color: #f4f8ff;
  font-family: 'Space Grotesk', system-ui, sans-serif;
  font-size: clamp(2.4rem, 7vw, 3.5rem);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -.055em;
}
.intro-wordmark span { display: inline-block; opacity: 0; }
.intro-wordmark .intro-accent { color: #ac8aef; }
.intro-caption {
  margin-top: 20px;
  color: #8093ad;
  font: 400 .58rem/1.5 'JetBrains Mono', monospace;
  letter-spacing: .28em;
  text-align: center;
  opacity: 0;
}

.is-running .intro-orbit { animation: intro-orbit 2300ms 150ms cubic-bezier(.22, 1, .36, 1) both; }
.is-running .intro-orbit--inner { animation-direction: reverse; }
.is-running .intro-logo { animation: intro-logo 1050ms 1150ms cubic-bezier(.16, 1, .3, 1) both; }
.is-running .intro-wordmark span { animation: intro-letter 700ms calc(850ms + var(--letter) * 65ms) cubic-bezier(.16, 1, .3, 1) both; }
.is-running .intro-caption { animation: intro-caption 700ms 1350ms ease both; }


@keyframes intro-logo {
  from { opacity: 0; transform: scale(.78); }
  to { opacity: 1; transform: scale(1); }
}
@keyframes intro-letter {
  from { opacity: 0; transform: translateY(14px); filter: blur(6px); }
  to { opacity: 1; transform: translateY(0); filter: blur(0); }
}
@keyframes intro-caption {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-height: 480px) {
  .intro-composition { transform: none; padding: 12px; }
  .intro-symbol { width: 48vh; }
  .intro-wordmark { font-size: 2rem; }
  .intro-caption { margin-top: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  html.intro-pending #preloader { display: none; }
  html.intro-pending, html.intro-pending body { overflow: visible; }
  #preloader, #preloader * { animation: none !important; transition: none !important; }
}
