:root {
  --bg: #0b0a24;
  --text: #f3e6b8;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: var(--bg);
}

#scene {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  opacity: 0;
  animation: fadeIn 2.4s ease-out 0.2s forwards;
}

/* Grano y trama de lienzo sobre la pintura */
.canvas-texture {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-size: 256px 256px;
  mix-blend-mode: overlay;
  opacity: 0.14;
}

/* Viñeta para enfocar el centro como en el video */
.vignette {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 85% 75% at 50% 48%, transparent 55%, rgba(5, 4, 20, 0.55) 100%),
    linear-gradient(to bottom, rgba(5, 4, 20, 0.25), transparent 18%, transparent 80%, rgba(5, 4, 12, 0.5));
}

.credit {
  position: fixed;
  left: 50%;
  bottom: max(18px, env(safe-area-inset-bottom));
  transform: translateX(-50%);
  width: calc(100% - 32px);
  text-align: center;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(13px, 1.6vw, 17px);
  letter-spacing: 0.04em;
  color: var(--text);
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.8);
  opacity: 0;
  animation: credit 9s ease-in-out 2.5s forwards;
  pointer-events: none;
}

@keyframes fadeIn {
  to { opacity: 1; }
}

@keyframes credit {
  0% { opacity: 0; }
  20% { opacity: 0.85; }
  75% { opacity: 0.85; }
  100% { opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  #scene { animation-duration: 0.01s; }
  .credit { animation: none; opacity: 0.8; }
}
