/* ==========================================================================
   plataforma/portada-viva.css — LA PORTADA VIVA (28-nov-2026, tercera vuelta)
   views/pages/public/home.ejs · JS: public/js/portada-demo.js

   Nil: «más animado, más moderno, más espectacular; fíjate en Notion, ClickUp;
   sé moderno, sé innovador» y «mejóralo muchísimo más». Solo var(--pf-*): los
   valores, en plataforma/tokens.css. Esta hoja SÍ usa manchas de color
   desenfocadas y máscaras con degradado (solo aquí, en la portada).
   Con prefers-reduced-motion, todo quieto y terminado (al final de la hoja).
   ========================================================================== */

@keyframes hv-sube { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
@keyframes hv-pop { 0% { opacity: 0; scale: 0.6; } 70% { opacity: 1; scale: 1.06; } 100% { opacity: 1; scale: 1; } }
@keyframes hv-traza { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes hv-flota { 0%, 100% { translate: 0 0; } 50% { translate: 0 -10px; } }
@keyframes hv-deriva-a { 0%, 100% { transform: translate(0, 0) scale(1); } 50% { transform: translate(8vw, 6vh) scale(1.15); } }
@keyframes hv-deriva-b { 0%, 100% { transform: translate(0, 0) scale(1.1); } 50% { transform: translate(-6vw, 8vh) scale(0.9); } }
@keyframes hv-franja { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@keyframes hv-late { 0%, 100% { box-shadow: 0 0 0 0 rgb(var(--pf-azul-rgb) / 0.45); } 60% { box-shadow: 0 0 0 14px rgb(var(--pf-azul-rgb) / 0); } }
@keyframes hv-brillo { from { transform: translateX(-120%) skewX(-20deg); } to { transform: translateX(220%) skewX(-20deg); } }
@keyframes hv-puntos { 0%, 80%, 100% { opacity: 0.25; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }
@keyframes hv-barra { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@keyframes hv-onda { from { r: 9; opacity: 0.7; } to { r: 26; opacity: 0; } }
@keyframes hv-hilo-corre { from { stroke-dashoffset: 0; } to { stroke-dashoffset: -2; } }

/* ---- 1 · EL HERO ------------------------------------------------------------ */
[data-portada] [data-hv-hero] {
  position: relative; isolation: isolate; overflow: clip; display: block; min-height: 0;
  padding: clamp(56px, 9vw, 120px) 0 0; border-bottom: 0; background: var(--pf-blanco);
}
.hv-manchas { position: absolute; inset: -10% -10% auto; height: 900px; z-index: -1; pointer-events: none; }
.hv-mancha { position: absolute; display: block; border-radius: 50%; filter: blur(90px); opacity: 0.55; }
.hv-mancha--a { width: 520px; height: 520px; left: 4%; top: 2%; background: var(--pf-cian-suave); animation: hv-deriva-a 18s ease-in-out infinite; }
.hv-mancha--b { width: 560px; height: 560px; right: 2%; top: 8%; background: var(--pf-rosa-suave); animation: hv-deriva-b 22s ease-in-out infinite; }
.hv-mancha--c { width: 640px; height: 420px; left: 30%; top: 46%; background: var(--pf-azul-suave); animation: hv-deriva-a 26s ease-in-out infinite reverse; }

/* El titular. */
[data-portada] .hv-h1 { font-size: clamp(44px, 7.6vw, 108px); line-height: 0.98; letter-spacing: -0.045em; max-width: 13ch; margin: 0 auto; }
html[data-plataforma]:lang(zh) [data-portada] .hv-h1 { letter-spacing: 0; line-height: 1.12; max-width: 11em; }
.hv-resalta { position: relative; display: inline-block; color: var(--pf-azul); white-space: nowrap; }
.hv-resalta svg { position: absolute; left: -2%; bottom: -0.16em; width: 104%; height: 0.32em; overflow: visible; }
.hv-resalta path { fill: none; stroke: var(--pf-cian); stroke-width: 7; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 1; vector-effect: non-scaling-stroke; animation: hv-traza 900ms 900ms cubic-bezier(.6, 0, .2, 1) forwards; }
[data-portada] [data-hv-hero] .hp-sub { max-width: 640px; margin: var(--pf-s5) auto 0; font-size: clamp(18px, 1.7vw, 22px); }
[data-portada] [data-hv-hero] .hn-acciones { margin-top: var(--pf-s6); }

/* El botón principal, con un brillo que cruza. */
.hv-btn { position: relative; overflow: hidden; min-height: 52px; padding: 0 28px; font-size: 17px; border-radius: 12px; box-shadow: 0 8px 24px -8px rgb(var(--pf-azul-rgb) / 0.6); transition: transform 160ms ease, box-shadow 160ms ease, background-color 160ms ease; }
.hv-btn::after { content: ""; position: absolute; inset: 0 auto 0 0; width: 40%; background: rgb(var(--pf-blanco-rgb) / 0.35); transform: translateX(-120%) skewX(-20deg); }
.hv-btn:hover { transform: translateY(-2px); box-shadow: 0 14px 30px -10px rgb(var(--pf-azul-rgb) / 0.7); }
.hv-btn:hover::after { animation: hv-brillo 700ms ease; }
[data-portada] [data-hv-hero] .hn-acciones .pf-btn--borde { min-height: 52px; border-radius: 12px; background: rgb(var(--pf-blanco-rgb) / 0.7); backdrop-filter: blur(8px); }
.hv-codigo { margin-top: var(--pf-s2); }
/* 2-dic-2026: la demo y el informe de muestra, sin registrarse. */
.hv-ejemplos { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 18px; margin: var(--pf-s2) 0 0; font-size: var(--pf-fs-peque); color: var(--pf-texto-3); }
.hv-ejemplos a { color: var(--pf-azul); font-weight: var(--pf-peso-medio); text-decoration: none; }
.hv-ejemplos a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* La telaraña de personas (solo en pantallas anchas). */
.hv-gente { position: absolute; left: 0; right: 0; top: 0; height: min(760px, 100%); pointer-events: none; display: none; }
@media (min-width: 1180px) { .hv-gente { display: block; } }
.hv-hilos { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.hv-hilos line { stroke: rgb(var(--pf-azul-rgb) / 0.3); stroke-width: 1.25; vector-effect: non-scaling-stroke; opacity: 0; animation: hn-aparece 900ms calc(1.2s + var(--k) * 140ms) ease forwards; }
.hv-persona {
  position: absolute; left: var(--x); top: var(--y); display: inline-flex; align-items: center; gap: 10px;
  padding: 6px 14px 6px 6px; border-radius: 999px; background: var(--pf-blanco); border: var(--pf-borde); box-shadow: var(--pf-sombra-flota);
  transform: translate(-50%, -50%) translate(calc(var(--mx, 0) * var(--prof) * -14px), calc(var(--my, 0) * var(--prof) * -10px));
  opacity: 0; animation: hv-pop 600ms calc(700ms + var(--k) * 120ms) cubic-bezier(.2, .7, .2, 1) forwards, hv-flota calc(5s + var(--k) * 0.7s) calc(1.4s + var(--k) * 0.3s) ease-in-out infinite;
  transition: transform 300ms cubic-bezier(.2, .7, .2, 1);
}
.hv-persona-av { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; font-weight: var(--pf-peso-titulo); font-size: 14px; }
.hv-persona-txt { display: grid; line-height: 1.2; text-align: left; }
.hv-persona-txt b { font-size: 14px; font-weight: var(--pf-peso-titulo); color: var(--pf-texto); }
.hv-persona-txt small { font-size: 12px; color: var(--pf-texto-3); }

/* Los tonos de las personas y avatares. */
.hv-tono-azul :is(.hv-persona-av), .hv-av.hv-tono-azul { background: var(--pf-azul); color: var(--pf-blanco); }
.hv-tono-tinta :is(.hv-persona-av), .hv-av.hv-tono-tinta { background: var(--pf-tinta); color: var(--pf-blanco); }
.hv-tono-cian :is(.hv-persona-av), .hv-av.hv-tono-cian { background: var(--pf-cian-suave); color: var(--pf-tinta); box-shadow: inset 0 0 0 2px var(--pf-cian); }
.hv-tono-rosa :is(.hv-persona-av), .hv-av.hv-tono-rosa { background: var(--pf-rosa-suave); color: var(--pf-tinta); box-shadow: inset 0 0 0 2px var(--pf-rosa); }

/* ---- 2 · EL ESCENARIO ------------------------------------------------------- */
.hv-escenario { position: relative; width: min(1180px, calc(100% - 32px)); margin: clamp(48px, 7vw, 88px) auto 0; perspective: 1800px; padding-bottom: var(--pf-s8); }
.hv-ventana {
  position: relative; z-index: 1; border-radius: 18px; overflow: hidden; background: var(--pf-blanco); border: var(--pf-borde);
  box-shadow: var(--pf-sombra-escenario); transform-origin: 50% 0;
  transform: rotateX(var(--hv-tilt, 0deg)) scale(var(--hv-sc, 1)); will-change: transform;
}
.hv-ventana-barra { display: flex; align-items: center; gap: 6px; padding: 12px 16px; border-bottom: var(--pf-borde); background: var(--pf-gris-fondo); }
.hv-ventana-barra i { width: 11px; height: 11px; border-radius: 50%; background: var(--pf-linea-fuerte); }
.hv-ventana-barra span { margin: 0 auto; padding: 3px 14px; border-radius: 6px; background: var(--pf-blanco); border: var(--pf-borde); font-size: 12px; color: var(--pf-texto-3); }
.hv-app { display: grid; grid-template-columns: 1fr; height: 460px; font-size: 14px; text-align: left; }
@media (min-width: 760px) { .hv-app { grid-template-columns: 190px 1fr; } }
@media (min-width: 1040px) { .hv-app { grid-template-columns: 200px 1fr 300px; height: 500px; } }
.hv-app-lado { display: none; flex-direction: column; gap: 4px; padding: 18px 12px; background: var(--pf-gris-fondo); border-right: var(--pf-borde); }
@media (min-width: 760px) { .hv-app-lado { display: flex; } }
.hv-app-logo { padding: 0 8px 14px; }
.hv-app-logo img { height: 18px; width: auto; }
.hv-app-item { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; color: var(--pf-texto-2); font-weight: var(--pf-peso-medio); }
.hv-app-item.is-on { background: var(--pf-blanco); color: var(--pf-texto); box-shadow: var(--pf-sombra); }
.hv-ico { display: inline-block; width: 16px; height: 16px; border: 1.75px solid currentColor; border-radius: 4px; flex: none; }
.hv-ico--red { border-radius: 50%; }
.hv-ico--lupa { border-radius: 50%; width: 13px; height: 13px; }
.hv-ico--casa { border-radius: 3px 3px 4px 4px; }
.hv-app-lista { display: flex; flex-direction: column; gap: 8px; padding: 18px; overflow: hidden; }
.hv-app-busca { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border: var(--pf-borde); border-radius: 10px; color: var(--pf-texto-3); }
.hv-app-filtros { display: flex; gap: 6px; margin: 4px 0 6px; }
.hv-app-filtros span { padding: 4px 12px; border-radius: 999px; border: var(--pf-borde); font-size: 12px; color: var(--pf-texto-2); }
.hv-app-filtros span.is-on { background: var(--pf-texto); color: var(--pf-blanco); border-color: var(--pf-texto); }
.hv-fila { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; border: 1px solid transparent; opacity: 0; animation: hv-sube 600ms calc(1.1s + var(--k) * 120ms) cubic-bezier(.2, .7, .2, 1) forwards; }
.hv-fila.is-nueva { border-color: rgb(var(--pf-azul-rgb) / 0.35); background: var(--pf-azul-suave); }
.hv-fila-txt { display: grid; line-height: 1.25; min-width: 0; }
.hv-fila-txt b { font-weight: var(--pf-peso-titulo); }
.hv-fila-txt small { color: var(--pf-texto-3); font-size: 12px; }
.hv-fila-tema { display: none; color: var(--pf-texto-2); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 280px; }
@media (min-width: 900px) { .hv-fila { grid-template-columns: auto 180px 1fr auto; } .hv-fila-tema { display: block; } }
.hv-av { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; font-size: 13px; font-weight: var(--pf-peso-titulo); flex: none; }
.hv-av--xl { width: 64px; height: 64px; font-size: 20px; }
.hv-app-ficha { display: none; flex-direction: column; gap: 10px; padding: 24px; border-left: var(--pf-borde); align-items: flex-start; }
@media (min-width: 1040px) { .hv-app-ficha { display: flex; } }
.hv-app-ficha > b { font-size: 20px; letter-spacing: -0.01em; }
.hv-app-ficha > small { margin-top: -8px; color: var(--pf-texto-2); }
.hv-app-ficha .hd-campo { width: 100%; }
.hv-app-ficha .hd-campo p { min-height: 0; }
.hv-app .hd-nuevo { animation: hv-pop 500ms 1.9s both; }

/* Las tarjetas que flotan. */
.hv-flota {
  position: absolute; z-index: 2; display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: 16px;
  background: var(--pf-blanco); border: var(--pf-borde); box-shadow: var(--pf-sombra-flota); text-align: left;
  transform: translate(calc(var(--mx, 0) * 18px), calc(var(--my, 0) * 12px));
  opacity: 0; animation: hv-pop 700ms calc(1.6s + var(--k) * 260ms) cubic-bezier(.2, .7, .2, 1) forwards, hv-flota calc(5.5s + var(--k) * 0.6s) calc(2.4s + var(--k) * 0.3s) ease-in-out infinite;
  transition: transform 400ms cubic-bezier(.2, .7, .2, 1);
}
.hv-flota b { display: block; font-size: 14px; font-weight: var(--pf-peso-titulo); }
.hv-flota small { display: block; font-size: 12px; color: var(--pf-texto-3); }
.hv-flota--qr { left: -72px; top: 44%; flex-direction: column; gap: 6px; padding: 14px; }
.hv-qr { width: 120px; height: 120px; margin: 0; }
.hv-qr .hd-qr-rayo { animation: hn-aparece 200ms 2s both, hn-rayo 1.6s 2s ease-in-out 3; --hd-qr-alto: 108px; }
.hv-flota--ok { right: 7%; top: -26px; }
.hv-ok-ico { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--pf-ok-suave); color: var(--pf-ok); font-weight: var(--pf-peso-titulo); }
.hv-flota--puente { right: -60px; bottom: calc(var(--pf-s8) + 4%); max-width: 300px; }
.hv-flota--puente small { color: var(--pf-azul); font-weight: var(--pf-peso-medio); }
.hv-puente-caras { display: flex; }
.hv-puente-caras .hv-av + .hv-av { margin-left: -10px; box-shadow: 0 0 0 3px var(--pf-blanco); }
.hv-flota--evento { left: -40px; bottom: calc(var(--pf-s8) + 3%); }
.hv-flota--evento .hv-ico { width: 20px; height: 20px; color: var(--pf-azul); }
.hv-etiqueta { position: absolute; top: auto; left: 50%; right: auto; translate: -50% 0; bottom: calc(var(--pf-s8) - 40px); z-index: 3; }
@media (max-width: 1299px) { .hv-flota--qr { left: -16px; } .hv-flota--puente { right: -16px; } .hv-flota--evento { left: -12px; } }
@media (max-width: 899px) {
  .hv-flota--qr, .hv-flota--evento { display: none; }
  .hv-flota--ok { right: 8px; top: -18px; }
  .hv-flota--puente { right: 8px; bottom: calc(var(--pf-s8) - 24px); max-width: 260px; }
  .hv-app { height: 380px; }
}

/* ---- 3 · LA FRANJA ---------------------------------------------------------- */
.hv-franja {
  overflow: hidden; padding: 26px 0; border-top: var(--pf-borde); border-bottom: var(--pf-borde); background: var(--pf-blanco);
  -webkit-mask-image: linear-gradient(90deg, transparent, var(--pf-texto) 10%, var(--pf-texto) 90%, transparent);
          mask-image: linear-gradient(90deg, transparent, var(--pf-texto) 10%, var(--pf-texto) 90%, transparent);
}
.hv-franja-pista { display: flex; width: max-content; animation: hv-franja 48s linear infinite; }
.hv-franja:hover .hv-franja-pista { animation-play-state: paused; }
.hv-franja-grupo { display: flex; align-items: center; }
.hv-franja-grupo > span { padding: 0 28px; font-size: clamp(26px, 3.4vw, 46px); font-weight: var(--pf-peso-titulo); letter-spacing: -0.03em; white-space: nowrap; color: var(--pf-texto); }
.hv-franja-grupo > span.hv-hueco { color: transparent; -webkit-text-stroke: 1.25px var(--pf-texto); }
.hv-franja-grupo > i { width: 12px; height: 12px; border-radius: 50%; background: var(--pf-azul); flex: none; }
.hv-franja-grupo > i:nth-of-type(3n) { background: var(--pf-cian); }
.hv-franja-grupo > i:nth-of-type(3n + 1) { background: var(--pf-rosa); }

/* ---- 4 · ASÍ FUNCIONA ------------------------------------------------------- */
.hv-como { padding: clamp(56px, 7vw, 96px) 0; }
.hv-como-rejilla { display: grid; gap: var(--pf-s5); }
@media (min-width: 960px) { .hv-como-rejilla { grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: var(--pf-s8); } }
.hv-pasos { margin: 0; padding: 0; list-style: none; }
.hv-paso { min-height: 38vh; display: flex; flex-direction: column; justify-content: center; gap: 10px; opacity: 0.28; transition: opacity 400ms ease; }
.hv-paso.is-activo { opacity: 1; }
.hv-paso-n { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; border: 1.5px solid var(--pf-linea-fuerte); font-weight: var(--pf-peso-titulo); color: var(--pf-texto-2); transition: all 300ms ease; }
.hv-paso.is-activo .hv-paso-n { background: var(--pf-azul); border-color: var(--pf-azul); color: var(--pf-blanco); animation: hv-late 1.6s ease-out 1; }
.hv-paso h3 { margin: 0; font-size: clamp(24px, 2.6vw, 34px); line-height: 1.05; letter-spacing: -0.03em; }
.hv-paso p { margin: 0; max-width: 30ch; font-size: clamp(17px, 1.4vw, 20px); color: var(--pf-texto-2); }
.hv-como-escena { position: sticky; top: calc(var(--header-h, 64px) + 24px); align-self: start; }
.hv-como-escena .hd-escena { height: min(440px, calc(100vh - var(--header-h, 64px) - 96px)); min-height: 340px; border-radius: 24px; box-shadow: var(--pf-sombra-escenario); }
@media (max-width: 959px) {
  .hv-como-escena { order: -1; top: calc(var(--header-h, 64px) + 8px); z-index: 2; }
  .hv-como-escena .hd-escena { height: 380px; }
  .hv-paso { min-height: 52vh; justify-content: flex-start; padding-top: 24px; }
}

/* ---- 5 · LAS FUNCIONES, en bloques de color --------------------------------- */
.hv-funciones { padding-top: 0; }
.hv-bento { margin: 0; padding: 0; list-style: none; display: grid; gap: var(--pf-s4); }
@media (min-width: 860px) { .hv-bento { grid-template-columns: 1.15fr 0.85fr; gap: var(--pf-s5); } .hv-bento > :nth-child(3) { grid-column: 1; } .hv-bento > :nth-child(2) { grid-row: span 1; } }
@media (min-width: 860px) { .hv-bento { grid-template-columns: repeat(12, 1fr); } .hv-bento > :nth-child(1) { grid-column: span 7; } .hv-bento > :nth-child(2) { grid-column: span 5; } .hv-bento > :nth-child(3) { grid-column: span 5; } .hv-bento > :nth-child(4) { grid-column: span 7; } }
.hv-bloque { border-radius: 28px; overflow: hidden; min-height: 440px; transition: transform 300ms cubic-bezier(.2, .7, .2, 1); }
.hv-bloque:hover { transform: translateY(-4px) scale(1.005); }
.hv-bloque > a.hv-bloque-a { position: relative; display: flex; flex-direction: column; height: 100%; padding: clamp(28px, 3vw, 40px); text-decoration: none; color: inherit; }
.hv-bloque-txt { display: grid; gap: 10px; max-width: 420px; position: relative; z-index: 1; }
.hv-bloque-txt strong { font-size: clamp(28px, 2.8vw, 40px); font-weight: var(--pf-peso-titulo); letter-spacing: -0.03em; line-height: 1.05; }
.hv-bloque-txt > span { font-size: 18px; line-height: 1.45; opacity: 0.85; }
.hv-bloque-txt em { font-style: normal; font-weight: var(--pf-peso-medio); margin-top: 6px; transition: transform 200ms ease; display: inline-block; }
.hv-bloque:hover .hv-bloque-txt em { transform: translateX(6px); }
.hv-bloque-vis { position: relative; flex: 1; display: grid; place-items: center; margin-top: var(--pf-s5); min-height: 200px; }
.hv-bloque--azul { background: var(--pf-azul); color: var(--pf-blanco); }
.hv-bloque--tinta { background: var(--pf-tinta); color: var(--pf-blanco); }
.hv-bloque--cian { background: var(--pf-cian-suave); color: var(--pf-tinta); }
.hv-bloque--rosa { background: var(--pf-rosa-suave); color: var(--pf-tinta); }
html[data-plataforma] .hv-bloque :is(strong, em) { color: inherit; }

/* Tarjeta: la tarjeta de Maya, inclinada, que se endereza al pasar. */
.hv-mini-tarjeta { display: grid; gap: 2px; justify-items: start; width: 250px; padding: 20px; border-radius: 18px; background: var(--pf-blanco); color: var(--pf-texto); box-shadow: 0 30px 60px -20px rgb(var(--pf-tinta-rgb) / 0.5); transform: rotate(-6deg) translateY(10px); transition: transform 500ms cubic-bezier(.2, .7, .2, 1); }
.hv-bloque:hover .hv-mini-tarjeta { transform: rotate(0) translateY(-6px); }
.hv-mini-tarjeta small { font-size: 12px; color: var(--pf-texto-3); }
.hv-mini-tarjeta b { font-size: 22px; letter-spacing: -0.02em; }
.hv-mini-tarjeta span:not(.hd-qr):not(.hd-qr-rayo) { font-size: 13px; color: var(--pf-texto-2); }
.hv-qr--mini { width: 96px; height: 96px; margin-top: 12px; justify-self: center; }
.is-visto .hv-qr--mini .hd-qr-rayo { animation: hn-aparece 200ms 400ms both, hn-rayo 1.6s 400ms ease-in-out infinite; --hd-qr-alto: 84px; }

/* Red: se dibuja al aparecer; un nodo nuevo late. */
.hv-vis-red svg { width: 100%; max-width: 360px; overflow: visible; }
.hv-vis-red line { stroke: rgb(var(--pf-blanco-rgb) / 0.35); stroke-width: 1.5; stroke-dasharray: 1; stroke-dashoffset: 1; }
.hv-vis-red circle { fill: var(--pf-tinta); stroke: rgb(var(--pf-blanco-rgb) / 0.7); stroke-width: 1.5; opacity: 0; transform-box: fill-box; transform-origin: center; }
.hv-vis-red circle.hv-red-tu { fill: var(--pf-blanco); stroke: var(--pf-blanco); }
.hv-vis-red circle.hv-red-nueva { fill: var(--pf-cian); stroke: var(--pf-cian); }
.is-visto .hv-vis-red line { animation: hv-traza 700ms calc(200ms + var(--k) * 110ms) ease-out forwards; }
.is-visto .hv-vis-red circle { animation: hv-pop 500ms calc(150ms + var(--k) * 110ms) cubic-bezier(.2, .7, .2, 1) forwards; }
.is-visto .hv-vis-red circle.hv-red-nueva { animation: hv-pop 500ms 1.1s cubic-bezier(.2, .7, .2, 1) forwards, hv-late-c 1.8s 1.6s ease-out infinite; }
@keyframes hv-late-c { 0% { stroke-width: 1.5; stroke-opacity: 1; } 100% { stroke-width: 22; stroke-opacity: 0; } }

/* Tu IA: la pregunta y la respuesta que se está escribiendo. */
.hv-vis-ia { display: flex; flex-direction: column; gap: 12px; align-items: stretch; width: 100%; max-width: 360px; justify-self: center; }
.hv-globo { display: block; padding: 12px 16px; border-radius: 18px; font-size: 15px; line-height: 1.4; }
.hv-globo--yo { align-self: flex-end; max-width: 82%; background: var(--pf-tinta); color: var(--pf-blanco); border-bottom-right-radius: 6px; opacity: 0; }
.hv-globo--pensando { align-self: flex-start; display: inline-flex; gap: 6px; background: var(--pf-blanco); border-bottom-left-radius: 6px; box-shadow: var(--pf-sombra-flota); opacity: 0; }
.hv-globo--pensando i { width: 8px; height: 8px; border-radius: 50%; background: var(--pf-texto-3); animation: hv-puntos 1.2s ease-in-out infinite; }
.hv-globo--pensando i:nth-child(2) { animation-delay: 150ms; }
.hv-globo--pensando i:nth-child(3) { animation-delay: 300ms; }
.hv-globo--ia { align-self: flex-start; display: flex; gap: 10px; align-items: flex-start; max-width: 92%; background: var(--pf-blanco); color: var(--pf-texto); border-bottom-left-radius: 6px; box-shadow: var(--pf-sombra-flota); opacity: 0; }
.hv-globo--ia .hv-av { width: 28px; height: 28px; font-size: 11px; }
@keyframes hv-pensar { 0% { opacity: 0; transform: translateY(10px); } 15%, 80% { opacity: 1; transform: none; } 100% { opacity: 0; } }
.is-visto .hv-globo--yo { animation: hv-sube 500ms 300ms both; }
.is-visto .hv-globo--pensando { animation: hv-pensar 1.4s 900ms both; }
.is-visto .hv-globo--ia { animation: hv-sube 600ms 2.2s both; }
.hv-globo-pila { display: grid; justify-items: start; }
.hv-globo-pila > * { grid-area: 1 / 1; }
.hv-bloque:hover .hv-globo--ia { transform: translateY(-3px); }

/* Eventos: barras que crecen. */
.hv-vis-eventos { display: flex; align-items: flex-end; gap: 12px; height: 220px; padding: 0 4px; }
.hv-vis-eventos i { display: block; width: 100%; max-width: 44px; height: var(--alto); border-radius: 10px 10px 4px 4px; background: var(--pf-rosa); transform-origin: bottom; transform: scaleY(0); opacity: 0.9; }
.hv-vis-eventos i:nth-child(even) { background: var(--pf-tinta); }
.is-visto .hv-vis-eventos i { animation: hv-barra 800ms calc(200ms + var(--k) * 90ms) cubic-bezier(.2, .7, .2, 1) forwards; }

/* ---- 6 · LOS CAMINOS -------------------------------------------------------- */
.hv-caminos-sec .pf-camino { transition: transform 250ms cubic-bezier(.2, .7, .2, 1), box-shadow 250ms ease, border-color 250ms ease; }
.hv-caminos-sec .pf-camino:hover { transform: translateY(-4px); box-shadow: var(--pf-sombra-flota); border-color: var(--pf-linea-fuerte); }

/* ---- 7 · EL CIERRE, en negro ------------------------------------------------ */
[data-portada] .hv-cierre { position: relative; isolation: isolate; overflow: hidden; background: var(--pf-tinta); color: var(--pf-blanco); padding: clamp(96px, 12vw, 180px) 0; }
html[data-plataforma] [data-portada] .hv-cierre .hn-h2 { color: var(--pf-blanco); font-size: clamp(36px, 5.4vw, 76px); letter-spacing: -0.04em; line-height: 1.02; max-width: 16ch; }
[data-portada] .hv-cierre .pf-lede { color: rgb(var(--pf-blanco-rgb) / 0.7); margin-top: var(--pf-s4); }
.hv-cierre-hilos { position: absolute; inset: 0; z-index: -1; opacity: 0.6; }
.hv-cierre-hilos svg { width: 100%; height: 100%; }
.hv-cierre-hilos path { fill: none; stroke: rgb(var(--pf-cian-rgb) / 0.22); stroke-width: 1; vector-effect: non-scaling-stroke; stroke-dasharray: 0.4 0.6; animation: hv-hilo-corre calc(14s + var(--k) * 1.3s) linear infinite; }
.hv-cierre-hilos path:nth-child(3n) { stroke: rgb(var(--pf-rosa-rgb) / 0.2); }
html[data-plataforma] [data-portada] .hv-cierre .hv-btn-claro { background: transparent; color: var(--pf-blanco); border-color: rgb(var(--pf-blanco-rgb) / 0.4); min-height: 52px; border-radius: 12px; }
html[data-plataforma] [data-portada] .hv-cierre .hv-btn-claro:hover { border-color: var(--pf-blanco); background: rgb(var(--pf-blanco-rgb) / 0.08); }

/* ---- Quietos ---------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  .hv-ventana { transform: none; }
  .hv-resalta path, .hv-hilos line, .hv-vis-red line { stroke-dashoffset: 0; }
  .hv-persona, .hv-flota, .hv-fila, .hv-vis-red circle, .hv-globo--yo, .hv-globo--ia { opacity: 1; }
  .hv-globo--pensando { display: none; }
  .hv-vis-eventos i { transform: none; }
  .hv-franja-pista { flex-wrap: wrap; width: auto; }
  .hv-franja-grupo + .hv-franja-grupo { display: none; }
}
