/* Emma — estilos del sitio público.
 *
 * Mobile-first. Dos layouts sobre los mismos tokens:
 *   - Ancho completo: landing y páginas legales.
 *   - Columna angosta (.container): el formulario de registro.
 *
 * Paleta tomada de los mockups de producto: azul #4C70F5 sobre tinta #1F1F3A.
 *
 * Convención de botones: .btn es de ancho automático. Los botones que deben
 * ocupar todo el ancho —los del formulario— llevan además .btn-block. Ojo al
 * añadir variantes: no volver a poner width en .btn o los CTA de la landing se
 * estiran de punta a punta.
 */

:root {
  --bg: #ffffff;
  --bg-alt: #fafafe;
  --surface: #ffffff;
  --text: #1f1f3a;
  --text-muted: #6b6b85;
  --border: #e8e8f2;
  --accent: #4c70f5;
  --accent-hover: #3b5ce0;
  --accent-soft: #eef0ff;
  --whatsapp: #25d366;
  --whatsapp-hover: #1fb958;
  --error: #c0392b;
  --pendiente-bg: #fff3cd;
  --pendiente-text: #7a5b00;
  --radius: 14px;
  --shadow: 0 1px 3px rgba(31, 31, 58, 0.06), 0 8px 24px rgba(31, 31, 58, 0.05);
  --measure: 68ch;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica,
    Arial, sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent);
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

.brand-mark {
  color: var(--accent);
}

.eyebrow {
  margin: 0 0 12px;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}

.eyebrow-center {
  text-align: center;
}

/* Marcador de dato faltante. Deliberadamente llamativo: si algo así llega a
   producción, tiene que saltar a la vista antes que a la de Meta. */
.pendiente {
  background: var(--pendiente-bg);
  color: var(--pendiente-text);
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 4px;
}

/* ---------- Botones ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 28px;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: background-color 0.15s ease, transform 0.05s ease;
}

.btn:active {
  transform: translateY(1px);
}

.btn:disabled {
  opacity: 0.6;
  cursor: default;
}

.btn-block {
  width: 100%;
}

.btn-compact {
  padding: 9px 18px;
  font-size: 0.9rem;
}

.btn-hero {
  padding: 15px 34px;
  font-size: 1.05rem;
}

.btn-primary {
  background: var(--text);
  color: #fff;
}

.btn-primary:hover:not(:disabled) {
  background: #33334f;
}

.btn-whatsapp {
  background: var(--whatsapp);
  color: #fff;
}

.btn-whatsapp:hover {
  background: var(--whatsapp-hover);
}

/* ---------- Navegación de la landing ---------- */

.nav {
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: 1020px;
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.nav-brand {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.01em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 22px;
}

.nav-links a {
  font-size: 0.9rem;
  color: var(--text-muted);
  text-decoration: none;
}

.nav-links a:hover {
  color: var(--text);
}

.nav-links .btn-primary {
  color: #fff;
}

@media (max-width: 560px) {
  .nav-links a:not(.btn) {
    display: none;
  }
}

/* ---------- Hero ---------- */

.hero {
  background: var(--bg-alt);
  border-bottom: 1px solid var(--border);
  padding: 72px 24px 64px;
  text-align: center;
}

.hero-inner {
  max-width: 640px;
  margin: 0 auto;
}

.hero-wordmark {
  margin: 0 0 18px;
  font-size: 2.75rem;
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1;
}

.hero h1 {
  margin: 0 0 18px;
  font-size: clamp(1.75rem, 5vw, 2.35rem);
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.hero-text {
  margin: 0 auto 32px;
  max-width: 34rem;
  font-size: 1.05rem;
  color: var(--text-muted);
}

/* ---------- Secciones ---------- */

.section {
  padding: 64px 24px;
}

.section-alt {
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.section-close {
  text-align: center;
}

.section-inner {
  max-width: 1020px;
  margin: 0 auto;
}

.section-inner-narrow {
  max-width: 560px;
}

.section-title {
  margin: 0 0 40px;
  font-size: clamp(1.35rem, 3.5vw, 1.7rem);
  font-weight: 600;
  letter-spacing: -0.015em;
  text-align: center;
  text-wrap: balance;
}

.close-text {
  margin: 0 0 28px;
  color: var(--text-muted);
}

/* Pasos: son una secuencia real, por eso van numerados y en <ol>. */
.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 32px;
}

.step {
  text-align: center;
}

.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  margin-bottom: 14px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 600;
}

.step h3 {
  margin: 0 0 8px;
  font-size: 1.05rem;
  font-weight: 600;
}

.step p {
  margin: 0;
  font-size: 0.95rem;
  color: var(--text-muted);
}

.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}

.feature {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}

.feature h3 {
  margin: 0 0 8px;
  font-size: 1rem;
  font-weight: 600;
}

.feature p {
  margin: 0;
  font-size: 0.95rem;
  color: var(--text-muted);
}

/* ---------- Documentos legales ---------- */

.doc {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 40px 24px 64px;
}

.doc-back {
  display: inline-block;
  margin-bottom: 28px;
  font-size: 0.9rem;
  text-decoration: none;
}

.doc h1 {
  margin: 0 0 6px;
  font-size: clamp(1.7rem, 5vw, 2.1rem);
  font-weight: 600;
  letter-spacing: -0.02em;
}

.doc-meta {
  margin: 0 0 36px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.doc-lede {
  font-size: 1.05rem;
}

.doc h2 {
  margin: 40px 0 12px;
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: -0.005em;
}

.doc p,
.doc li {
  color: #3c3c5c;
}

.doc ul {
  padding-left: 22px;
}

.doc li {
  margin-bottom: 8px;
}

/* ---------- Registro (columna angosta) ---------- */

.container {
  width: 100%;
  max-width: 460px;
  margin: 0 auto;
  padding: 32px 20px 48px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.brand {
  text-align: center;
}

.brand-name {
  margin: 0;
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.brand-tagline {
  margin: 4px 0 0;
  font-size: 0.95rem;
  color: var(--text-muted);
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
}

.card-title {
  margin: 0 0 4px;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.card-subtitle {
  margin: 0 0 20px;
  font-size: 0.95rem;
  color: var(--text-muted);
}

.form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field label {
  font-size: 0.9rem;
  font-weight: 600;
}

.optional {
  font-weight: 400;
  color: var(--text-muted);
}

.field input,
.field select {
  width: 100%;
  padding: 12px 14px;
  font-size: 1rem;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  appearance: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.field input:focus,
.field select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(76, 112, 245, 0.18);
}

.hint {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.checks {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 4px 0;
}

.check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.88rem;
  color: var(--text-muted);
  cursor: pointer;
}

.check input {
  margin-top: 3px;
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  accent-color: var(--accent);
  cursor: pointer;
}

.error {
  margin: 0;
  font-size: 0.88rem;
  color: var(--error);
}

.success-card {
  text-align: center;
}

.success-check {
  font-size: 2.5rem;
  line-height: 1;
  margin-bottom: 8px;
}

.success-card .btn {
  margin-top: 8px;
}

/* ---------- Pie legal ---------- */

.site-footer {
  border-top: 1px solid var(--border);
  background: var(--bg-alt);
  padding: 32px 24px 40px;
}

.site-footer-inner {
  max-width: 1020px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
}

.site-footer-legal p {
  margin: 0 0 6px;
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.site-footer-brand {
  font-size: 1rem !important;
  font-weight: 600;
  color: var(--text) !important;
  margin-bottom: 10px !important;
}

.site-footer-links {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.site-footer-links a {
  font-size: 0.82rem;
  color: var(--text-muted);
  text-decoration: none;
}

.site-footer-links a:hover {
  color: var(--accent);
}

@media (max-width: 560px) {
  .site-footer-inner {
    flex-direction: column;
  }
}
