/* Identidad de Neuropoint (paleta y tipografía del sitio neuropoint-ai-promocional).
   Pensado primero para proyector (texto grande, alto contraste) y celular. */

@font-face { font-family: 'Stack Sans Headline'; src: url('fuentes/StackSansHeadline-Medium.ttf') format('truetype'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'Stack Sans Headline'; src: url('fuentes/StackSansHeadline-SemiBold.ttf') format('truetype'); font-weight: 600; font-display: swap; }
@font-face { font-family: 'Stack Sans Headline'; src: url('fuentes/StackSansHeadline-Bold.ttf') format('truetype'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'Stack Sans Text'; src: url('fuentes/StackSansText-Regular.ttf') format('truetype'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Stack Sans Text'; src: url('fuentes/StackSansText-Medium.ttf') format('truetype'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'Stack Sans Text'; src: url('fuentes/StackSansText-SemiBold.ttf') format('truetype'); font-weight: 600; font-display: swap; }

:root {
  --fondo: #0a0818;
  --fondo-2: #120f2a;
  --tarjeta: rgba(24, 20, 56, 0.72);
  --tarjeta-borde: rgba(165, 180, 252, 0.16);
  --texto: #f5f5ff;
  --texto-2: #c7cbea;
  --texto-3: #8f8cbf;
  --indigo: #818cf8;
  --indigo-claro: #c7d2fe;
  --indigo-fuerte: #6366f1;
  --indigo-oscuro: #3730a3;
  --verde: #4ade80;
  --ambar: #fcd34d;
  --rojo: #f87171;
  --radio: 20px;
  --sombra: 0 30px 80px -30px rgba(0, 0, 0, 0.7), 0 0 0 1px var(--tarjeta-borde);
  --titulos: 'Stack Sans Headline', 'Segoe UI', system-ui, sans-serif;
  --cuerpo: 'Stack Sans Text', 'Segoe UI', system-ui, sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100dvh;
  background: var(--fondo);
  color: var(--texto);
  font-family: var(--cuerpo);
  font-size: clamp(16px, 0.55vw + 12px, 20px);
  line-height: 1.5;
  overflow-x: hidden;
}
.oculto { display: none !important; }
[hidden] { display: none !important; }

/* Fondo vivo, discreto */
.fondo { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.aura { position: absolute; border-radius: 50%; filter: blur(90px); opacity: 0.55; }
.a1 { width: 60vmax; height: 60vmax; left: -20vmax; top: -25vmax; background: radial-gradient(circle, #3730a3 0%, transparent 65%); animation: flota 18s ease-in-out infinite alternate; }
.a2 { width: 50vmax; height: 50vmax; right: -18vmax; bottom: -22vmax; background: radial-gradient(circle, #6366f1 0%, transparent 60%); opacity: 0.35; animation: flota 22s ease-in-out infinite alternate-reverse; }
.rejilla { position: absolute; inset: 0; background-image: linear-gradient(rgba(129,140,248,0.05) 1px, transparent 1px), linear-gradient(90deg, rgba(129,140,248,0.05) 1px, transparent 1px); background-size: 56px 56px; mask-image: radial-gradient(ellipse at 50% 30%, #000 20%, transparent 75%); }
@keyframes flota { to { transform: translate(6vmax, 4vmax) scale(1.08); } }

/* Barra superior */
.barra { display: flex; align-items: center; justify-content: space-between; padding: 20px clamp(16px, 4vw, 56px); }
.marca { display: inline-flex; align-items: center; gap: 12px; color: var(--texto); text-decoration: none; }
.marca img { height: 27px; width: auto; }
.marca-nombre { font-family: var(--titulos); font-weight: 600; font-size: 1.25rem; letter-spacing: -0.01em; }
.marca-nombre span { color: var(--indigo); }
.reloj { display: inline-flex; align-items: center; gap: 10px; padding: 8px 16px; border-radius: 999px; background: rgba(129,140,248,0.12); border: 1px solid var(--tarjeta-borde); font-family: var(--titulos); font-weight: 600; font-size: 1.35rem; font-variant-numeric: tabular-nums; }
.punto-vivo { width: 10px; height: 10px; border-radius: 50%; background: var(--rojo); box-shadow: 0 0 0 0 rgba(248,113,113,0.7); animation: late 1.6s infinite; }
.reloj.detenido .punto-vivo { background: var(--verde); animation: none; }
@keyframes late { 70% { box-shadow: 0 0 0 12px rgba(248,113,113,0); } 100% { box-shadow: 0 0 0 0 rgba(248,113,113,0); } }

main { padding: 0 clamp(16px, 4vw, 56px) 48px; max-width: 1480px; margin: 0 auto; }

.vista { display: grid; gap: clamp(24px, 4vw, 64px); align-items: start; animation: entra 0.5s ease both; }
@keyframes entra { from { opacity: 0; transform: translateY(12px); } }
@media (min-width: 980px) {
  #vista-captura { grid-template-columns: 1fr minmax(440px, 560px); align-items: center; min-height: calc(100dvh - 140px); }
  #vista-vivo { grid-template-columns: minmax(340px, 0.9fr) 1.1fr; }
}

/* Portada */
.sobretitulo { margin: 0 0 12px; color: var(--indigo); font-family: var(--titulos); font-weight: 600; font-size: 0.85rem; letter-spacing: 0.14em; text-transform: uppercase; }
h1, h2, h3 { font-family: var(--titulos); letter-spacing: -0.02em; margin: 0; }
h1 { font-size: clamp(2.3rem, 4.6vw, 4.6rem); line-height: 1.04; font-weight: 700; }
h1 em { font-style: normal; background: linear-gradient(90deg, var(--indigo-claro), var(--indigo) 60%, #a78bfa); -webkit-background-clip: text; background-clip: text; color: transparent; }
.bajada { color: var(--texto-2); font-size: clamp(1.05rem, 1.1vw, 1.3rem); max-width: 36ch; margin: 24px 0 32px; }
.pasos-mini { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 10px 22px; color: var(--texto-2); font-weight: 500; }
.pasos-mini li { display: inline-flex; align-items: center; gap: 10px; }
.pasos-mini span { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: rgba(129,140,248,0.16); color: var(--indigo-claro); font-family: var(--titulos); font-weight: 600; font-size: 0.9rem; }

/* Tarjetas */
.tarjeta { background: var(--tarjeta); border-radius: var(--radio); box-shadow: var(--sombra); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); padding: clamp(20px, 2.4vw, 36px); }

/* Formulario */
.formulario { display: grid; gap: 18px; }
.campo { display: grid; gap: 8px; border: 0; padding: 0; margin: 0; min-width: 0; }
label, legend { font-weight: 600; font-size: 0.95rem; color: var(--texto); padding: 0; }
label small, legend small { color: var(--texto-3); font-weight: 400; margin-left: 6px; }
.fila-2 { display: grid; gap: 18px; }
@media (min-width: 560px) { .fila-2 { grid-template-columns: 1fr 1fr; } }
input, textarea {
  width: 100%; font: inherit; font-size: 1.05rem; color: var(--texto); background: rgba(10, 8, 24, 0.55);
  border: 1px solid rgba(165,180,252,0.22); border-radius: 12px; padding: 14px 16px; outline: none; transition: border-color .2s, box-shadow .2s;
}
textarea { resize: vertical; min-height: 84px; }
input::placeholder, textarea::placeholder { color: #6b6894; }
input:focus, textarea:focus { border-color: var(--indigo); box-shadow: 0 0 0 4px rgba(129,140,248,0.22); }
input[aria-invalid="true"] { border-color: var(--rojo); }
.nota { margin: 0; color: var(--texto-3); font-size: 0.85rem; }
.destino { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 16px; }
.enlace-discreto { font: inherit; font-size: 0.78rem; color: var(--texto-3); opacity: 0.7; background: none; border: 0; padding: 4px 0; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.enlace-discreto:hover, .enlace-discreto:focus-visible { opacity: 1; color: var(--texto-2); }

.opciones { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.opcion { position: relative; cursor: pointer; }
.opcion input { position: absolute; opacity: 0; pointer-events: none; }
.opcion span { display: grid; gap: 2px; height: 100%; padding: 14px 16px; border-radius: 14px; border: 1px solid rgba(165,180,252,0.22); background: rgba(10,8,24,0.4); transition: all .2s; }
.opcion b { font-family: var(--titulos); font-weight: 600; font-size: 1.02rem; }
.opcion i { font-style: normal; color: var(--texto-3); font-size: 0.85rem; font-weight: 400; }
.opcion input:checked + span { border-color: var(--indigo); background: linear-gradient(160deg, rgba(99,102,241,0.32), rgba(55,48,163,0.25)); box-shadow: 0 0 0 1px var(--indigo) inset; }
.opcion input:checked + span i { color: var(--indigo-claro); }
.opcion input:focus-visible + span { box-shadow: 0 0 0 4px rgba(129,140,248,0.35); }

.error { margin: 0; padding: 12px 14px; border-radius: 12px; background: rgba(248,113,113,0.12); border: 1px solid rgba(248,113,113,0.4); color: #fecaca; font-weight: 500; }

/* Botones */
.boton { display: inline-flex; align-items: center; justify-content: center; gap: 10px; font: inherit; font-family: var(--titulos); font-weight: 600; font-size: 1.1rem; border-radius: 14px; padding: 15px 24px; border: 0; cursor: pointer; transition: transform .15s, box-shadow .2s, background .2s, opacity .2s; min-height: 54px; }
.boton svg { width: 22px; height: 22px; flex: none; }
.boton:active { transform: translateY(1px) scale(0.99); }
.boton:disabled { opacity: 0.55; cursor: progress; }
.principal { color: #fff; background: linear-gradient(135deg, var(--indigo) 0%, var(--indigo-fuerte) 55%, var(--indigo-oscuro) 100%); box-shadow: 0 14px 40px -12px rgba(99,102,241,0.8); }
.principal:hover:not(:disabled) { box-shadow: 0 18px 50px -10px rgba(99,102,241,0.95); }
.secundario { color: var(--indigo-claro); background: rgba(129,140,248,0.12); box-shadow: 0 0 0 1px var(--tarjeta-borde) inset; }
.secundario:hover { background: rgba(129,140,248,0.2); }
.peligro { color: #fff; background: #dc2626; }
#boton-crear { width: 100%; margin-top: 4px; font-size: 1.2rem; min-height: 60px; }

/* Avance */
#vista-vivo h2 { font-size: clamp(2rem, 3.4vw, 3.4rem); line-height: 1.08; margin-bottom: 28px; }
.avance { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.avance > li { display: grid; grid-template-columns: 44px 1fr; gap: 16px; padding: 14px 0; position: relative; color: var(--texto-3); transition: color .3s; }
.avance > li:not(:last-child)::after { content: ''; position: absolute; left: 21px; top: 58px; bottom: -10px; width: 2px; background: rgba(129,140,248,0.18); }
.avance > li.hecho:not(:last-child)::after { background: linear-gradient(var(--verde), rgba(74,222,128,0.3)); }
.avance b { font-family: var(--titulos); font-weight: 600; font-size: clamp(1.15rem, 1.4vw, 1.5rem); display: block; padding-top: 7px; }
.icono { width: 44px; height: 44px; border-radius: 50%; border: 2px solid rgba(129,140,248,0.3); display: grid; place-items: center; background: var(--fondo-2); position: relative; }
.avance > li.activo { color: var(--texto); }
.avance > li.activo .icono { border-color: var(--indigo); }
.avance > li.activo .icono::before { content: ''; width: 44px; height: 44px; border-radius: 50%; border: 3px solid transparent; border-top-color: var(--indigo-claro); position: absolute; inset: -2px; animation: gira 0.9s linear infinite; }
.avance > li.activo .icono::after { content: ''; width: 12px; height: 12px; border-radius: 50%; background: var(--indigo); animation: respira 1.4s ease-in-out infinite; }
.avance > li.hecho { color: var(--texto); }
.avance > li.hecho .icono { border-color: var(--verde); background: rgba(74,222,128,0.14); }
.avance > li.hecho .icono::after { content: ''; width: 16px; height: 9px; border-left: 3px solid var(--verde); border-bottom: 3px solid var(--verde); transform: rotate(-45deg) translate(1px, -2px); }
.avance > li.fallo .icono { border-color: var(--ambar); background: rgba(252,211,77,0.12); }
.avance > li.fallo .icono::after { content: '!'; color: var(--ambar); font-weight: 700; font-family: var(--titulos); }
@keyframes gira { to { transform: rotate(360deg); } }
@keyframes respira { 50% { transform: scale(0.6); opacity: 0.6; } }
.detalles { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 4px; color: var(--texto-2); font-size: 0.98rem; }
.detalles li { animation: entra .35s ease both; padding-left: 18px; position: relative; }
.detalles li::before { content: ''; position: absolute; left: 2px; top: 0.7em; width: 6px; height: 6px; border-radius: 50%; background: var(--indigo); }
.detalles li.aviso::before { background: var(--ambar); }
.detalles li.tiempo { color: var(--texto-3); font-size: 0.88rem; }
.detalles li.tiempo::before { display: none; }
.acciones-vivo { margin-top: 28px; display: flex; flex-wrap: wrap; gap: 12px; }

.columna-resultado { display: grid; gap: 22px; }

/* Panel de llamada */
.llamada { display: grid; grid-template-columns: auto 1fr; gap: 22px 26px; align-items: center; animation: entra .45s ease both; }
.orbe { position: relative; width: clamp(88px, 8vw, 120px); aspect-ratio: 1; display: grid; place-items: center; color: #fff; --nivel: 0; }
.orbe svg { width: 40%; height: 40%; position: relative; z-index: 2; }
.orbe span { position: absolute; inset: 0; border-radius: 50%; background: radial-gradient(circle at 35% 30%, var(--indigo), var(--indigo-oscuro)); }
.orbe span:nth-child(2), .orbe span:nth-child(3) { background: transparent; border: 2px solid var(--indigo); opacity: 0; }
.orbe.sonando span:nth-child(2) { animation: onda 1.6s ease-out infinite; }
.orbe.sonando span:nth-child(3) { animation: onda 1.6s ease-out .8s infinite; }
.orbe.sonando svg { animation: timbre 1.2s ease-in-out infinite; }
.orbe.hablando span:first-child { transform: scale(calc(1 + var(--nivel) * 0.18)); transition: transform .08s linear; box-shadow: 0 0 calc(20px + var(--nivel) * 60px) rgba(129,140,248,0.75); }
.orbe.hablando span:nth-child(2) { opacity: 0.6; animation: onda 2.2s ease-out infinite; }
.orbe.terminada span:first-child { background: radial-gradient(circle at 35% 30%, #4ade80, #15803d); }
.orbe.fallo span:first-child { background: radial-gradient(circle at 35% 30%, #fcd34d, #b45309); }
@keyframes onda { from { transform: scale(1); opacity: 0.8; } to { transform: scale(1.9); opacity: 0; } }
@keyframes timbre { 0%, 50%, 100% { transform: rotate(0); } 10%, 30% { transform: rotate(-14deg); } 20%, 40% { transform: rotate(14deg); } }
.llamada-estado { margin: 0; font-family: var(--titulos); font-weight: 700; font-size: clamp(1.5rem, 2.3vw, 2.4rem); line-height: 1.1; }
.llamada-sub { margin: 6px 0 0; color: var(--texto-2); }
.llamada-botones { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 12px; }
.llamada-botones .boton { flex: 1 1 220px; }
#boton-web { font-size: 1.25rem; min-height: 62px; }

.transcripcion { grid-column: 1 / -1; display: grid; gap: 10px; max-height: 340px; overflow-y: auto; padding: 4px 4px 4px 0; scroll-behavior: smooth; }
.burbuja { max-width: 86%; padding: 10px 14px; border-radius: 16px; font-size: 1.02rem; line-height: 1.4; animation: entra .25s ease both; }
.burbuja.agente { background: rgba(99,102,241,0.22); border: 1px solid rgba(129,140,248,0.3); border-bottom-left-radius: 4px; }
.burbuja.persona { justify-self: end; background: rgba(245,245,255,0.1); border: 1px solid rgba(245,245,255,0.14); border-bottom-right-radius: 4px; }
.burbuja.parcial { opacity: 0.65; }
.burbuja small { display: block; color: var(--texto-3); font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 2px; }

/* Marcador mientras se investiga */
.espera { display: grid; gap: 12px; }
.hueso { height: 14px; border-radius: 8px; background: linear-gradient(90deg, rgba(129,140,248,0.08), rgba(129,140,248,0.22), rgba(129,140,248,0.08)); background-size: 200% 100%; animation: brillo 1.6s linear infinite; }
.hueso.h-titulo { height: 30px; width: 55%; margin-bottom: 6px; }
.hueso.corto { width: 60%; }
.huesos-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 8px; }
.hueso.bloque { height: 90px; border-radius: 14px; }
.espera-texto { margin: 6px 0 0; color: var(--texto-3); }
@keyframes brillo { to { background-position: -200% 0; } }

/* Ficha */
.ficha { animation: entra .5s ease both; }
.ficha h3 { font-size: clamp(1.5rem, 2.2vw, 2.2rem); }
.aviso-plan-b { margin: 10px 0 0; padding: 8px 12px; border-radius: 10px; background: rgba(252,211,77,0.1); border: 1px solid rgba(252,211,77,0.35); color: #fde68a; font-size: 0.92rem; }
.ficha-resumen { color: var(--texto-2); margin: 12px 0 18px; font-size: 1.05rem; }
.ficha-datos { display: grid; gap: 14px; margin: 0 0 18px; }
@media (min-width: 640px) { .ficha-datos { grid-template-columns: 1fr 1fr; } }
.ficha-datos div { background: rgba(10,8,24,0.45); border: 1px solid rgba(165,180,252,0.12); border-radius: 14px; padding: 12px 14px; min-width: 0; }
.ficha-datos dt { color: var(--indigo); font-weight: 600; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 4px; }
.ficha-datos dd { margin: 0; font-size: 0.98rem; overflow-wrap: anywhere; }
.ficha-datos dd ul { margin: 0; padding-left: 18px; }
.ficha-datos .ancho { grid-column: 1 / -1; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { padding: 4px 10px; border-radius: 999px; background: rgba(129,140,248,0.16); color: var(--indigo-claro); font-size: 0.88rem; }
.ficha-faq h4, .ficha-falta h4 { margin: 0 0 8px; font-family: var(--titulos); font-weight: 600; font-size: 1rem; color: var(--texto-2); }
.ficha-faq details { border-top: 1px solid rgba(165,180,252,0.12); padding: 10px 0; }
.ficha-faq summary { cursor: pointer; font-weight: 500; }
.ficha-faq details p { margin: 6px 0 0; color: var(--texto-2); }
.ficha-falta { margin-top: 14px; }
.ficha-falta .chip { background: rgba(252,211,77,0.1); color: #fde68a; }
.ficha-falta p { margin: 8px 0 0; color: var(--texto-3); font-size: 0.88rem; }

/* Diálogo de clave */
dialog { border: 0; border-radius: var(--radio); background: var(--fondo-2); color: var(--texto); box-shadow: var(--sombra); padding: 28px; width: min(420px, calc(100vw - 32px)); }
dialog::backdrop { background: rgba(5, 4, 14, 0.8); backdrop-filter: blur(4px); }
dialog form { display: grid; gap: 14px; }
dialog p { margin: 0; color: var(--texto-2); }

@media (max-width: 560px) {
  .opciones { grid-template-columns: 1fr; }
  .llamada { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .llamada-botones { width: 100%; }
  .burbuja { max-width: 92%; text-align: left; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition: none !important; }
}
