/* preloader.css */
@font-face {
  font-family: 'LunaDePan';
  src: url('/assets/fonts/LunaDePan.woff2') format('woff2');
  font-display: block;
}

:root {
  --ink: #1d1b18;
  --cream: #ecc088;
  --brown: #46382b;
}

.pre {
  position: fixed;
  inset: 0;
  z-index: 999999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: radial-gradient(circle at 50% 42%, #2a2621 0%, var(--ink) 70%);
  transition: opacity .9s ease, visibility .9s, transform .9s ease;
}

.pre.done {
  opacity: 0;
  visibility: hidden;
  transform: scale(1.04);
}

.pre svg {
  width: min(66vw, 300px);
  height: auto;
  overflow: visible;
}

.ln {
  fill: none;
  stroke: var(--cream);
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
}

.shape {
  fill: rgba(236, 192, 136, 0);
  fill-rule: evenodd;
  stroke-width: 1.2;
}

.soft {
  stroke-width: 1;
  opacity: .55;
}

.spark {
  fill: var(--cream);
  opacity: 0;
  transform-box: fill-box;
  transform-origin: center;
}

.word {
  font-family: 'LunaDePan', 'Kaushan Script', 'Brush Script MT', cursive;
  font-size: clamp(34px, 9vw, 52px);
  color: var(--cream);
  text-shadow: 2px 2px 0 rgba(217, 141, 70, .55);
  opacity: 0;
  transform: translateY(8px);
  margin-top: 6px;
  white-space: nowrap;
}

.tag {
  font-family: 'Cinzel', serif;
  font-size: 12px;
  letter-spacing: .38em;
  text-transform: uppercase;
  color: var(--cream);
  opacity: 0;
  margin-left: .38em;
}

.bar {
  width: 140px;
  height: 1px;
  background: rgba(236, 192, 136, .2);
  margin-top: 22px;
  overflow: hidden;
  opacity: 0;
}

.bar i {
  display: block;
  height: 100%;
  width: 100%;
  background: var(--cream);
  transform: scaleX(0);
  transform-origin: left;
}

.play .shape {
  animation: draw var(--du) var(--dl) cubic-bezier(.65, 0, .35, 1) forwards, fillin .9s 3s ease forwards;
}

.play .spark {
  animation: pop .8s calc(3.4s + var(--i) * .2s) ease forwards, twinkle 2.6s calc(4.4s + var(--i) * .3s) ease-in-out infinite;
}

.play .word {
  animation: rise 1s 3.5s ease forwards;
}

.play .tag {
  animation: fade 1s 4s ease forwards;
}

.play .bar {
  animation: fade .6s 3s ease forwards;
}

.play .bar i {
  animation: grow 2.1s 3s cubic-bezier(.4, 0, .2, 1) forwards;
}

.play.short .shape {
  animation: none;
  fill: #ecc088;
  stroke-dashoffset: 0;
}
.play.short .spark {
  animation: none;
  opacity: 1;
}
.play.short .word {
  animation: none;
  opacity: 1;
  transform: none;
}
.play.short .tag {
  animation: none;
  opacity: 1;
}
.play.short .bar {
  display: none;
}

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

@keyframes fillin {
  to {
    fill: #ecc088;
  }
}

@keyframes pop {
  0% {
    opacity: 0;
    transform: scale(.2) rotate(-40deg);
  }

  100% {
    opacity: 1;
    transform: none;
  }
}

@keyframes twinkle {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: .35;
  }
}

@keyframes rise {
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes fade {
  to {
    opacity: 1;
  }
}

@keyframes grow {
  to {
    transform: scaleX(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  .play * {
    animation-duration: .01s !important;
    animation-delay: 0s !important;
  }
}

.no-scroll {
  overflow: hidden !important;
  height: 100vh !important;
}
