/* Splash screen — art showcase */

#splash {
  position: fixed;
  inset: 0;
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(10, 6, 4, 0.88);
  backdrop-filter: blur(8px);
  transition: opacity 1.5s ease-out;
}

#splash.done {
  opacity: 0;
  pointer-events: none;
}

/* Positioning wrapper for frame + overlapping elements */
#splash-stage {
  position: relative;
  transform: rotate(-5deg);
  opacity: 0;
  animation: splashFrameIn 0.8s ease-out 0.3s forwards;
}

/* Burgundy frame around the art */
#splash-frame {
  padding: 20px;
  background: linear-gradient(145deg, #5c2626 0%, #3d1a1a 100%);
  border-radius: 4px;
  box-shadow:
    0 20px 60px rgba(0, 0, 0, 0.6),
    inset 0 1px 0 rgba(255, 255, 255, 0.15),
    inset 0 -1px 0 rgba(0, 0, 0, 0.3);
}

/* Inner border to simulate matting */
#splash-frame::before {
  content: '';
  position: absolute;
  inset: 6px;
  border: 1.5px solid rgba(255, 255, 255, 0.12);
  border-radius: 2px;
  pointer-events: none;
}

/* Art image */
#splash-art {
  display: block;
  max-width: min(800px, 85vw);
  max-height: 80vh;
  object-fit: contain;
  border-radius: 2px;
}

/* Credit label — top left, overlapping the frame */
#splash-credit {
  position: absolute;
  top: -12px;
  left: -10px;
  z-index: 10;
  font-family: var(--font-display);
  font-size: 0.8rem;
  color: var(--color-parchment);
  letter-spacing: 0.08em;
  padding: 0.25rem 0.75rem;
  background: var(--color-wood-dark);
  border: 1px solid rgba(212, 160, 96, 0.3);
  border-radius: 3px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
  transform: rotate(5deg);
  opacity: 0;
  animation: fadeIn 0.6s ease-out 1s forwards;
}

/* Continue button — bottom right, overlapping the frame */
#splash-enter {
  position: absolute;
  bottom: -14px;
  right: -10px;
  z-index: 10;
  font-family: var(--font-display);
  font-size: 0.85rem;
  color: var(--color-parchment-dark);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.4rem 1.2rem;
  background: var(--color-wood-dark);
  border: 1px solid rgba(212, 160, 96, 0.3);
  border-radius: 3px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
  cursor: pointer;
  transform: rotate(5deg);
  transition: color var(--dur-medium), border-color var(--dur-medium), background var(--dur-medium);
  opacity: 0;
  animation: fadeIn 0.6s ease-out 1s forwards;
}

#splash-enter:hover,
#splash-enter:focus-visible {
  color: var(--color-candle-glow);
  border-color: var(--color-candle-glow);
  background: rgba(42, 21, 8, 0.95);
  outline: none;
}

@keyframes splashFrameIn {
  from {
    opacity: 0;
    transform: rotate(-5deg) scale(0.95);
  }
  to {
    opacity: 1;
    transform: rotate(-5deg) scale(1);
  }
}

/* Reduced motion accessibility */
@media (prefers-reduced-motion: reduce) {
  #splash {
    transition: opacity 0.15s ease-out;
  }

  #splash-stage {
    animation: none;
    opacity: 1;
  }

  #splash-credit,
  #splash-enter {
    animation: none;
    opacity: 1;
  }
}
