/* ===========================================================================
   /lista-espera  +  /en/waitlist — dedicated conversion page.

   Design posture: a calm, single-column waitlist page. No distractions,
   no upsells, no hero mockup. Just a warm surface, an oversized eyebrow
   numeral, a proper label-above-input form, and the legal disclosure
   sitting quietly under the submit button where TCPA reviewers expect
   to find it. Heritage palette only (verde / hueso / tinta / rojo);
   the Cash-green app colour is deliberately NOT used here so the page
   reads as "from Pesito" rather than "from the app".
   =========================================================================== */

/* ---------- Page shell ---------- */

.wl-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(1200px 700px at 100% -8%, rgba(0, 166, 81, 0.10) 0%, transparent 60%),
    radial-gradient( 900px 500px at -10% 110%, rgba(212, 169, 74, 0.08) 0%, transparent 65%),
    var(--hueso);
}

.wl-main {
  flex: 1;
  padding: 112px 0 96px;
}
@media (max-width: 768px) {
  .wl-main { padding: 88px 0 56px; }
}

/* ---------- Split layout ---------- */

.wl-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 72px;
  align-items: start;
}
@media (max-width: 1023px) {
  .wl-grid { grid-template-columns: 1fr; gap: 48px; }
}

/* ---------- Left rail ---------- */

.wl-copy { max-width: 520px; }
.wl-copy .how-crumb {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: var(--fs-caption);
  font-weight: 600;
  color: var(--tinta-500);
  margin-bottom: 24px;
  transition: color var(--dur-fast) var(--ease-standard);
}
.wl-copy .how-crumb:hover { color: var(--verde-700); }
.wl-copy h1 {
  color: var(--tinta-900);
  margin-top: 12px;
  max-width: 14ch;
}
.wl-copy h1 .oro-dot { color: var(--oro); }
.wl-lede {
  margin-top: 24px;
  max-width: 460px;
  color: var(--tinta-500);
}

/* Reassurance list — three beats, understated pre-form so it reads as a
   promise rather than a sales pitch. */
.wl-reassure {
  margin-top: 40px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.wl-reassure li {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  font-size: var(--fs-body);
  color: var(--tinta-700);
  line-height: 1.5;
}
.wl-reassure svg {
  flex-shrink: 0;
  margin-top: 3px;
  color: var(--verde-500);
}
.wl-reassure strong {
  font-weight: 700;
  color: var(--tinta-900);
  display: block;
}
.wl-reassure span {
  color: var(--tinta-500);
  font-size: var(--fs-caption);
  display: block;
  margin-top: 2px;
}

/* ---------- The form card ---------- */

.wl-card {
  background: var(--blanco);
  border: 1px solid rgba(11, 11, 11, 0.06);
  border-radius: var(--radius-xl);
  padding: 36px;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.8) inset,
    0 20px 60px -30px rgba(0, 61, 38, 0.30),
    0 2px 8px rgba(11, 11, 11, 0.04);
  max-width: 480px;
  margin-left: auto;
  width: 100%;
}
@media (max-width: 1023px) {
  .wl-card { margin-left: 0; }
}
@media (max-width: 560px) {
  .wl-card { padding: 24px 20px; border-radius: var(--radius-lg); }
}

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

.wl-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
@media (max-width: 420px) {
  .wl-row { grid-template-columns: 1fr; }
}

.wl-field label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--tinta-700);
  letter-spacing: 0.02em;
  margin-bottom: 6px;
}
.wl-field label .req {
  color: var(--verde-700);
  margin-left: 2px;
  font-weight: 700;
}
.wl-field label .opt {
  color: var(--tinta-500);
  font-weight: 500;
  text-transform: lowercase;
  letter-spacing: 0;
  margin-left: 6px;
}
.wl-input {
  width: 100%;
  height: 52px;
  padding: 0 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--tinta-300);
  background: var(--hueso);
  color: var(--tinta-900);
  font-size: var(--fs-body);
  font-weight: 500;
  font-family: inherit;
  transition: border-color var(--dur-fast) var(--ease-standard),
              background var(--dur-fast) var(--ease-standard);
}
.wl-input::placeholder { color: var(--tinta-500); opacity: 0.8; }
.wl-input:hover { border-color: var(--tinta-500); }
.wl-input:focus {
  outline: none;
  border-color: var(--verde-500);
  background: var(--blanco);
  box-shadow: 0 0 0 3px var(--verde-100);
}

/* Consent row.
 *
 * Two variants share this skeleton:
 *   1. `.wl-consent--always` — the marketing-email consent that gates
 *      the submit button. Always visible. Slightly firmer border + a
 *      hairline top rule so it reads as the "Before you continue…"
 *      contract rather than an add-on.
 *   2. Default (toggled via [hidden]) — the SMS consent that only
 *      appears once the phone field has content.
 *
 * The checkbox itself is restyled (rather than hidden) so a TCPA /
 * CAN-SPAM reviewer can see at a glance that the control is real and
 * keyboard-reachable.
 */
.wl-consent {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px 14px 14px 12px;
  background: var(--verde-050);
  border: 1px solid var(--verde-100);
  border-radius: var(--radius-md);
}
.wl-consent[hidden] { display: none; }
.wl-consent--always {
  /* Mark it visually as "this is required". Same palette, heavier
     border so it stands apart from the SMS consent that appears below. */
  border-color: var(--verde-500);
  background: linear-gradient(180deg, var(--verde-050) 0%, var(--blanco) 100%);
}
.wl-consent input[type="checkbox"] {
  flex-shrink: 0;
  appearance: none;
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  margin-top: 2px;
  border: 1.5px solid var(--verde-500);
  border-radius: 6px;
  background: var(--blanco);
  cursor: pointer;
  display: grid;
  place-content: center;
  transition: background var(--dur-fast) var(--ease-standard);
}
.wl-consent input[type="checkbox"]::before {
  content: '';
  width: 11px;
  height: 11px;
  transform: scale(0);
  transition: transform var(--dur-fast) var(--ease-emphasized);
  background: var(--verde-700);
  clip-path: polygon(14% 44%, 0 65%, 50% 100%, 100% 16%, 80% 0%, 43% 62%);
}
.wl-consent input[type="checkbox"]:checked::before { transform: scale(1); }
.wl-consent input[type="checkbox"]:focus-visible {
  outline: 2px solid var(--verde-500);
  outline-offset: 2px;
}
.wl-consent label {
  font-size: 13px;
  color: var(--tinta-700);
  line-height: 1.5;
  cursor: pointer;
  flex: 1;
}
.wl-consent label strong {
  display: block;
  font-weight: 700;
  color: var(--tinta-900);
  margin-bottom: 2px;
  font-size: 13px;
}

/* Submit button — full-width on the card, heritage verde-500 primary.
 *
 * The disabled state (before the user ticks the marketing-consent box)
 * uses a desaturated verde + not-allowed cursor so it's unmistakably
 * "do this first" rather than looking like the normal enabled button.
 */
.wl-form .btn.waitlist-submit {
  margin-top: 8px;
  height: 54px;
  width: 100%;
  justify-content: center;
}
.wl-form .btn.waitlist-submit:disabled,
.wl-form .btn.waitlist-submit[aria-disabled="true"] {
  background: var(--tinta-300);
  color: var(--tinta-500);
  cursor: not-allowed;
  box-shadow: none;
  pointer-events: auto; /* so title / aria still respond to hover */
}
.wl-form .btn.waitlist-submit:disabled:hover,
.wl-form .btn.waitlist-submit[aria-disabled="true"]:hover {
  background: var(--tinta-300);
  color: var(--tinta-500);
  box-shadow: none;
  transform: none;
}

/* Inline error bar sitting between the form and the disclaimer. */
.wl-form-error {
  color: #A50F20;
  background: var(--rojo-050);
  border: 1px solid var(--rojo-200);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 500;
  margin: 4px 0 0;
}

/* Disclosure block — the legal text. Kept quiet but not hidden. */
.wl-legal {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid rgba(11, 11, 11, 0.06);
  font-size: 12px;
  line-height: 1.55;
  color: var(--tinta-500);
}
.wl-legal a {
  color: var(--verde-700);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.wl-legal a:hover { color: var(--verde-900); }

/* ---------- Success state ---------- */

.wl-success {
  display: none;
  text-align: center;
  padding: 12px 4px;
}
.wl-form.is-success { display: none; }
.wl-form.is-success ~ .wl-success { display: block; }

.wl-success-badge {
  width: 72px;
  height: 72px;
  margin: 0 auto 20px;
  border-radius: 50%;
  background: var(--verde-100);
  display: grid;
  place-content: center;
  color: var(--verde-700);
}
.wl-success h2 {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--tinta-900);
  margin-bottom: 12px;
}
.wl-success p {
  color: var(--tinta-500);
  font-size: var(--fs-body);
  line-height: 1.55;
  max-width: 36ch;
  margin: 0 auto;
}
.wl-success .wl-success-sub {
  margin-top: 20px;
  font-size: 12px;
  color: var(--tinta-500);
}

/* Submitting state — muted button, animated dot progress inline. */
.wl-form.is-submitting .waitlist-submit { opacity: 0.6; cursor: wait; }
