body iframe {
  display: block;
  max-width: 100%;
  border: 0;
}

.theme-cursor.is-native-zone {
  cursor: auto;
}

.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  background: linear-gradient(
    90deg,
    var(--primary),
    var(--secondary),
    var(--accent)
  );
  z-index: 10000;
  transform-origin: left;
  transform: scaleX(0);
  transition: transform 0.1s linear;
}

.loader {
  --loader-ball: #e11d2e;
  --loader-step: #ff7b83;
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  gap: 1rem;
  align-content: center;
  background: var(--bg);
  transition:
    opacity 400ms ease,
    visibility 400ms ease;
}

.loader.is-hidden {
  visibility: hidden;
  opacity: 0;
}

.loader-jump {
  position: relative;
  width: 120px;
  height: 90px;
  margin: 0 auto;
}

.loader-jump::before {
  position: absolute;
  bottom: 30px;
  left: 50px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--loader-ball);
  box-shadow: 0 0 20px color-mix(in srgb, var(--loader-ball) 38%, transparent);
  content: "";
  animation: loading-bounce 500ms ease-in-out infinite alternate;
}

.loader-jump::after {
  position: absolute;
  top: 0;
  right: 0;
  width: 45px;
  height: 7px;
  border-radius: 4px;
  content: "";
  box-shadow:
    0 5px 0 var(--loader-step),
    -35px 50px 0 var(--loader-step),
    -70px 95px 0 var(--loader-step);
  animation: loading-step 1s ease-in-out infinite;
}

.loader-text {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

@keyframes loading-bounce {
  0% {
    transform: scale(1, 0.7);
  }
  40% {
    transform: scale(0.8, 1.2);
  }
  60% {
    transform: scale(1, 1);
  }
  100% {
    bottom: 140px;
  }
}

@keyframes loading-step {
  0% {
    box-shadow:
      0 10px 0 transparent,
      0 10px 0 var(--loader-step),
      -35px 50px 0 var(--loader-step),
      -70px 90px 0 var(--loader-step);
  }
  100% {
    box-shadow:
      0 10px 0 var(--loader-step),
      -35px 50px 0 var(--loader-step),
      -70px 90px 0 var(--loader-step),
      -70px 90px 0 transparent;
  }
}

@media (prefers-reduced-motion: reduce) {
  .loader-jump::before,
  .loader-jump::after {
    animation: none;
  }

  .loader-jump::after {
    box-shadow:
      0 10px 0 var(--loader-step),
      -35px 50px 0 var(--loader-step),
      -70px 90px 0 var(--loader-step);
  }
}
