/*
 * Habla+ · página pública. Un solo archivo de estilos, sin frameworks ni
 * fuentes externas: la página no conecta con nadie más que con la API de
 * Habla+ (ni Google Fonts ni rastreadores). Colores del kit de marca.
 */

:root {
  --azul: #0056b3;
  --azul-oscuro: #003f85;
  --azul-claro: #e8f1fb;
  --turquesa: #12b8aa;
  --turquesa-oscuro: #0b7f75;
  --turquesa-claro: #e3f7f5;
  --texto: #1b2733;
  --texto-suave: #4a5866;
  --borde: #d6dee6;
  --fondo: #ffffff;
  --fondo-alterno: #f4f7fa;
  --aviso: #fff6e0;
  --aviso-borde: #f0c24b;
  --error: #b3261e;
  --exito: #1e7a43;

  --radio: 14px;
  --sombra: 0 2px 12px rgb(16 40 64 / 8%);
  --ancho: 68rem;
  --ancho-texto: 40rem;
  --fuente: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  margin: 0;
  font-family: var(--fuente);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--texto);
  background: var(--fondo);
}

img {
  max-width: 100%;
  height: auto;
}

a {
  color: var(--azul);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--turquesa);
  outline-offset: 2px;
}

h1,
h2,
h3 {
  line-height: 1.25;
  margin: 0 0 0.75rem;
}

h1 {
  font-size: clamp(2rem, 4.5vw, 3rem);
  letter-spacing: -0.01em;
}

h2 {
  font-size: clamp(1.6rem, 3vw, 2.1rem);
}

h3 {
  font-size: 1.2rem;
}

p {
  margin: 0 0 1rem;
}

.contenedor {
  width: min(100% - 2rem, var(--ancho));
  margin-inline: auto;
}

.texto {
  max-width: var(--ancho-texto);
}

.salto {
  position: absolute;
  left: -999px;
  top: 0;
  padding: 0.75rem 1rem;
  background: var(--azul);
  color: #fff;
  z-index: 100;
}

.salto:focus {
  left: 1rem;
}

/* ---------- Aviso de versión de prueba ---------- */

.piloto {
  background: var(--aviso);
  border-bottom: 1px solid var(--aviso-borde);
  font-size: 0.95rem;
}

.piloto p {
  margin: 0;
  padding: 0.6rem 0;
}

/* ---------- Encabezado ---------- */

.encabezado {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgb(255 255 255 / 96%);
  border-bottom: 1px solid var(--borde);
  backdrop-filter: blur(6px);
}

.encabezado .contenedor {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 4.25rem;
}

.marca img {
  display: block;
  height: 2.5rem;
  width: auto;
}

.menu {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.menu a:not(.boton) {
  color: var(--texto);
  text-decoration: none;
  font-weight: 500;
}

.menu a:not(.boton):hover {
  color: var(--azul);
}

@media (max-width: 52rem) {
  .menu .enlace-seccion {
    display: none;
  }
}

/* ---------- Botones ---------- */

.boton {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 3rem;
  padding: 0.7rem 1.4rem;
  border-radius: 999px;
  border: 2px solid transparent;
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s, color 0.15s, border-color 0.15s;
}

.boton-principal {
  background: var(--azul);
  color: #fff;
}

.boton-principal:hover {
  background: var(--azul-oscuro);
}

.boton-secundario {
  background: transparent;
  color: var(--azul);
  border-color: var(--azul);
}

.boton-secundario:hover {
  background: var(--azul-claro);
}

.boton-chico {
  min-height: 2.5rem;
  padding: 0.45rem 1.1rem;
}

.boton[disabled] {
  opacity: 0.6;
  cursor: progress;
}

/* ---------- Portada ---------- */

.portada {
  background:
    radial-gradient(circle at 12% 18%, var(--azul-claro) 0, transparent 45%),
    radial-gradient(circle at 88% 70%, var(--turquesa-claro) 0, transparent 45%);
  padding: clamp(3rem, 8vw, 6rem) 0;
}

.portada .contenedor {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 3rem;
  align-items: center;
}

@media (max-width: 52rem) {
  .portada .contenedor {
    grid-template-columns: 1fr;
  }
}

.etiqueta {
  display: inline-block;
  margin-bottom: 1rem;
  padding: 0.25rem 0.8rem;
  border-radius: 999px;
  background: var(--turquesa-claro);
  color: var(--turquesa-oscuro);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.portada .entrada {
  font-size: 1.2rem;
  color: var(--texto-suave);
  max-width: 36rem;
}

.acciones {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.75rem;
}

.principio {
  background: #fff;
  border-radius: var(--radio);
  box-shadow: var(--sombra);
  padding: 2rem;
  border-top: 5px solid var(--turquesa);
}

.principio .cita {
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--azul);
  line-height: 1.35;
  margin-bottom: 1rem;
}

.principio p:last-child {
  margin-bottom: 0;
  color: var(--texto-suave);
}

/* ---------- Secciones ---------- */

.seccion {
  padding: clamp(3rem, 7vw, 5rem) 0;
}

.seccion-alterna {
  background: var(--fondo-alterno);
}

.seccion .intro {
  color: var(--texto-suave);
  max-width: var(--ancho-texto);
  margin-bottom: 2rem;
}

.rejilla {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 1.25rem;
}

.tarjeta {
  background: #fff;
  border: 1px solid var(--borde);
  border-radius: var(--radio);
  padding: 1.5rem;
}

.tarjeta p:last-child,
.tarjeta ul:last-child {
  margin-bottom: 0;
}

.paso-numero {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  margin-bottom: 0.75rem;
  border-radius: 50%;
  background: var(--azul);
  color: #fff;
  font-weight: 700;
}

.lista {
  margin: 0;
  padding-left: 1.2rem;
}

.lista li {
  margin-bottom: 0.5rem;
}

.dos-columnas {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

@media (max-width: 52rem) {
  .dos-columnas {
    grid-template-columns: 1fr;
  }
}

.tarjeta-azul {
  border-top: 5px solid var(--azul);
}

.tarjeta-turquesa {
  border-top: 5px solid var(--turquesa);
}

/* ---------- Transparencia ---------- */

.datos {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border-radius: var(--radio);
  overflow: hidden;
  border: 1px solid var(--borde);
}

.datos th,
.datos td {
  text-align: left;
  vertical-align: top;
  padding: 1rem 1.1rem;
  border-bottom: 1px solid var(--borde);
}

.datos th {
  width: 28%;
  background: var(--azul-claro);
  color: var(--azul-oscuro);
}

.datos tr:last-child th,
.datos tr:last-child td {
  border-bottom: 0;
}

@media (max-width: 40rem) {
  .datos,
  .datos tbody,
  .datos tr,
  .datos th,
  .datos td {
    display: block;
    width: 100%;
  }

  .datos th {
    border-bottom: 0;
    padding-bottom: 0.4rem;
  }
}

.nota {
  margin-top: 1.5rem;
  padding: 1rem 1.25rem;
  border-left: 4px solid var(--aviso-borde);
  background: var(--aviso);
  border-radius: 0 var(--radio) var(--radio) 0;
}

/* ---------- Pruebas ---------- */

.pruebas {
  background: linear-gradient(135deg, var(--azul) 0%, var(--azul-oscuro) 100%);
  color: #fff;
}

.pruebas a:not(.boton) {
  color: #fff;
}

.pruebas .intro {
  color: rgb(255 255 255 / 88%);
}

.pruebas .tarjeta {
  background: rgb(255 255 255 / 8%);
  border-color: rgb(255 255 255 / 25%);
  color: #fff;
}

.pruebas .paso-numero {
  background: var(--turquesa);
}

.boton-claro {
  background: #fff;
  color: var(--azul);
}

.boton-claro:hover {
  background: var(--turquesa-claro);
}

.boton-borde-claro {
  background: transparent;
  color: #fff;
  border-color: #fff;
}

.boton-borde-claro:hover {
  background: rgb(255 255 255 / 12%);
}

/* ---------- Formulario ---------- */

.formulario {
  display: grid;
  gap: 1.1rem;
  background: #fff;
  border: 1px solid var(--borde);
  border-radius: var(--radio);
  padding: clamp(1.25rem, 4vw, 2rem);
  box-shadow: var(--sombra);
}

.campo {
  display: grid;
  gap: 0.35rem;
}

.campo label,
.campo legend {
  font-weight: 600;
}

.campo input,
.campo select,
.campo textarea {
  width: 100%;
  min-height: 3rem;
  padding: 0.7rem 0.85rem;
  border: 1px solid #a9b6c3;
  border-radius: 10px;
  font: inherit;
  color: var(--texto);
  background: #fff;
}

.campo textarea {
  min-height: 9rem;
  resize: vertical;
}

.campo .ayuda {
  font-size: 0.9rem;
  color: var(--texto-suave);
}

.casilla {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
}

.casilla input {
  width: 1.4rem;
  height: 1.4rem;
  margin-top: 0.15rem;
  flex: none;
  accent-color: var(--azul);
}

/* El campo trampa: fuera de la vista y del teclado, nunca `display: none`
   (algunos programas lo saltan si está oculto así). */
.trampa {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.estado {
  margin: 0;
  padding: 0.85rem 1rem;
  border-radius: 10px;
  font-weight: 500;
}

.estado:empty {
  display: none;
}

.estado-exito {
  background: #e6f4ea;
  color: var(--exito);
}

.estado-error {
  background: #fde8e7;
  color: var(--error);
}

/* ---------- Pie ---------- */

.pie {
  background: var(--texto);
  color: #d5dde5;
  padding: 2.5rem 0;
  font-size: 0.95rem;
}

.pie .contenedor {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1.5rem;
}

.pie a {
  color: #fff;
}

.pie nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
}

.pie p {
  margin: 0.25rem 0;
}

/* ---------- Páginas de texto (privacidad, 404) ---------- */

.documento {
  padding: clamp(2.5rem, 6vw, 4rem) 0;
}

.documento h2 {
  margin-top: 2.5rem;
  font-size: 1.4rem;
}
