/* Landing de reclutamiento de Facilita: una columna pensada para celular.
 *
 * La gente llega desde un flyer de Facebook/Instagram: la pagina usa los mismos
 * azules y la misma Poppins para que se sienta la continuacion del anuncio, y
 * el formulario tiene que asomar en la primera pantalla (opcion A del mockup).
 * Sin frameworks ni build: este archivo es todo el CSS. */

@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fuentes/poppins-400.woff2') format('woff2');
}
@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/fuentes/poppins-600.woff2') format('woff2');
}
@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/fuentes/poppins-700.woff2') format('woff2');
}

:root {
  --azul-profundo: #013986;
  --azul: #0078ff;
  --azul-hover: #0068de;
  --celeste: #00c3ff;
  --gris: #5a6f89;
  --fondo-suave: #f4f7fb;
  --texto: #1d2a3a;
  --borde: #c9d5e6;
  --seleccion: #eaf3ff;
  --error: #c62828;
  --error-fondo: #fdecea;
  --radio: 12px;
  --ancho: 30rem;
  color-scheme: light;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: 'Poppins', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  font-size: 1rem;
  line-height: 1.5;
  color: var(--texto);
  background: var(--fondo-suave);
  -webkit-font-smoothing: antialiased;
  /* Nada se sale de lado en un celular angosto. */
  overflow-x: hidden;
}

img,
svg {
  display: block;
  max-width: 100%;
}

h1,
h2,
p,
ul,
fieldset {
  margin: 0;
}

[hidden] {
  display: none !important;
}

.contenedor {
  width: 100%;
  max-width: var(--ancho);
  margin: 0 auto;
  padding: 0 16px;
}

/* ---------------------------------------------------------------- encabezado */

.encabezado {
  background: var(--azul-profundo);
  color: #fff;
}

.encabezado-fila {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 56px;
  padding-top: 8px;
  padding-bottom: 8px;
}

.logo {
  width: auto;
  height: 38px;
}

.lema {
  font-size: 0.8125rem;
  opacity: 0.9;
}

/* ---------------------------------------------------------------- hero */

/* Del azul profundo al azul Facilita, con el celeste como luz en una esquina:
 * el texto queda sobre la parte oscura y se lee bien (contraste AA). */
.hero {
  position: relative;
  overflow: hidden;
  color: #fff;
  background:
    radial-gradient(circle at 105% -10%, rgba(0, 195, 255, 0.55) 0, rgba(0, 195, 255, 0) 45%),
    linear-gradient(160deg, var(--azul-profundo) 0%, #0250b5 65%, #0266dc 100%);
  padding: 18px 0 34px;
}

.etiqueta {
  display: inline-block;
  background: var(--celeste);
  color: var(--azul-profundo);
  font-weight: 700;
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  padding: 3px 12px;
  border-radius: 999px;
}

.hero h1 {
  font-size: 1.875rem;
  line-height: 1.1;
  font-weight: 700;
  margin: 10px 0 6px;
  letter-spacing: -0.01em;
}

.bajada {
  font-size: 1rem;
  opacity: 0.95;
}

.chips {
  list-style: none;
  padding: 0;
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.chips li {
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.3;
  padding: 5px 11px;
  border-radius: 999px;
  /* Fondo oscuro translucido: blanco sobre el azul claro no llega a 4.5:1. */
  background: rgba(0, 22, 66, 0.32);
  border: 1px solid rgba(255, 255, 255, 0.35);
}

/* ---------------------------------------------------------------- formulario */

/* La tarjeta del formulario se monta sobre el borde del hero: se ve como una
 * sola pieza y gana unos pixeles en la primera pantalla. */
.tarjeta-form {
  position: relative;
  margin-top: -18px;
  background: #fff;
  border-radius: 20px 20px 0 0;
  padding: 22px 0 28px;
}

fieldset {
  border: 0;
  padding: 0;
  min-width: 0;
}

.campo {
  margin-bottom: 16px;
}

.rotulo {
  display: block;
  font-weight: 600;
  font-size: 0.9375rem;
  color: var(--azul-profundo);
  margin-bottom: 6px;
  padding: 0;
}

/* 16px de letra como minimo: con menos, iOS hace zoom al enfocar el campo. */
input[type='text'],
input[type='tel'],
select {
  display: block;
  width: 100%;
  min-height: 52px;
  padding: 12px 14px;
  font: inherit;
  font-size: 1rem;
  color: var(--texto);
  background-color: #fff;
  border: 1.5px solid var(--borde);
  border-radius: var(--radio);
  transition: border-color 0.15s, box-shadow 0.15s;
}

input::placeholder {
  color: #7d8ea5;
  opacity: 1;
}

select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 44px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9'%3E%3Cpath d='M1 1l6 6 6-6' fill='none' stroke='%23013986' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
}

select:invalid,
select option[value=''] {
  color: #7d8ea5;
}

select option {
  color: var(--texto);
}

input[type='text']:focus,
input[type='tel']:focus,
select:focus {
  outline: none;
  border-color: var(--azul);
  box-shadow: 0 0 0 3px rgba(0, 120, 255, 0.25);
}

.con-error input[type='text'],
.con-error input[type='tel'],
.con-error select {
  border-color: var(--error);
}

.con-error input[type='text']:focus,
.con-error input[type='tel']:focus,
.con-error select:focus {
  box-shadow: 0 0 0 3px rgba(198, 40, 40, 0.2);
}

.error {
  color: var(--error);
  font-size: 0.875rem;
  font-weight: 600;
  margin-top: 6px;
  line-height: 1.35;
}

/* Botones de opcion: el radio nativo cubre todo el boton (invisible), asi el
 * toque, el teclado y el lector de pantalla funcionan como un radio comun. */
.opciones-zona {
  display: grid;
  gap: 8px;
  /* Reserva el alto de los 3 botones mientras llega listas.json: el resto del
   * formulario no salta cuando aparecen. */
  min-height: calc(3 * 56px + 2 * 8px);
}

.opciones-seg {
  display: grid;
  gap: 8px;
  min-height: 48px;
}

.opciones-2 {
  grid-template-columns: repeat(2, 1fr);
}

.opciones-3 {
  grid-template-columns: repeat(3, 1fr);
}

.opcion {
  position: relative;
  display: block;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.opcion input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.opcion span {
  display: flex;
  align-items: center;
  height: 100%;
  border: 1.5px solid var(--borde);
  border-radius: var(--radio);
  background: #fff;
  color: var(--azul-profundo);
  font-weight: 600;
  transition: border-color 0.15s, background-color 0.15s;
}

.opcion-zona span {
  position: relative;
  min-height: 56px;
  padding: 10px 14px 10px 48px;
  font-size: 0.9375rem;
  line-height: 1.3;
}

/* El circulo del radio, dibujado: vacio sin elegir, lleno al elegir. */
.opcion-zona span::before {
  content: '';
  position: absolute;
  left: 16px;
  top: 50%;
  width: 20px;
  height: 20px;
  margin-top: -10px;
  border-radius: 50%;
  border: 2px solid var(--borde);
  background: #fff;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.opcion-seg span {
  justify-content: center;
  min-height: 48px;
  padding: 8px 6px;
  font-size: 0.9375rem;
  text-align: center;
}

.opcion input:checked + span {
  border-color: var(--azul);
  background: var(--seleccion);
  box-shadow: inset 0 0 0 1px var(--azul);
}

.opcion-zona input:checked + span::before {
  border-color: var(--azul);
  box-shadow: inset 0 0 0 4px #fff;
  background: var(--azul);
}

.opcion input:focus-visible + span {
  outline: 3px solid var(--azul);
  outline-offset: 2px;
}

@media (hover: hover) {
  .opcion:hover span {
    border-color: var(--azul);
  }
}

.con-error .opcion span {
  border-color: var(--error);
}

.con-error .opcion input:checked + span {
  border-color: var(--azul);
}

/* ---------------------------------------------------------------- envio */

/* Blanco sobre #0078ff da 4.1:1: alcanza AA como texto grande (19px en
 * negrita), por eso el boton no baja de ese tamano. */
.boton {
  display: block;
  width: 100%;
  min-height: 58px;
  margin-top: 22px;
  padding: 14px 16px;
  font: inherit;
  font-size: 1.1875rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #fff;
  background: var(--azul);
  border: 0;
  border-radius: 14px;
  box-shadow: 0 6px 18px rgba(0, 120, 255, 0.3);
  cursor: pointer;
  transition: background-color 0.15s, transform 0.1s;
  -webkit-tap-highlight-color: transparent;
}

@media (hover: hover) {
  .boton:hover:not(:disabled) {
    background: var(--azul-hover);
  }
}

.boton:active:not(:disabled) {
  transform: scale(0.99);
}

.boton:focus-visible {
  outline: 3px solid var(--azul-profundo);
  outline-offset: 3px;
}

.boton:disabled {
  cursor: progress;
  opacity: 0.7;
  box-shadow: none;
}

.boton-secundario {
  margin-top: 8px;
  min-height: 44px;
  padding: 8px 18px;
  font: inherit;
  font-weight: 600;
  color: var(--azul-profundo);
  background: #fff;
  border: 1.5px solid var(--azul-profundo);
  border-radius: var(--radio);
  cursor: pointer;
}

.aviso-error {
  margin-top: 14px;
  margin-bottom: 14px;
  padding: 12px 14px;
  border-radius: 10px;
  background: var(--error-fondo);
  color: #a01c1c;
  font-size: 0.9375rem;
  font-weight: 600;
}

.aviso-datos {
  margin-top: 12px;
  font-size: 0.8125rem;
  line-height: 1.45;
  color: var(--gris);
  text-align: center;
}

/* ---------------------------------------------------------------- beneficios */

.beneficios {
  background: var(--fondo-suave);
  padding: 28px 0 40px;
}

.beneficios h2 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--azul-profundo);
  margin-bottom: 12px;
}

.lista-beneficios {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 10px;
}

.lista-beneficios li {
  position: relative;
  padding: 12px 14px 12px 50px;
  background: #fff;
  border-radius: var(--radio);
  font-size: 0.9375rem;
  line-height: 1.4;
  box-shadow: 0 1px 2px rgba(1, 57, 134, 0.06);
}

/* Visto en un circulo celeste, como los del flyer. */
.lista-beneficios li::before {
  content: '';
  position: absolute;
  left: 14px;
  top: 50%;
  width: 24px;
  height: 24px;
  margin-top: -12px;
  border-radius: 50%;
  background: var(--celeste) 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.5 5.2l3 3 6-6.4' fill='none' stroke='%23013986' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat center;
}

/* ---------------------------------------------------------------- gracias */

.gracias {
  padding: 32px 0 48px;
}

.tarjeta-gracias {
  background: #fff;
  border-radius: 20px;
  padding: 32px 20px;
  text-align: center;
  box-shadow: 0 6px 24px rgba(1, 57, 134, 0.08);
}

.icono-listo {
  margin: 0 auto 16px;
}

.tarjeta-gracias h1 {
  font-size: 1.5rem;
  line-height: 1.2;
  font-weight: 700;
  color: var(--azul-profundo);
}

.tarjeta-gracias p {
  margin-top: 10px;
  font-size: 1.0625rem;
  color: var(--gris);
}

/* ---------------------------------------------------------------- pantallas grandes */

/* En computadora la pagina sigue siendo una columna (es una pagina de celular),
 * con el formulario como tarjeta centrada. */
@media (min-width: 40rem) {
  .hero {
    padding: 32px 0 48px;
  }

  .hero h1 {
    font-size: 2.25rem;
  }

  .tarjeta-form {
    max-width: calc(var(--ancho) + 32px);
    margin: -28px auto 0;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(1, 57, 134, 0.1);
  }

  .beneficios {
    background: transparent;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
