:root {
  color-scheme: dark;
  background: #05020d;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  min-height: 100%;
  margin: 0;
  overflow: hidden;
  background: #05020d;
}

body {
  min-height: 100svh;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.teaser {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  isolation: isolate;
  overflow: hidden;
  background: #05020d;
}

/* A soft extension of the artwork fills screens that are not 16:9. */
.teaser__ambient {
  position: absolute;
  inset: -5%;
  z-index: -2;
  background:
    linear-gradient(rgba(4, 1, 12, 0.23), rgba(4, 1, 12, 0.36)),
    url("assets/miruva-teaser.webp") center / cover no-repeat;
  filter: blur(30px) saturate(1.18) brightness(0.64);
  transform: scale(1.08);
}

.teaser__art {
  width: 100vw;
  height: 100svh;
  display: grid;
  place-items: center;
  animation: reveal 1.25s cubic-bezier(.2, .75, .25, 1) both;
}

.teaser__art img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  filter: saturate(1.03) contrast(1.02);
  user-select: none;
  -webkit-user-drag: none;
}

.teaser__vignette {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background:
    radial-gradient(circle at 50% 43%, transparent 48%, rgba(2, 0, 8, 0.24) 100%),
    linear-gradient(to bottom, rgba(2, 0, 8, 0.16), transparent 16%, transparent 82%, rgba(2, 0, 8, 0.22));
}

.teaser__grain {
  position: absolute;
  inset: -50%;
  z-index: 3;
  pointer-events: none;
  opacity: 0.045;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.8'/%3E%3C/svg%3E");
  animation: grain 9s steps(8) infinite;
}

@keyframes reveal {
  from {
    opacity: 0;
    transform: scale(1.018);
    filter: blur(5px);
  }
  to {
    opacity: 1;
    transform: scale(1);
    filter: blur(0);
  }
}

@keyframes grain {
  0%, 100% { transform: translate(0, 0); }
  20% { transform: translate(-2%, 1%); }
  40% { transform: translate(1%, -2%); }
  60% { transform: translate(2%, 2%); }
  80% { transform: translate(-1%, -1%); }
}

@media (prefers-reduced-motion: reduce) {
  .teaser__art,
  .teaser__grain {
    animation: none;
  }
}
