.olavsfest-loading {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-content: center;
  justify-items: center;
  box-sizing: border-box;
  gap: 25px;
  padding: 24px;
  background: #5c0860;
  color: #fff;
  text-align: center;
  font: 650 14px/1.5 system-ui, sans-serif;
}

.olavsfest-loading > img {
  display: block;
  width: min(252px, calc(100vw - 48px));
  height: auto;
  animation: olavsfest-loading-motion 1.8s ease-in-out infinite;
}

.olavsfest-loading > p {
  margin: 0;
  color: inherit;
}

.olavsfest-loading[data-failed] > img {
  animation: none;
}

.olavsfest-project-fallback {
  position: fixed;
  z-index: 101;
  inset: auto 0 10vh;
  color: #fff;
  text-align: center;
}

@keyframes olavsfest-loading-motion {
  0%, 66%, 100% { transform: translateY(0) rotate(0); }
  24% { transform: translateY(-9px) rotate(-2deg); }
  42% { transform: translateY(-3px) rotate(1deg); }
}

@media (prefers-reduced-motion: reduce) {
  .olavsfest-loading > img {
    animation: none;
  }
}
