/* Paleta neutra y profesional. Todo el color está en estas variables. */
:root {
  --fondo: #f7f5f2;
  --superficie: #ffffff;
  --texto: #1f1d1b;
  --texto-suave: #6b6560;
  --borde: #e2ddd7;
  --acento: #2f3b36;
  --acento-texto: #ffffff;
  --foco: #8a9a8f;
  --error: #b3261e;
  --radio: 12px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--fondo);
  color: var(--texto);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

/* Mobile-first: 16px de margen lateral, se ensancha en pantallas grandes */
.contenedor {
  max-width: 680px;
  margin: 0 auto;
  padding: 24px 16px 48px;
}

.cabecera { margin-bottom: 24px; }

.marca {
  margin: 0 0 16px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--texto-suave);
}

.progreso {
  height: 4px;
  background: var(--borde);
  border-radius: 4px;
  overflow: hidden;
}

.progreso-barra {
  height: 100%;
  width: 0;
  background: var(--acento);
  transition: width 0.3s ease;
}

.progreso-texto {
  margin: 8px 0 0;
  font-size: 13px;
  color: var(--texto-suave);
}

/* ---------- Pasos ---------- */
.paso { display: none; }
.paso.activo { display: block; animation: aparecer 0.25s ease; }

@keyframes aparecer {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

.paso h1,
.gracias h1 {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 500;
  font-size: 28px;
  line-height: 1.2;
  margin: 0 0 8px;
}

.paso-intro {
  margin: 0 0 28px;
  color: var(--texto-suave);
}

/* ---------- Preguntas ---------- */
.pregunta {
  background: var(--superficie);
  border: 1px solid var(--borde);
  border-radius: var(--radio);
  padding: 18px 16px;
  margin-bottom: 14px;
}

.pregunta.con-error { border-color: var(--error); }

.etiqueta {
  display: block;
  font-weight: 500;
  margin: 0 0 4px;
}

.obligatoria { color: var(--error); margin-left: 2px; }

.ayuda {
  margin: 0 0 10px;
  font-size: 14px;
  color: var(--texto-suave);
}

.etiqueta + .campo,
.etiqueta + .opciones { margin-top: 10px; }

.campo {
  width: 100%;
  font: inherit;
  color: inherit;
  background: var(--fondo);
  border: 1px solid var(--borde);
  border-radius: 8px;
  padding: 12px;
}

textarea.campo { min-height: 96px; resize: vertical; }

.campo:focus {
  outline: 2px solid var(--foco);
  outline-offset: 1px;
  background: var(--superficie);
}

.opciones { display: grid; gap: 8px; }

/* Opciones grandes y fáciles de tocar con el dedo */
.opcion {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--borde);
  border-radius: 8px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}

.opcion:hover { border-color: var(--foco); }

.opcion input {
  margin: 3px 0 0;
  width: 18px;
  height: 18px;
  accent-color: var(--acento);
  flex-shrink: 0;
}

.opcion:has(input:checked) {
  border-color: var(--acento);
  background: #eef0ee;
}

.campo-otro { margin-top: 8px; }
.campo-otro[hidden] { display: none; }

.mensaje-error {
  margin: 8px 0 0;
  font-size: 14px;
  color: var(--error);
}

.error-general {
  min-height: 1.2em;
  margin: 8px 0;
  color: var(--error);
  font-size: 14px;
}

/* ---------- Navegación ---------- */
.navegacion {
  display: flex;
  gap: 12px;
  margin-top: 8px;
}

.boton {
  flex: 1;
  font: inherit;
  font-weight: 600;
  padding: 14px 20px;
  border-radius: 999px;
  border: 1px solid var(--acento);
  background: var(--acento);
  color: var(--acento-texto);
  cursor: pointer;
}

.boton:disabled { opacity: 0.6; cursor: wait; }

.boton-secundario {
  background: transparent;
  color: var(--acento);
}

.boton:focus-visible { outline: 2px solid var(--foco); outline-offset: 2px; }

/* Campo trampa para bots: fuera de la pantalla, no con display:none (algunos bots lo detectan) */
.trampa {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.gracias { padding-top: 40px; }
.gracias p { color: var(--texto-suave); }

@media (min-width: 640px) {
  .contenedor { padding-top: 56px; }
  .paso h1, .gracias h1 { font-size: 34px; }
  .pregunta { padding: 22px 24px; }
  .navegacion .boton { flex: 0 0 auto; min-width: 160px; }
  .navegacion { justify-content: space-between; }
}
