/* Splash: logo stars over shared page starfield — fade logo in, keep bg */

:root {
  --splash-duration: 6.2s;
  --splash-ease: cubic-bezier(0.33, 0, 0.2, 1);
  --splash-reveal: 2s;
}

body.mod-splash-active {
  overflow: hidden;
  background: transparent;
}

.splash {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  cursor: pointer;
}

.splash.mod-exiting {
  pointer-events: none;
  cursor: default;
}

.splash.mod-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.splash__canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  z-index: 1;
  background: transparent;
}

.splash__stage {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  width: 100%;
  height: 100%;
  padding: 2rem 2rem max(2.4rem, env(safe-area-inset-bottom));
  pointer-events: none;
}

.splash__hint {
  font-family: 'TT Norms', 'Arial', sans-serif;
  font-size: clamp(1.1rem, 2.2vh, 1.5rem);
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.42);
  text-align: center;
  max-width: 40rem;
  margin: 0;
  transition: opacity 0.45s var(--splash-ease);
}

.splash.mod-exiting .splash__hint {
  opacity: 0;
}

.splash.mod-exiting.mod-reveal-content {
  z-index: 2000;
  background: transparent;
  pointer-events: none;
}

.splash.mod-exiting.mod-reveal-content .splash__canvas {
  opacity: 1;
}

/* Reduced motion: static logo fallback */
.splash.mod-reduced .splash__canvas {
  display: none;
}

.splash.mod-reduced {
  background: #000;
}

.splash.mod-reduced .splash__fallback-logo {
  display: block;
  height: 18vh;
  width: auto;
  max-width: min(88vw, 90rem);
  margin: auto;
  filter: brightness(0) invert(1);
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -55%);
  z-index: 1;
}

.splash__fallback-logo {
  display: none;
}

body.mod-splash-active #site-main:not(.mod-visible) {
  opacity: 0;
}

/* Keep content hidden until explicit fade-in (even after mod-splash-active drops) */
#site-main:not(.mod-visible) {
  opacity: 0;
}

#site-main.mod-reveal {
  transition: opacity var(--splash-reveal) var(--splash-ease);
  will-change: opacity;
}

#site-main.mod-visible {
  opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
  :root {
    --splash-reveal: 0.36s;
  }

  .splash.mod-exiting {
    background: #000;
    transition: opacity 0.3s ease;
  }

  .splash.mod-exiting .splash__stage {
    opacity: 0;
    transition: opacity 0.2s ease;
  }
}
