/* Pantalla de carga: solo la primera visita de la sesión y nunca más de 1.6 s. */
.nexus-loader {
  position: fixed; inset: 0; z-index: 2147483000;
  display: grid; place-items: center;
  background: radial-gradient(circle at 50% 42%, var(--accent-soft, #dcf5ea) 0, transparent 46vmax), var(--bg, #f6fbf9);
  color: var(--text, #20212b);
  transition: opacity 380ms cubic-bezier(.23,1,.32,1), transform 380ms cubic-bezier(.23,1,.32,1);
  cursor: pointer;
}
.nexus-loader.is-leaving { opacity: 0; transform: scale(1.02); pointer-events: none; }
.nexus-loader-content { display: grid; justify-items: center; gap: 10px; padding: 24px; text-align: center; }
.nexus-loader-emblem { position: relative; display: grid; place-items: center; width: 104px; height: 104px; margin-bottom: 8px; }
.nexus-loader-emblem img { width: 60px; height: 60px; border-radius: 16px; animation: nexus-loader-in 560ms cubic-bezier(.23,1,.32,1) both; }
.nexus-loader-ring {
  position: absolute; inset: 0; border-radius: 50%;
  border: 2px solid color-mix(in srgb, var(--accent, #047857) 16%, transparent);
  border-top-color: var(--accent, #047857);
  animation: nexus-loader-spin 900ms linear infinite;
}
.nexus-loader-name {
  margin: 0; font: 700 clamp(28px, 6vw, 40px)/1.1 var(--font-display, 'Bricolage Grotesque', system-ui, sans-serif);
  letter-spacing: -.03em; animation: nexus-loader-in 560ms 80ms cubic-bezier(.23,1,.32,1) both;
}
.nexus-loader-caption {
  margin: 0; color: var(--text-secondary, #5c6170);
  font: 500 11px/1.4 var(--font-mono, 'IBM Plex Mono', ui-monospace, monospace);
  letter-spacing: .2em; text-transform: uppercase;
  animation: nexus-loader-in 560ms 140ms cubic-bezier(.23,1,.32,1) both;
}
.nexus-loader-track {
  width: 140px; height: 3px; margin-top: 18px; overflow: hidden; border-radius: 3px;
  background: color-mix(in srgb, var(--accent, #047857) 16%, transparent);
}
.nexus-loader-track span {
  display: block; height: 100%; background: var(--accent, #047857);
  transform-origin: left; animation: nexus-loader-fill 1400ms cubic-bezier(.65,0,.35,1) both;
}
@keyframes nexus-loader-in { from { opacity: 0; transform: translateY(10px); } }
@keyframes nexus-loader-spin { to { transform: rotate(360deg); } }
@keyframes nexus-loader-fill { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@media (prefers-reduced-motion: reduce) {
  .nexus-loader, .nexus-loader * { animation: none !important; transition: none !important; }
}
