/* ============================================================================
   COTIZADOR MUFAH SOLUTIONS
   Mismos tokens que sitio/css/styles.css para que el cotizador se sienta parte
   del sitio y no una página prestada. Archivo variable, navy + azul, rombos.
   ============================================================================ */

/* ---------- Tipografía autoalojada (mismos archivos que el sitio) ---------- */
@font-face {
  font-family: 'Archivo';
  font-style: normal;
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
  src: url('../fuentes/Archivo-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Archivo';
  font-style: normal;
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
  src: url('../fuentes/Archivo-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --navy:        #081A31;
  --navy-deep:   #04101F;
  --navy-mid:    #0C2340;
  --navy-card:   #0A1E3A;
  --blue:        #2E6FD8;
  --blue-hover:  #4A83E0;
  --blue-light:  #5B8FE3;
  --light:       #F2F3F5;
  --white:       #FFFFFF;
  --gray:        #6B7686;
  --gray-soft:   #97A1B0;
  --err:         #E08A8A;
  --ok:          #6FCF97;
  --warn:        #E8C07D;

  --maxw: 760px;
  --font: 'Archivo', Helvetica, Arial, sans-serif;
  --curva: cubic-bezier(0.16, 1, 0.3, 1);
}

* { box-sizing: border-box; }

html, body {
  margin: 0; padding: 0;
  min-height: 100%;
  background: var(--navy);
  font-family: var(--font);
  color: var(--light);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
/* El `display` de una clase le gana a la regla [hidden] del navegador, así que
   un `.btn--bloque` con atributo hidden se seguiría viendo. Esto lo zanja. */
[hidden] { display: none !important; }

h1, h2, h3, p, ul, figure { margin: 0; }
ul { padding: 0; list-style: none; }
img, svg { max-width: 100%; }
a { color: var(--blue); text-decoration: none; transition: color 200ms ease; }
a:hover { color: var(--blue-light); }
::selection { background: var(--blue); color: var(--white); }

a:focus-visible, button:focus-visible, input:focus-visible,
textarea:focus-visible, select:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
}

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
/* La trampa para bots no se oculta con display:none — algunos bots lo detectan. */
.trampa {
  position: absolute; left: -9999px; top: auto;
  width: 1px; height: 1px; overflow: hidden;
}

@keyframes aparecer   { from { opacity: 0; } to { opacity: 1; } }
@keyframes subir      { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: translateY(0); } }
@keyframes romboEntra { from { opacity: 0; transform: rotate(45deg) scale(0); } to { opacity: 1; transform: rotate(45deg) scale(1); } }
@keyframes barrer     { from { transform: translateY(-160px); } to { transform: translateY(110vh); } }
@keyframes girar      { to   { transform: rotate(360deg); } }
@keyframes latir      { 0%,100% { transform: rotate(45deg) scale(1); opacity: .9; } 50% { transform: rotate(45deg) scale(1.3); opacity: 1; } }
@keyframes puntear    { 0%,80%,100% { opacity: .25; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-4px); } }
@keyframes trazarAro  { from { stroke-dashoffset: 208; } to { stroke-dashoffset: 0; } }
@keyframes trazarTick { from { stroke-dashoffset: 52; }  to { stroke-dashoffset: 0; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ============================================================
   FONDO
   ============================================================ */
.fondo {
  position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden;
  background: radial-gradient(ellipse 130% 100% at 50% 20%, #0C2340 0%, #081A31 55%, #04101F 100%);
}
.fondo__reticula {
  position: absolute; inset: 0;
  display: grid; grid-template-columns: repeat(4, 1fr);
}
.fondo__reticula > div { border-right: 1px solid rgba(255,255,255,0.05); }
.fondo__reticula > div:last-child { border-right: none; }
.fondo__resplandor {
  position: absolute; top: 30%; left: 50%;
  width: 1000px; height: 1000px; margin: -500px 0 0 -500px;
  background: radial-gradient(circle, rgba(46,111,216,0.26) 0%, rgba(46,111,216,0.08) 38%, rgba(46,111,216,0) 68%);
}
.fondo__barrido {
  position: absolute; left: 0; right: 0; top: 0; height: 140px;
  background: linear-gradient(180deg, rgba(46,111,216,0) 0%, rgba(46,111,216,0.05) 40%, rgba(46,111,216,0.12) 50%, rgba(46,111,216,0) 100%);
  animation: barrer 9s linear infinite;
}

/* ============================================================
   CABECERA
   ============================================================ */
.cabecera {
  position: relative; z-index: 10;
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding: 22px 24px;
  max-width: 1240px; margin: 0 auto;
}
.marca { display: inline-flex; align-items: center; gap: 9px; }
.marca__nombre {
  font-weight: 800; font-size: 19px; letter-spacing: 0.03em; color: var(--white);
}
.rombo {
  display: inline-block; width: 9px; height: 9px;
  background: var(--blue); border-radius: 1.5px; transform: rotate(45deg);
}
.cabecera__volver {
  font-size: 12px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase;
  color: rgba(255,255,255,0.5);
}
.cabecera__volver:hover { color: var(--white); }

/* ============================================================
   ESCENAS
   ============================================================ */
#escena {
  position: relative; z-index: 5;
  max-width: var(--maxw); margin: 0 auto;
  padding: 8px 24px 80px;
}
.escena { display: none; }
.escena--activa { display: block; animation: subir 0.55s var(--curva) both; }
.escena--centrada {
  min-height: 62vh;
  flex-direction: column; align-items: center; justify-content: center; text-align: center;
}
.escena--centrada.escena--activa { display: flex; }

.antetitulo {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 11.5px; font-weight: 600; letter-spacing: 0.24em; text-transform: uppercase;
  color: var(--blue); margin-bottom: 18px;
}
.antetitulo--claro { color: var(--gray-soft); }
.antetitulo .punto {
  width: 7px; height: 7px; background: var(--blue); border-radius: 50%; flex: 0 0 auto;
}

.titulo {
  font-size: clamp(34px, 7vw, 56px); font-weight: 800; line-height: 1.04;
  letter-spacing: -0.015em; color: var(--white); margin-bottom: 20px;
}
.titulo em { font-style: normal; color: var(--blue-light); }

/* ============================================================
   ENTRADA
   La portada del cotizador es lo único que ve alguien que llega
   sin saber qué es esto, así que aquí no se cuenta que hay un
   bot: se enseña trabajando. A la izquierda el discurso, a la
   derecha la demostración. Solo esta escena es ancha; en cuanto
   arranca el chat todo vuelve a la columna de 760 px.
   ============================================================ */
#escena:has(#e-inicio.escena--activa) { max-width: 1160px; }

.entrada {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.04fr);
  gap: clamp(30px, 4.5vw, 62px); align-items: center;
  padding-top: clamp(10px, 3vw, 40px);
}
.entrada__discurso .titulo { font-size: clamp(34px, 4.4vw, 54px); text-wrap: balance; }
.entrada__texto {
  font-size: 16.5px; line-height: 1.66; color: rgba(242,243,245,0.72);
  max-width: 52ch; margin-bottom: 32px;
}
.entrada__sellos {
  display: flex; flex-wrap: wrap; gap: 10px 22px; margin-top: 26px;
}
.entrada__sellos li {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--gray-soft);
}
.entrada__sellos li::before {
  content: ''; width: 6px; height: 6px; background: var(--blue);
  border-radius: 1px; transform: rotate(45deg);
}

/* ---------- La demostración ---------- */
.demo { position: relative; border-radius: 24px; }
/* El marco va OPACO a propósito. Si fuera traslúcido —como el chat y el
   formulario, que no llevan luz detrás— el filo azul y su resplandor se
   transparentarían por encima de la conversación y se vería una mancha
   clara cruzando las burbujas. Opaco, la luz solo asoma por el borde. */
.demo__marco {
  position: relative; z-index: 1; border-radius: inherit; overflow: hidden;
  background: linear-gradient(165deg, #10284A 0%, #0A1E3A 62%, #081D38 100%);
  border: 1px solid rgba(255,255,255,0.1);
  box-shadow: 0 30px 70px rgba(0,0,0,0.42);
}
/* El filo de luz azul de la marca dándole la vuelta al marco */
@property --demo-giro { syntax: '<angle>'; initial-value: 0deg; inherits: false; }
@keyframes demoGira { to { --demo-giro: 360deg; } }
.demo__led {
  position: absolute; inset: -1.5px; border-radius: inherit; z-index: 0; pointer-events: none;
  background: conic-gradient(from var(--demo-giro),
    rgba(46,111,216,0) 0deg, rgba(46,111,216,0) 44deg,
    #2E6FD8 74deg, #BFD9FF 92deg, #2E6FD8 110deg,
    rgba(46,111,216,0) 142deg, rgba(46,111,216,0) 360deg);
  animation: demoGira 6s linear infinite;
}
.demo__led::after {
  content: ''; position: absolute; inset: 0; border-radius: inherit;
  background: inherit; filter: blur(14px); opacity: 0.7;
}

.demo__cabecera {
  display: flex; align-items: center; gap: 12px;
  padding: 16px 20px; border-bottom: 1px solid rgba(255,255,255,0.08);
  background: rgba(12,35,64,0.55);
}
.demo__avatar {
  width: 36px; height: 36px; flex: 0 0 auto; border-radius: 50%;
  background: rgba(46,111,216,0.16); border: 1px solid rgba(46,111,216,0.4);
  display: grid; place-items: center;
}
.demo__avatar .rombo { width: 11px; height: 11px; animation: latir 3.2s ease-in-out infinite; }
.demo__nombre { font-size: 14.5px; font-weight: 700; color: var(--white); }
.demo__estado {
  display: flex; align-items: center; gap: 6px; margin-top: 1px;
  font-size: 10.5px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--gray-soft);
}
.demo__vivo { width: 6px; height: 6px; border-radius: 50%; background: var(--ok); }

.demo__hilo { padding: 20px; display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
.demo__msj {
  max-width: 88%; padding: 13px 17px; font-size: 14.5px; line-height: 1.58;
  color: rgba(242,243,245,0.9); opacity: 0;
}
.demo__msj--tuyo {
  align-self: flex-end; background: rgba(46,111,216,0.18);
  border: 1px solid rgba(46,111,216,0.34); border-radius: 18px 4px 18px 18px;
  animation: demoEntra 0.5s var(--curva) 0.5s forwards;
}
.demo__msj--fah {
  background: rgba(255,255,255,0.055); border: 1px solid rgba(255,255,255,0.08);
  border-radius: 4px 18px 18px 18px;
  animation: demoEntra 0.5s var(--curva) 3.6s forwards;
}
/* Los puntitos hacen su trabajo y luego se van del renglón: la altura
   baja a cero para que la respuesta ocupe su lugar sin dar el brinco. */
.demo__escribiendo {
  display: inline-flex; gap: 5px; align-items: center; overflow: hidden;
  padding: 15px 17px; background: rgba(255,255,255,0.055);
  border: 1px solid rgba(255,255,255,0.08); border-radius: 4px 18px 18px 18px;
  opacity: 0; animation: demoEscribe 2.6s var(--curva) 1.3s forwards;
}
.demo__escribiendo i {
  width: 6px; height: 6px; border-radius: 50%; background: var(--gray-soft);
  animation: puntear 1.3s ease-in-out infinite;
}
.demo__escribiendo i:nth-child(2) { animation-delay: 0.16s; }
.demo__escribiendo i:nth-child(3) { animation-delay: 0.32s; }
.demo__salida {
  display: flex; align-items: center; gap: 13px; width: 100%;
  margin-top: 4px; padding: 15px 17px; border-radius: 14px;
  background: rgba(46,111,216,0.1); border: 1px solid rgba(46,111,216,0.32);
  opacity: 0; animation: demoEntra 0.55s var(--curva) 4.5s forwards;
}
.demo__rombo {
  width: 13px; height: 13px; flex: 0 0 auto; background: var(--blue);
  border-radius: 2px; transform: rotate(45deg);
  box-shadow: 0 0 18px rgba(46,111,216,0.75);
}
.demo__salida-eti { font-size: 13.5px; font-weight: 700; color: var(--white); }
.demo__salida-arch {
  margin-top: 2px; font-size: 11px; font-weight: 600;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--gray-soft);
}

@keyframes demoEntra { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes demoEscribe {
  0%   { opacity: 0; transform: translateY(8px); height: 44px; }
  10%  { opacity: 1; transform: none; height: 44px; }
  86%  { opacity: 1; height: 44px; margin-bottom: 0; }
  100% { opacity: 0; height: 0; padding-top: 0; padding-bottom: 0; border-width: 0; margin-top: -12px; }
}

/* Con "reducir movimiento" no hay teatro: la conversación ya está ahí */
@media (prefers-reduced-motion: reduce) {
  .demo__msj, .demo__salida { opacity: 1; animation: none; }
  .demo__escribiendo { display: none; }
  .demo__led { animation: none; background: linear-gradient(135deg, #BFD9FF 0%, #2E6FD8 42%, rgba(46,111,216,0.2) 100%); }
}
/* Donde no se pueda animar el ángulo, filo azul fijo */
@supports not (background: conic-gradient(from var(--demo-giro), red, blue)) {
  .demo__led { background: linear-gradient(135deg, #BFD9FF 0%, #2E6FD8 42%, rgba(46,111,216,0.15) 100%); }
}

/* ---------- Cómo funciona ---------- */
.pasos {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px; margin-top: clamp(44px, 6vw, 74px);
  padding-top: clamp(28px, 4vw, 40px); border-top: 1px solid rgba(255,255,255,0.09);
  counter-reset: paso;
}
.paso { display: flex; flex-direction: column; gap: 9px; }
.paso__num {
  font-size: 30px; font-weight: 800; line-height: 1; color: transparent;
  -webkit-text-stroke: 1.4px rgba(46,111,216,0.75); margin-bottom: 4px;
}
.paso__titulo {
  font-size: 13px; font-weight: 700; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--white);
}
.paso__texto { font-size: 14px; line-height: 1.62; color: rgba(242,243,245,0.6); }

/* ============================================================
   BOTONES
   ============================================================ */
.btn {
  display: inline-block; padding: 16px 34px; border: none; cursor: pointer;
  font-family: var(--font); font-size: 13px; font-weight: 700;
  letter-spacing: 0.14em; text-transform: uppercase; border-radius: 999px;
  transition: background 200ms ease, color 200ms ease, opacity 200ms ease, transform 120ms ease;
}
.btn:active { transform: translateY(1px); }
.btn--azul { background: var(--blue); color: var(--white); }
.btn--azul:hover { background: var(--blue-hover); color: var(--white); }
.btn--azul:disabled {
  background: rgba(46,111,216,0.28); color: rgba(255,255,255,0.45);
  cursor: not-allowed; transform: none;
}
.btn--fantasma {
  background: rgba(46,111,216,0.12); border: 1px solid rgba(46,111,216,0.5); color: var(--white);
}
.btn--fantasma:hover { background: rgba(46,111,216,0.28); border-color: var(--blue); color: var(--white); }
.btn--bloque { display: block; width: 100%; }

.enlace {
  display: block; width: 100%; margin-top: 14px;
  background: none; border: none; cursor: pointer; font-family: var(--font);
  font-size: 12.5px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--gray-soft); padding: 10px;
}
.enlace:hover { color: var(--white); }

/* ============================================================
   CHAT
   ============================================================ */
.chat {
  background: rgba(10,30,58,0.72); border: 1px solid rgba(255,255,255,0.09);
  border-radius: 22px; overflow: hidden;
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 24px 60px rgba(0,0,0,0.35);
}
.chat__cabecera {
  display: flex; align-items: center; gap: 13px;
  padding: 18px 22px; border-bottom: 1px solid rgba(255,255,255,0.08);
  background: rgba(12,35,64,0.5);
}
.chat__avatar {
  width: 40px; height: 40px; flex: 0 0 auto; border-radius: 50%;
  background: rgba(46,111,216,0.16); border: 1px solid rgba(46,111,216,0.4);
  display: grid; place-items: center;
}
.chat__avatar .rombo { width: 12px; height: 12px; animation: latir 3.2s ease-in-out infinite; }
.chat__nombre { font-size: 15px; font-weight: 700; color: var(--white); }
.chat__estado {
  display: flex; align-items: center; gap: 7px; margin-top: 2px;
  font-size: 11.5px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--gray-soft);
}
.chat__punto { width: 6px; height: 6px; border-radius: 50%; background: var(--ok); }

.chat__hilo {
  padding: 24px 22px 6px;
  display: flex; flex-direction: column; gap: 14px;
  min-height: 260px;
}
.burbuja {
  max-width: 92%; padding: 15px 19px;
  background: rgba(255,255,255,0.055); border: 1px solid rgba(255,255,255,0.07);
  border-radius: 4px 18px 18px 18px;
  font-size: 15.5px; line-height: 1.62; color: rgba(242,243,245,0.9);
  animation: subir 0.45s var(--curva) both;
}
.burbuja strong { color: var(--white); font-weight: 700; }
.burbuja--destacada {
  background: rgba(46,111,216,0.12); border-color: rgba(46,111,216,0.35);
}
.burbuja ul { margin: 10px 0 0; display: flex; flex-direction: column; gap: 9px; }
.burbuja li { display: flex; gap: 11px; align-items: flex-start; }
.burbuja li::before {
  content: ''; flex: 0 0 auto; width: 6px; height: 6px; margin-top: 8px;
  background: var(--blue); border-radius: 1px; transform: rotate(45deg);
}

.escribiendo {
  display: inline-flex; gap: 5px; padding: 17px 19px; width: fit-content;
  background: rgba(255,255,255,0.055); border: 1px solid rgba(255,255,255,0.07);
  border-radius: 4px 18px 18px 18px;
}
.escribiendo span {
  width: 7px; height: 7px; border-radius: 50%; background: var(--gray-soft);
  animation: puntear 1.3s ease-in-out infinite;
}
.escribiendo span:nth-child(2) { animation-delay: 0.16s; }
.escribiendo span:nth-child(3) { animation-delay: 0.32s; }

.chat__pie { padding: 12px 22px 22px; }

/* ============================================================
   TARJETA / FORMULARIO
   ============================================================ */
.tarjeta {
  background: rgba(10,30,58,0.72); border: 1px solid rgba(255,255,255,0.09);
  border-radius: 22px; overflow: hidden;
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 24px 60px rgba(0,0,0,0.35);
}
/* El relleno de abajo es el que separa la bajada del primer <legend>: la
   leyenda de un fieldset se apoya en su borde superior y no respeta el
   padding-top del propio fieldset. */
.tarjeta__cabecera { padding: 28px 26px 22px; }
.tarjeta__titulo {
  font-size: clamp(24px, 4.6vw, 32px); font-weight: 800; line-height: 1.12;
  letter-spacing: -0.01em; color: var(--white);
}
.tarjeta__bajada {
  margin-top: 12px; font-size: 15px; line-height: 1.6; color: rgba(242,243,245,0.66);
}
.tarjeta__pie { padding: 8px 26px 28px; }
.tarjeta__nota {
  margin-top: 14px; text-align: center;
  font-size: 12.5px; line-height: 1.55; color: var(--gray);
}
.req { color: var(--blue-light); }

.grupo { border: none; margin: 0; padding: 26px; }
.grupo + .grupo { border-top: 1px solid rgba(255,255,255,0.07); }
.grupo__titulo {
  padding: 0; font-size: 11.5px; font-weight: 700;
  letter-spacing: 0.2em; text-transform: uppercase; color: var(--blue);
  margin-bottom: 6px;
}
.grupo__pista {
  font-size: 13.5px; line-height: 1.6; color: rgba(242,243,245,0.58); margin-bottom: 18px;
}
.grupo--destacado { background: rgba(46,111,216,0.06); }

.rejilla { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.campo--ancho { grid-column: 1 / -1; }
@media (max-width: 599px) { .rejilla { grid-template-columns: 1fr; } }

.campo { display: block; }
.campo__eti {
  display: block; margin-bottom: 7px;
  font-size: 12.5px; font-weight: 600; letter-spacing: 0.03em; color: rgba(242,243,245,0.78);
}
.campo input, .campo select, .campo textarea {
  width: 100%; padding: 13px 15px;
  background: rgba(4,16,31,0.55); border: 1px solid rgba(255,255,255,0.12); border-radius: 11px;
  font-family: var(--font); font-size: 15px; color: var(--white);
  transition: border-color 180ms ease, background 180ms ease;
}
.campo textarea { resize: vertical; min-height: 140px; line-height: 1.6; }
.campo input::placeholder, .campo textarea::placeholder { color: rgba(151,161,176,0.6); }
.campo input:hover, .campo select:hover, .campo textarea:hover { border-color: rgba(255,255,255,0.22); }
.campo input:focus, .campo select:focus, .campo textarea:focus {
  border-color: var(--blue); background: rgba(4,16,31,0.8); outline-offset: 1px;
}
.campo input[aria-invalid="true"], .campo textarea[aria-invalid="true"] { border-color: var(--err); }
.campo select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%236B7686' d='M6 8 0 0h12z'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 15px center; padding-right: 38px;
}
.campo select option { background: var(--navy-mid); color: var(--light); }

.contador {
  margin-top: 8px; text-align: right;
  font-size: 12px; font-variant-numeric: tabular-nums; color: var(--gray);
}
.contador.cerca { color: var(--warn); }

/* ---------- Fichas (checkboxes tipo píldora) ---------- */
.fichas { display: flex; flex-wrap: wrap; gap: 9px; }
.ficha { cursor: pointer; }
.ficha input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.ficha span {
  display: inline-block; padding: 10px 17px; border-radius: 999px;
  background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.14);
  font-size: 13.5px; font-weight: 600; color: rgba(242,243,245,0.75);
  transition: background 180ms ease, border-color 180ms ease, color 180ms ease;
}
.ficha:hover span { border-color: rgba(255,255,255,0.3); color: var(--white); }
.ficha input:checked + span {
  background: rgba(46,111,216,0.22); border-color: var(--blue); color: var(--white);
}
.ficha input:focus-visible + span { outline: 2px solid var(--blue); outline-offset: 3px; }

/* ---------- Bloque de privacidad ---------- */
.privacidad {
  margin: 0 26px 22px; padding: 18px 20px;
  background: rgba(46,111,216,0.07); border: 1px solid rgba(46,111,216,0.25); border-radius: 14px;
}
.privacidad__titulo {
  font-size: 11.5px; font-weight: 700; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--blue); margin-bottom: 10px;
}
/* La letra chica del responsable va debajo de las casillas y con menos peso:
   la ley pide que esté y que se lea, no que domine el bloque. */
.privacidad__texto {
  margin-top: 14px; padding-top: 12px;
  border-top: 1px solid rgba(46,111,216,0.18);
  font-size: 11.5px; line-height: 1.6; color: rgba(242,243,245,0.5);
}
.privacidad__texto strong { color: rgba(242,243,245,0.72); font-weight: 600; }
.privacidad__texto a { color: rgba(91,143,227,0.85); }
.privacidad__texto a:hover { color: var(--blue-light); }
.casilla {
  display: flex; align-items: flex-start; gap: 11px; margin-top: 11px;
  font-size: 13px; line-height: 1.55; color: rgba(242,243,245,0.8); cursor: pointer;
}
.casilla:first-of-type { margin-top: 0; }
.casilla input {
  flex: 0 0 auto; margin-top: 2px; width: 17px; height: 17px;
  accent-color: var(--blue); cursor: pointer;
}
.casilla em { font-style: normal; color: var(--gray); }

.error {
  margin: 0 26px 18px; padding: 13px 16px;
  background: rgba(224,138,138,0.1); border: 1px solid rgba(224,138,138,0.4); border-radius: 11px;
  font-size: 13.5px; line-height: 1.55; color: #F3C4C4;
}

/* ============================================================
   ESPERA
   ============================================================ */
.orbita { position: relative; width: 116px; height: 116px; margin-bottom: 34px; }
.orbita__anillo {
  position: absolute; inset: 0; border-radius: 50%;
  border: 1.5px solid rgba(46,111,216,0.22); border-top-color: var(--blue);
  animation: girar 1.5s linear infinite;
}
.orbita__anillo--2 {
  inset: 18px; border-color: rgba(46,111,216,0.14); border-bottom-color: var(--blue-light);
  animation: girar 2.4s linear infinite reverse;
}
.orbita__nucleo {
  position: absolute; top: 50%; left: 50%; width: 17px; height: 17px; margin: -8.5px 0 0 -8.5px;
  background: var(--blue); border-radius: 2.5px; animation: latir 1.9s ease-in-out infinite;
}
.espera__titulo {
  font-size: clamp(22px, 4.5vw, 30px); font-weight: 800; color: var(--white); margin-bottom: 12px;
}
.espera__paso {
  font-size: 15px; color: rgba(242,243,245,0.62); min-height: 1.6em;
  transition: opacity 300ms ease;
}
.espera__paso.oculto { opacity: 0; }

/* ============================================================
   RESULTADO
   ============================================================ */
.lineas { padding: 4px 26px 6px; display: flex; flex-direction: column; }
.linea {
  display: flex; align-items: flex-start; gap: 16px;
  padding: 16px 0; border-bottom: 1px dashed rgba(255,255,255,0.1);
  animation: subir 0.4s var(--curva) both;
}
.linea:last-child { border-bottom: none; }
.linea__marca {
  flex: 0 0 auto; width: 9px; height: 9px; margin-top: 6px;
  background: var(--blue); border-radius: 1.5px; transform: rotate(45deg);
}
.linea__cuerpo { flex: 1 1 auto; min-width: 0; }
.linea__nombre { font-size: 15.5px; font-weight: 700; color: var(--white); line-height: 1.35; }
.linea__desc { margin-top: 5px; font-size: 13.5px; line-height: 1.6; color: rgba(242,243,245,0.6); }
.linea__precio { flex: 0 0 auto; text-align: right; }
.linea__monto {
  font-size: 16px; font-weight: 800; color: var(--white);
  font-variant-numeric: tabular-nums; white-space: nowrap;
}
.linea__periodo {
  margin-top: 2px; font-size: 11px; font-weight: 600;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--gray);
}

.totales { margin: 14px 26px 0; padding: 20px 22px; border-radius: 16px; background: rgba(4,16,31,0.55); }
.totales__fila {
  display: flex; align-items: baseline; justify-content: space-between; gap: 16px;
  font-size: 14.5px; color: rgba(242,243,245,0.72);
}
.totales__fila + .totales__fila { margin-top: 10px; }
.totales__fila b { font-size: 17px; font-weight: 800; color: var(--white); font-variant-numeric: tabular-nums; }
.totales__gran {
  margin-top: 16px; padding-top: 16px; border-top: 1px solid rgba(255,255,255,0.1);
  text-align: center;
}
.totales__eti {
  font-size: 11px; font-weight: 600; letter-spacing: 0.24em; text-transform: uppercase; color: var(--gray-soft);
}
.totales__cifra {
  margin-top: 8px; font-size: clamp(26px, 6vw, 36px); font-weight: 800; color: var(--white);
  font-variant-numeric: tabular-nums; letter-spacing: -0.01em;
}
.totales__cifra small { font-size: 0.5em; font-weight: 700; color: var(--gray-soft); }
.totales__pie { margin-top: 10px; font-size: 12px; color: var(--gray); }

.aviso-preliminar {
  margin: 20px 26px 0; padding: 16px 18px;
  background: rgba(232,192,125,0.09); border-left: 3px solid var(--warn); border-radius: 0 12px 12px 0;
  font-size: 13.2px; line-height: 1.62; color: rgba(242,243,245,0.78);
}
.aviso-preliminar strong { color: var(--white); font-weight: 700; }

.nota-alcance {
  margin: 14px 26px 0; padding: 14px 18px;
  background: rgba(255,255,255,0.045); border-radius: 12px;
  font-size: 13.2px; line-height: 1.62; color: rgba(242,243,245,0.66);
}

/* ============================================================
   PANTALLA FINAL
   ============================================================ */
.final {
  position: fixed; inset: 0; z-index: 100;
  background: radial-gradient(ellipse 120% 90% at 50% 40%, #0C2340 0%, #081A31 52%, #04101F 100%);
  display: grid; place-items: center; padding: 32px 24px;
  animation: aparecer 0.5s ease-out both;
  overflow-y: auto;
}
.final[hidden] { display: none; }
.final__rombos { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.final__centro { position: relative; text-align: center; max-width: 620px; }

.final__sello { display: inline-block; margin-bottom: 26px; animation: subir 0.5s var(--curva) 0.1s both; }
.sello__aro {
  stroke-dasharray: 208; stroke-dashoffset: 208;
  animation: trazarAro 0.75s var(--curva) 0.25s forwards;
}
.sello__palomita {
  stroke-dasharray: 52; stroke-dashoffset: 52;
  animation: trazarTick 0.45s var(--curva) 0.85s forwards;
}

.final__antetitulo {
  font-size: 11.5px; font-weight: 700; letter-spacing: 0.32em; text-transform: uppercase;
  color: var(--blue); margin-bottom: 16px; animation: subir 0.5s var(--curva) 0.35s both;
}
.final__titulo {
  font-size: clamp(30px, 6.6vw, 52px); font-weight: 800; line-height: 1.08;
  letter-spacing: -0.015em; color: var(--white);
  animation: subir 0.6s var(--curva) 0.45s both;
}
.final__titulo em { font-style: normal; color: var(--blue-light); }
.final__texto {
  margin-top: 20px; font-size: 16.5px; line-height: 1.65; color: rgba(242,243,245,0.68);
  animation: subir 0.6s var(--curva) 0.6s both;
}
.final__folio {
  margin-top: 22px; font-size: 12px; font-weight: 600;
  letter-spacing: 0.22em; text-transform: uppercase; color: var(--gray);
  animation: subir 0.6s var(--curva) 0.7s both;
}
.final__acciones {
  margin-top: 34px; display: flex; flex-wrap: wrap; gap: 12px; justify-content: center;
  animation: subir 0.6s var(--curva) 0.8s both;
}

/* ============================================================
   PANTALLAS CHICAS
   ============================================================ */

/* Tablet: la portada pasa a una sola columna, con la demostración
   debajo del discurso y centrada; sigue viéndose el bot trabajando. */
@media (max-width: 940px) {
  #escena:has(#e-inicio.escena--activa) { max-width: 760px; }
  .entrada { grid-template-columns: 1fr; gap: 36px; }
  .entrada__discurso .titulo { font-size: clamp(34px, 6.4vw, 50px); }
  .entrada__texto { max-width: 60ch; }
  .demo { max-width: 560px; width: 100%; }
}

@media (max-width: 760px) {
  .pasos { grid-template-columns: 1fr; gap: 24px; }
  .paso { flex-direction: row; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
  .paso__num { margin-bottom: 0; flex: 0 0 auto; }
  .paso__titulo { flex: 1 1 auto; align-self: center; }
  .paso__texto { flex: 1 0 100%; padding-left: 50px; margin-top: -4px; }
}

@media (max-width: 640px) {
  .entrada { padding-top: 4px; }
  .demo__hilo { padding: 16px; }
  .demo__msj { max-width: 94%; font-size: 14px; }
  .demo__cabecera { padding: 14px 16px; }
  .entrada__sellos { gap: 9px 18px; }
  .cabecera { padding: 18px 20px; }
  #escena { padding: 4px 16px 64px; }
  .tarjeta__cabecera, .grupo, .tarjeta__pie { padding-left: 20px; padding-right: 20px; }
  .lineas, .aviso-preliminar, .nota-alcance, .error { margin-left: 0; padding-left: 20px; padding-right: 20px; }
  .aviso-preliminar, .nota-alcance, .error { margin-left: 20px; margin-right: 20px; padding-left: 16px; padding-right: 16px; }
  .privacidad { margin-left: 20px; margin-right: 20px; }
  .totales { margin-left: 20px; margin-right: 20px; }
  .chat__hilo { padding: 20px 18px 4px; }
  .chat__pie { padding: 10px 18px 20px; }
  .burbuja { max-width: 100%; font-size: 15px; }
  .linea { flex-wrap: wrap; }
  .linea__precio { width: 100%; text-align: left; padding-left: 25px; }
  .linea__monto { font-size: 15px; }
}

/* El rol va junto al nombre de Fah, pero pesa menos */
.chat__rol { font-weight: 500; opacity: 0.55; letter-spacing: 0.02em; }

/* Redes en la pantalla de "Recibido". Va como una línea de texto y no
   como botón: los dos botones de arriba son la acción, esto es el
   "por cierto". */
.final__redes {
  margin-top: 26px;
  font-size: 13px;
  color: rgba(255,255,255,0.55);
}
.final__redes a {
  color: #6D9AE4;
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid rgba(109,154,228,0.35);
  transition: color 200ms ease, border-color 200ms ease;
}
.final__redes a:hover { color: #fff; border-color: #fff; }
.final__redes span { margin: 0 6px; opacity: 0.5; }
