/* ══ ATLAS HOME — Hero con Videos Higgsfield ══ */

/* Container principal del hero */
#hero-section {
  position: relative;
  width: 100%;
  height: 100svh;
  min-height: 580px;
  overflow: hidden;
  background: #0B1120;
}

/* Slides de video */
.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1.6s ease;
  overflow: hidden;
}
.hero-slide.active { opacity: 1; }

/* IMAGEN de fallback — siempre visible detrás del video */
.hero-slide .hero-fallback {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  z-index: 0;
  animation: kb-fallback 8s ease-in-out infinite alternate;
}
@keyframes kb-fallback {
  0%   { transform: scale(1.06) translate(0, 0); }
  100% { transform: scale(1.00) translate(-0.5%, 0.5%); }
}

/* Color de fondo por slide — visible mientras carga la imagen */
#hs-0 { background: linear-gradient(160deg, #1a2e4a, #0d1e35); }
#hs-1 { background: linear-gradient(160deg, #1a1a2e, #0d0d20); }
#hs-2 { background: linear-gradient(160deg, #1a2a1a, #0d1e0d); }

/* VIDEO de fondo — empieza invisible para no tapar la imagen fallback */
.hero-slide video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
  z-index: 1;
  opacity: 0;
  transition: opacity 0.6s ease;
}
/* JS añade .video-ready cuando el video puede reproducirse */
.hero-slide video.video-ready {
  opacity: 1;
}

/* Overlay gradiente */
.hero-slide-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background:
    linear-gradient(to bottom,
      rgba(11,17,32,.4)  0%,
      rgba(11,17,32,.0)  25%,
      rgba(11,17,32,.0)  50%,
      rgba(11,17,32,.85) 80%,
      rgba(11,17,32,.98) 100%
    ),
    linear-gradient(to right,
      rgba(11,17,32,.3) 0%,
      transparent 40%
    );
}

/* Partículas doradas flotantes */
.hero-particle {
  position: absolute;
  border-radius: 50%;
  background: rgba(212, 160, 23, 0.45);
  pointer-events: none;
  z-index: 3;
  animation: float-particle linear infinite;
  opacity: 0;
}
@keyframes float-particle {
  0%   { transform: translateY(0) translateX(0);         opacity: 0; }
  10%  { opacity: 0.9; }
  90%  { opacity: 0.4; }
  100% { transform: translateY(-140px) translateX(18px); opacity: 0; }
}

/* Chips indicadores */
.hero-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 13px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  background: rgba(11, 17, 32, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #94A3B8;
  cursor: pointer;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: all 0.3s ease;
  white-space: nowrap;
}
.hero-chip.active {
  background: rgba(212, 160, 23, 0.18);
  border-color: rgba(212, 160, 23, 0.55);
  color: #F3D27A;
}
.hero-chip-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #64748B;
  transition: background 0.3s;
  flex-shrink: 0;
}
.hero-chip.active .hero-chip-dot { background: #D4A017; }

/* Caption dinámica */
.hero-caption {
  font-size: clamp(13px, 1.5vw, 15px);
  color: #94A3B8;
  line-height: 1.65;
  max-width: 500px;
  margin-bottom: 24px;
  transition: opacity 0.4s ease;
}

/* Progress bar */
.hero-progress-bar {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  z-index: 15;
  height: 3px;
  background: rgba(255, 255, 255, 0.08);
}
.hero-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #B8860B, #F3D27A);
  width: 0%;
  will-change: width;
}
.hero-progress-fill.animating {
  transition: width 7s linear;
  width: 100%;
}

/* Scroll hint */
.hero-scroll-hint {
  position: absolute;
  bottom: 22px; right: 28px;
  z-index: 15;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  color: #475569;
  font-size: 9px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  animation: float-hint 2.2s ease-in-out infinite;
}
@keyframes float-hint {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(7px); }
}
.hero-scroll-arrow {
  width: 28px; height: 28px;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; color: #94A3B8;
}

/* Badge "Video IA" en el hero */
.hero-ia-badge {
  position: absolute;
  top: 68px; right: 16px;
  z-index: 30;
  display: flex; align-items: center; gap: 5px;
  background: rgba(11,17,32,.75);
  border: 1px solid rgba(212,160,23,.25);
  border-radius: 20px;
  padding: 4px 10px;
  font-size: 9px; font-weight: 700;
  color: #D4A017;
  backdrop-filter: blur(8px);
  letter-spacing: .5px;
}

/* Loading spinner mientras carga el video */
.hero-video-loading {
  position: absolute;
  bottom: 12px; left: 50%;
  transform: translateX(-50%);
  z-index: 20;
  display: none;
  align-items: center; gap: 6px;
  font-size: 9px; color: #475569;
}
.hero-video-loading.show { display: flex; }
.spin {
  width: 10px; height: 10px;
  border: 1.5px solid rgba(212,160,23,.3);
  border-top-color: #D4A017;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Mobile ──────────────────────────────────────────────────────────────── */
@media (max-width: 640px) {
  .hero-caption { font-size: 11px; margin-bottom: 12px; }
  .hero-scroll-hint { display: none; }
  .hero-ia-badge { display: none; }
  .hero-chip { font-size: 9px; padding: 4px 9px; gap: 4px; }
  .hero-chip-dot { width: 4px; height: 4px; }
}

/* En pantallas tiny (iPhone SE 375px) oculta labels de los chips */
@media (max-width: 390px) {
  .hero-chip span { display: none; }
  .hero-chip { padding: 5px 7px; }
}
