/* Portada de venta. Lo que se mueve: la demostración del héroe (la IA consulta la red y responde),
   las piezas regadas que se ordenan en la bodega y las pestañas de los módulos. El resto, quieto. */
/* El fondo de neuronas va detrás de todo; el contenido, encima. */
#fondo { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
main, .pie { position: relative; z-index: 1; }
.saltar { position: absolute; left: -999px; top: 8px; background: var(--tinta); color: #fff; padding: 8px 12px; border-radius: var(--radio); z-index: 10; }
.saltar:focus { left: 8px; }

.barra { position: sticky; top: 0; z-index: 5; background: rgba(255, 255, 255, 0.82); backdrop-filter: saturate(1.4) blur(8px); border-bottom: 1px solid var(--linea); }
.barra-dentro { max-width: 1240px; margin: 0 auto; height: 64px; padding: 0 32px; display: flex; align-items: center; gap: 36px; }
.menu { display: flex; gap: 26px; font-size: 15px; }
.menu a { text-decoration: none; color: #3a4049; }
.menu a:hover { color: var(--tinta); }
.acciones { margin-left: auto; display: flex; align-items: center; gap: 18px; }
.entrar { text-decoration: none; font-size: 15px; font-weight: 600; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

main > section { max-width: 1240px; margin: 0 auto; padding-left: 32px; padding-right: 32px; }
.encabezado { max-width: 720px; }
h2 { font-size: 40px; line-height: 1.1; letter-spacing: -0.03em; font-weight: 680; }
.encabezado p, .jira-texto p, .cierre p, .regado-texto p, .ia-texto > p { margin-top: 14px; font-size: 18px; color: #4a515b; line-height: 1.6; }

/* ---------- Héroe ---------- */
.heroe { display: grid; grid-template-columns: minmax(0, 0.82fr) minmax(0, 1.18fr); gap: 56px; align-items: center; padding-top: 64px; padding-bottom: 72px; }
.heroe h1 { font-size: 58px; line-height: 1.03; letter-spacing: -0.04em; font-weight: 700; }
.heroe h1 span { display: block; }
.heroe h1 span + span { margin-top: 0.12em; }
.heroe .entrada { margin-top: 22px; font-size: 19px; line-height: 1.55; color: #3a4049; max-width: 30em; }
.botones { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.nota-heroe { margin-top: 18px; font-size: 14px; color: var(--gris); }

.ventana { border: 1px solid var(--linea); border-radius: 14px; background: #fff; overflow: hidden; box-shadow: 0 30px 60px -36px rgba(29, 33, 37, 0.35); }
.heroe-ventana { display: grid; grid-template-rows: 40px minmax(0, 1fr) auto; height: 600px; box-shadow: 0 40px 80px -40px rgba(29, 33, 37, 0.45), 0 0 0 1px rgba(29, 33, 37, 0.02); }
.ventana-barra { display: flex; align-items: center; gap: 14px; padding: 0 14px; border-bottom: 1px solid var(--linea); background: var(--lateral); font-size: 12.5px; color: var(--gris); }
.semaforo { display: flex; gap: 6px; }
.semaforo i { width: 10px; height: 10px; border-radius: 50%; background: #dfe2e7; }
.ventana-titulo { font-weight: 600; color: #3a4049; }
.ventana-cifras { margin-left: auto; }
.heroe-red { min-height: 0; padding: 6px 10px 0; }
.mini-logo { width: 22px; height: 22px; border-radius: 6px; background: var(--tinta); color: #fff; display: inline-grid; place-items: center; font-size: 11px; font-weight: 650; flex: none; }

/* El chat de la demostración: la pregunta arriba; debajo, en el mismo lugar, «leyendo» o la respuesta. */
.chat { border-top: 1px solid var(--linea); padding: 14px 18px 16px; display: grid; grid-template-rows: auto minmax(96px, auto); gap: 10px; background: #fff; }
.chat-fila { display: flex; align-items: center; gap: 10px; min-width: 0; }
.asistente { flex: none; font-size: 12px; font-weight: 650; padding: 4px 10px; border-radius: 999px; background: var(--tinta); color: #fff; }
.pregunta { font-size: 16.5px; font-weight: 600; letter-spacing: -0.01em; min-height: 1.5em; }
.cursor { display: inline-block; width: 2px; height: 1.05em; margin-left: 2px; vertical-align: -0.15em; background: var(--tinta); opacity: 0; }
.chat.tecleando .cursor { opacity: 1; animation: parpadeo 0.9s steps(1) infinite; }
@keyframes parpadeo { 50% { opacity: 0; } }
.leyendo, .respuesta { grid-row: 2; grid-column: 1; transition: opacity 0.35s ease, transform 0.35s ease; }
.leyendo { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--gris); opacity: 0; align-self: start; }
.leyendo img { image-rendering: pixelated; }
.leyendo::after { content: ''; width: 18px; text-align: left; animation: puntos 1.2s steps(4) infinite; }
@keyframes puntos { 0% { content: ''; } 25% { content: '.'; } 50% { content: '..'; } 75% { content: '...'; } }
.leyendo.visible { opacity: 1; }
.respuesta { opacity: 0; transform: translateY(6px); font-size: 15px; line-height: 1.55; color: #2c3238; }
.respuesta.visible { opacity: 1; transform: none; }
.fuentes { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.chip.fuente { background: #edf3fd; color: #1b4593; }
.chip.fuente::before { content: ''; width: 8px; height: 10px; border: 1.5px solid currentColor; border-radius: 2px; }
.chip.fuente.escrita { background: #e3f5ec; color: #0a5d41; }
.chip.fuente.escrita::before { width: 10px; height: 5px; border-width: 0 0 2px 2px; border-radius: 0; transform: rotate(-45deg) translate(1px, -1px); }

.escenas { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 16px; }
.escenas button { border: 1px solid #d5dae0; background: #fff; border-radius: 999px; padding: 7px 14px; cursor: pointer; font-size: 14px; color: #3a4049; transition: border-color 0.15s, background 0.15s, color 0.15s; }
.escenas button:hover { border-color: var(--tinta); color: var(--tinta); }
.escenas button[aria-pressed='true']:not(.pausa) { background: var(--tinta); border-color: var(--tinta); color: #fff; }
.escenas .pausa { margin-left: auto; width: 36px; height: 36px; padding: 0; display: grid; place-items: center; }
.escenas .pausa svg { width: 14px; height: 14px; fill: currentColor; }
.pausa .icono-seguir, .pausa[aria-pressed='true'] .icono-pausa { display: none; }
.pausa[aria-pressed='true'] .icono-seguir { display: block; }
@media (pointer: coarse) { .escenas button { min-height: 44px; } .escenas .pausa { width: 44px; height: 44px; } }

/* ---------- Red ---------- */
.red { width: 100%; height: 100%; }
.red .guias ellipse { fill: none; stroke: #eef0f3; stroke-width: 1; }
.red .arista { stroke: #d6dbe2; stroke-width: 0.8; }
.red .arista.fuerte { stroke: #b9c1cc; stroke-width: 1.3; }
.red .arista.enlace { stroke: #e8c25a; stroke-dasharray: 3 3; }
.red text { font-size: 12px; fill: #4a515b; paint-order: stroke; stroke: #fff; stroke-width: 3px; stroke-linejoin: round; font-family: system-ui, -apple-system, 'Segoe UI', sans-serif; }
.red text.fuerte { font-size: 13px; font-weight: 650; fill: var(--tinta); }
.red text.ini { font-size: 13px; font-weight: 700; fill: var(--tinta); stroke: none; }
.red .centro text.ini { fill: #fff; font-size: 18px; }
.red .marca { fill: none; stroke: var(--error); stroke-width: 1.6; }
.red circle.t0 { fill: #dbe7fb; } .red circle.t1 { fill: #ebe3fb; } .red circle.t2 { fill: #d4f0e3; } .red circle.t3 { fill: #fde5cd; } .red circle.t4 { fill: #fbdde7; }
.red .nodo { cursor: default; }
.red .nodo, .red .arista, .red .guias { transition: opacity 0.4s ease, stroke 0.3s ease; }
.red.consultando .nodo:not(.lit) { opacity: 0.3; }
.red.consultando .arista:not(.lit) { opacity: 0.16; }
.red.consultando .guias { opacity: 0.5; }
.red .arista.lit { stroke: var(--azul); stroke-width: 2.6; stroke-dasharray: none; }
.red.escribiendo .arista.lit { stroke: var(--verde); }
.red .halo { fill: rgba(47, 111, 222, 0.12); stroke: var(--azul); stroke-width: 2; transform-box: fill-box; transform-origin: center; }
.red.escribiendo .halo { fill: rgba(14, 159, 110, 0.13); stroke: var(--verde); }
.red .nodo.lit text:not(.ini) { fill: var(--tinta); font-weight: 650; }
@media (prefers-reduced-motion: no-preference) {
  .red.animada .figura { transform-box: fill-box; transform-origin: center; animation: aparecer 0.5s ease-out both; animation-delay: calc(var(--anillo) * 0.14s + 0.1s); }
  .red.animada .aristas { animation: aparecer-lineas 0.6s ease-out 0.55s both; }
  .red .halo { animation: halo 0.55s cubic-bezier(0.2, 0.9, 0.3, 1.25) both; }
}
@keyframes aparecer { from { opacity: 0; transform: scale(0.6); } to { opacity: 1; transform: scale(1); } }
@keyframes aparecer-lineas { from { opacity: 0; } to { opacity: 1; } }
@keyframes halo { from { opacity: 0; transform: scale(0.3); } to { opacity: 1; transform: scale(1); } }

/* ---------- Con qué IA funciona ---------- */
.con { padding-top: 28px; padding-bottom: 56px; text-align: center; }
.con > p:first-child { font-size: 14px; color: var(--gris); }
.con ul { list-style: none; margin: 14px 0 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 12px 44px; }
.con li { font-size: 24px; font-weight: 650; letter-spacing: -0.02em; color: #7b838e; }
.con-mas { margin-top: 12px; font-size: 14px; color: var(--gris); }

/* ---------- Lo regado se ordena ---------- */
.regado { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 56px; align-items: center; padding-top: 88px; padding-bottom: 88px; border-top: 1px solid var(--linea); }
.regado-texto p + p { margin-top: 12px; color: var(--tinta); font-weight: 550; }
.mesa { position: relative; height: 410px; }
.bodega-marco { position: absolute; inset: 0; border: 1.5px solid transparent; border-radius: 18px; transition: background 0.6s ease 0.4s, border-color 0.6s ease 0.4s, box-shadow 0.6s ease 0.4s; }
.bodega-nombre { position: absolute; left: 18px; top: 14px; display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 650; opacity: 0; transition: opacity 0.5s ease 0.7s; }
.mesa.ordenada .bodega-marco { background: var(--lateral); border-style: solid; border-color: var(--linea); box-shadow: 0 30px 60px -44px rgba(29, 33, 37, 0.4); }
.mesa.ordenada .bodega-nombre { opacity: 1; }
.piezas { list-style: none; margin: 0; padding: 0; }
.pieza { position: absolute; width: calc(50% - 27px); min-height: 102px; padding: 10px 12px 12px; border-radius: 10px; background: #fff; border: 1px solid var(--linea); box-shadow: 0 10px 24px -18px rgba(29, 33, 37, 0.5); font-size: 14px; line-height: 1.4; display: grid; align-content: start; gap: 4px;
  left: var(--x0); top: var(--y0); transform: rotate(var(--r0));
  transition: left 0.9s cubic-bezier(0.2, 0.8, 0.2, 1), top 0.9s cubic-bezier(0.2, 0.8, 0.2, 1), transform 0.9s cubic-bezier(0.2, 0.8, 0.2, 1), background 0.5s, border-color 0.5s, border-radius 0.5s;
  transition-delay: calc(var(--i) * 90ms); }
.pieza-de { font-size: 11.5px; color: var(--gris); }
.pieza-texto { font-weight: 550; }
.destino { justify-self: start; margin-top: 4px; font-size: 12px; font-weight: 650; padding: 2px 9px; border-radius: 999px; background: #edf3fd; color: #1b4593; opacity: 0; transform: translateY(4px); transition: opacity 0.4s, transform 0.4s; transition-delay: calc(var(--i) * 90ms + 0.75s); }
/* Así llegan: cada pieza con la forma de donde vive hoy. */
.pieza:nth-child(1) { --x0: 0%; --y0: 8px; --r0: -7deg; background: #e3f5ec; border-color: transparent; border-radius: 14px 14px 14px 4px; }
.pieza:nth-child(2) { --x0: 49%; --y0: 0px; --r0: 5deg; }
.pieza:nth-child(2) .pieza-texto { font-weight: 650; }
.pieza:nth-child(3) { --x0: 14%; --y0: 138px; --r0: 4deg; background: #fff3b0; border-color: transparent; box-shadow: 0 14px 22px -16px rgba(120, 90, 0, 0.6); }
.pieza:nth-child(4) { --x0: 53%; --y0: 124px; --r0: -4deg; border-left: 3px solid var(--azul); }
.pieza:nth-child(5) { --x0: 2%; --y0: 276px; --r0: 6deg; background: var(--suave); border-color: transparent; font-style: italic; }
.pieza:nth-child(6) { --x0: 47%; --y0: 290px; --r0: -6deg; }
.pieza:nth-child(6) .pieza-texto::before { content: ''; display: inline-block; width: 10px; height: 12px; margin-right: 7px; vertical-align: -1px; border-radius: 2px; background: #1d7a46; }
/* Así quedan: en su lugar dentro de la bodega, todas iguales. */
.mesa.ordenada .pieza { transform: none; background: #fff; border-color: var(--linea); border-radius: 10px; border-left-width: 1px; font-style: normal; box-shadow: 0 1px 2px rgba(29, 33, 37, 0.06); }
.mesa.ordenada .pieza:nth-child(odd) { left: 18px; }
.mesa.ordenada .pieza:nth-child(even) { left: calc(50% + 9px); }
.mesa.ordenada .pieza:nth-child(1), .mesa.ordenada .pieza:nth-child(2) { top: 54px; }
.mesa.ordenada .pieza:nth-child(3), .mesa.ordenada .pieza:nth-child(4) { top: 168px; }
.mesa.ordenada .pieza:nth-child(5), .mesa.ordenada .pieza:nth-child(6) { top: 282px; }
.mesa.ordenada .destino { opacity: 1; transform: none; }

/* ---------- Pasos ---------- */
.pasos { padding-top: 88px; padding-bottom: 88px; border-top: 1px solid var(--linea); }
.pasos ol { list-style: none; margin: 40px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.pasos li { border-top: 2px solid var(--tinta); padding-top: 20px; display: flex; flex-direction: column; }
.numero { font-size: 15px; font-weight: 650; color: var(--gris); }
.pasos h3 { font-size: 22px; margin-top: 10px; letter-spacing: -0.015em; font-weight: 650; }
.pasos li > p { margin-top: 10px; font-size: 16.5px; color: #4a515b; line-height: 1.55; }
.mini { margin-top: auto; padding-top: 22px; }
.mini > * { font-size: 13px; }
.mini { display: grid; gap: 10px; align-content: end; }
.mini-nota { background: #fff; border: 1px solid var(--linea); border-radius: 10px; padding: 10px 12px; line-height: 1.5; }
.mini-nota b { display: block; font-size: 13.5px; margin-bottom: 2px; }
.mini-nota u, .enlace-nota { text-decoration: none; color: #5b34b8; background: #f1ebfc; border-radius: 4px; padding: 0 4px; }
.mini-avance { margin: 0; display: grid; grid-template-columns: 70px minmax(0, 1fr); gap: 3px 10px; background: var(--lateral); border-radius: 10px; padding: 10px 12px; }
.mini-avance dt { color: var(--gris); }
.mini-avance dd { margin: 0; }
.mini-red { width: 100%; height: auto; background: var(--lateral); border-radius: 10px; padding: 4px; }
.mini-red .mini-lineas line { stroke: #c9cfd7; stroke-width: 1.2; }
.mini-red .mini-lineas line:last-child { stroke: #d6dbe2; stroke-dasharray: 3 3; }
.mini-red text { font-size: 10.5px; fill: #4a515b; font-family: system-ui, -apple-system, 'Segoe UI', sans-serif; paint-order: stroke; stroke: var(--lateral); stroke-width: 3px; }
.mini-red text.fuerte { font-weight: 650; fill: var(--tinta); font-size: 11px; }
.mini-red text.ini { font-weight: 700; fill: #0a5d41; stroke: none; font-size: 10.5px; }
.mini-alerta { background: var(--fondo-alerta); color: var(--alerta); border-radius: 8px; padding: 8px 12px; }
.mini-pregunta { justify-self: end; background: var(--suave); border-radius: 14px 14px 4px 14px; padding: 8px 12px; }
.mini-respuesta { border: 1px solid var(--linea); border-radius: 14px 14px 14px 4px; padding: 10px 12px; line-height: 1.5; display: grid; gap: 8px; }
.mini-respuesta .chip { justify-self: start; }

/* ---------- Módulos ---------- */
.plataforma { padding-top: 88px; padding-bottom: 72px; border-top: 1px solid var(--linea); }
.pestanas { display: flex; gap: 8px; margin-top: 36px; flex-wrap: wrap; }
.pestanas button { border: 1px solid #d5dae0; background: #fff; border-radius: 999px; padding: 9px 18px; cursor: pointer; font-size: 15px; color: #3a4049; display: inline-flex; align-items: center; gap: 8px; transition: border-color 0.15s, background 0.15s, color 0.15s; }
.pestanas button:hover { border-color: var(--tinta); color: var(--tinta); }
.pestanas { position: relative; }
.pestanas .indicador { position: absolute; left: 0; top: 0; border-radius: 999px; background: var(--tinta); pointer-events: none; }
.pestanas.lista .indicador { transition: transform 0.42s cubic-bezier(0.3, 0.8, 0.2, 1), width 0.42s cubic-bezier(0.3, 0.8, 0.2, 1), height 0.42s ease; }
.pestanas button { position: relative; z-index: 1; }
.pestanas button[aria-selected='true'] { background: transparent; border-color: transparent; color: #fff; font-weight: 600; }
@media (pointer: coarse) { .pestanas button { min-height: 44px; } }
.panel { display: grid; grid-template-columns: minmax(0, 0.75fr) minmax(0, 1.25fr); gap: 56px; align-items: center; margin-top: 36px; }
.panel h3 { font-size: 28px; line-height: 1.2; letter-spacing: -0.02em; font-weight: 650; }
.panel .texto p { margin-top: 14px; font-size: 17px; color: #4a515b; line-height: 1.6; }
.panel ul { margin: 22px 0 0; padding: 0; list-style: none; display: grid; gap: 12px; }
.panel li { display: grid; grid-template-columns: 18px minmax(0, 1fr); gap: 10px; font-size: 16px; }
.panel li::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--modulo, var(--tinta)); margin-top: 8px; }
@media (prefers-reduced-motion: no-preference) { .panel > * { animation: entrar-panel 0.35s ease both; } .panel > .ventana { animation-delay: 0.05s; } }
@keyframes entrar-panel { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.pantalla { min-height: 420px; padding: 20px 22px; display: flex; flex-direction: column; gap: 14px; font-size: 13.5px; }
.pantalla-titulo { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.pantalla-titulo strong { font-size: 16px; }
.pequeno { font-size: 12.5px; }
.red-panel { flex: 1; min-height: 360px; }

.tablero { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.columna { background: var(--lateral); border-radius: 10px; padding: 10px; display: flex; flex-direction: column; gap: 8px; min-height: 270px; }
.columna h4 { margin: 0 0 2px; font-size: 12.5px; font-weight: 600; color: #4a515b; display: flex; justify-content: space-between; }
.tarjeta { background: #fff; border: 1px solid var(--linea); border-radius: 8px; padding: 9px 10px; display: grid; gap: 8px; }
.tarjeta p { font-size: 12.5px; line-height: 1.35; font-weight: 550; }
.tarjeta .pie-tarjeta { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.pila { display: flex; }
.pila .av { width: 22px; height: 22px; font-size: 9px; margin-left: -6px; box-shadow: 0 0 0 2px #fff; }
.pila .av:first-child { margin-left: 0; }
.chip.bloq { background: var(--fondo-error); color: var(--error); }
.chip.fecha { background: var(--suave); }
.alerta { background: var(--fondo-alerta); color: var(--alerta); border-radius: 8px; padding: 9px 12px; font-size: 12.5px; }

.avance { display: grid; grid-template-columns: 32px minmax(0, 1fr); gap: 12px; padding: 12px 0; border-top: 1px solid var(--linea); }
.avance:first-of-type { border-top: 0; }
.avance dl { margin: 6px 0 0; display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 3px 10px; font-size: 13px; }
.avance dt { color: var(--gris); }
.avance dd { margin: 0; }
.salud { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; }
.pregunta-semana { display: flex; align-items: center; justify-content: space-between; gap: 12px; background: var(--lateral); border-radius: 10px; padding: 10px 12px; }

.ficha { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 16px; align-items: center; }
.ficha .av { width: 64px; height: 64px; font-size: 21px; }
.ficha-nombre { font-size: 20px; }
.ficha-chips { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.cifras { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.cifras div { border: 1px solid var(--linea); border-radius: 10px; padding: 10px 12px; }
.cifras b { display: block; font-size: 22px; letter-spacing: -0.02em; }
.fila { display: grid; grid-template-columns: 10px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 9px 0; border-top: 1px solid var(--linea); }

.campos { width: 100%; border-collapse: collapse; }
.campos td { padding: 9px 4px; border-top: 1px solid var(--linea); vertical-align: top; }
.campos td:first-child { width: 120px; color: var(--gris); }
.campos ol { margin: 0; padding-left: 18px; }
.persona-linea { display: inline-flex; align-items: center; gap: 8px; }

.notas-demo { display: grid; grid-template-columns: 190px minmax(0, 1fr); gap: 0; margin: -20px -22px; min-height: 420px; }
.arbol { background: var(--lateral); border-right: 1px solid var(--linea); padding: 14px 10px; display: flex; flex-direction: column; gap: 2px; font-size: 12.5px; color: #3a4049; }
.arbol-titulo { font-weight: 650; padding: 0 6px 10px; }
.arbol span { display: flex; align-items: center; gap: 8px; padding: 5px 6px; border-radius: 6px; }
.arbol .sub, .arbol .archivo { padding-left: 24px; }
.arbol .carpeta::before { content: ''; width: 12px; height: 9px; border: 1.5px solid #8a929d; border-radius: 2px; flex: none; }
.arbol .archivo::before { content: ''; width: 8px; height: 10px; border: 1.5px solid #b0b6bf; border-radius: 1.5px; flex: none; }
.arbol .activo { background: #fff; box-shadow: 0 0 0 1px var(--linea); font-weight: 600; color: var(--tinta); }
.nota-demo { padding: 20px 24px; display: grid; gap: 8px; align-content: start; font-size: 14px; line-height: 1.6; }
.nota-demo h4 { margin: 0; font-size: 20px; letter-spacing: -0.015em; }
.nota-sub { font-weight: 650; margin-top: 6px; }

/* ---------- Tu IA ---------- */
.tu-ia { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); gap: 56px; align-items: center; padding-top: 88px; padding-bottom: 88px; border-top: 1px solid var(--linea); }
.garantias { list-style: none; margin: 26px 0 0; padding: 0; display: grid; gap: 14px; }
.garantias li { position: relative; padding-left: 32px; font-size: 16px; line-height: 1.5; color: #4a515b; }
.garantias b { color: var(--tinta); }
.garantias li::before { content: ''; position: absolute; left: 0; top: 2px; width: 20px; height: 20px; border-radius: 50%; background: #e3f5ec; }
.garantias li::after { content: ''; position: absolute; left: 6px; top: 8px; width: 8px; height: 4px; border: solid var(--ok); border-width: 0 0 2px 2px; transform: rotate(-45deg); }
.conectar-pasos { list-style: none; counter-reset: paso; margin: 30px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.conectar-pasos li { counter-increment: paso; display: inline-flex; align-items: center; gap: 8px; font-size: 14px; padding: 6px 12px 6px 6px; border-radius: 999px; background: var(--lateral); }
.conectar-pasos li::before { content: counter(paso); width: 22px; height: 22px; border-radius: 50%; background: var(--tinta); color: #fff; font-size: 12px; font-weight: 650; display: grid; place-items: center; }
.permiso-escena { display: grid; place-items: center; padding: 40px 24px; border-radius: 22px; background: var(--lateral); }
.permiso { width: min(100%, 400px); padding: 24px; display: grid; gap: 12px; font-size: 14px; line-height: 1.5; }
.permiso-marca { display: flex; align-items: center; gap: 8px; font-weight: 650; font-size: 14px; }
.permiso-titulo { font-size: 22px; font-weight: 680; letter-spacing: -0.02em; margin-top: 6px; }
.permiso-sub { color: #3a4049; }
.permiso-lista { background: var(--lateral); border-radius: 10px; padding: 12px 14px; color: #3a4049; }
.permiso-lista ul { margin: 6px 0; padding-left: 18px; }
.falso { cursor: default; pointer-events: none; }

/* ---------- Seguridad ---------- */
.seguridad { padding-top: 88px; padding-bottom: 88px; border-top: 1px solid var(--linea); }
.seguridad-lista { list-style: none; margin: 40px 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px; }
.seguridad-lista svg { width: 28px; height: 28px; fill: none; stroke: var(--tinta); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.seguridad-lista h3 { margin-top: 16px; font-size: 18px; line-height: 1.3; letter-spacing: -0.01em; font-weight: 650; }
.seguridad-lista p { margin-top: 8px; font-size: 15.5px; color: #4a515b; line-height: 1.55; }

/* ---------- Jira ---------- */
.jira { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: 56px; align-items: start; padding-top: 88px; padding-bottom: 88px; border-top: 1px solid var(--linea); }
.tabla-jira { width: 100%; border-collapse: collapse; font-size: 16px; }
.tabla-jira th { text-align: left; font-size: 13px; font-weight: 600; color: var(--gris); padding: 0 14px 12px 0; border-bottom: 1px solid var(--tinta); }
.tabla-jira td { padding: 15px 14px 15px 0; border-bottom: 1px solid var(--linea); vertical-align: top; }
.tabla-jira td:first-child { color: var(--gris); width: 48%; }

/* ---------- Cierre y pie ---------- */
.cierre { text-align: center; padding-top: 88px; padding-bottom: 104px; border-top: 1px solid var(--linea); display: flex; flex-direction: column; align-items: center; }
.cierre-buho { width: 132px; height: auto; image-rendering: pixelated; margin-bottom: 18px; }
.cierre h2 { font-size: 46px; }
.cierre .botones { justify-content: center; }
.pie { max-width: 1240px; margin: 0 auto; padding: 24px 32px 40px; display: flex; justify-content: space-between; font-size: 14px; color: var(--gris); border-top: 1px solid var(--linea); }

/* ---------- Movimiento: una entrada al cargar y lo que se arma al llegar a cada sección ---------- */
.progreso { position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--tinta); transform: scaleX(0); transform-origin: 0 50%; }
@media (prefers-reduced-motion: no-preference) {
  .heroe h1 span, .heroe .entrada, .heroe .botones, .heroe .nota-heroe { animation: subir 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
  .heroe h1 span:nth-child(2) { animation-delay: 0.14s; }
  .heroe .entrada { animation-delay: 0.28s; }
  .heroe .botones { animation-delay: 0.38s; }
  .heroe .nota-heroe { animation-delay: 0.46s; }
  .instrumento { animation: subir 1s cubic-bezier(0.2, 0.8, 0.2, 1) 0.2s both; }
}
@keyframes subir { from { opacity: 0; transform: translateY(16px); filter: blur(6px); } to { opacity: 1; transform: none; filter: none; } }
@keyframes subir-poco { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes trazar { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }

/* Señales que corren por la red */
.red .senal { fill: #aab1bb; pointer-events: none; }
.red .senal.viva { fill: var(--azul); }
.red.escribiendo .senal.viva { fill: var(--verde); }

/* La franja enciende la IA que está hablando en la demostración */
.con li { position: relative; transition: color 0.4s ease; }
.con li::after { content: ''; position: absolute; left: 50%; bottom: -9px; width: 5px; height: 5px; border-radius: 50%; background: var(--tinta); transform: translateX(-50%) scale(0); transition: transform 0.3s ease; }
.con li.activa { color: var(--tinta); }
.con li.activa::after { transform: translateX(-50%) scale(1); }

/* Pasos: cada mini se arma en orden, de izquierda a derecha */
.pasos li:nth-child(1) .mini { --b: 0s; }
.pasos li:nth-child(2) .mini { --b: 0.45s; }
.pasos li:nth-child(3) .mini { --b: 0.9s; }
.mini.visto .mini-nota u { animation: resalta 1.2s ease both; animation-delay: calc(var(--b) + 0.2s); }
.mini.visto .mini-nota u + u { animation-delay: calc(var(--b) + 0.65s); }
@keyframes resalta { 0%, 100% { background: #f1ebfc; box-shadow: none; } 40% { background: #dccbf8; box-shadow: 0 0 0 3px #ece3fc; } }
.mini:not(.visto) .mini-avance { opacity: 0; }
.mini.visto .mini-avance { animation: subir-poco 0.45s ease both; animation-delay: calc(var(--b) + 0.9s); }
.mini-red .mn { transform-box: fill-box; transform-origin: center; }
.mini-red .mini-lineas line { stroke-dasharray: 1; stroke-dashoffset: 0; }
.mini-red .mini-lineas line.debil { stroke: #d9dde3; }
.mini:not(.visto) .mn { opacity: 0; }
.mini:not(.visto) .mini-red .mini-lineas line { stroke-dashoffset: 1; }
.mini.visto .mn { animation: aparecer 0.45s ease-out both; animation-delay: calc(var(--b) + var(--d)); }
.mini.visto .mini-red .mini-lineas line { animation: trazar 0.5s ease both; animation-delay: calc(var(--b) + var(--d)); }
.mini.visto .anillo-alerta { animation: latir 1.1s ease-in-out 3; animation-delay: calc(var(--b) + 1.5s); }
@keyframes latir { 0%, 100% { opacity: 1; stroke-width: 1.6; } 50% { opacity: 0.35; stroke-width: 3.2; } }
.mini:not(.visto) .mini-alerta { opacity: 0; }
.mini.visto .mini-alerta { animation: subir-poco 0.45s ease both; animation-delay: calc(var(--b) + 1.35s); }
.mini-turno { display: grid; }
.mini-turno > * { grid-area: 1 / 1; }
.mini-escribiendo { justify-self: start; align-self: start; display: inline-flex; gap: 4px; padding: 11px 13px; border: 1px solid var(--linea); border-radius: 14px 14px 14px 4px; opacity: 0; }
.mini-escribiendo i { width: 6px; height: 6px; border-radius: 50%; background: #9aa1ab; }
.mini:not(.visto) .mini-pregunta, .mini:not(.visto) .mini-respuesta { opacity: 0; }
.mini.visto .mini-pregunta { animation: subir-poco 0.4s ease both; animation-delay: calc(var(--b) + 0.1s); }
.mini.visto .mini-escribiendo { animation: un-rato 1.3s ease both; animation-delay: calc(var(--b) + 0.5s); }
.mini.visto .mini-escribiendo i { animation: rebote 0.6s ease-in-out 2; animation-delay: calc(var(--b) + 0.55s); }
.mini.visto .mini-escribiendo i:nth-child(2) { animation-delay: calc(var(--b) + 0.7s); }
.mini.visto .mini-escribiendo i:nth-child(3) { animation-delay: calc(var(--b) + 0.85s); }
.mini.visto .mini-respuesta { animation: subir-poco 0.45s ease both; animation-delay: calc(var(--b) + 1.75s); }
@keyframes un-rato { 0% { opacity: 0; } 15% { opacity: 1; } 80% { opacity: 1; } 100% { opacity: 0; } }
@keyframes rebote { 0%, 100% { transform: none; opacity: 0.5; } 50% { transform: translateY(-3px); opacity: 1; } }

/* Tu IA: se leen los permisos, se toca «Permitir» y queda conectado */
.permiso-escena { gap: 16px; }
.permiso-lista li { border-radius: 4px; padding: 1px 4px; margin-left: -4px; }
.permiso-escena.visto .permiso-lista li { animation: marca-linea 1.1s ease both; animation-delay: 0.3s; }
.permiso-escena.visto .permiso-lista li + li { animation-delay: 0.8s; }
@keyframes marca-linea { 0%, 100% { background: transparent; } 35% { background: #e4ecfb; } }
.permiso-escena.visto .permitir { animation: pulsar 0.5s ease both; animation-delay: 1.7s; }
@keyframes pulsar { 0%, 100% { transform: none; } 45% { transform: scale(0.96); background: #000; } }
.conectado { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; color: var(--ok); background: #fff; border: 1px solid #cdebdc; border-radius: 999px; padding: 7px 14px 7px 7px; box-shadow: 0 10px 24px -18px rgba(14, 122, 85, 0.6); }
.check { position: relative; width: 22px; height: 22px; border-radius: 50%; background: #e3f5ec; flex: none; }
.check::after { content: ''; position: absolute; left: 7px; top: 7px; width: 8px; height: 4px; border: solid var(--ok); border-width: 0 0 2px 2px; transform: rotate(-45deg); }
.permiso-escena:not(.visto) .conectado { opacity: 0; }
.permiso-escena.visto .conectado { animation: subir-poco 0.45s ease both; animation-delay: 2.2s; }

/* Seguridad: los íconos se dibujan */
.seguridad-lista svg path { stroke-dasharray: 1; stroke-dashoffset: 0; }
.seguridad-lista:not(.visto) svg path { stroke-dashoffset: 1; }
.seguridad-lista.visto svg path { animation: trazar 1s ease both; }
.seguridad-lista.visto li:nth-child(2) svg path { animation-delay: 0.15s; }
.seguridad-lista.visto li:nth-child(3) svg path { animation-delay: 0.3s; }
.seguridad-lista.visto li:nth-child(4) svg path { animation-delay: 0.45s; }

/* Jira: lo de antes se tacha y lo de ahora se enciende, fila por fila */
.antes { text-decoration: line-through; text-decoration-thickness: 1px; text-decoration-color: transparent; transition: text-decoration-color 0.6s ease; transition-delay: calc(var(--f) * 0.2s + 0.2s); }
.tabla-jira.visto .antes { text-decoration-color: rgba(104, 112, 125, 0.65); }
.tabla-jira td + td { transition: color 0.6s ease; transition-delay: calc(var(--f) * 0.2s + 0.35s); }
.tabla-jira:not(.visto) td + td { color: var(--gris-claro); }

/* Cierre: el búho llega con un saltito */
.cierre:not(.visto) .cierre-buho { opacity: 0; }
.cierre.visto .cierre-buho { animation: saltito 0.8s cubic-bezier(0.3, 1.4, 0.5, 1) both; }
@keyframes saltito { 0% { opacity: 0; transform: translateY(16px); } 60% { opacity: 1; transform: translateY(-6px); } 100% { transform: none; } }

/* ---------- Pantallas medianas y celulares ---------- */
@media (max-width: 1080px) {
  .heroe, .panel, .jira, .regado, .tu-ia { grid-template-columns: 1fr; gap: 40px; }
  .heroe h1 { font-size: 48px; max-width: 13em; }
  .pasos ol { grid-template-columns: 1fr; gap: 40px; }
  .seguridad-lista { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .menu { display: none; }
  .mesa { max-width: 620px; }
}
@media (max-width: 640px) {
  .barra-dentro, main > section, .pie { padding-left: 18px; padding-right: 18px; }
  .acciones .crear-barra { display: none; }
  .heroe { padding-top: 36px; }
  .heroe h1 { font-size: 38px; }
  h2, .cierre h2 { font-size: 30px; }
  .heroe-ventana { height: 560px; }
  .ventana-cifras { display: none; }
  .pregunta { font-size: 15px; }
  .chat { grid-template-rows: auto minmax(118px, auto); }
  .respuesta { font-size: 14px; }
  .escenas .pausa { margin-left: 0; }
  .con li { font-size: 19px; }
  .seguridad-lista { grid-template-columns: 1fr; }
  .tablero { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .notas-demo { grid-template-columns: 1fr; }
  .arbol { display: none; }
  /* En el celular las piezas no vuelan: se ven ya ordenadas, una debajo de otra. */
  .mesa { height: auto; padding: 52px 14px 14px; }
  .bodega-marco { background: var(--lateral); border-style: solid; border-color: var(--linea); }
  .bodega-nombre { opacity: 1; }
  .piezas { display: grid; gap: 10px; }
  .pieza, .mesa.ordenada .pieza { position: relative; left: auto !important; top: auto !important; width: auto; min-height: 0; transform: none; }
  .destino { opacity: 1; transform: none; }
}
