/* Embudo de prospectos. Tarjeta azul marino con los colores del logo. */
.funnel {
  --f-navy: #0B2D5E;
  --f-sprout: #72B85A;
  --f-soft: #B9CBE6;
  --f-display: "Lexend", "Avenir Next", "Segoe UI", sans-serif;
  --f-text: "Atkinson Hyperlegible", "Segoe UI", system-ui, sans-serif;

  background: var(--f-navy); color: #fff;
  border-radius: 1.75rem; padding: clamp(1.5rem, 4vw, 2.75rem);
  font-family: var(--f-text);
  min-height: 24rem;
  scroll-margin-top: 6rem;
}
.funnel[aria-busy="true"] { display: grid; place-items: center; }
.funnel[aria-busy="true"]::before { content: "Cargando…"; color: var(--f-soft); }

.funnel-progress { display: flex; align-items: center; gap: 1rem; font: 500 .92rem/1 var(--f-display); color: var(--f-soft); }
.funnel-bar { flex: 1; height: 6px; border-radius: 3px; background: rgba(255,255,255,.14); overflow: hidden; }
.funnel-bar span { display: block; height: 100%; background: var(--f-sprout); border-radius: 3px; transition: width .35s ease; }

.funnel-step { border: 0; margin: 1.75rem 0 0; padding: 0; min-width: 0; display: grid; gap: 1.1rem; }
.funnel-title { font: 600 clamp(1.4rem, 3vw, 1.75rem)/1.2 var(--f-display); letter-spacing: -0.02em; margin: 0; padding: 0; color: #fff; }
.funnel-title:focus { outline: none; }
.funnel-step > legend.funnel-title { margin-bottom: 1.1rem; }
.funnel-intro { margin: -.4rem 0 0; color: #D8E2F1; }

.funnel-options { display: grid; gap: .7rem; }
.funnel-option { display: block; cursor: pointer; }
.funnel-option input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.funnel-option-text {
  display: grid; gap: .2rem; padding: 1rem 1.2rem 1rem 3.2rem; position: relative;
  border: 2px solid rgba(255,255,255,.22); border-radius: 1rem;
  transition: border-color .15s, background-color .15s;
}
.funnel-option-text::before { /* círculo de selección, como el punto del logo */
  content: ""; position: absolute; left: 1.1rem; top: 1.1rem;
  width: 1.2rem; height: 1.2rem; border-radius: 50%; border: 2px solid rgba(255,255,255,.55);
  transition: border-color .15s, background-color .15s, box-shadow .15s;
}
.funnel-option strong { font: 500 1.1rem/1.3 var(--f-display); }
.funnel-option small { color: var(--f-soft); font-size: .95rem; }
.funnel-option:hover .funnel-option-text { border-color: rgba(255,255,255,.5); background: rgba(255,255,255,.04); }
.funnel-option input:checked + .funnel-option-text { border-color: var(--f-sprout); background: rgba(114,184,90,.12); }
.funnel-option input:checked + .funnel-option-text::before { border-color: var(--f-sprout); background: var(--f-sprout); box-shadow: inset 0 0 0 3px var(--f-navy); }
.funnel-option input:focus-visible + .funnel-option-text { outline: 3px solid #fff; outline-offset: 2px; }

.funnel-field { display: grid; gap: .4rem; }
.funnel-field label { font: 500 1rem/1.3 var(--f-display); }
.funnel-field input {
  font: 400 1.05rem/1.4 var(--f-text); color: var(--f-navy); background: #fff;
  border: 2px solid #fff; border-radius: .8rem; padding: .85rem 1rem; width: 100%;
}
.funnel-field input:focus { outline: none; border-color: var(--f-sprout); box-shadow: 0 0 0 3px rgba(114,184,90,.4); }
.funnel [aria-invalid="true"] { border-color: #FF9C8A; }
.funnel-hint { font-size: .92rem; color: var(--f-soft); }
.funnel-error { color: #FFC4B8; font-size: .95rem; }
.funnel-form-error { margin: 0; padding: .8rem 1rem; border-radius: .7rem; background: rgba(255,156,138,.15); color: #FFD9D1; }

.funnel-consent { display: grid; grid-template-columns: auto 1fr; gap: .7rem; font-size: .95rem; color: #D8E2F1; align-items: start; cursor: pointer; }
.funnel-consent a { color: #fff; text-underline-offset: 2px; }
.funnel-consent a:hover { color: var(--f-sprout); }
.funnel-consent input { width: 1.2rem; height: 1.2rem; margin-top: .2rem; accent-color: var(--f-sprout); }

.funnel-trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.funnel-submit {
  font: 600 1.05rem/1 var(--f-display); padding: 1.05rem 1.6rem; border-radius: 999px; border: 0;
  background: var(--f-sprout); color: var(--f-navy); cursor: pointer; width: 100%; margin-top: .25rem;
}
.funnel-submit:hover { background: #86C76E; }
.funnel-submit:disabled { opacity: .7; cursor: progress; }
.funnel-submit:focus-visible, .funnel-back:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }

.funnel-back {
  justify-self: start; background: none; border: 0; padding: .25rem 0; cursor: pointer;
  font: 500 .98rem/1 var(--f-display); color: var(--f-soft); text-decoration: underline; text-underline-offset: 3px;
}
.funnel-back:hover { color: #fff; }

.funnel-done { margin-top: 1rem; display: grid; gap: .9rem; }
.funnel-done p { margin: 0; color: #D8E2F1; }

@media (prefers-reduced-motion: reduce) {
  .funnel-bar span, .funnel-option-text, .funnel-option-text::before { transition: none; }
}
