body {
  margin: 0;
  background: #08090b;
}

.splash {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
}

.splash__photo {
  position: absolute;
  inset: 0;
  opacity: 0;
  animation: photo-in 4.5s ease-in-out 4.5s forwards;
}

.splash__still,
.splash__gl {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.splash__still {
  object-fit: cover;
  object-position: center;
}

.splash__gl {
  display: none;
}

.splash.is-gl .splash__gl {
  display: block;
}

.splash.is-gl .splash__pan {
  visibility: hidden;
}

/* Flat photo layer: the script sizes images to the full cover box, so touch
   panning reveals real content beyond the screen edge. */
.splash__pan {
  position: absolute;
  inset: 0;
  transform-origin: 50% 50%;
  will-change: transform;
}

.splash__pan img {
  position: absolute;
  left: calc(50% - var(--w, 100%) / 2);
  top: calc(50% - var(--h, 100%) / 2);
  width: var(--w, 100%);
  height: var(--h, 100%);
  max-width: none;
  object-fit: cover;
  object-position: center;
  opacity: 0;
  transition: opacity 4s ease-in-out;
  -webkit-user-drag: none;
  pointer-events: none;
}

.splash__pan img.is-on {
  opacity: 1;
}

.splash__logo {
  position: relative;
  width: min(70vw, 36rem);
  height: auto;
  opacity: 0;
  pointer-events: none;
  animation: logo-intro 5s ease-in-out forwards;
}

@keyframes logo-intro {
  0%, 100% { opacity: 0; }
  40%, 70% { opacity: 1; }
}

@keyframes photo-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .splash__logo {
    display: none;
    animation: none;
  }

  .splash__photo {
    opacity: 1;
    animation: none;
  }

  .splash__pan img {
    transition: none;
  }
}
