/* =====================================================
   AIMMA · HOME v4 — Agencia de IA (rediseño 2026-07-10)
   Minimalismo exagerado dark-tech. SOLO afecta al home:
   el scope body:has(#home:not([hidden])) enciende el modo
   oscuro en header/footer/home; las tabs de servicios
   (style.v3.css) quedan intactas en white-mode.
   Un solo color de acción: verde #22C55E (Diagnóstico/WhatsApp).
   ===================================================== */

:root {
  --v4-bg:      #030911;
  --v4-bg-2:    #060f1c;
  --v4-card:    rgba(10, 30, 51, 0.55);
  --v4-line:    rgba(80, 140, 180, 0.16);
  --v4-white:   #f4f7fa;
  --v4-white-70:rgba(244, 247, 250, 0.72);
  --v4-white-50:rgba(244, 247, 250, 0.52);
  --v4-green:   #22C55E;
  --v4-green-hover: #1db456;
  --v4-green-glow: rgba(34, 197, 94, 0.28);
  --v4-cyan:    #00d4f5;
}

/* ========== SCOPE OSCURO (solo con home visible) ========== */
body:has(#home:not([hidden])) {
  background: var(--v4-bg);
  color: var(--v4-white);
}
body:has(#home:not([hidden])) .site-header {
  background: rgba(3, 9, 17, 0.82);
  border-bottom: 1px solid var(--v4-line);
  backdrop-filter: blur(12px);
}
body:has(#home:not([hidden])) .brand-name,
body:has(#home:not([hidden])) .nav-link { color: var(--v4-white); }
body:has(#home:not([hidden])) .brand-suffix { color: var(--v4-white-50); }
body:has(#home:not([hidden])) .nav-link:hover,
body:has(#home:not([hidden])) .nav-link.active { color: var(--v4-cyan); }
body:has(#home:not([hidden])) .hamburger span { background: var(--v4-white); }
body:has(#home:not([hidden])) .mobile-drawer {
  background: var(--v4-bg-2);
  border-left: 1px solid var(--v4-line);
}
body:has(#home:not([hidden])) .drawer-link { color: var(--v4-white); }
body:has(#home:not([hidden])) .drawer-close { color: var(--v4-white); }
body:has(#home:not([hidden])) .site-footer {
  background: var(--v4-bg-2);
  border-top: 1px solid var(--v4-line);
}
body:has(#home:not([hidden])) .site-footer,
body:has(#home:not([hidden])) .site-footer p,
body:has(#home:not([hidden])) .site-footer a { color: var(--v4-white-70); }
body:has(#home:not([hidden])) .site-footer h4,
body:has(#home:not([hidden])) .site-footer .brand-name { color: var(--v4-white); }
body:has(#home:not([hidden])) .site-footer a:hover { color: var(--v4-cyan); }
body:has(#home:not([hidden])) .bg-halos { opacity: 0.5; }

/* Dentro del home, tipografía base clara.
   OJO: .section-title/.section-subtitle NO se tocan — los usa el bloque
   del form diagnóstico, que conserva su superficie blanca. */
#home { color: var(--v4-white); }
#home .v4-section .eyebrow { color: var(--v4-cyan); letter-spacing: 0.14em; }

/* WhatsApp = verde (color de acción exclusivo) mientras el home está visible */
body:has(#home:not([hidden])) .wa-float {
  background: var(--v4-green);
  color: #04150a;
  box-shadow: 0 8px 24px var(--v4-green-glow);
  animation: none;
}

/* ========== CTA VERDE (exclusivo Diagnóstico/WhatsApp) ========== */
.cta-green {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 12px 28px;
  border: none;
  border-radius: 12px;
  background: var(--v4-green);
  color: #04150a;
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: 1.02rem;
  letter-spacing: 0.04em;
  text-decoration: none;
  cursor: pointer;
  transition: background 180ms ease, box-shadow 180ms ease, transform 180ms ease;
  box-shadow: 0 0 0 rgba(34, 197, 94, 0);
}
.cta-green:hover {
  background: var(--v4-green-hover);
  box-shadow: 0 6px 28px var(--v4-green-glow);
}
.cta-green:focus-visible { outline: 2px solid var(--v4-green); outline-offset: 3px; }
.cta-green--lg { min-height: 56px; padding: 15px 36px; font-size: 1.12rem; }
.cta-green--ghost {
  background: transparent;
  color: var(--v4-green);
  border: 1.5px solid var(--v4-green);
}
.cta-green--ghost:hover { background: rgba(34, 197, 94, 0.10); box-shadow: none; }

/* Utilidad accesible (no existe en style.v3.css) */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ========== REVEALS (transform/opacity only) ========== */
.v4-reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 260ms ease-out, transform 260ms ease-out;
}
.v4-reveal.in { opacity: 1; transform: translateY(0); }

/* ========== S1 HERO ========== */
#home .hero-v4 { text-align: left; }
#home .hero-v4 .hero-content {
  max-width: var(--container);
  width: 100%;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 56px;
  align-items: center;
}
#home .hero-v4 .hero-title {
  font-size: clamp(2.7rem, 6.6vw, 5.6rem);
  color: var(--v4-white);
}
#home .hero-v4 .hero-title .accent {
  color: var(--v4-cyan);
  text-shadow: 0 0 44px rgba(0, 212, 245, 0.30);
}
#home .hero-v4 .hero-subtitle {
  color: var(--v4-white-70);
  max-width: 520px;
  margin-bottom: 34px;
}
#home .hero-v4 .hero-ctas { justify-content: flex-start; }

/* Chat card */
.v4-chat {
  /* Más clara que el fondo: debe leerse como chat VIVO, no como mockup */
  background: linear-gradient(165deg, rgba(32, 64, 98, 0.92), rgba(16, 38, 62, 0.95));
  border: 1px solid rgba(0, 212, 245, 0.30);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(10px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-height: 420px;
  max-height: 520px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
}
.v4-chat-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--v4-line);
}
.v4-chat-head strong {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1rem;
  color: var(--v4-white);
  display: block;
}
.v4-chat-head small { color: var(--v4-white-50); font-size: 0.8rem; }
.v4-chat-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--v4-green);
  box-shadow: 0 0 10px var(--v4-green-glow);
  flex-shrink: 0;
}
.v4-chat-log {
  flex: 1;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 0.98rem;
  scrollbar-width: thin;
}
.v4-msg {
  max-width: 85%;
  padding: 10px 14px;
  border-radius: 14px;
  line-height: 1.45;
  opacity: 0;
  transform: translateY(8px);
  animation: v4msg 220ms ease-out forwards;
}
@keyframes v4msg { to { opacity: 1; transform: translateY(0); } }
.v4-msg--ai {
  align-self: flex-start;
  background: rgba(0, 212, 245, 0.08);
  border: 1px solid rgba(0, 212, 245, 0.14);
  color: var(--v4-white);
  border-bottom-left-radius: 4px;
}
.v4-msg--user {
  align-self: flex-end;
  background: rgba(34, 197, 94, 0.14);
  border: 1px solid rgba(34, 197, 94, 0.20);
  color: var(--v4-white);
  border-bottom-right-radius: 4px;
}
.v4-typing {
  align-self: flex-start;
  display: inline-flex;
  gap: 5px;
  padding: 12px 16px;
}
.v4-typing span {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--v4-white-50);
  animation: v4blink 1s infinite;
}
.v4-typing span:nth-child(2) { animation-delay: 0.18s; }
.v4-typing span:nth-child(3) { animation-delay: 0.36s; }
@keyframes v4blink { 0%, 80%, 100% { opacity: 0.25; } 40% { opacity: 1; } }
.v4-chat-invite {
  padding: 12px 22px 0;
  border-top: 1px solid rgba(0, 212, 245, 0.18);
  color: var(--v4-cyan);
  font-weight: 600;
  font-size: 0.94rem;
}
.v4-chat-form {
  display: flex;
  gap: 10px;
  padding: 10px 14px 14px;
}
.v4-chat-form input {
  flex: 1;
  min-height: 48px;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1.5px solid rgba(0, 212, 245, 0.45);
  background: rgba(255, 255, 255, 0.10);
  color: var(--v4-white);
  font-family: var(--font-ui);
  font-size: 1rem;
}
/* Pulso suave que invita a escribir; se apaga al primer toque (JS agrega .v4-used) */
.v4-chat:not(.v4-used) .v4-chat-form input {
  animation: v4invite 2.2s ease-in-out infinite;
}
@keyframes v4invite {
  0%, 100% { box-shadow: 0 0 0 0 rgba(0, 212, 245, 0); }
  50% { box-shadow: 0 0 0 5px rgba(0, 212, 245, 0.16); }
}
.v4-chat-form input::placeholder { color: rgba(244, 247, 250, 0.62); }
.v4-chat-form input:focus-visible { outline: 2px solid var(--v4-cyan); outline-offset: 1px; }
.v4-chat-send {
  width: 46px; min-height: 46px;
  border: none;
  border-radius: 10px;
  background: rgba(0, 212, 245, 0.14);
  color: var(--v4-cyan);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 180ms ease;
}
.v4-chat-send:hover { background: rgba(0, 212, 245, 0.26); }
.v4-chat-send:disabled { opacity: 0.4; cursor: default; }
.v4-chat-close {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 14px;
  border-top: 1px solid var(--v4-line);
}
.v4-chat-close .cta-green { flex: 1; min-width: 150px; font-size: 0.95rem; }
/* Fallback WhatsApp (jamás un hero roto) */
.v4-chat-fallback {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 28px;
  text-align: center;
  color: var(--v4-white-70);
}

/* ========== S2 CONFIANZA (marquee) ========== */
.v4-trust {
  border-top: 1px solid var(--v4-line);
  border-bottom: 1px solid var(--v4-line);
  padding: 26px 0;
  overflow: hidden;
}
.v4-trust-label {
  text-align: center;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  color: var(--v4-white-50);
  margin-bottom: 16px;
}
.v4-marquee { display: flex; overflow: hidden; user-select: none; }
.v4-marquee-track {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  gap: 64px;
  padding-right: 64px;
  animation: v4marquee 30s linear infinite;
}
@keyframes v4marquee { to { transform: translateX(-100%); } }
.v4-marquee-track span {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: 0.06em;
  color: var(--v4-white-50);
  white-space: nowrap;
}
.v4-marquee-track i {
  font-style: normal;
  color: rgba(0, 212, 245, 0.4);
}

/* Franja de números de confianza (todos reales, dentro de S2) */
.v4-stats {
  max-width: var(--container);
  margin: 34px auto 8px;
  padding: 0 24px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  text-align: center;
}
.v4-stat { display: flex; flex-direction: column; gap: 6px; }
.v4-stat-num {
  font-family: var(--font-mono);
  font-weight: 400;
  font-size: clamp(1.9rem, 3.4vw, 2.8rem);
  line-height: 1;
  color: var(--v4-white);
}
.v4-stat-label {
  font-size: 0.88rem;
  letter-spacing: 0.04em;
  color: var(--v4-white-50);
}
@media (max-width: 640px) {
  .v4-stats { grid-template-columns: 1fr 1fr; gap: 22px 12px; }
}

/* ========== SECCIONES BASE ========== */
.v4-section {
  max-width: var(--container);
  margin: 0 auto;
  padding: 110px 24px 0;
}
.v4-title {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(2rem, 4.6vw, 3.6rem);
  line-height: 1.06;
  letter-spacing: -0.02em;
  color: var(--v4-white);
  margin: 10px 0 14px;
}
.v4-sub { color: var(--v4-white-70); font-size: 1.08rem; max-width: 640px; }

/* ========== S3 QUÉ HACEMOS ========== */
.v4-what-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: 44px;
}
.v4-card {
  background: var(--v4-card);
  border: 1px solid var(--v4-line);
  border-radius: var(--radius-lg);
  padding: 28px 26px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  text-align: left;
  color: var(--v4-white);
  text-decoration: none;
  transition: border-color 200ms ease, transform 200ms ease;
}
a.v4-card, button.v4-card { cursor: pointer; }
a.v4-card:hover, button.v4-card:hover {
  border-color: rgba(0, 212, 245, 0.4);
  transform: translateY(-3px);
}
.v4-card h3 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.22rem;
  color: var(--v4-white);
}
.v4-card p { color: var(--v4-white-70); font-size: 0.98rem; line-height: 1.5; }
.v4-card-icon {
  width: 44px; height: 44px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 212, 245, 0.10);
  color: var(--v4-cyan);
  flex-shrink: 0;
}
.v4-card-icon svg { width: 24px; height: 24px; }
/* La estrella: doble ancho + glow */
.v4-card--star {
  grid-column: span 2;
  border-color: rgba(0, 212, 245, 0.34);
  background: linear-gradient(140deg, rgba(0, 212, 245, 0.10), rgba(10, 30, 51, 0.55) 55%);
  box-shadow: 0 0 44px rgba(0, 212, 245, 0.10);
}
.v4-card--star h3 { font-size: 1.55rem; }
.v4-star-examples {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-top: 4px;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--v4-white-70);
}
.v4-star-examples li::before { content: '▸ '; color: var(--v4-cyan); }
.v4-card-link {
  margin-top: auto;
  font-weight: 700;
  font-size: 0.92rem;
  letter-spacing: 0.05em;
  color: var(--v4-cyan);
}

/* Reveals en cascada dentro de las grillas (la gente es visual) */
.v4-what-grid > .v4-reveal:nth-child(2) { transition-delay: 70ms; }
.v4-what-grid > .v4-reveal:nth-child(3) { transition-delay: 140ms; }
.v4-what-grid > .v4-reveal:nth-child(4) { transition-delay: 210ms; }
.v4-what-grid > .v4-reveal:nth-child(5) { transition-delay: 280ms; }
.v4-what-grid > .v4-reveal:nth-child(6) { transition-delay: 350ms; }
.v4-what-grid > .v4-reveal:nth-child(7) { transition-delay: 420ms; }
.v4-chips > .v4-reveal:nth-child(2) { transition-delay: 60ms; }
.v4-chips > .v4-reveal:nth-child(3) { transition-delay: 120ms; }
.v4-chips > .v4-reveal:nth-child(4) { transition-delay: 180ms; }
.v4-chips > .v4-reveal:nth-child(5) { transition-delay: 240ms; }
.v4-chips > .v4-reveal:nth-child(6) { transition-delay: 300ms; }
.v4-chips > .v4-reveal:nth-child(7) { transition-delay: 360ms; }
.v4-chips > .v4-reveal:nth-child(8) { transition-delay: 420ms; }
.v4-stats > .v4-reveal:nth-child(2) { transition-delay: 90ms; }
.v4-stats > .v4-reveal:nth-child(3) { transition-delay: 180ms; }
.v4-stats > .v4-reveal:nth-child(4) { transition-delay: 270ms; }

/* Orbe IA en la tarjeta estrella (mismo lenguaje del orbe de Tecnología IA) */
.v4-card--star { position: relative; overflow: hidden; }
.v4-orb {
  position: absolute;
  right: 34px;
  top: 50%;
  width: 96px; height: 96px;
  margin-top: -48px;
  pointer-events: none;
}
.v4-orb i {
  position: absolute;
  inset: 0;
  border: 1px solid rgba(0, 212, 245, 0.35);
  border-radius: 50%;
  border-top-color: transparent;
  border-left-color: transparent;
  animation: v4spin 7s linear infinite;
}
.v4-orb i:nth-child(2) {
  inset: 14px;
  border-color: rgba(0, 212, 245, 0.22);
  border-bottom-color: transparent;
  border-right-color: transparent;
  animation: v4spin 5s linear infinite reverse;
}
.v4-orb b {
  position: absolute;
  inset: 34px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, rgba(0, 212, 245, 0.85), rgba(0, 109, 139, 0.6));
  box-shadow: 0 0 26px rgba(0, 212, 245, 0.4);
  animation: v4breathe 2.6s ease-in-out infinite;
}
@keyframes v4spin { to { transform: rotate(360deg); } }
@keyframes v4breathe { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.12); } }

/* Glow pulsante detrás del chat del hero */
.v4-chat { animation: v4chatglow 3.2s ease-in-out infinite; }
@keyframes v4chatglow {
  0%, 100% { box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45), 0 0 34px rgba(0, 212, 245, 0.10); }
  50% { box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45), 0 0 56px rgba(0, 212, 245, 0.22); }
}

/* Scan-line sutil que recorre los case cards */
.v4-case { position: relative; overflow: hidden; }
.v4-case::after {
  content: '';
  position: absolute;
  left: 0; right: 0; top: 0;
  height: 42px;
  background: linear-gradient(180deg, transparent, rgba(0, 212, 245, 0.06), transparent);
  transform: translateY(-60px);
  animation: v4scan 5.5s ease-in-out infinite;
  pointer-events: none;
}
.v4-case:nth-child(2)::after { animation-delay: 2.7s; }
@keyframes v4scan {
  0%, 55%, 100% { transform: translateY(-60px); opacity: 0; }
  15% { opacity: 1; }
  40% { transform: translateY(420px); opacity: 0; }
}

/* Terminal en vivo (lenguaje de AIMMA THINKING / AIMMASCRAPING) */
.v4-term {
  margin-top: 18px;
  background: rgba(2, 8, 18, 0.85);
  border: 1px solid var(--v4-line);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.v4-term-head {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--v4-line);
}
.v4-term-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: rgba(0, 212, 245, 0.25);
}
.v4-term-dot:first-child { background: rgba(0, 212, 245, 0.55); }
.v4-term-title {
  margin-left: 10px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  color: var(--v4-white-50);
}
.v4-term-body {
  margin: 0;
  padding: 20px 22px 24px;
  min-height: 196px;
  font-family: var(--font-mono);
  font-size: 0.88rem;
  line-height: 1.75;
  color: var(--v4-white-70);
  white-space: pre-wrap;
}
.v4-term-body .ok { color: var(--v4-green); }
.v4-term-body .warn { color: #eab308; }
.v4-term-body .hl { color: var(--v4-cyan); }
.v4-term-cursor {
  display: inline-block;
  width: 8px; height: 1.05em;
  vertical-align: text-bottom;
  background: var(--v4-cyan);
  animation: v4blink 1s steps(1) infinite;
}

/* ========== S4 SECTORES (chips scroll-snap) ========== */
.v4-chips {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-top: 40px;
}
.v4-chip {
  background: var(--v4-card);
  border: 1px solid var(--v4-line);
  border-radius: 16px;
  padding: 20px 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.v4-chip strong {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1rem;
  color: var(--v4-white);
  display: flex;
  align-items: center;
  gap: 9px;
}
.v4-chip strong svg { width: 19px; height: 19px; color: var(--v4-cyan); flex-shrink: 0; }
.v4-chip span { color: var(--v4-white-70); font-size: 0.9rem; line-height: 1.45; }
.v4-chips-cta { margin-top: 34px; text-align: center; }

/* ========== S5 CÓMO TRABAJAMOS ========== */
.v4-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: 44px;
}
.v4-step { padding: 8px 6px; }
.v4-step-num {
  font-family: var(--font-mono);
  font-weight: 300;
  font-size: clamp(3.4rem, 7vw, 5.4rem);
  line-height: 1;
  color: rgba(0, 212, 245, 0.35);
  display: block;
  margin-bottom: 12px;
}
.v4-step h3 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.3rem;
  color: var(--v4-white);
  margin-bottom: 8px;
}
.v4-step p { color: var(--v4-white-70); font-size: 0.98rem; }

/* ========== S6 CASOS ========== */
.v4-cases {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-top: 44px;
}
.v4-case {
  background: var(--v4-card);
  border: 1px solid var(--v4-line);
  border-radius: var(--radius-lg);
  padding: 32px 30px;
}
.v4-case-client {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.2em;
  color: var(--v4-white-50);
  display: block;
  margin-bottom: 16px;
}
.v4-case-metric {
  font-family: var(--font-mono);
  font-weight: 400;
  font-size: clamp(2.6rem, 5vw, 4rem);
  line-height: 1;
  color: var(--v4-white);
  display: block;
}
.v4-case-metric small {
  display: block;
  font-size: 0.36em;
  color: var(--v4-white-50);
  letter-spacing: 0.06em;
  margin-top: 10px;
}
.v4-case-claims {
  list-style: none;
  margin-top: 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: var(--v4-white-70);
  font-size: 0.98rem;
}
.v4-case-claims li { display: flex; gap: 9px; align-items: flex-start; }
.v4-case-claims svg { width: 17px; height: 17px; color: var(--v4-cyan); flex-shrink: 0; margin-top: 3px; }
.v4-case-attrib {
  margin-top: 18px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-style: italic;
  color: var(--v4-white-50);
}

/* ========== S7 CIERRE ========== */
.v4-cierre {
  text-align: center;
  padding-top: 130px;
  padding-bottom: 40px;
}
.v4-cierre .v4-title { font-size: clamp(2.2rem, 5.4vw, 4.4rem); max-width: 900px; margin-inline: auto; }
.v4-cierre-ctas {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 36px;
}

/* Form diagnóstico heredado (white-mode) sobre fondo oscuro: darle superficie.
   color: restaura el texto oscuro (los títulos de style.v3.css no fijan color
   y heredarían el blanco de #home). */
#home .diagnostico {
  color: #1a1a1a;
  background: #fafafa;
  border-radius: var(--radius-lg);
  padding-top: 56px;
  padding-bottom: 56px;
  margin-top: 90px;
  margin-bottom: 110px;
}

/* ========== CTA STICKY MÓVIL ========== */
.v4-sticky {
  display: none;
  position: fixed;
  left: 12px; right: 12px; bottom: 12px;
  z-index: 60;
}
.v4-sticky .cta-green { width: 100%; box-shadow: 0 10px 34px rgba(0, 0, 0, 0.5); }

/* ========== RESPONSIVE ========== */
@media (max-width: 980px) {
  #home .hero-v4 .hero-content { grid-template-columns: 1fr; gap: 34px; }
  .v4-what-grid { grid-template-columns: 1fr 1fr; }
  .v4-card--star { grid-column: span 2; }
  .v4-chips { grid-template-columns: 1fr 1fr; }
  .v4-steps { grid-template-columns: 1fr; gap: 34px; }
  .v4-cases { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .v4-section { padding-top: 80px; }
  #home .hero-v4 { padding: 28px 18px 90px; }
  #home .hero-v4 .hero-ctas { display: none; } /* CTA pasa al sticky */
  .v4-sticky { display: block; }
  .v4-chat { min-height: 340px; max-height: 420px; }
  .v4-what-grid { grid-template-columns: 1fr; }
  .v4-card--star { grid-column: span 1; }
  /* Chips: scroll-snap horizontal */
  .v4-chips {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 12px;
    padding-bottom: 10px;
    -webkit-overflow-scrolling: touch;
  }
  .v4-chip { flex: 0 0 78%; scroll-snap-align: start; }
  /* Deja aire para el sticky */
  #home .diagnostico { margin-bottom: 90px; }
  .site-footer { padding-bottom: 84px; }
  /* El flotante de WhatsApp no debe montarse sobre el CTA sticky */
  body:has(#home:not([hidden])) .wa-float { bottom: 86px; right: 14px; width: 52px; height: 52px; }
}

/* ========== REDUCED MOTION ========== */
@media (prefers-reduced-motion: reduce) {
  .v4-marquee-track { animation: none; flex-wrap: wrap; justify-content: center; }
  .v4-reveal { opacity: 1; transform: none; transition: none; }
  .v4-msg { animation: none; opacity: 1; transform: none; }
  .v4-typing span { animation: none; }
  .cta-green, .v4-card { transition: none; }
  .v4-orb i, .v4-orb b, .v4-chat, .v4-case::after, .v4-term-cursor,
  .v4-chat:not(.v4-used) .v4-chat-form input { animation: none; }
  .v4-case::after { display: none; }
}
@media (max-width: 900px) {
  .v4-orb { display: none; } /* decorativo: no compite con el texto en pantallas angostas */
}
