:root {
  --bg: #0f1720;
  --surface: #ffffff;
  --ink: #1a2330;
  --ink-soft: #5b6b7d;
  --brand: #1f9d72;
  --brand-dark: #157a58;
  --brand-soft: #e7f6ef;
  --line: #e2e8f0;
  --danger: #d64545;
  --radius: 14px;
  --shadow: 0 10px 40px rgba(15, 23, 32, 0.12);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font);
  color: var(--ink);
  background: linear-gradient(160deg, #0f1720 0%, #16314f 100%);
  min-height: 100vh;
  min-height: 100dvh;
  display: block;                 /* SIN flex: nunca centra verticalmente */
  padding: calc(env(safe-area-inset-top) + 28px) 18px calc(env(safe-area-inset-bottom) + 28px);
  line-height: 1.5;
}
@media (min-height: 760px) { body { padding-top: calc(env(safe-area-inset-top) + 44px); } }

.funnel {
  width: 100%;
  max-width: 480px;
  margin: 0 auto;                 /* centrado horizontal, pegado arriba */
  background: var(--surface);
  border-radius: 20px;
  box-shadow: var(--shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* Header / progress */
.funnel__head { padding: 18px 22px 13px; border-bottom: 1px solid var(--line); }

.brand { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.brand__group { display: flex; align-items: center; gap: 8px; min-width: 0; }
.brand__dot { width: 10px; height: 10px; border-radius: 50%; background: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); flex-shrink: 0; }
.brand__name { font-size: 13px; font-weight: 600; color: var(--ink-soft); letter-spacing: .2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.progress { height: 8px; background: var(--line); border-radius: 99px; overflow: hidden; }
.progress__bar { height: 100%; width: 10%; background: linear-gradient(90deg, var(--brand), var(--brand-dark)); border-radius: 99px; transition: width .35s ease; }
.progress__label { font-size: 12px; font-weight: 600; color: var(--ink-soft); white-space: nowrap; flex-shrink: 0; }

/* Steps */
form { padding: 18px 22px 10px; }
.step { display: none; animation: fade .3s ease; }
.step.is-active { display: block; }
@keyframes fade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.step__title { font-size: 22px; font-weight: 700; line-height: 1.25; margin-bottom: 6px; }
.step__lead { color: var(--ink-soft); margin-bottom: 18px; }
.step__note { font-size: 13px; color: var(--brand-dark); background: var(--brand-soft); padding: 10px 12px; border-radius: 10px; margin: 16px 0 20px; }
.muted { color: var(--ink-soft); font-weight: 400; font-size: .85em; }

.features { list-style: none; display: flex; flex-direction: column; gap: 10px; margin-bottom: 8px; }
.features li { background: #f7fafc; border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; font-size: 14px; }

/* Hero */
.hero { text-align: center; margin-bottom: 12px; }
.hero__badge {
  display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: .3px;
  text-transform: uppercase; color: #fff; background: var(--ink);
  padding: 5px 11px; border-radius: 99px; margin-bottom: 9px;
}
.hero__salary {
  font-size: 33px; font-weight: 800; line-height: 1; color: var(--brand-dark);
  margin-bottom: 7px;
}
.hero__salary span { font-size: 15px; font-weight: 600; color: var(--ink-soft); }
.hero__lead { color: var(--ink-soft); font-size: 13px; line-height: 1.38; }
.hero__lead strong { color: var(--ink); }

/* CTA superior (sobre los beneficios) */
.nav--cta { margin-bottom: 12px; padding-top: 0; }

.terms { background: #fff7ed; border: 1px solid #fed7aa; border-radius: 10px; padding: 8px 13px; margin: 12px 0; text-align: center; }
.terms p { font-size: 12.5px; color: #9a3412; line-height: 1.35; }
.terms strong { color: #7c2d12; }

.step__hint { text-align: center; font-size: 12px; color: var(--ink-soft); margin-top: 9px; }

/* Beneficios en una sola línea (hero, compacto pero completo) */
.benefits--inline { gap: 7px; margin-bottom: 0; }
.benefits--inline .benefit { align-items: center; padding: 8px 12px; border-radius: 10px; gap: 10px; }
.benefits--inline .benefit__icon { font-size: 17px; width: 20px; }
.benefits--inline .benefit__body { font-size: 12.5px; line-height: 1.3; color: var(--ink-soft); }
.benefits--inline .benefit__body strong { display: inline; color: var(--ink); font-size: 13px; }

/* Preguntas tipo funnel */
.q__title { font-size: 21px; font-weight: 700; line-height: 1.3; margin-bottom: 6px; }
.q__sub { color: var(--ink-soft); margin-bottom: 18px; font-size: 14.5px; }
.opts { display: flex; flex-direction: column; gap: 11px; }
.opt {
  width: 100%; text-align: left; font: inherit; font-size: 16px; font-weight: 500;
  color: var(--ink); background: #fff;
  border: 1.5px solid var(--line); border-radius: 12px;
  padding: 16px 18px; cursor: pointer;
  transition: border-color .15s, background .15s, transform .05s;
  -webkit-tap-highlight-color: transparent;
}
.opt:hover { border-color: var(--brand); }
.opt:active { transform: scale(.99); }
.opt.is-selected { border-color: var(--brand); background: var(--brand-soft); }
.nav--back { margin-top: 16px; padding-top: 0; }

/* Pantalla de descalificación */
.blocked { padding: 48px 28px; text-align: center; }
.blocked__icon { font-size: 46px; margin-bottom: 16px; }

/* Benefits */
.benefits__title { font-size: 15px; font-weight: 700; color: var(--ink); margin: 4px 0 12px; }
.benefits { list-style: none; display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.benefit {
  display: flex; align-items: center; gap: 12px;
  background: var(--brand-soft);
  border: 1px solid #cdeede;
  border-radius: 11px;
  padding: 10px 14px;
}
.benefit__icon {
  font-size: 20px; line-height: 1.2; flex-shrink: 0;
  width: 24px; text-align: center;
}
.benefit__body { font-size: 13px; color: var(--ink-soft); line-height: 1.3; }
.benefit__body strong { display: block; color: var(--ink); font-size: 14px; margin-bottom: 1px; }

/* Fields */
.field { display: block; margin-bottom: 18px; border: 0; }
.field__label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 7px; }
input[type="text"], input[type="tel"], textarea {
  width: 100%;
  font: inherit;
  padding: 13px 14px;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  transition: border-color .15s, box-shadow .15s;
}
input[type="file"] { width: 100%; font: inherit; font-size: 14px; padding: 10px 0; }

/* Upload con botones cámara / galería */
.upload { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.upload__input { display: none; }
.upload__btn {
  font: inherit; font-size: 14px; font-weight: 600;
  padding: 11px 15px; border-radius: 10px; cursor: pointer;
  border: 1.5px solid var(--line); background: #fff; color: var(--ink);
  -webkit-tap-highlight-color: transparent;
}
.upload__btn--alt { color: var(--ink-soft); }
.upload__btn:active { transform: scale(.98); }
.upload__name { width: 100%; font-size: 13px; color: var(--brand-dark); font-weight: 600; word-break: break-all; }
textarea { resize: vertical; }
input:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
input.invalid, .choices.invalid { border-color: var(--danger); }
.field-error { color: var(--danger); font-size: 13px; margin-top: 6px; display: none; }
.field-error.show { display: block; }

/* Choices (radio) */
.choices { display: flex; flex-direction: column; gap: 10px; }
.choices--row { flex-direction: row; gap: 12px; }
.choices--row .choice { flex: 1; }
.choice, .check {
  display: flex; align-items: center; gap: 11px;
  padding: 13px 14px;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  cursor: pointer;
  font-size: 15px;
  transition: border-color .15s, background .15s;
}
.choice input, .check input { width: 20px; height: 20px; accent-color: var(--brand); flex-shrink: 0; }
.choice:has(input:checked), .check:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); }

/* Checks grid */
.checks { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.check--consent { margin-top: 4px; align-items: flex-start; font-size: 14px; }
.check--consent input { margin-top: 2px; }

/* Nav buttons */
.nav { display: flex; gap: 10px; margin-top: 8px; padding-top: 8px; }
.btn {
  font: inherit; font-weight: 600; font-size: 16px;
  padding: 14px 18px;
  border: 0; border-radius: 12px;
  cursor: pointer;
  transition: transform .05s, background .15s, opacity .15s;
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: scale(.985); }
.btn--primary { background: var(--brand); color: #fff; flex: 1; }
.btn--primary:hover { background: var(--brand-dark); }
.btn--ghost { background: #fff; color: var(--ink-soft); border: 1.5px solid var(--line); }
.btn--ghost:hover { border-color: var(--ink-soft); }
.btn--block { width: 100%; }
.btn--sm { font-size: 14px; padding: 9px 14px; }
.btn[disabled] { opacity: .6; cursor: progress; }

/* Honeypot hidden */
.hidden-field { position: absolute; left: -9999px; }

/* Footer */
.funnel__foot { padding: 14px 22px 20px; border-top: 1px solid var(--line); }
.funnel__foot p { font-size: 12px; color: var(--ink-soft); text-align: center; }

/* Thanks page */
.thanks { padding: 48px 28px; text-align: center; }
.thanks__icon {
  width: 72px; height: 72px; margin: 0 auto 20px;
  border-radius: 50%; background: var(--brand-soft); color: var(--brand);
  font-size: 38px; line-height: 72px; font-weight: 700;
}
.thanks__text { color: var(--ink-soft); margin: 16px 0 28px; }
.thanks__text strong { color: var(--ink); }
.thanks__tips { display: flex; flex-direction: column; gap: 8px; background: var(--brand-soft); border: 1px solid #cdeede; border-radius: 12px; padding: 14px 16px; margin-bottom: 22px; }
.thanks__tips p { font-size: 14px; color: var(--ink); }
.thanks__bye { font-size: 15px; font-weight: 600; color: var(--brand-dark); }
.thanks .btn { display: inline-block; text-decoration: none; }

/* Acción WhatsApp en la página de gracias */
.thanks__action { background: #f7fafc; border: 1px solid var(--line); border-radius: 14px; padding: 18px 16px; margin: 8px 0 22px; }
.thanks__cta-text { font-size: 14.5px; color: var(--ink); line-height: 1.45; margin-bottom: 14px; }
.btn--wa { background: #25D366; color: #fff; font-size: 17px; }
.btn--wa:hover { background: #1ebe5b; }
.thanks__number { font-size: 13px; color: var(--ink-soft); margin-top: 12px; }
.thanks__number strong { color: var(--ink); }

@media (max-width: 380px) {
  .checks { grid-template-columns: 1fr; }
  .step__title { font-size: 20px; }
}
