/* ═══════════════════════════════════════════════════════════════════
   LS DOMÓTICA — hero.css
   ------------------------------------------------------------------
   Estilos de la sección HERO (bienvenida).

   Capas (z-index interno):
     · .hero-aurora    (fondo azul/negro + video opcional + grid)
     · .hero-inner     (contenido real: badge, título, CTAs, KPIs)

   Responsive:
     · Desktop: título ~4.5rem, dos CTAs en fila
     · Mobile:  título ~2.5rem, CTAs apilados, KPIs en 3 columnas chicas
═══════════════════════════════════════════════════════════════════ */

/* ─── CONTAINER ───────────────────────────────────────────────── */
.hero {
  position: relative;
  min-height: 92svh;             /* deja asomar la sección siguiente */
  min-height: 92vh;              /* fallback */
  padding: calc(var(--nav-height) + 72px) 0 78px;
  display: flex;
  align-items: center;
  overflow: hidden;              /* los orbs no deben sangrar */
  isolation: isolate;            /* para que el aurora viva en su propia capa */
  background:
    radial-gradient(900px 520px at 20% 18%, rgba(0, 149, 255, 0.18), transparent 65%),
    radial-gradient(780px 480px at 84% 72%, rgba(0, 212, 255, 0.12), transparent 68%),
    linear-gradient(135deg, #020617 0%, #061426 48%, #020617 100%);
}

.hero-inner {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1.6rem;
}

/* ─── BLUE / BLACK BACKGROUND + OPTIONAL VIDEO ───────────────── */
.hero-aurora {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  overflow: hidden;
}

.hero-aurora .orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.58;
  will-change: transform;
}

.hero-aurora .orb-a {
  width: 520px;
  height: 520px;
  background: radial-gradient(circle, #0095ff 0%, transparent 70%);
  top: -120px;
  left: -120px;
  animation: orbFloatA 14s ease-in-out infinite;
}

.hero-aurora .orb-b {
  width: 460px;
  height: 460px;
  background: radial-gradient(circle, #00d4ff 0%, transparent 70%);
  bottom: -140px;
  right: -80px;
  animation: orbFloatB 18s ease-in-out infinite;
  opacity: 0.46;
}

.hero-aurora .orb-c {
  width: 340px;
  height: 340px;
  background: radial-gradient(circle, #2563eb 0%, transparent 70%);
  top: 42%;
  left: 50%;
  transform: translate(-50%, -50%);
  animation: orbFloatC 22s ease-in-out infinite;
  opacity: 0.28;
}

@keyframes orbFloatA {
  0%,100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(40px, 60px) scale(1.08); }
}

@keyframes orbFloatB {
  0%,100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-50px, -40px) scale(1.1); }
}

@keyframes orbFloatC {
  0%,100% { transform: translate(-50%, -50%) scale(1); }
  50% { transform: translate(calc(-50% + 30px), calc(-50% - 30px)) scale(1.06); }
}

.hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transform: scale(1.035);
  filter: blur(1.4px) saturate(1.08) contrast(1.08) brightness(0.9);
  transition: opacity 420ms ease;
}

.hero-video-enabled .hero-video {
  opacity: 0.68;
}

.hero-video-enabled .hero-aurora .orb {
  opacity: 0.16;
}

.hero-video-scrim {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(7, 9, 15, 0.44) 0%, rgba(7, 9, 15, 0.14) 44%, rgba(7, 9, 15, 0.7) 100%),
    radial-gradient(ellipse at 50% 48%, rgba(7, 9, 15, 0.42) 0%, rgba(7, 9, 15, 0.16) 34%, transparent 68%),
    radial-gradient(760px 440px at 50% 44%, rgba(0, 149, 255, 0.16), transparent 72%),
    linear-gradient(90deg, rgba(7, 9, 15, 0.7) 0%, rgba(7, 9, 15, 0.18) 50%, rgba(7, 9, 15, 0.7) 100%);
}

.hero-aurora .grid-overlay {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.035) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse at center, black 40%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse at center, black 40%, transparent 80%);
  opacity: 0.5;
}

/* ─── BADGE ───────────────────────────────────────────────────── */
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  border-radius: 999px;
  background: rgba(0, 149, 255, 0.08);
  border: 1px solid rgba(0, 149, 255, 0.28);
  color: var(--text);
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.28);
}

.hero-badge-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 rgba(0, 149, 255, 0.7);
  animation: badgePulse 2.2s ease-in-out infinite;
}
@keyframes badgePulse {
  0%   { box-shadow: 0 0 0 0   rgba(0, 149, 255, 0.65); }
  70%  { box-shadow: 0 0 0 10px rgba(0, 149, 255, 0);    }
  100% { box-shadow: 0 0 0 0   rgba(0, 149, 255, 0);    }
}

/* ─── TÍTULO + SUBTÍTULO ──────────────────────────────────────── */
.hero-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.4rem, 5.6vw, 4.6rem);
  line-height: 1.04;
  letter-spacing: 0;
  max-width: 15ch;
  margin: 0;
  text-shadow: 0 18px 44px rgba(0, 0, 0, 0.56);
}

.hero-sub {
  font-size: clamp(1rem, 1.25vw, 1.18rem);
  line-height: 1.55;
  color: rgba(238, 242, 255, 0.82);
  max-width: 62ch;
  margin: 0;
  text-shadow: 0 10px 28px rgba(0, 0, 0, 0.5);
}
.hero-sub strong {
  color: var(--text);
  font-weight: 700;
}

.hero-proof {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 9px;
  max-width: 780px;
}

.hero-proof span {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(3, 7, 18, 0.42);
  color: rgba(238, 242, 255, 0.82);
  font-size: 0.78rem;
  font-weight: 700;
  backdrop-filter: blur(12px);
}

.hero-proof span::before {
  content: '';
  width: 6px;
  height: 6px;
  margin-right: 8px;
  border-radius: 999px;
  background: #22c55e;
  box-shadow: 0 0 14px rgba(34, 197, 94, 0.75);
  flex: 0 0 auto;
}

/* ─── CTAs ────────────────────────────────────────────────────── */
.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.8rem;
  margin-top: 0.4rem;
}

.hero-cta-primary,
.hero-cta-ghost {
  font-size: 0.98rem;
  padding: 0.95rem 1.6rem;
  font-weight: 700;
}

.hero-cta-primary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  box-shadow: var(--shadow-accent);
}

.hero-cta-ghost {
  background: rgba(3, 7, 18, 0.38);
  backdrop-filter: blur(10px);
}
.hero-cta-primary .hero-cta-arrow {
  transition: transform var(--t-fast);
}
.hero-cta-primary:hover .hero-cta-arrow {
  transform: translateX(4px);
}

/* ─── KPIs ────────────────────────────────────────────────────── */
.hero-kpis {
  display: flex;
  gap: clamp(1.4rem, 4vw, 3rem);
  list-style: none;
  margin: 1.6rem 0 0;
  padding: 0;
}

.hero-kpi {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.hero-kpi-num {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.6rem, 2.4vw, 2.2rem);
  line-height: 1;
  letter-spacing: -0.02em;
}

.hero-kpi-label {
  font-size: 0.78rem;
  color: var(--muted);
  letter-spacing: 0.02em;
}

/* ─── INDICADOR DE SCROLL ─────────────────────────────────────── */
.hero-scroll {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  transition: color var(--t-fast);
}
.hero-scroll:hover {
  color: var(--text);
}

.hero-scroll-dot {
  width: 22px; height: 34px;
  border: 1.5px solid rgba(255,255,255,0.25);
  border-radius: 999px;
  position: relative;
}
.hero-scroll-dot::after {
  content: '';
  position: absolute;
  left: 50%; top: 7px;
  width: 3px; height: 7px;
  background: var(--accent);
  border-radius: 999px;
  transform: translateX(-50%);
  animation: scrollDot 1.8s ease-in-out infinite;
}
@keyframes scrollDot {
  0%   { transform: translate(-50%, 0);    opacity: 1; }
  80%  { transform: translate(-50%, 14px); opacity: 0; }
  100% { transform: translate(-50%, 0);    opacity: 0; }
}

/* ─── WHATSAPP HINT ────────────────────────────────────────────── */
.hero-wa-hint {
  font-size: 0.82rem;
  color: rgba(238, 242, 255, 0.52);
  text-align: center;
  margin-top: -0.4rem;
}

.hero-wa-link {
  color: var(--wa-green, #25d366);
  font-weight: 700;
  text-decoration: none;
  transition: color var(--t-fast);
  white-space: nowrap;
}

.hero-wa-link:hover {
  color: #22c55e;
}

/* ─── RESPONSIVE ──────────────────────────────────────────────── */
@media (max-width: 640px) {
  .hero {
    min-height: 90svh;
    padding: calc(var(--nav-height) + 32px) 0 56px;
  }
  .hero-inner {
    gap: 1rem;
  }
  /* Badge: texto más pequeño para no desbordar en 360px */
  .hero-badge {
    font-size: 0.70rem;
    padding: 6px 12px;
    gap: 7px;
    max-width: calc(100vw - 48px);
    text-align: center;
  }
  .hero-ctas {
    width: 100%;
    flex-direction: column;
  }
  .hero-cta-primary,
  .hero-cta-ghost {
    width: 100%;
    justify-content: center;
  }
  /* KPIs: evitar overflow horizontal en 360px */
  .hero-kpis {
    width: 100%;
    justify-content: space-between;
    gap: 0.5rem;
  }
  .hero-kpi {
    flex: 1;
    min-width: 0;
  }
  .hero-kpi-num {
    font-size: clamp(1.3rem, 6vw, 1.6rem);
  }
  .hero-kpi-label {
    font-size: 0.68rem;
    text-align: center;
    word-break: break-word;
    overflow-wrap: break-word;
    line-height: 1.3;
    max-width: 100%;
    white-space: normal;
  }
  .hero-proof {
    gap: 7px;
  }
  .hero-proof span {
    width: 100%;
    justify-content: center;
  }
  .hero-wa-hint {
    font-size: 0.78rem;
  }
  .hero-scroll {
    display: none;
  }
}

/* Usuarios con reduce-motion activado: apagamos animaciones decorativas */
@media (prefers-reduced-motion: reduce) {
  .hero-video,
  .hero-aurora .orb,
  .hero-badge-dot,
  .hero-scroll-dot::after {
    animation: none;
  }
}
