/* Páginas del embudo: /auditoria, /gracias, /privacidad (usa los tokens de styles.css) */

body.funnel { background: var(--paper); color: var(--on-light); }
body.funnel--dark { background: var(--ink); color: var(--on-dark); }

.funnel-header {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 20px var(--gutter);
}
.funnel .brand__logo { filter: none; }
.funnel--dark .brand__logo { filter: brightness(0) invert(1); }
.funnel-header__wa { text-decoration: none; color: var(--on-light-dim); }
.funnel-header__wa:hover { color: var(--on-light); }

/* ---------- Auditoría ---------- */
.audit {
  max-width: 1440px; margin: 0 auto;
  padding: clamp(24px, 5vw, 64px) var(--gutter) 96px;
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 6vw, 96px);
  align-items: start;
}
.audit__aside { position: sticky; top: 32px; }
.audit__title {
  font-family: var(--f-display); font-size: clamp(2rem, 4.2vw, 3.8rem); font-weight: 800; font-variation-settings: "wdth" 76;
  line-height: .95; text-transform: uppercase;
}
.audit__lede { margin-top: 20px; font-size: var(--fs-m); color: var(--on-light-dim); line-height: 1.45; max-width: 34ch; }
.audit__promise { margin-top: 28px; display: grid; gap: 12px; }
.audit__promise li { display: flex; align-items: center; gap: 12px; font-weight: 500; }
@media (max-width: 900px) {
  .audit { grid-template-columns: 1fr; }
  .audit__aside { position: static; }
  .audit__promise { grid-template-columns: 1fr; }
}

.audit__form-wrap {
  background: #fff; border-radius: 20px; border: 1px solid rgba(12,20,34,.1);
  padding: clamp(20px, 4vw, 48px);
  box-shadow: 0 30px 60px -40px rgba(12,20,34,.35);
}

/* Progreso como traza de circuito */
.progress { position: relative; display: grid; grid-template-columns: repeat(3, 1fr); margin-bottom: 40px; }
.progress::before {
  content: ""; position: absolute; top: 10px; left: 10px; right: 10px; height: 3px; background: var(--paper-2);
}
.progress__step { position: relative; display: grid; gap: 10px; justify-items: start; color: var(--on-light-dim); }
.progress__step:nth-child(2) { justify-items: center; }
.progress__step:nth-child(3) { justify-items: end; }
.progress__pad {
  position: relative; z-index: 1; width: 22px; height: 22px; border-radius: 50%;
  background: #fff; border: 3px solid var(--paper-2); transition: all .3s;
}
.progress__step.is-current { color: var(--on-light); }
.progress__step.is-current .progress__pad { border-color: var(--copper); box-shadow: 0 0 0 5px rgba(212,129,63,.18); }
.progress__step.is-done .progress__pad { background: var(--copper); border-color: var(--copper); }

.form fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.step-panel__title {
  padding: 0; margin-bottom: 28px;
  font-family: var(--f-display); font-size: clamp(1.5rem, 2.4vw, 2rem); font-weight: 750; font-variation-settings: "wdth" 85;
}
.step-panel__title:focus { outline: none; }
.field { margin-bottom: 28px; }
.field label:not(.opt):not(.inline-check), .field__label { display: block; font-weight: 600; margin-bottom: 10px; }
.field__label small, .field label small { font-weight: 400; color: var(--on-light-dim); margin-left: 6px; }
.field input[type="text"], .field input[type="email"], .field input[type="tel"], .field select {
  width: 100%; font: inherit; color: inherit;
  padding: 14px 16px; border-radius: 12px; border: 1.5px solid #C5CDD7; background: #fff;
  transition: border-color .2s, box-shadow .2s;
}
.field input:focus, .field select:focus { outline: none; border-color: var(--navy); box-shadow: 0 0 0 4px rgba(27,38,59,.12); }
.field input:disabled { background: var(--paper); color: var(--on-light-dim); }
.field.has-error input, .field.has-error select { border-color: #C2412D; }
.field__error { color: #B23A27; font-size: .9rem; margin-top: 8px; }
.field__error:empty { display: none; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 20px; }
@media (max-width: 560px) { .field-row { grid-template-columns: 1fr; } }

.options { display: flex; flex-wrap: wrap; gap: 10px; }
.options--stack { flex-direction: column; }
.opt { position: relative; cursor: pointer; }
.opt input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.opt span {
  display: inline-block; padding: 11px 16px; border-radius: 999px; border: 1.5px solid #C5CDD7; background: #fff;
  font-size: .95rem; transition: border-color .15s, background-color .15s, color .15s;
}
.options--stack .opt span { display: block; border-radius: 12px; padding: 14px 16px; }
.opt:hover span { border-color: var(--navy); }
.opt input:checked + span { background: var(--navy); border-color: var(--navy); color: #fff; }
.opt input:focus-visible + span { outline: 2px solid var(--copper); outline-offset: 2px; }
.field.has-error .opt span { border-color: #E1A196; }

.inline-check { display: flex; align-items: flex-start; gap: 10px; margin-top: 12px; font-size: .95rem; color: var(--on-light-dim); cursor: pointer; }
.inline-check input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--navy); flex: none; }
.inline-check--consent { color: var(--on-light); white-space: nowrap; align-items: center; }
.inline-check--consent input { margin-top: 0; }
@media (max-width: 360px) { .inline-check--consent { font-size: .875rem; } }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

.form__nav { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 12px; padding-top: 24px; border-top: 1px solid var(--paper-2); }
.form__nav [data-next] { margin-left: auto; }
.form__nav .btn:disabled { opacity: .6; cursor: progress; }
.btn-back { background: none; border: 0; padding: 10px 0; cursor: pointer; color: var(--on-light-dim); font-weight: 500; }
.btn-back:hover { color: var(--on-light); }
.form__status { margin-top: 12px; color: var(--on-light-dim); font-size: .9rem; }
.form__status:empty { display: none; }

/* ---------- Gracias ---------- */
.thanks { padding-block: clamp(32px, 8vh, 96px) 80px; }
.flow-mini { display: flex; flex-wrap: wrap; gap: 8px 28px; margin-bottom: clamp(32px, 6vw, 64px); }
.flow-mini li {
  position: relative; display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--f-mono); font-size: var(--fs-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--on-dark-dim);
}
.flow-mini li::before { content: ""; width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--steel); }
.flow-mini li.is-on { color: var(--on-dark); }
.flow-mini li.is-on::before { background: var(--copper); border-color: var(--copper); }
.flow-mini li.is-now::before { box-shadow: 0 0 0 5px rgba(212,129,63,.25), 0 0 16px var(--copper); }
.flow-mini li + li::after { content: "→"; position: absolute; left: -20px; color: var(--steel); }
@media (max-width: 520px) { .flow-mini li + li::after { display: none; } }

.thanks__title {
  font-family: var(--f-display); font-size: var(--fs-xl); font-weight: 820; font-variation-settings: "wdth" 70;
  line-height: .92; text-transform: uppercase; max-width: 15ch;
}
.thanks__title [data-name] { color: var(--copper); }
.thanks__next { margin-top: 32px; display: grid; justify-items: start; gap: 22px; }
.thanks__lede { font-size: var(--fs-m); max-width: 42ch; line-height: 1.45; }
.thanks__alt { color: var(--on-dark-dim); font-size: .95rem; }
.thanks__grid {
  margin-top: clamp(64px, 10vw, 120px); padding-top: 40px; border-top: 1px solid color-mix(in srgb, var(--steel) 50%, transparent);
  display: grid; grid-template-columns: 1fr 1fr; gap: 48px;
}
@media (max-width: 860px) { .thanks__grid { grid-template-columns: 1fr; } }
.timeline { display: grid; gap: 0; }
.timeline li { display: grid; gap: 4px; padding: 16px 0 16px 24px; border-left: 2px solid var(--copper); position: relative; }
.timeline li::before { content: ""; position: absolute; left: -7px; top: 22px; width: 12px; height: 12px; border-radius: 50%; background: var(--ink); border: 2px solid var(--copper); }
.timeline .mono { color: var(--copper); }
.scope-dark li { padding: 14px 0; border-bottom: 1px solid color-mix(in srgb, var(--steel) 45%, transparent); color: var(--on-dark-dim); }
.scope-dark strong { color: var(--on-dark); margin-right: 6px; }
.thanks__tip { margin-top: 20px; color: var(--on-dark-dim); font-size: .95rem; }
.thanks__home { display: inline-block; margin-top: 64px; text-decoration: none; color: var(--on-dark-dim); }
.thanks__home:hover { color: var(--on-dark); }

/* ---------- Legal ---------- */
.legal { max-width: 760px; padding-block: 40px 96px; }
.legal h1 { font-family: var(--f-display); font-size: clamp(2rem, 4vw, 3rem); font-weight: 800; font-variation-settings: "wdth" 80; line-height: 1; margin-bottom: 12px; }
.legal h2 { font-family: var(--f-display); font-size: 1.25rem; font-weight: 700; margin: 36px 0 10px; }
.legal p { color: var(--on-light-dim); }
.legal .mono { color: var(--steel); }
