:root {
  --fondo: #0a0a0c;
  --texto: #f5f5f7;
  --borde: rgba(255, 255, 255, 0.16);
  --velocidad: 520ms;
}

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

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

body {
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, Helvetica, Arial, sans-serif;
  color: var(--texto);
  -webkit-font-smoothing: antialiased;
}

.escenario {
  position: relative;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  cursor: pointer;
  user-select: none;
  isolation: isolate;
}

.marco {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.imagen {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  opacity: 0;
  transform: scale(1.04);
  transition: opacity var(--velocidad) ease, transform 900ms ease;
}

.imagen.visible {
  opacity: 1;
  transform: scale(1);
}

.imagen.saliendo {
  opacity: 0;
  transform: scale(0.99);
}

.brillo {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(120% 80% at 50% 120%, rgba(0, 0, 0, 0.55), transparent 60%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.45), transparent 28%, transparent 62%, rgba(0, 0, 0, 0.65));
}

.interfaz,
.pie {
  position: absolute;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: clamp(1rem, 3vw, 2rem) clamp(1.25rem, 4vw, 3rem);
  pointer-events: none;
  z-index: 2;
}

.interfaz {
  top: 0;
  font-size: 0.95rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  opacity: 0.85;
}

.pie {
  bottom: 0;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  text-align: center;
}

.marca {
  font-weight: 700;
}

.contador {
  font-variant-numeric: tabular-nums;
  opacity: 0.7;
}

.pista {
  font-size: clamp(0.85rem, 2.2vw, 1rem);
  opacity: 0.9;
  transition: opacity 400ms ease;
}

.pista.tenue {
  opacity: 0.25;
}

.credito {
  font-size: 0.72rem;
  opacity: 0.45;
}

.credito a {
  color: inherit;
  pointer-events: auto;
}

kbd {
  display: inline-block;
  padding: 0.1em 0.45em;
  border: 1px solid var(--borde);
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.08);
  font-family: inherit;
  font-size: 0.9em;
}

.cargando {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  z-index: 1;
  opacity: 0;
  transition: opacity 250ms ease;
  pointer-events: none;
}

.cargando.activo {
  opacity: 1;
}

.cargando__punto {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--texto);
  animation: latido 1s infinite ease-in-out;
}

.cargando__punto:nth-child(2) {
  animation-delay: 0.15s;
}

.cargando__punto:nth-child(3) {
  animation-delay: 0.3s;
}

@keyframes latido {
  0%, 80%, 100% { transform: scale(0.6); opacity: 0.35; }
  40% { transform: scale(1); opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .imagen,
  .pista,
  .cargando {
    transition-duration: 1ms;
  }

  .cargando__punto {
    animation: none;
  }
}