/* ============================================================
   LoreU Splash — storybook-terminal overlay
   Pure DOM/CSS + one 2D canvas. No engine dependency.
   ============================================================ */

#loreu-splash {
  position: fixed;
  inset: 0;
  z-index: 9000;
  background: #0a0512;
  overflow: hidden;
  opacity: 1;
  transition: opacity 0.9s ease;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
}

#loreu-splash.loreu-splash-out {
  opacity: 0;
  pointer-events: none;
}

#loreu-splash canvas.loreu-rain {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

/* Dims the rain behind the text stages */
#loreu-splash .loreu-veil {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: rgba(10, 5, 18, 0.38);
  transition: background 1.1s ease;
}

#loreu-splash.loreu-title-stage .loreu-veil {
  background: rgba(10, 5, 18, 0.62);
}

/* Once the title card is fully up, the veil lightens —
   apparitions in the rain get the stage back. */
#loreu-splash.loreu-prompt-stage .loreu-veil {
  background: rgba(10, 5, 18, 0.45);
}

#loreu-splash .loreu-layer {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  pointer-events: none;
}

/* — Studio card — */
#loreu-splash .loreu-presents {
  font-family: Consolas, 'Courier New', monospace;
  font-size: clamp(14px, 2.2vw, 22px);
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: #e8c468;
  text-shadow:
    0 0 14px rgba(232, 196, 104, 0.45),
    0 2px 10px rgba(0, 0, 0, 0.95),
    0 0 4px rgba(0, 0, 0, 1);
  opacity: 0;
  transition: opacity 0.5s ease;
}

/* — Title — */
#loreu-splash .loreu-title {
  font-family: Georgia, 'Times New Roman', serif;
  font-weight: 700;
  font-size: clamp(56px, 11vw, 118px);
  line-height: 1;
  color: #a78bfa;
  text-shadow:
    0 2px 0 rgba(0, 0, 0, 0.9),
    0 0 6px rgba(0, 0, 0, 1),
    0 0 22px rgba(167, 139, 250, 0.65),
    0 0 70px rgba(167, 139, 250, 0.3);
  letter-spacing: 0.04em;
}

#loreu-splash .loreu-title span {
  display: inline-block;
  min-width: 0.55em;
  opacity: 0;
  transition: opacity 0.18s ease;
}

/* — Subtitle — */
#loreu-splash .loreu-subtitle {
  margin-top: 26px;
  font-family: Georgia, 'Times New Roman', serif;
  font-style: italic;
  font-size: clamp(15px, 2.4vw, 24px);
  color: #ece5d0;
  text-shadow:
    0 2px 8px rgba(0, 0, 0, 0.95),
    0 0 4px rgba(0, 0, 0, 1),
    0 0 14px rgba(236, 229, 208, 0.3);
  min-height: 1.4em;
  background: rgba(10, 5, 18, 0.35);
  padding: 4px 18px;
  border-radius: 8px;
}

/* — Prompt — */
#loreu-splash .loreu-prompt {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 12%;
  text-align: center;
  font-family: Consolas, 'Courier New', monospace;
  font-size: clamp(11px, 1.5vw, 15px);
  letter-spacing: 0.25em;
  color: #e8c468;
  opacity: 0;
}

#loreu-splash .loreu-prompt.on {
  animation: loreu-prompt-pulse 1.6s ease-in-out infinite;
  text-shadow:
    0 2px 8px rgba(0, 0, 0, 0.95),
    0 0 12px rgba(232, 196, 104, 0.4);
}

@keyframes loreu-prompt-pulse {
  0%, 100% { opacity: 0.6; }
  50%      { opacity: 1; }
}

/* — Typewriter caret — */
#loreu-splash .loreu-caret {
  color: #a78bfa;
  text-shadow: 0 0 8px rgba(167, 139, 250, 0.6);
}
