/* Preloader */

#preloader {
  position: fixed;
  inset: 0;
  z-index: 3000;
  background: #050505;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  transition:
    transform 1.4s var(--ease),
    opacity 1.1s var(--ease);
}

#preloader.done {
  transform: translateY(-100%);
  opacity: 0;
  pointer-events: none;
}

#preloader canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.9;
  pointer-events: none;
}

.pre-content {
  position: relative;
  z-index: 2;
  text-align: center;
}

.pre-mark {
  width: 84px;
  height: 84px;
  margin: 120px auto 2rem;
}

.pre-mark path {
  fill: none;
  stroke-width: 2;
  stroke-dasharray: 1200;
  stroke-dashoffset: 1200;
  animation: draw 1.6s var(--ease) forwards 0.2s;
  stroke: var(--aws);
}

.pre-meta {
  font-family: var(--ui);
  font-weight: 300;
  font-size: 14px;
  letter-spacing: 0.8em;
  text-transform: uppercase;
  color: var(--muted);
  animation: pulse 2s infinite alternate;
}

.pre-bar {
  width: 300px;
  max-width: 80vw;
  height: 2px;
  margin: 2rem auto 0;
  background: var(--w05);
  border-radius: 4px;
  position: relative;
  overflow: hidden;
}

.pre-fill {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, transparent, var(--accent-soft), transparent);
  box-shadow: 0 0 16px var(--accent);
  transition: width 0.4s var(--ease);
}

.pre-pct {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 4px;
  color: var(--muted);
  margin-top: 1.4rem;
}

@keyframes draw {
  to {
    stroke-dashoffset: 0;
  }
}

@keyframes pulse {
  0% {
    color: rgba(242, 239, 233, 0.25);
  }
  100% {
    color: rgba(242, 239, 233, 0.75);
  }
}
