/* Familia con Futuro · índigo sobre neutros fríos, acentos lavanda suaves. Banca digital, optimista. */
:root {
  --marca: #4338CA;
  --marca-osc: #3730A3;
  --marca-suave: #EEF0FF;
  --lavanda: #E4E7FF;
  --fondo: #F5F6FA;
  --borde: #DFE3EE;
  --tinta: #12142B;
  --tinta-2: #474B66;
  --tinta-3: #6A6F8A;
  --radio: 16px;
  --sombra: 0 1px 2px rgba(18, 20, 43, .05), 0 10px 28px rgba(67, 56, 202, .07);
  --fuente-titulo: "Sora", "Segoe UI", system-ui, sans-serif;
  --fuente: "Inter", "Segoe UI", system-ui, sans-serif;
}
body {
  background:
    radial-gradient(900px 340px at 85% -80px, #E6E8FF 0%, transparent 70%),
    radial-gradient(700px 300px at -10% 10%, #EEF0FF 0%, transparent 70%),
    var(--fondo);
  background-attachment: fixed;
}
.paso-titulo { font-weight: 700; letter-spacing: -.025em; }
.logo { font-weight: 700; letter-spacing: -.02em; }

/* Banda del programa (fija con el encabezado) */
.programa { background: linear-gradient(90deg, var(--marca-osc), var(--marca)); color: #fff; }
.programa .contenedor { min-height: 0; padding-block: 9px 10px; display: flex; flex-direction: column; align-items: flex-start; gap: 1px; }
.programa-titulo { font-family: var(--fuente-titulo); font-weight: 600; font-size: .9rem; letter-spacing: -.005em; display: flex; align-items: center; gap: 8px; }
.programa-sub { font-size: .74rem; color: #D6D9FF; }
body[data-paso-actual="salida"] .programa { display: none; }

.etiqueta { display: inline-block; font-size: .76rem; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; color: var(--marca); background: var(--lavanda); border-radius: 999px; padding: 5px 12px; margin-bottom: 12px; }

/* Opciones con acento lavanda */
.opcion { border-radius: 14px; }
.opcion:hover { background: #FAFAFF; }
.opcion[aria-pressed="true"] { background: var(--marca-suave); }
.boton { border-radius: 14px; font-weight: 700; }
.select { border-radius: 14px; border-color: #C5CADB; }
.campo-tarjeta { margin-top: 20px; }

/* Tarjeta del plan con curva */
.plan-card { margin-top: 26px; background: var(--superficie); border: 1px solid var(--borde); border-radius: var(--radio); box-shadow: var(--sombra); overflow: hidden; }
.plan-ilus { height: 104px; background: linear-gradient(180deg, #F7F7FF, #fff); border-bottom: 1px solid #ECEEF7; }
.plan-ilus svg { width: 100%; height: 100%; }
.plan-linea { stroke-dasharray: 420; stroke-dashoffset: 420; animation: traza 1.6s cubic-bezier(.4,0,.2,1) .3s forwards; }
.plan-area { opacity: 0; animation: aparece .8s ease 1.2s forwards; }
.plan-punto { opacity: 0; transform-origin: 314px 16px; animation: punto .5s cubic-bezier(.2,1.4,.4,1) 1.7s forwards; }
@keyframes traza { to { stroke-dashoffset: 0; } }
@keyframes aparece { to { opacity: 1; } }
@keyframes punto { from { opacity: 0; transform: scale(.2); } to { opacity: 1; transform: none; } }
.plan-texto { padding: 18px 20px 20px; }
.plan-texto h3 { font-size: 1.05rem; font-weight: 700; letter-spacing: -.015em; }
.plan-lista { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.plan-lista li { display: flex; gap: 10px; align-items: flex-start; color: var(--tinta-2); font-size: .94rem; }
.plan-lista li::before { content: ""; flex: 0 0 18px; height: 18px; margin-top: 2px; border-radius: 6px; background: var(--lavanda) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='8' viewBox='0 0 10 8'%3E%3Cpath d='M1 4l2.6 2.6L9 1.2' stroke='%234338CA' stroke-width='1.8' fill='none' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat center; }
.confianza svg { color: var(--marca); }

/* Buscando especialistas */
.buscando { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 14px; padding-block: 30px 10px; }
.radar { position: relative; width: 92px; height: 92px; display: grid; place-items: center; margin-bottom: 4px; }
.radar span { position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--marca); opacity: 0; animation: onda 2.4s cubic-bezier(.2,.6,.3,1) infinite; }
.radar span:nth-child(2) { animation-delay: .8s; }
.radar span:nth-child(3) { animation-delay: 1.6s; }
.radar i { width: 44px; height: 44px; border-radius: 50%; background: linear-gradient(145deg, #5B50E0, var(--marca-osc)); box-shadow: 0 8px 20px rgba(67, 56, 202, .35); }
.radar i::after { content: ""; display: block; width: 100%; height: 100%; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24'%3E%3Cpath d='m20 20-4.2-4.2M17 10.5a6.5 6.5 0 1 1-13 0 6.5 6.5 0 0 1 13 0Z' stroke='white' stroke-width='2.4' fill='none' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat center; }
@keyframes onda { 0% { transform: scale(.45); opacity: .55; } 100% { transform: scale(1.25); opacity: 0; } }
.buscando .paso-titulo { font-size: clamp(1.35rem, 5.4vw, 1.7rem); max-width: 420px; }
.contador-revision { font-weight: 600; color: var(--marca); background: var(--lavanda); border-radius: 999px; padding: 6px 14px; font-size: .9rem; font-variant-numeric: tabular-nums; }
.perfiles { list-style: none; padding: 0; margin: 8px 0 0; width: 100%; display: flex; flex-direction: column; gap: 10px; text-align: left; }
.perfiles li { display: flex; align-items: center; gap: 12px; background: var(--superficie); border: 1px solid var(--borde); border-radius: 14px; padding: 12px 14px; opacity: .55; transition: opacity .3s, border-color .3s, box-shadow .3s; }
.perfiles li.activo { opacity: 1; border-color: #C9CCF8; box-shadow: var(--sombra); }
.perfiles li.ok { opacity: 1; }
.perfil-av { flex: 0 0 38px; height: 38px; border-radius: 50%; background: var(--lavanda) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24'%3E%3Cpath fill='%234338CA' d='M12 12a4.5 4.5 0 1 0 0-9 4.5 4.5 0 0 0 0 9Zm0 2c-4.4 0-8 2.2-8 5v2h16v-2c0-2.8-3.6-5-8-5Z'/%3E%3C/svg%3E") no-repeat center; }
.perfil-lineas { flex: 1; display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.perfil-lineas b { font-size: .95rem; }
.perfil-lineas small { font-size: .82rem; color: var(--tinta-3); }
.perfil-ok { flex: 0 0 24px; height: 24px; border-radius: 50%; border: 2px solid var(--borde); transition: all .3s; }
.perfiles li.activo .perfil-ok { border-color: var(--lavanda); border-top-color: var(--marca); animation: gira .8s linear infinite; }
.perfiles li.ok .perfil-ok { border-color: var(--llamar); background: var(--llamar) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='10' viewBox='0 0 12 10'%3E%3Cpath d='M1 5l3.5 3.5L11 1.5' stroke='white' stroke-width='2' fill='none'/%3E%3C/svg%3E") no-repeat center; animation: none; }
.perfiles li.ok small { color: var(--llamar); font-weight: 600; }

/* Llamar */
.exito { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; padding-top: 6px; }
.exito-icono { width: 60px; height: 60px; border-radius: 50%; background: var(--llamar); color: #fff; display: grid; place-items: center; box-shadow: 0 0 0 8px color-mix(in srgb, var(--llamar) 14%, transparent); animation: pop .5s cubic-bezier(.2,1.4,.4,1); }
@keyframes pop { from { transform: scale(.4); opacity: 0; } to { transform: none; opacity: 1; } }
.llamada { display: flex; flex-direction: column; gap: 14px; border-color: #D5D8F5; }
.esp-cab { display: flex; gap: 12px; align-items: center; }
.esp-cab > div { display: flex; flex-direction: column; gap: 2px; }
.esp-avatar { width: 48px; height: 48px; border-radius: 50%; background: var(--lavanda); color: var(--marca); display: grid; place-items: center; flex: 0 0 48px; }
.mini-titulo { font-size: 1.02rem; font-weight: 700; margin-bottom: 14px; }
.pasos-llamada li::before { background: var(--lavanda); }
.no-gobierno { text-align: center; font-size: .86rem; font-weight: 600; color: var(--tinta-2); background: var(--superficie); border: 1px dashed #C9CDE0; border-radius: 12px; padding: 12px 14px; }

.salida-icono { background: var(--lavanda); }
.pie { background: #FBFBFE; }

@media (min-width: 640px) {
  main { padding-top: 34px; }
}
.llamada .boton-llamar { font-size: 1.1rem; text-align: left; }
@media (max-width: 400px) { .programa-titulo { font-size: .84rem; } }

/* Avatar con foto de la asesora */
.esp-avatar.con-foto { position: relative; width: 60px; height: 60px; flex: 0 0 60px; padding: 0; background: var(--marca-suave); box-shadow: 0 0 0 3px #fff, 0 0 0 5px color-mix(in srgb, var(--marca) 22%, transparent); }
.esp-avatar.con-foto img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; display: block; }
.esp-en-linea { position: absolute; right: 1px; bottom: 1px; width: 14px; height: 14px; border-radius: 50%; background: var(--llamar); border: 2.5px solid #fff; }

/* ---------- Formulario como tarjeta destacada ---------- */
body { background: linear-gradient(180deg, #ECEEFB 0%, #F3F4FB 260px, #F5F6FB 100%); }
.formulario { background: #fff; border: 1px solid #D9DDF4; border-radius: 22px; box-shadow: 0 1px 2px rgba(16,24,40,.04), 0 14px 36px rgba(67,56,202,.13); overflow: hidden; }
.formulario:not(:has(.form-cuerpo > .paso:not([hidden]))) { display: none; }
.form-cab { background: linear-gradient(120deg, #5B4BEA, #3A2DBE); color: #fff; padding: 14px 20px 16px; display: flex; flex-direction: column; gap: 10px; }
.form-cab-fila { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.form-cab-titulo { display: inline-flex; align-items: center; gap: 8px; font-family: var(--fuente-titulo); font-weight: 700; font-size: .95rem; letter-spacing: -.005em; }
.form-cab-titulo svg { width: 18px; height: 18px; color: #A7F3D0; }
.form-cab-paso { font-size: .78rem; font-weight: 600; color: rgba(255,255,255,.82); white-space: nowrap; }
.form-cab .barra { background: rgba(255,255,255,.22); height: 6px; }
.form-cab .barra::after { background: #fff; }
.form-cuerpo { padding: 22px 20px 24px; }
.form-cuerpo .opcion { background: #FAFAFF; }
.form-cuerpo .opcion:hover, .form-cuerpo .opcion[aria-pressed="true"] { background: var(--marca-suave); }
.form-cuerpo .campo-tarjeta { box-shadow: none; border: 0; padding: 0; background: transparent; }
.extra-retiro { margin-top: 22px; display: flex; flex-direction: column; gap: 16px; }
body:not([data-paso-actual="retiro"]) .extra-retiro { display: none; }
@media (max-width: 400px) { .form-cuerpo { padding: 20px 16px 22px; } .form-cab { padding: 13px 16px 15px; } }

/* Cabecera del formulario en blanco (el cintillo ya es morado) */
.form-cab { background: #fff; color: var(--tinta); border-bottom: 1px solid #ECEEF7; }
.form-cab-titulo svg { color: var(--llamar); }
.form-cab-paso { color: var(--tinta-3); }
.form-cab .barra { background: #E8EAF6; }
.form-cab .barra::after { background: var(--marca); }

/* Bloque inferior: título + foto real + una frase, sin tarjeta */
.extra-retiro { margin-top: 34px; gap: 14px; }
.extra-titulo { font-family: var(--fuente-titulo); font-weight: 800; font-size: clamp(1.35rem, 5.4vw, 1.6rem); line-height: 1.15; letter-spacing: -.02em; }
.extra-foto { width: 100%; height: auto; aspect-ratio: 1200 / 865; object-fit: cover; border-radius: 18px; display: block; }
.extra-texto { color: var(--tinta-2); font-size: 1rem; line-height: 1.55; }
.garantias-nota { display: none; } /* ya lo dice la tarjeta del formulario */

/* Bloque inferior sin foto: título y frase centrados, juntos */
.extra-retiro { text-align: center; align-items: center; gap: 8px; }
.extra-titulo { text-wrap: balance; }
.extra-texto { max-width: 34ch; }

/* Preguntas sin explicaciones */
.form-cuerpo .paso-sub { display: none; }

/* Pantalla de llamar: un solo latido (el del avatar), temporizador y "Así es la llamada" sin tarjeta */
.llamada .en-linea::before { display: none; }
.espera { display: flex; align-items: center; justify-content: space-between; gap: 10px; background: #FFF4F2; border: 1px solid #FBD5CF; border-radius: 12px; padding: 10px 14px; }
.espera-txt { font-size: .88rem; font-weight: 600; color: #8A2A1C; }
.espera-reloj { font-family: var(--fuente-titulo); font-weight: 800; font-size: 1.35rem; color: var(--alerta); font-variant-numeric: tabular-nums; letter-spacing: .02em; white-space: nowrap; }
.espera-reloj.vencido { font-size: .9rem; color: var(--llamar); }
.asi-llamada { padding: 4px 4px 0; }

/* Cintillo en una línea (iPhone 16: 393 px) con la bandera al lado */
.programa-titulo { gap: 6px; font-size: clamp(.7rem, 3.15vw, .9rem); letter-spacing: -.01em; white-space: nowrap; }
.programa-titulo > span { overflow: hidden; text-overflow: ellipsis; }
.bandera { width: auto; height: 1.15em; flex: 0 0 auto; }
@media (max-width: 400px) { .programa-titulo { font-size: clamp(.7rem, 3.15vw, .9rem); } }

/* Preguntas: sin botón "Atrás" (el atrás del celular sigue funcionando) y el título usa todo el ancho de la tarjeta */
.form-cuerpo .atras { display: none; }
.form-cuerpo .paso-titulo { text-wrap: wrap; max-width: none; }

/* Párrafo de abajo a todo el ancho y justificado (contrasta con la tarjeta centrada) */
.extra-retiro { align-items: stretch; }
.extra-texto { max-width: none; text-align: justify; text-align-last: center; hyphens: auto; -webkit-hyphens: auto; }
