/* MAIAJ splash — black entry + fluid logo */

:root {
  --splash-bg: #030508;
  --splash-cyan: #00e8ff;
  --splash-amber: #ffb020;
  --font-display: "Orbitron", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;
}

html,
body.splash-body {
  margin: 0;
  height: 100%;
  height: 100dvh;
  background: var(--splash-bg);
  color: #b8e8ee;
  font-family: var(--font-mono);
  overflow: hidden;
}

.splash-body {
  position: relative;
}

.splash-stage {
  position: fixed;
  inset: 0;
  z-index: 0;
  background: var(--splash-bg) url(../background-splash-screen-dithered.png) center/cover no-repeat;
}

.splash-stage--fallback {
  display: flex;
  align-items: center;
  justify-content: center;
}

.splash-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  touch-action: none;
  z-index: 1;
  background: transparent;
  opacity: 0.7;
}

.splash-fallback {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  pointer-events: none;
}

.splash-fallback-logo {
  width: min(40vw, 180px);
  height: auto;
  animation: splash-breathe 4s ease-in-out infinite;
  filter: drop-shadow(0 0 24px rgba(0, 232, 255, 0.35));
}

@keyframes splash-breathe {
  0%,
  100% {
    transform: scale(1);
    opacity: 0.92;
  }
  50% {
    transform: scale(1.03);
    opacity: 1;
  }
}

.splash-vignette {
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: radial-gradient(ellipse 70% 60% at 50% 45%, transparent 30%, rgba(3, 5, 8, 0.75) 100%);
}

.splash-grain {
  position: fixed;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  opacity: 0.35;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 0, 0, 0.04) 2px,
    rgba(0, 0, 0, 0.04) 4px
  );
}

.splash-ui {
  position: fixed;
  z-index: 5;
  left: 0;
  right: 0;
  top: 87%;
  padding: 0 20px max(24px, env(safe-area-inset-bottom)) max(20px, env(safe-area-inset-left));
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  text-align: center;
  max-width: 680px;
  margin: 0 auto;
  opacity: 0;
  transform: translateY(-50%) translateY(12px);
  transition: opacity 0.8s ease 0.3s, transform 0.8s ease 0.3s;
  pointer-events: none;
}

.splash-ui--visible {
  opacity: 1;
  transform: translateY(-50%);
  pointer-events: auto;
}

.splash-tagline {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(10px, 2.8vw, 12px);
  letter-spacing: 0.35em;
  color: rgba(184, 232, 238, 0.65);
  text-transform: uppercase;
}

.splash-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(22px, 6vw, 32px);
  font-weight: 700;
  letter-spacing: 0.2em;
  color: var(--splash-cyan);
  text-shadow: 0 0 20px rgba(0, 232, 255, 0.4);
}

.splash-sub {
  margin: 0;
  font-size: clamp(9px, 2.5vw, 11px);
  letter-spacing: 0.12em;
  color: #5a8a92;
  max-width: 28em;
  line-height: 1.5;
}

.splash-progress {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  max-width: 320px;
}

.splash-progress-bar {
  width: 100%;
  height: 3px;
  background: rgba(0, 232, 255, 0.1);
  border-radius: 2px;
  overflow: hidden;
  position: relative;
}

.splash-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--splash-cyan), #3dff9a);
  border-radius: 2px;
  box-shadow: 0 0 12px rgba(0, 232, 255, 0.6);
  animation: splash-progress 2.5s ease-out 0.5s forwards;
}

.splash-progress-text {
  font-size: 8px;
  letter-spacing: 0.2em;
  color: rgba(184, 232, 238, 0.4);
  text-transform: uppercase;
  text-align: center;
}

@keyframes splash-progress {
  0% {
    width: 0%;
  }
  100% {
    width: 100%;
  }
}

.splash-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  min-width: min(100%, 280px);
  padding: 14px 32px;
  margin-top: 8px;
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-decoration: none;
  color: var(--splash-cyan);
  background: rgba(0, 232, 255, 0.06);
  border: 1px solid rgba(0, 232, 255, 0.45);
  box-shadow: 0 0 20px rgba(0, 232, 255, 0.12), inset 0 0 20px rgba(0, 232, 255, 0.04);
  transition: background 0.2s, border-color 0.2s, box-shadow 0.2s, color 0.2s;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.splash-cta:hover,
.splash-cta:focus-visible {
  color: #030508;
  background: var(--splash-cyan);
  border-color: var(--splash-cyan);
  box-shadow: 0 0 32px rgba(0, 232, 255, 0.45);
  outline: none;
}

.splash-cta:active {
  transform: scale(0.98);
}

.splash-hint {
  margin: 0;
  font-size: 9px;
  letter-spacing: 0.1em;
  color: #3a5a62;
}

.splash-corner {
  position: fixed;
  z-index: 9;
  width: 20px;
  height: 20px;
  border-color: var(--splash-cyan);
  border-style: solid;
  opacity: 0.45;
  pointer-events: none;
}

.splash-corner--tl {
  top: max(12px, env(safe-area-inset-top));
  left: max(12px, env(safe-area-inset-left));
  border-width: 2px 0 0 2px;
}
.splash-corner--tr {
  top: max(12px, env(safe-area-inset-top));
  right: max(12px, env(safe-area-inset-right));
  border-width: 2px 2px 0 0;
}
.splash-corner--bl {
  bottom: max(120px, calc(env(safe-area-inset-bottom) + 100px));
  left: max(12px, env(safe-area-inset-left));
  border-width: 0 0 2px 2px;
}
.splash-corner--br {
  bottom: max(120px, calc(env(safe-area-inset-bottom) + 100px));
  right: max(12px, env(safe-area-inset-right));
  border-width: 0 2px 2px 0;
}

@media (max-width: 600px) {
  .splash-ui {
    padding-bottom: max(20px, env(safe-area-inset-bottom));
  }

  .splash-cta {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .splash-fallback-logo {
    animation: none;
  }
  .splash-ui {
    transition: none;
  }
}
