@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700;800&display=swap');

:root {
  /* ---- Fondo claro corporativo (blanco / gris muy claro / azul suave) ---- */
  --bg-top: #ffffff;
  --bg-mid: #f2f5fb;
  --bg-bottom: #e6eefb;

  /* ---- Texto ---- */
  --text-strong: #0b1f45;   /* navy oscuro — títulos */
  --text-body: #45536b;     /* slate — párrafos */
  --text-faint: rgba(11,31,69,0.5);

  /* ---- Acentos de marca (se mantienen) ---- */
  --navy-dark: #08142f;
  --navy-mid: #0f2a5a;
  --blue-bright: #388ef5;
  --blue-glow: #6ebeff;
  --white: #ffffff;
  --green-whatsapp: #25D366;
  --danger: #c23050;
  --radius: 16px;

  /* ---- Superficies (tarjetas/inputs sobre fondo claro) ---- */
  --surface: rgba(11,31,69,0.035);
  --surface-strong: rgba(11,31,69,0.055);
  --surface-border: rgba(11,31,69,0.10);
  --input-bg: #fbfcfe;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  background: linear-gradient(165deg, var(--bg-top) 0%, var(--bg-mid) 55%, var(--bg-bottom) 100%);
  font-family: 'Poppins', sans-serif;
  color: var(--text-strong);
  overflow-x: hidden;
}

.orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.16;
  z-index: 0;
  pointer-events: none;
}
.orb-a { width: 320px; height: 320px; background: var(--blue-bright); top: -120px; left: -100px; }
.orb-b { width: 380px; height: 380px; background: var(--blue-bright); bottom: -140px; right: -120px; }

/* Marca de agua fotográfica — pareja difuminada, decorativa, no interactiva.
   Grande, suave y de muy poca opacidad: se integra con el fondo claro
   sin interferir con la lectura del contenido (que va en .app, z-index:1). */
.marca-agua-pareja {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(720px, 150vw);
  max-width: none;
  height: auto;
  opacity: 0.9; /* el degradado de transparencia ya viene "horneado" en el PNG */
  pointer-events: none;
  z-index: 0;
  user-select: none;
}
@media (max-width: 480px) {
  .marca-agua-pareja { width: 165vw; top: 42%; }
}

/* Marca de agua decorativa — sutil, no interactiva, no oficial.
   max-width/max-height son un límite de seguridad: aunque alguna regla
   más específica falle en cargar, nunca puede crecer sin control. */
.marca-agua {
  position: fixed;
  color: var(--blue-bright);
  opacity: 0.06;
  pointer-events: none;
  overflow: hidden;
  max-width: 220px;
  max-height: 220px;
  z-index: 0;
}
.marca-agua-mic { width: 90px; max-width: 90px; top: 8%; right: 6%; transform: rotate(8deg); }
.marca-agua-escritorio { width: 220px; max-width: 220px; bottom: 6%; left: -4%; }
.marca-agua-documento { width: 110px; max-width: 110px; top: 38%; left: 4%; transform: rotate(-6deg); }
.marca-agua-franjas { width: 140px; max-width: 140px; bottom: 14%; right: -6%; opacity: 0.05; transform: rotate(-3deg); }
@media (max-width: 420px) {
  .marca-agua-escritorio { width: 160px; max-width: 160px; }
  .marca-agua-documento { width: 80px; max-width: 80px; }
}

.app {
  position: relative;
  z-index: 1;
  max-width: 480px;
  margin: 0 auto;
  padding: 32px 24px 48px;
  min-height: 100vh;
}

.screen { display: none; animation: fadeIn 0.35s ease; }
.screen.active { display: block; }

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 40px;
  text-align: center;
}
.brand-logo {
  display: block;
  width: 160px;
  max-width: min(60%, 220px);
  height: auto;
  filter: drop-shadow(0 4px 18px rgba(11,31,69,0.18));
  margin: 0 auto 4px;
}
.brand-sub {
  font-size: 13px;
  color: var(--blue-bright);
  margin-top: 2px;
  letter-spacing: 0.5px;
}

.titulo {
  font-size: 24px;
  font-weight: 700;
  margin: 0 0 8px;
  line-height: 1.3;
  color: var(--text-strong);
}
.subtitulo {
  color: var(--text-body);
  font-size: 14px;
  margin: 0 0 28px;
}
.tagline-posicionamiento {
  text-align: center;
  font-size: 12px;
  line-height: 1.5;
  color: var(--blue-bright);
  margin: 0 0 24px;
}
.tagline-disclaimer {
  display: block;
  color: var(--text-faint);
  font-size: 11px;
  margin-top: 4px;
}
.parrafo {
  color: var(--text-body);
  font-size: 15px;
  line-height: 1.6;
  margin-bottom: 28px;
}
.parrafo-pequeno {
  color: var(--text-body);
  font-size: 13px;
  line-height: 1.5;
  text-align: center;
  margin: 20px 0;
}

.campo {
  display: block;
  margin-bottom: 18px;
}
.campo span {
  display: block;
  font-size: 13px;
  color: var(--blue-bright);
  margin-bottom: 6px;
}
.campo input {
  width: 100%;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1.5px solid var(--surface-border);
  background: var(--input-bg);
  color: var(--text-strong);
  font-size: 16px;
  font-family: inherit;
}
.campo input:focus {
  outline: none;
  border-color: var(--blue-bright);
  box-shadow: 0 0 0 3px rgba(56,142,245,0.18);
}

.btn {
  width: 100%;
  padding: 16px;
  border-radius: 14px;
  border: none;
  font-family: inherit;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 8px;
  transition: transform 0.15s ease, opacity 0.15s ease;
}
.btn:active { transform: scale(0.98); }
.btn:disabled { opacity: 0.4; cursor: not-allowed; }

.btn-primario {
  background: linear-gradient(135deg, var(--blue-bright), #1c5fc4);
  color: var(--white);
  box-shadow: 0 10px 28px rgba(56,142,245,0.35);
}
.btn-secundario {
  background: var(--surface);
  color: var(--text-strong);
  border: 1.5px solid var(--surface-border);
}
.btn-whatsapp {
  background: var(--green-whatsapp);
  color: var(--white);
  box-shadow: 0 10px 24px rgba(37,211,102,0.3);
}
.btn-whatsapp-premium {
  background: var(--surface);
  color: var(--text-strong);
  border: 1.5px solid var(--green-whatsapp);
}

/* Botón flotante de WhatsApp — visible en toda la navegación */
.whatsapp-flotante {
  position: fixed;
  bottom: 18px;
  right: 18px;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--green-whatsapp);
  color: var(--white);
  border: none;
  border-radius: 30px;
  padding: 12px 16px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 8px 22px rgba(11,31,69,0.22);
  cursor: pointer;
  max-width: 220px;
}
.whatsapp-flotante-icono { font-size: 18px; line-height: 1; }
.whatsapp-flotante-texto { text-align: left; line-height: 1.2; }
@media (max-width: 380px) {
  .whatsapp-flotante-texto { display: none; }
  .whatsapp-flotante { border-radius: 50%; width: 52px; height: 52px; padding: 0; justify-content: center; }
}
.btn-link {
  background: none;
  border: none;
  color: var(--blue-bright);
  font-family: inherit;
  font-size: 14px;
  text-decoration: underline;
  cursor: pointer;
  display: block;
  margin: 16px auto 0;
  padding: 8px;
}

.mensaje-error {
  color: var(--danger);
  font-size: 13px;
  min-height: 18px;
  margin-top: 8px;
}

.nota-pie {
  color: var(--text-faint);
  font-size: 11px;
  text-align: center;
  margin-top: 24px;
}

.opciones-idioma {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.btn-idioma {
  background: var(--surface);
  border: 1.5px solid rgba(56,142,245,0.30);
  color: var(--text-strong);
}
.btn-idioma:hover { border-color: var(--blue-bright); }

.consentimiento-caja {
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius);
  padding: 18px;
  max-height: 40vh;
  overflow-y: auto;
  margin-bottom: 20px;
}
.consentimiento-caja p {
  color: var(--text-body);
  font-size: 14px;
  line-height: 1.7;
  white-space: pre-line;
  margin: 0;
}

.check-fila {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 20px;
  font-size: 14px;
  color: var(--text-body);
  cursor: pointer;
}
.check-fila input {
  margin-top: 3px;
  width: 18px;
  height: 18px;
  accent-color: var(--blue-bright);
}

.entrevista-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}
.badge-bloque, .badge-progreso {
  font-size: 12px;
  padding: 6px 12px;
  border-radius: 20px;
  background: rgba(56,142,245,0.10);
  color: var(--navy-mid);
}

.tiempo-transcurrido {
  text-align: center;
  color: var(--text-faint);
  font-size: 12px;
  margin: 0 0 16px;
}

.oficial-card {
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius);
  padding: 28px 22px;
  text-align: center;
  margin-bottom: 20px;
  box-shadow: 0 20px 45px -25px rgba(11,31,69,0.25);
}
.oficial-icono { font-size: 32px; margin-bottom: 12px; }
.oficial-pregunta {
  font-size: 18px;
  font-weight: 500;
  line-height: 1.5;
  margin: 0;
  color: var(--text-strong);
}

.transcripcion-viva {
  min-height: 24px;
  color: var(--text-body);
  font-size: 14px;
  font-style: italic;
  text-align: center;
  margin-bottom: 20px;
}

.controles-voz {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 8px;
}
.btn-mic {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(135deg, var(--blue-bright), #1c5fc4);
  color: var(--white);
  font-size: 26px;
  box-shadow: 0 0 0 0 rgba(56,142,245,0.6);
  cursor: pointer;
  transition: box-shadow 0.3s ease;
}
.btn-mic.grabando {
  animation: pulso 1.4s infinite;
}
@keyframes pulso {
  0% { box-shadow: 0 0 0 0 rgba(56,142,245,0.6); }
  70% { box-shadow: 0 0 0 22px rgba(56,142,245,0); }
  100% { box-shadow: 0 0 0 0 rgba(56,142,245,0); }
}
.estado-mic {
  font-size: 13px;
  color: var(--text-body);
  margin-top: 12px;
}

.oculto { display: none !important; }

.respuesta-texto-caja { margin-top: 16px; }
.respuesta-texto-caja textarea {
  width: 100%;
  padding: 12px;
  border-radius: 12px;
  border: 1.5px solid var(--surface-border);
  background: var(--input-bg);
  color: var(--text-strong);
  font-family: inherit;
  font-size: 14px;
  resize: none;
  margin-bottom: 10px;
}

.resumen-card {
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius);
  padding: 24px 20px;
  margin-bottom: 8px;
  box-shadow: 0 20px 45px -25px rgba(11,31,69,0.25);
}
.resumen-etiqueta {
  font-size: 12px;
  color: var(--blue-bright);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 0 0 6px;
}
.resumen-nivel {
  font-size: 22px;
  font-weight: 700;
  margin: 0 0 20px;
  color: var(--text-strong);
}
.resumen-lista {
  margin: 0;
  padding-left: 18px;
  color: var(--text-body);
  font-size: 14px;
  line-height: 1.8;
}

@media (min-width: 540px) {
  .app { padding-top: 56px; }
}
