/* ============================================================
   IG TECH · Impact Layer
   Sticky CTA · Live feed flotante · CTA pulse · Urgency
   Diseñado para convertir visita → diagnóstico en <30s
   ============================================================ */

/* ============================================================
   1. STICKY CTA BAR · barra inferior con CTA principal
   Aparece al scrollear >300px · se esconde al subir
   ============================================================ */
.imp-sticky-cta {
  position: fixed;
  bottom: 0;
  left: 0; right: 0;
  z-index: 90;
  transform: translateY(100%);
  transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
}
.imp-sticky-cta.is-visible {
  transform: translateY(0);
  pointer-events: auto;
}
.imp-sticky-cta-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  /* Sólido · sin glassmorphism. Navy puro lee más confiado. */
  background: #0F2A44;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-bottom: none;
  border-radius: 16px 16px 0 0;
  box-shadow: 0 -8px 24px rgba(15, 42, 68, 0.18);
}
.imp-sticky-cta-text {
  color: rgba(255, 255, 255, 0.92);
  font-size: 14px;
  font-weight: 500;
  flex: 1;
  min-width: 0;
  line-height: 1.4;
}
.imp-sticky-cta-text strong {
  color: #fff;
  font-weight: 600;
}
.imp-sticky-cta-text .imp-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(34, 197, 94, 0.15);
  color: #4ade80;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 100px;
  letter-spacing: 0.04em;
  margin-right: 10px;
  vertical-align: middle;
}
.imp-sticky-cta-text .imp-tag::before {
  content: '';
  width: 6px; height: 6px;
  background: #22C55E;
  border-radius: 50%;
  /* Glow retirado · era AI slop. Punto sólido. */
  animation: imp-pulse 2s ease-in-out infinite;
}
@keyframes imp-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.55; transform: scale(0.85); }
}
.imp-sticky-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  background: #0F2A44;
  color: #5CD387;
  border: 1px solid rgba(255,255,255,0.14);
  font-weight: 700;
  font-size: 14px;
  border-radius: 100px;
  text-decoration: none;
  white-space: nowrap;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.25s ease;
  /* Sombra normal · sin glow verde. */
  box-shadow: 0 4px 12px rgba(15, 42, 68, 0.20);
  position: relative;
  overflow: hidden;
}
.imp-sticky-cta-btn::after {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 100%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
  transition: left 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}
.imp-sticky-cta-btn:hover::after { left: 100%; }
.imp-sticky-cta-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(15, 42, 68, 0.28);
  border-color: #22C55E;
}
.imp-sticky-cta-btn .arr {
  transition: transform 0.25s ease;
}
.imp-sticky-cta-btn:hover .arr { transform: translateX(4px); }

.imp-sticky-cta-close {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  border: 0;
  color: rgba(255,255,255,0.6);
  font-size: 14px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.imp-sticky-cta-close:hover {
  background: rgba(255,255,255,0.15);
  color: #fff;
}

@media (max-width: 760px) {
  .imp-sticky-cta-inner { padding: 10px 12px; gap: 8px; border-radius: 12px 12px 0 0; }
  .imp-sticky-cta-text { font-size: 12px; line-height: 1.3; }
  .imp-sticky-cta-text .imp-tag { display: none; }
  .imp-sticky-cta-btn { padding: 9px 14px; font-size: 12.5px; }
  .imp-sticky-cta-close { width: 24px; height: 24px; font-size: 11px; }
}

/* ============================================================
   COORDINACIÓN con chat-launcher · cuando sticky CTA visible
   se sube el chat launcher para que no se tape
   ============================================================ */
.chat-launcher,
.chat-launcher-button,
[class*="chat-launcher"][class*="button"] {
  transition: bottom 0.4s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.3s ease;
}
body.has-sticky-cta .chat-launcher,
body.has-sticky-cta .chat-launcher-button,
body.has-sticky-cta [class*="chat-launcher"][class*="button"] {
  bottom: 96px !important;  /* sube por encima de la sticky bar */
}

@media (max-width: 760px) {
  body.has-sticky-cta .chat-launcher,
  body.has-sticky-cta .chat-launcher-button,
  body.has-sticky-cta [class*="chat-launcher"][class*="button"] {
    bottom: 88px !important;
  }
}

/* ============================================================
   2. LIVE FEED · notificaciones flotantes esquina inferior izquierda
   ============================================================ */
.imp-live-feed {
  position: fixed;
  bottom: 92px;
  left: 20px;
  z-index: 85;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
  max-width: 320px;
}
.imp-feed-item {
  background: #0F2A44;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  padding: 12px 14px 12px 12px;
  color: #fff;
  font-size: 13px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  box-shadow: 0 12px 28px rgba(15, 42, 68, 0.22);
  opacity: 0;
  transform: translateX(-20px) scale(0.95);
  animation: imp-feed-in 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards,
             imp-feed-out 0.5s cubic-bezier(0.65, 0, 0.35, 1) 7s forwards;
  pointer-events: auto;
}
@keyframes imp-feed-in {
  to { opacity: 1; transform: translateX(0) scale(1); }
}
@keyframes imp-feed-out {
  from { opacity: 1; transform: translateX(0) scale(1); }
  to { opacity: 0; transform: translateX(-30px) scale(0.95); }
}
.imp-feed-icon {
  width: 28px; height: 28px;
  border-radius: 8px;
  background: rgba(34, 197, 94, 0.15);
  color: #4ade80;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 14px;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
}
.imp-feed-body { min-width: 0; flex: 1; }
.imp-feed-title {
  font-weight: 600;
  color: #fff;
  line-height: 1.3;
  margin-bottom: 2px;
}
.imp-feed-meta {
  font-size: 11px;
  color: rgba(255,255,255,0.55);
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: 0.02em;
}
.imp-feed-meta .live {
  color: #4ade80;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.imp-feed-meta .live::before {
  content: '';
  width: 5px; height: 5px;
  background: #22C55E;
  border-radius: 50%;
  display: inline-block;
  /* Glow retirado · punto sólido. */
  animation: imp-pulse 2s ease-in-out infinite;
}

@media (max-width: 760px) {
  .imp-live-feed { display: none; }
}

/* ============================================================
   3. CTA PULSE · pulso sutil en el botón principal del hero
   ============================================================ */
.hero .btn--accent.btn--lg {
  position: relative;
  animation: imp-cta-pulse 3.2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
  animation-delay: 1.5s;
}
@keyframes imp-cta-pulse {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0),
                0 4px 14px rgba(34, 197, 94, 0.25);
  }
  50% {
    box-shadow: 0 0 0 14px rgba(34, 197, 94, 0),
                0 4px 14px rgba(34, 197, 94, 0.45);
  }
}

/* Pausa el pulse al hacer hover (no compite con shine) */
.hero .btn--accent.btn--lg:hover {
  animation-play-state: paused;
}

/* ============================================================
   4. URGENCY BADGE · pequeña insignia en hero
   ============================================================ */
.imp-urgency-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px 6px 10px;
  background: rgba(34, 197, 94, 0.12);
  border: 1px solid rgba(34, 197, 94, 0.3);
  border-radius: 100px;
  color: #4ade80;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  margin-top: 12px;
  text-transform: uppercase;
}
@media (max-width: 560px) {
  .imp-urgency-badge {
    font-size: 10px;
    padding: 5px 10px 5px 8px;
    letter-spacing: 0.03em;
  }
}
.imp-urgency-badge::before {
  content: '';
  width: 7px; height: 7px;
  background: #22C55E;
  border-radius: 50%;
  box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7);
  animation: imp-radar 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}
@keyframes imp-radar {
  0% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.65); }
  70% { box-shadow: 0 0 0 8px rgba(34, 197, 94, 0); }
  100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}

/* ============================================================
   5. PROOF STRIP · franja con stats clave sobre fondo oscuro
   ============================================================ */
.imp-proof-strip {
  background: linear-gradient(180deg, #0F2A44 0%, #07182A 100%);
  color: #fff;
  padding: 40px 24px;
  position: relative;
  overflow: hidden;
}
.imp-proof-strip::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 25% 30%, rgba(34, 197, 94, 0.12), transparent 60%),
    radial-gradient(circle at 75% 70%, rgba(30, 95, 255, 0.10), transparent 60%);
  pointer-events: none;
}
.imp-proof-inner {
  max-width: 1280px;
  margin: 0 auto;
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  align-items: center;
}
@media (max-width: 760px) {
  .imp-proof-inner { grid-template-columns: 1fr 1fr; gap: 24px; }
}
.imp-proof-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.imp-proof-item-value {
  font-family: 'JetBrains Mono', monospace;
  font-size: 24px;
  font-weight: 600;
  color: #4ade80;
  line-height: 1;
}
.imp-proof-item-label {
  font-size: 12px;
  color: rgba(255,255,255,0.65);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.imp-proof-item-icon {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: rgba(74, 222, 128, 0.7);
  font-weight: 600;
  margin-bottom: 6px;
}

/* ============================================================
   6. NAV CTA · botón de contacto destacado en el nav
   ============================================================ */
.site-header .nav-link[href*="diagnostico"] {
  color: #22C55E !important;
  font-weight: 600;
  position: relative;
}
.site-header .nav-link[href*="diagnostico"]::after {
  background: #22C55E;
}

/* ============================================================
   7. REDUCED MOTION
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  .hero .btn--accent.btn--lg,
  .imp-urgency-badge::before,
  .imp-sticky-cta-text .imp-tag::before,
  .imp-feed-meta .live::before {
    animation: none !important;
  }
  .imp-feed-item {
    animation-duration: 0.1s !important;
  }
}
