/* IA4Sales — landing. Mismos colores y letras que el panel (frontend/src/index.css). */
:root {
  --azul: #1B4F9C;
  --azul-claro: #4C8DF6;
  --azul-fondo: #EAF1FC;
  --verde: #12B886;
  --verde-fondo: #E3F7F0;
  --naranja: #E8590C;
  --rojo: #D9480F;
  --marino: #0B1220;
  --marino-2: #131C2E;
  --texto: #0F172A;
  --texto-suave: #556070;
  --borde: #E2E8F0;
  --fondo: #FFFFFF;
  --fondo-2: #F6F8FB;
  --sombra: 0 1px 2px rgba(15, 23, 42, .06), 0 8px 24px rgba(15, 23, 42, .06);
  --radio: 14px;
  --titulos: "Plus Jakarta Sans", "Inter", system-ui, sans-serif;
  --cuerpo: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
  margin: 0;
  background: var(--fondo);
  color: var(--texto);
  font: 16px/1.6 var(--cuerpo);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
[hidden] { display: none !important; }
a { color: var(--azul); }
h1, h2, h3 { font-family: var(--titulos); line-height: 1.2; margin: 0; letter-spacing: -.01em; }
h1 { font-size: clamp(2rem, 4.6vw, 3.25rem); font-weight: 800; }
h2 { font-size: clamp(1.6rem, 3vw, 2.25rem); font-weight: 800; }
h3 { font-size: 1.05rem; font-weight: 700; }
p { margin: 0; }
.contenedor { width: min(1160px, 100% - 32px); margin-inline: auto; }
.visualmente-oculto { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.texto-suave { color: var(--texto-suave); }
:focus-visible { outline: 3px solid var(--azul-claro); outline-offset: 2px; border-radius: 6px; }

/* ── Botones ── */
.boton {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 20px; border-radius: 10px; border: 1px solid transparent;
  background: var(--azul); color: #fff; font: 600 15px/1 var(--cuerpo);
  text-decoration: none; cursor: pointer; transition: background .15s, transform .15s;
}
.boton:hover { background: #163F7E; }
.boton:active { transform: translateY(1px); }
.boton:disabled { opacity: .55; cursor: not-allowed; }
.boton-secundario { background: transparent; color: var(--azul); border-color: #C7D6EE; }
.boton-secundario:hover { background: var(--azul-fondo); }
.boton-chico { padding: 9px 14px; font-size: 14px; }

/* ── Barra ── */
.barra {
  position: sticky; top: 0; z-index: 50;
  background: rgba(11, 18, 32, .86); backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, .06);
}
.barra-interior { display: flex; align-items: center; gap: 24px; height: 64px; }
.logo { display: inline-flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font: 800 20px/1 var(--titulos); }
.logo b { color: var(--verde); }
.barra-nav { display: flex; gap: 22px; margin-left: auto; }
.barra-nav a { color: #C9D3E3; text-decoration: none; font-size: 15px; }
.barra-nav a:hover { color: #fff; }

/* ── Portada ── */
.portada {
  background:
    radial-gradient(800px 400px at 85% 10%, rgba(76, 141, 246, .25), transparent 60%),
    radial-gradient(600px 300px at 10% 100%, rgba(18, 184, 134, .14), transparent 60%),
    var(--marino);
  color: #fff; padding: 72px 0 88px;
}
.portada-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 56px; align-items: center; }
.antetitulo { color: var(--verde); font-weight: 700; text-transform: uppercase; letter-spacing: .08em; font-size: 13px; margin-bottom: 14px; }
.bajada { color: #C9D3E3; font-size: 18px; margin: 20px 0 28px; max-width: 34em; }
.portada-acciones { display: flex; gap: 12px; flex-wrap: wrap; }
.portada .boton-secundario { color: #fff; border-color: rgba(255, 255, 255, .25); }
.portada .boton-secundario:hover { background: rgba(255, 255, 255, .08); }
.datos-rapidos { list-style: none; padding: 0; margin: 40px 0 0; display: flex; gap: 36px; flex-wrap: wrap; }
.datos-rapidos strong { display: block; font: 800 22px/1.2 var(--titulos); }
.datos-rapidos span { color: #93A1B8; font-size: 14px; }

.telefono {
  background: #0E1626; border: 1px solid rgba(255, 255, 255, .08); border-radius: 28px;
  padding: 14px; box-shadow: 0 30px 80px rgba(0, 0, 0, .45); width: 100%;
}
.telefono-cabecera { display: flex; align-items: center; gap: 8px; color: #C9D3E3; font-size: 14px; padding: 6px 10px 12px; }
.punto { width: 8px; height: 8px; border-radius: 50%; background: var(--verde); box-shadow: 0 0 0 4px rgba(18, 184, 134, .2); }
.telefono-chat { background: #ECE5DD; border-radius: 18px; padding: 14px; display: flex; flex-direction: column; gap: 8px; }
.globo { max-width: 85%; padding: 8px 12px; border-radius: 12px; font-size: 14px; line-height: 1.45; color: #111; box-shadow: 0 1px 1px rgba(0, 0, 0, .08); }
.globo.cliente { align-self: flex-end; background: #D9FDD3; border-top-right-radius: 4px; }
.globo.bot { align-self: flex-start; background: #fff; border-top-left-radius: 4px; }
html:not(.js) .telefono .globo { opacity: 0; animation: aparecer .4s ease forwards; }
.telefono .globo:nth-child(1) { animation-delay: .2s; }
.telefono .globo:nth-child(2) { animation-delay: .9s; }
.telefono .globo:nth-child(3) { animation-delay: 1.6s; }
.telefono .globo:nth-child(4) { animation-delay: 2.3s; }
.telefono .globo:nth-child(5) { animation-delay: 3s; }
.telefono .globo:nth-child(6) { animation-delay: 3.7s; }
@keyframes aparecer { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }


/* ── Secciones ── */
.seccion { padding: 88px 0; }
.seccion > .contenedor > h2 { max-width: 22em; }
.seccion-bajada { color: var(--texto-suave); font-size: 18px; margin: 14px 0 40px; max-width: 46em; }
.seccion-oscura { background: var(--marino); color: #fff; }
.seccion-oscura h2 { margin-bottom: 40px; }

.pasos { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.pasos li { background: var(--fondo-2); border: 1px solid var(--borde); border-radius: var(--radio); padding: 22px; }
.pasos p { color: var(--texto-suave); margin-top: 6px; font-size: 15px; }
.paso-num {
  display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 9px;
  background: var(--azul-fondo); color: var(--azul); font: 800 15px/1 var(--titulos); margin-bottom: 14px;
}

.tarjetas { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.tarjeta { border: 1px solid var(--borde); border-radius: var(--radio); padding: 24px; box-shadow: var(--sombra); background: #fff; }
.tarjeta h3 { margin-bottom: 8px; }
.tarjeta p { color: var(--texto-suave); font-size: 15px; }
.tarjeta::before { content: ""; display: block; width: 36px; height: 4px; border-radius: 4px; background: linear-gradient(90deg, var(--azul), var(--verde)); margin-bottom: 18px; }

.linea { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; counter-reset: paso; }
.linea li { border-top: 2px solid rgba(255, 255, 255, .14); padding-top: 18px; counter-increment: paso; }
.linea li::before { content: "0" counter(paso); color: var(--verde); font: 800 14px/1 var(--titulos); display: block; margin-bottom: 10px; }
.linea p { color: #A9B6CB; font-size: 15px; margin-top: 6px; }

.equipo { display: grid; grid-template-columns: repeat(2, minmax(0, 360px)); gap: 20px; margin-top: 32px; }
.persona { display: flex; align-items: center; gap: 16px; border: 1px solid var(--borde); border-radius: var(--radio); padding: 20px; }
.persona p { color: var(--texto-suave); font-size: 15px; }
.persona-iniciales {
  flex: none; width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--azul), var(--azul-claro)); color: #fff; font: 800 18px/1 var(--titulos);
}

.seccion-cierre { background: linear-gradient(135deg, var(--azul) 0%, #123A75 100%); color: #fff; text-align: center; }
.cierre { display: flex; flex-direction: column; align-items: center; gap: 16px; }
.cierre p { color: #D2DEF2; font-size: 18px; }
.cierre .boton { background: #fff; color: var(--azul); margin-top: 8px; }
.cierre .boton:hover { background: #EAF1FC; }

.pie { background: var(--marino); color: #93A1B8; font-size: 14px; padding: 28px 0; }
.pie-interior { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.logo-pie { font-size: 16px; }

/* ── Demo ── */
.seccion-demo { background: var(--fondo-2); border-block: 1px solid var(--borde); }
.demo { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr); gap: 20px; align-items: start; }
.demo-chat {
  display: flex; flex-direction: column; background: #fff; border: 1px solid var(--borde);
  border-radius: 18px; box-shadow: var(--sombra); overflow: hidden; height: 640px;
}
.demo-chat-cabecera { display: flex; align-items: center; gap: 12px; padding: 12px 16px; background: #075E54; color: #fff; }
.demo-chat-cabecera small { display: block; color: #CDE7E2; font-size: 12px; line-height: 1.2; }
.avatar { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: #fff; color: #075E54; font: 800 16px/1 var(--titulos); }
.demo-mensajes {
  flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 8px;
  background: #ECE5DD;
}
.demo-mensajes .globo { white-space: pre-wrap; overflow-wrap: anywhere; }
.globo.asesor { align-self: flex-start; background: #FFF4D6; border-top-left-radius: 4px; }
.globo-autor { display: block; font-size: 11px; font-weight: 700; color: #8A6D1E; margin-bottom: 2px; }
.globo-foto { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.globo-foto::before { content: ""; width: 38px; height: 28px; border-radius: 5px; background: linear-gradient(135deg, #BFD3F2, #8EB1E8); flex: none; }
.globo-imagen { padding: 4px; }
.globo-imagen img { border-radius: 9px; max-height: 260px; width: auto; }
.globo-imagen span { display: block; padding: 6px 6px 2px; font-size: 13px; color: #445; }
.globo-mapa { padding: 4px; width: 280px; max-width: 85%; }
.globo-mapa .mapa { height: 150px; border-radius: 9px; overflow: hidden; background: #DDE6EE; }
.globo-mapa span { display: block; padding: 6px 6px 2px; font-size: 13px; color: #445; }
.escribiendo { align-self: flex-start; background: #fff; border-radius: 12px; padding: 10px 14px; display: flex; gap: 4px; }
.escribiendo i { width: 7px; height: 7px; border-radius: 50%; background: #9AA5B1; animation: saltito 1s infinite; }
.escribiendo i:nth-child(2) { animation-delay: .15s; }
.escribiendo i:nth-child(3) { animation-delay: .3s; }
@keyframes saltito { 0%, 60%, 100% { transform: none; opacity: .5; } 30% { transform: translateY(-4px); opacity: 1; } }

.demo-vacio { margin: auto; text-align: center; color: #5B6470; font-size: 14px; max-width: 26em; background: rgba(255, 255, 255, .7); border-radius: 12px; padding: 12px 16px; }
.demo-sugerencias, .demo-acciones { display: flex; gap: 8px; flex-wrap: wrap; padding: 0 12px; background: #ECE5DD; }
.demo-sugerencias:not(:empty), .demo-acciones:not(:empty) { padding-bottom: 10px; }
.chip {
  border: 1px solid #C7D6EE; background: #fff; color: var(--azul); border-radius: 999px;
  padding: 7px 12px; font: 500 13px/1.2 var(--cuerpo); cursor: pointer;
}
.chip:hover { background: var(--azul-fondo); }
.chip:disabled { opacity: .5; cursor: not-allowed; }
.chip-verde { border-color: #A6E3CF; color: #0B7A59; }
.chip-verde:hover { background: var(--verde-fondo); }
.demo-entrada { display: flex; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--borde); background: #F0F2F5; }
.demo-entrada input {
  flex: 1; min-width: 0; border: 1px solid var(--borde); border-radius: 999px; padding: 11px 16px;
  font: 15px var(--cuerpo); background: #fff; color: var(--texto);
}
.demo-entrada input:focus { outline: 2px solid var(--azul-claro); outline-offset: 0; }
.demo-entrada .boton { border-radius: 999px; }
.demo-captcha:empty { display: none; }
.demo-captcha { display: flex; justify-content: center; padding: 8px; }
.demo-pie { font-size: 12px; color: var(--texto-suave); padding: 8px 14px 10px; border-top: 1px solid var(--borde); }
.demo-pie.alerta { color: var(--rojo); }

.demo-panel { background: #fff; border: 1px solid var(--borde); border-radius: 18px; box-shadow: var(--sombra); padding: 20px; position: sticky; top: 84px; }
.demo-panel-titulo { font: 700 13px/1 var(--cuerpo); text-transform: uppercase; letter-spacing: .08em; color: var(--texto-suave); margin-bottom: 16px; }
.demo-panel-cuerpo { display: flex; flex-direction: column; gap: 14px; font-size: 14px; }
.demo-panel .boton { margin-top: 16px; width: 100%; }
.etapa { border-radius: 12px; padding: 14px; background: var(--azul-fondo); }
.etapa small { display: block; color: var(--texto-suave); font-size: 12px; }
.etapa strong { font: 700 16px/1.3 var(--titulos); color: var(--azul); }
.etapa.verde { background: var(--verde-fondo); }
.etapa.verde strong { color: #0B7A59; }
.etapa.naranja { background: #FFF0E6; }
.etapa.naranja strong { color: var(--naranja); }
.ficha { display: grid; grid-template-columns: auto 1fr; gap: 6px 12px; margin: 0; }
.ficha dt { color: var(--texto-suave); }
.ficha dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.ficha dd.vacio { color: #A0A9B6; font-weight: 400; }
.docs { display: flex; gap: 6px; flex-wrap: wrap; }
.insignia { display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; background: #EEF1F5; color: #5B6470; }
.insignia.ok { background: var(--verde-fondo); color: #0B7A59; }
.insignia.ok::before { content: "✓"; }
.nota-equipo { border-left: 3px solid var(--verde); padding: 8px 12px; background: #F6FBF9; border-radius: 0 8px 8px 0; color: #24453A; }

/* ── Celular ── */
@media (max-width: 960px) {
  .portada-grid, .demo { grid-template-columns: 1fr; }
  .telefono-escena { justify-self: center; }
  .pasos { grid-template-columns: repeat(2, 1fr); }
  .tarjetas, .linea { grid-template-columns: repeat(2, 1fr); }
  .demo-panel { position: static; }
}
@media (max-width: 640px) {
  .barra-nav { display: none; }
  .barra-interior { justify-content: space-between; }
  .portada { padding: 48px 0 64px; }
  .seccion { padding: 64px 0; }
  .pasos, .tarjetas, .linea, .equipo { grid-template-columns: 1fr; }
  .datos-rapidos { gap: 22px; }
  .demo-chat { height: 560px; }
  .bajada, .seccion-bajada { font-size: 16px; }
}

/* ═════════════════════════════════════════════════════════════
   Animaciones (animaciones.js). Con «reducir movimiento» del sistema
   todo queda quieto y visible: ver el bloque del final.
   ═════════════════════════════════════════════════════════════ */
@property --angulo { syntax: "<angle>"; inherits: false; initial-value: 0deg; }

/* ── Barra de progreso de lectura y barra superior al bajar ── */
.progreso {
  position: fixed; inset: 0 0 auto 0; height: 3px; z-index: 60; transform-origin: 0 50%;
  transform: scaleX(var(--avance, 0)); background: linear-gradient(90deg, var(--azul-claro), var(--verde));
}
.barra { transition: background .3s, box-shadow .3s; }
.barra.con-scroll { background: rgba(11, 18, 32, .94); box-shadow: 0 10px 30px rgba(0, 0, 0, .25); }
.barra-nav a { position: relative; }
.barra-nav a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -4px; height: 2px; border-radius: 2px;
  background: var(--verde); transform: scaleX(0); transform-origin: right; transition: transform .3s ease;
}
.barra-nav a:hover::after { transform: scaleX(1); transform-origin: left; }
.logo img { transition: transform .5s cubic-bezier(.34, 1.56, .64, 1); }
.logo:hover img { transform: rotate(-12deg) scale(1.08); }

/* ── Botones: brillo que cruza ── */
.boton { position: relative; overflow: hidden; isolation: isolate; }
.boton::after {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, .35) 50%, transparent 70%);
  transform: translateX(-120%); transition: transform .7s ease;
}
.boton:hover::after { transform: translateX(120%); }
.portada-acciones .boton:first-child { box-shadow: 0 0 0 0 rgba(76, 141, 246, .55); animation: latido 2.8s ease-out 2.4s infinite; }
@keyframes latido { 0% { box-shadow: 0 0 0 0 rgba(76, 141, 246, .5); } 70%, 100% { box-shadow: 0 0 0 14px rgba(76, 141, 246, 0); } }

/* ── Portada: fondo vivo ── */
.portada { position: relative; overflow: hidden; isolation: isolate; }
.portada-fondo, .cierre-fondo { position: absolute; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.orbe { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .55; will-change: transform; }
.portada .orbe-1 { width: 520px; height: 520px; background: #2F6FD6; top: -180px; right: -60px; animation: deriva-1 18s ease-in-out infinite alternate; }
.portada .orbe-2 { width: 420px; height: 420px; background: #12B886; bottom: -220px; left: -120px; opacity: .35; animation: deriva-2 22s ease-in-out infinite alternate; }
.portada .orbe-3 { width: 300px; height: 300px; background: #7C5CFF; top: 30%; left: 45%; opacity: .22; animation: deriva-3 26s ease-in-out infinite alternate; }
@keyframes deriva-1 { to { transform: translate(-140px, 120px) scale(1.15); } }
@keyframes deriva-2 { to { transform: translate(180px, -90px) scale(1.2); } }
@keyframes deriva-3 { to { transform: translate(-220px, 80px) scale(.85); } }
.grilla {
  position: absolute; inset: 0;
  background-image: linear-gradient(rgba(255, 255, 255, .05) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .05) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 70% 60% at 60% 30%, #000 20%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 60% 30%, #000 20%, transparent 75%);
  animation: grilla 30s linear infinite;
}
@keyframes grilla { to { background-position: 56px 56px; } }

/* ── Portada: entrada escalonada ── */
.js .entrada { opacity: 0; transform: translateY(18px); filter: blur(6px); animation: entrar .9s cubic-bezier(.2, .8, .2, 1) forwards; animation-delay: calc(var(--d, 0) * 110ms + 100ms); }
@keyframes entrar { to { opacity: 1; transform: none; filter: none; } }
.titular .linea-t { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .08em; }
.titular .linea-t > span { display: inline-block; }
.js .titular .linea-t > span { transform: translateY(110%); animation: subir 1s cubic-bezier(.2, .8, .2, 1) forwards; animation-delay: calc(var(--d) * 120ms); }
@keyframes subir { to { transform: none; } }
.degradado {
  background: linear-gradient(90deg, #6EA8FF, #12B886, #6EA8FF); background-size: 200% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.js .titular .degradado { animation: subir 1s cubic-bezier(.2, .8, .2, 1) forwards, brillo-texto 6s linear 1.4s infinite; animation-delay: 360ms, 1.4s; }
@keyframes brillo-texto { to { background-position: -200% 0; } }
.antetitulo { display: inline-flex; align-items: center; gap: 10px; }
.pulso { width: 8px; height: 8px; border-radius: 50%; background: var(--verde); box-shadow: 0 0 0 0 rgba(18, 184, 134, .6); animation: pulso 2s ease-out infinite; }
@keyframes pulso { 70%, 100% { box-shadow: 0 0 0 10px rgba(18, 184, 134, 0); } }

/* ── Portada: el teléfono flota, se inclina con el mouse y conversa en bucle ── */
.telefono-escena { position: relative; justify-self: end; width: 100%; max-width: 380px; perspective: 1200px; }
.telefono { animation: flotar 7s ease-in-out infinite; }
.telefono-inclinable { transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transition: transform .25s ease-out; transform-style: preserve-3d; }
@keyframes flotar { 50% { translate: 0 -12px; } }
.telefono-chat { min-height: 430px; justify-content: flex-start; }
.js .telefono .globo { display: none; }
.js .telefono .globo.ver { display: block; animation: globo-entra .45s cubic-bezier(.34, 1.56, .64, 1) both; }
.telefono .escribiendo { animation: globo-entra .35s cubic-bezier(.34, 1.56, .64, 1) both; }
.telefono-chat.salir > * { animation: globo-sale .5s ease forwards; }
@keyframes globo-entra { from { opacity: 0; transform: translateY(10px) scale(.92); } to { opacity: 1; transform: none; } }
@keyframes globo-sale { to { opacity: 0; transform: translateY(-8px); } }
.chapa {
  position: absolute; z-index: 2; padding: 10px 14px; border-radius: 12px; font-size: 13px; color: #E6EDF8;
  background: rgba(19, 28, 46, .82); border: 1px solid rgba(255, 255, 255, .12); backdrop-filter: blur(8px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, .35); white-space: nowrap;
  opacity: 0; transform: translateY(8px) scale(.95); transition: opacity .5s ease, transform .5s cubic-bezier(.34, 1.56, .64, 1);
}
.chapa b { color: var(--verde); }
.chapa.ver { opacity: 1; transform: none; }
.chapa-1 { top: 24%; left: -150px; }
.chapa-2 { bottom: -20px; right: -24px; }
html:not(.js) .chapa { opacity: 1; transform: none; }

/* ── Aparecer al hacer scroll ── */
.js :is(.seccion h2, .seccion-bajada, .pasos li, .tarjeta, .linea li, .persona, .demo, .cierre > h2, .cierre > p, .cierre > .boton) {
  opacity: 0; transform: translateY(28px); transition: opacity .8s cubic-bezier(.2, .8, .2, 1), transform .8s cubic-bezier(.2, .8, .2, 1);
  transition-delay: calc(var(--i, 0) * 90ms);
}
.js :is(.seccion h2, .seccion-bajada, .pasos li, .tarjeta, .linea li, .persona, .demo, .cierre > h2, .cierre > p, .cierre > .boton).visible { opacity: 1; transform: none; }
.js .pasos li.visible, .js .tarjeta.visible, .js .persona.visible { transition: opacity .8s cubic-bezier(.2, .8, .2, 1), transform .35s ease, box-shadow .35s ease, border-color .35s ease; transition-delay: calc(var(--i, 0) * 90ms), 0s, 0s, 0s; }

/* ── Tarjetas con luz que sigue al cursor ── */
.pasos li, .tarjeta, .persona { position: relative; overflow: hidden; isolation: isolate; transition: transform .35s ease, box-shadow .35s ease, border-color .35s ease; }
.pasos li::after, .tarjeta::after, .persona::after {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; opacity: 0; transition: opacity .3s;
  background: radial-gradient(360px circle at var(--x, 50%) var(--y, 50%), rgba(76, 141, 246, .14), transparent 60%);
}
.pasos li:hover, .tarjeta:hover, .persona:hover { transform: translateY(-6px); box-shadow: 0 18px 40px rgba(27, 79, 156, .14); border-color: #C7D6EE; }
.pasos li:hover::after, .tarjeta:hover::after, .persona:hover::after { opacity: 1; }
.paso-num { transition: transform .5s cubic-bezier(.34, 1.56, .64, 1), background .3s, color .3s; }
.pasos li:hover .paso-num { transform: rotate(-8deg) scale(1.15); background: var(--azul); color: #fff; }
.tarjeta::before { transition: width .5s cubic-bezier(.2, .8, .2, 1); }
.tarjeta:hover::before { width: 72px; }
.persona-iniciales { transition: transform .6s cubic-bezier(.34, 1.56, .64, 1); background-size: 200% 200%; }
.persona:hover .persona-iniciales { transform: rotate(360deg); }

/* ── Línea de implementación que se va llenando ── */
.linea li { position: relative; }
.linea li::after {
  content: ""; position: absolute; left: 0; top: -2px; height: 2px; width: 100%;
  background: linear-gradient(90deg, var(--verde), var(--azul-claro)); transform: scaleX(0); transform-origin: left;
  transition: transform 1s cubic-bezier(.2, .8, .2, 1); transition-delay: calc(var(--i, 0) * 250ms + 200ms);
}
.linea li.visible::after, html:not(.js) .linea li::after { transform: scaleX(1); }

/* ── Demo: aura animada y mensajes que aparecen ── */
.demo { position: relative; isolation: isolate; }
.demo-aura {
  /* Solo detrás del chat (primera columna), no del panel */
  position: absolute; top: -2px; left: -2px; width: calc((100% - 20px) * .625 + 4px); height: 644px;
  z-index: -1; border-radius: 22px; filter: blur(28px); opacity: .38; pointer-events: none;
  background: conic-gradient(from var(--angulo), #4C8DF6, #12B886, #7C5CFF, #4C8DF6);
  animation: girar 10s linear infinite;
}
@keyframes girar { to { --angulo: 360deg; } }
.demo-mensajes .globo, .demo-mensajes .escribiendo { animation: globo-entra .4s cubic-bezier(.34, 1.56, .64, 1) both; transform-origin: bottom left; }
.demo-mensajes .globo.cliente { transform-origin: bottom right; }
.chip { transition: transform .2s ease, background .2s, box-shadow .2s; }
.chip:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 6px 14px rgba(27, 79, 156, .12); }
.demo-sugerencias .chip, .demo-acciones .chip { animation: globo-entra .45s cubic-bezier(.34, 1.56, .64, 1) both; }
.demo-sugerencias .chip:nth-child(2), .demo-acciones .chip:nth-child(2) { animation-delay: .08s; }
.demo-sugerencias .chip:nth-child(3), .demo-acciones .chip:nth-child(3) { animation-delay: .16s; }
.demo-acciones .chip:nth-child(4) { animation-delay: .24s; }
.etapa.cambio { animation: etapa-cambia .9s ease; }
@keyframes etapa-cambia { 0% { transform: scale(.96); box-shadow: 0 0 0 0 rgba(18, 184, 134, .5); } 40% { transform: scale(1.02); } 100% { transform: none; box-shadow: 0 0 0 14px rgba(18, 184, 134, 0); } }
.ficha dd.nuevo { animation: dato-nuevo 1.4s ease; border-radius: 4px; }
@keyframes dato-nuevo { 0% { background: rgba(18, 184, 134, .28); } 100% { background: transparent; } }

/* ── Cierre: degradado en movimiento ── */
.seccion-cierre { position: relative; overflow: hidden; isolation: isolate; background-size: 200% 200%; animation: fondo-cierre 14s ease-in-out infinite alternate; background-image: linear-gradient(135deg, #1B4F9C 0%, #123A75 45%, #0F5E73 100%); }
@keyframes fondo-cierre { to { background-position: 100% 100%; } }
.seccion-cierre .orbe-1 { width: 380px; height: 380px; background: #4C8DF6; top: -160px; left: 10%; opacity: .35; animation: deriva-2 18s ease-in-out infinite alternate; }
.seccion-cierre .orbe-2 { width: 320px; height: 320px; background: #12B886; bottom: -170px; right: 8%; opacity: .3; animation: deriva-1 20s ease-in-out infinite alternate; }

@media (max-width: 960px) {
  .chapa-1 { left: -6px; top: 18%; }
  .chapa-2 { right: -6px; }
  .demo-aura { width: calc(100% + 4px); }
}
@media (max-width: 640px) {
  .chapa { display: none; }
  .demo-aura { height: 564px; }
}

/* ── Sin movimiento si el sistema lo pide ── */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .entrada, .js .titular .linea-t > span, .chapa, .js :is(.seccion h2, .seccion-bajada, .pasos li, .tarjeta, .linea li, .persona, .demo, .cierre > h2, .cierre > p, .cierre > .boton) { opacity: 1; transform: none; filter: none; }
  .js .telefono .globo { display: block; }
  .linea li::after { transform: scaleX(1); }
}
