/* ============================================================
   IG TECH · Enhancements layer
   Overlay seguro · no toca tipografía ni layout
   Solo añade: hover smoothness, glow, shine, gradient stats, dividers
   ============================================================ */

/* ============================================================
   1. CARDS · lift + shadow + border accent en hover
   ============================================================ */
.pillar-card,
.case-card,
.sector-card,
.contact-option {
  transition:
    transform 0.4s cubic-bezier(0.16, 1, 0.3, 1),
    box-shadow 0.4s cubic-bezier(0.16, 1, 0.3, 1),
    border-color 0.3s ease;
  position: relative;
}

.pillar-card:hover,
.case-card:hover,
.sector-card:hover {
  transform: translateY(-4px);
  box-shadow:
    0 1px 3px rgba(15, 42, 68, 0.04),
    0 12px 32px rgba(15, 42, 68, 0.12),
    0 4px 12px rgba(30, 95, 255, 0.08);
  border-color: rgba(30, 95, 255, 0.3);
}

.contact-option:hover {
  transform: translateY(-2px);
}

/* ============================================================
   2. PILLAR ICONS · scale + subtle rotate al hover de la card
   ============================================================ */
.pillar-card .pillar-icon {
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}
.pillar-card:hover .pillar-icon {
  transform: scale(1.1) rotate(-4deg);
}

/* ============================================================
   3. BUTTONS · shine effect (gradient sweep) al hover
   ============================================================ */
.btn--accent,
.btn--primary,
.btn--lg {
  position: relative;
  overflow: hidden;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.3s ease;
}

.btn--accent::after,
.btn--primary::after,
.btn--lg::after {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 100%; height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.25),
    transparent
  );
  transition: left 0.7s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
}

.btn--accent:hover::after,
.btn--primary:hover::after,
.btn--lg:hover::after {
  left: 100%;
}

.btn--accent:hover,
.btn--primary:hover,
.btn--lg:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(34, 197, 94, 0.25);
}

.btn--primary:hover {
  box-shadow: 0 6px 20px rgba(30, 95, 255, 0.25);
}

/* Arrow del botón · animación al hover */
.btn .btn-arrow {
  display: inline-block;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.btn:hover .btn-arrow {
  transform: translateX(4px);
}

/* ============================================================
   4. STAT NUMBERS · gradient brand → accent en hover
   ============================================================ */
.stat-num {
  background: linear-gradient(135deg, #1E5FFF 0%, #22C55E 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  background-size: 200% 200%;
  background-position: 0% 0%;
  transition: background-position 0.6s ease;
}
.stats:hover .stat-num,
.stat-num:hover {
  background-position: 100% 100%;
}

/* ============================================================
   5. SECTION DIVIDERS · línea gradient sutil entre secciones
   ============================================================ */
.section + .section::before,
section.section + .section--elevated::before {
  content: '';
  display: block;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(15, 42, 68, 0.08),
    transparent
  );
  margin-bottom: -1px;
}

/* ============================================================
   6. HERO · subtle shimmer en el gradient pattern
   ============================================================ */
.hero-grid-pattern {
  animation: shimmer-grid 30s linear infinite;
  background-size: 200% 200%;
}
@keyframes shimmer-grid {
  0%, 100% { background-position: 0% 0%; }
  50% { background-position: 100% 100%; }
}

/* ============================================================
   7. NAV LINKS · underline gradient al hover
   ============================================================ */
.nav-link {
  position: relative;
  transition: color 0.2s ease;
}
.nav-link::after {
  content: '';
  position: absolute;
  bottom: -2px; left: 0;
  width: 100%; height: 2px;
  background: linear-gradient(90deg, #1E5FFF, #22C55E);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}
.nav-link:hover::after,
.nav-link.is-active::after {
  transform: scaleX(1);
}

/* ============================================================
   8. FOOTER LINKS · slide right al hover
   ============================================================ */
.footer-col ul a {
  position: relative;
  transition: padding-left 0.25s ease, color 0.25s ease;
}
.footer-col ul a:hover {
  padding-left: 8px;
  color: #22C55E;
}
.footer-col ul a::before {
  content: '→';
  position: absolute;
  left: -16px;
  opacity: 0;
  transition: left 0.25s ease, opacity 0.25s ease;
}
.footer-col ul a:hover::before {
  left: -10px;
  opacity: 0.6;
}

/* ============================================================
   9. CALCULATOR · highlight del precio cuando cambia
   ============================================================ */
.calc-result-value,
[data-show] {
  transition: color 0.3s ease, transform 0.3s ease;
}

/* ============================================================
   10. CONTACT OPTIONS · arrow indicator al hover
   ============================================================ */
.contact-option {
  position: relative;
  overflow: hidden;
}
.contact-option::after {
  content: '→';
  position: absolute;
  top: 50%; right: 20px;
  transform: translateY(-50%) translateX(20px);
  opacity: 0;
  font-size: 24px;
  font-weight: 300;
  transition: opacity 0.3s ease, transform 0.3s ease;
  color: #22C55E;
}
.contact-option:hover::after {
  opacity: 1;
  transform: translateY(-50%) translateX(0);
}

/* ============================================================
   11. LANG SWITCH · pill animation al cambiar
   ============================================================ */
.lang-switch button {
  position: relative;
  transition: color 0.25s ease;
}
.lang-switch button.is-active {
  font-weight: 700;
}

/* ============================================================
   12. NEWSLETTER FORM · focus state premium
   ============================================================ */
.newsletter-input:focus,
input[type="email"]:focus,
input[type="text"]:focus,
textarea:focus {
  outline: none;
  box-shadow:
    0 0 0 3px rgba(30, 95, 255, 0.18),
    0 0 0 1px #1E5FFF;
  transition: box-shadow 0.2s ease;
}

/* ============================================================
   13. TERMINAL · subtle pulse en el OK
   ============================================================ */
.terminal-line .ok {
  position: relative;
}
.terminal-line .ok::before {
  content: '';
  position: absolute;
  inset: -2px;
  background: currentColor;
  border-radius: 3px;
  opacity: 0;
  z-index: -1;
  filter: blur(8px);
  animation: terminal-pulse 4s ease-in-out infinite;
}
@keyframes terminal-pulse {
  0%, 100% { opacity: 0; }
  50% { opacity: 0.2; }
}

/* ============================================================
   14. REVEAL · smoother animation (sobrescribe si existe)
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition:
    opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal.is-visible,
.reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================================
   15. ACCENT-LINE · subtle highlight color (no rompe título)
   ============================================================ */
.hero-title .accent-line {
  position: relative;
  display: inline-block;
}
.hero-title .accent-line::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, #1E5FFF 0%, #22C55E 100%);
  opacity: 0.25;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 1.2s cubic-bezier(0.16, 1, 0.3, 1) 0.5s,
              opacity 0.4s ease;
  z-index: -1;
}
.hero-title .accent-line:hover::after,
.hero:hover .hero-title .accent-line::after {
  transform: scaleX(1);
}

/* Mostrar el accent-line al cargar (delay para que se vea suave) */
body[data-page="home"] .hero-title .accent-line::after {
  animation: accent-reveal 1.2s cubic-bezier(0.16, 1, 0.3, 1) 1.2s forwards;
}
@keyframes accent-reveal {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}

/* ============================================================
   16. CHAT LAUNCHER · subtle pulse para llamar atención
   ============================================================ */
.chat-launcher-button,
.chat-launcher {
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.chat-launcher-button:hover {
  transform: scale(1.05);
}

/* ============================================================
   17. RESPONSIVE · efectos más sutiles en móvil
   ============================================================ */
@media (max-width: 768px) {
  .pillar-card:hover,
  .case-card:hover {
    transform: none;
  }
  .btn--accent:hover,
  .btn--primary:hover {
    transform: none;
  }
}

/* ============================================================
   19. DIAGNOSTIC CTA · grid de 6 preguntas como tarjetas numeradas
   ============================================================ */
.diag-cta-section {
  background: linear-gradient(180deg, #0F2A44 0%, #07182A 100%);
  color: #fff;
  position: relative;
  overflow: hidden;
  padding: 80px 0 100px;
}
.diag-cta-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 15% 20%, rgba(34, 197, 94, 0.10), transparent 55%),
    radial-gradient(circle at 85% 80%, rgba(30, 95, 255, 0.10), transparent 55%);
  pointer-events: none;
}
.diag-cta-section > .container {
  position: relative;
  z-index: 1;
}

.diag-cta-head {
  text-align: center;
  max-width: 800px;
  margin: 0 auto 56px;
}
.diag-cta-head .eyebrow {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.18em;
  font-weight: 600;
}
.diag-cta-head h2 {
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
}
.diag-cta-head p {
  margin-left: auto;
  margin-right: auto;
}

/* ─── Lista editorial de 6 preguntas ───
   Rediseño: fuera el grid 3×2 idéntico, fuera el meta mono verde y la flecha
   redundante. Cada pregunta es ahora una fila tipo "índice de revista":
   número grande con peso fino + pregunta grande + meta a la derecha en
   neutral discreto. Separadores horizontales finos, hover sutil. */
.diag-questions-grid {
  display: flex;
  flex-direction: column;
  max-width: 880px;
  margin: 0 auto 56px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.diag-q-card {
  position: relative;
  display: grid;
  grid-template-columns: 72px 1fr auto;
  align-items: center;
  column-gap: 28px;
  padding: 22px 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  color: inherit;
  text-decoration: none;
  overflow: hidden;
  transition:
    background 0.28s cubic-bezier(0.16, 1, 0.3, 1),
    padding-left 0.28s cubic-bezier(0.16, 1, 0.3, 1),
    padding-right 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}
.diag-q-card:hover {
  background: rgba(255, 255, 255, 0.025);
  padding-left: 16px;
  padding-right: 16px;
}

.diag-q-num {
  font-family: 'Inter Tight', 'Inter', sans-serif;
  font-size: 44px;
  font-weight: 200;
  letter-spacing: -0.04em;
  color: rgba(255, 255, 255, 0.30);
  line-height: 1;
  transition: color 0.28s ease;
}
.diag-q-card:hover .diag-q-num {
  color: #22C55E;
}

.diag-q-text {
  font-size: 19px;
  font-weight: 600;
  color: #fff;
  line-height: 1.32;
  letter-spacing: -0.015em;
}

.diag-q-meta {
  font-family: inherit;
  font-size: 13px;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.42);
  letter-spacing: 0;
  line-height: 1.45;
  text-align: right;
  white-space: nowrap;
  transition: color 0.28s ease;
}
.diag-q-card:hover .diag-q-meta {
  color: rgba(255, 255, 255, 0.72);
}

/* Móvil: dos columnas (número + texto), meta debajo del texto */
@media (max-width: 720px) {
  .diag-q-card {
    grid-template-columns: 48px 1fr;
    column-gap: 18px;
    row-gap: 4px;
    padding: 18px 4px;
  }
  .diag-q-num { font-size: 28px; align-self: start; padding-top: 2px; }
  .diag-q-text { font-size: 16px; grid-column: 2; }
  .diag-q-meta {
    grid-column: 2;
    grid-row: 2;
    text-align: left;
    white-space: normal;
    font-size: 12.5px;
  }
}

/* ─── Bottom actions ─── */
.diag-cta-actions {
  text-align: center;
}
.diag-cta-actions .btn--lg {
  padding: 16px 32px;
  font-size: 15.5px;
  box-shadow: 0 0 0 0 rgba(34, 197, 94, 0),
              0 6px 22px rgba(34, 197, 94, 0.35);
  animation: diag-cta-pulse 3.4s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}
@keyframes diag-cta-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0), 0 6px 22px rgba(34, 197, 94, 0.3); }
  50% { box-shadow: 0 0 0 12px rgba(34, 197, 94, 0), 0 6px 22px rgba(34, 197, 94, 0.5); }
}
.diag-cta-actions .btn--lg:hover { animation-play-state: paused; }

/* Microcopy bajo el CTA · indica el compromiso de follow-up con el cliente.
   Restrained: una línea, Inter (no mono), gris medio. Sin punto pulsante. */
.diag-cta-microcopy {
  margin: 18px auto 0;
  max-width: 480px;
  font-size: 13.5px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.55);
  letter-spacing: 0;
}

@media (max-width: 760px) {
  .diag-cta-section { padding: 60px 0 80px; }
  .diag-cta-head h2 { font-size: 28px; }
  /* .diag-q-text y .diag-q-card responsive se manejan en su propia media query */
}

/* ============================================================
   20. REDUCED MOTION · respetar preferencia del usuario
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
