/* =====================================================
   CAPTACIÓN DE LEADS
   Formularios (hero + reserva) y popup de confirmación.
   Archivo independiente: no modifica styles_metodo_residuo.css
===================================================== */


/* ---------- FORMULARIO ---------- */

.lead-form {
  width: 100%;
  max-width: 600px;
}

.lf-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 12px;
}

.lf-field input {
  width: 100%;
  min-height: 58px;
  padding: 0 22px;
  border: 1.5px solid rgba(244, 240, 230, .18);
  border-radius: 100px;
  background: rgba(255, 255, 255, .07);
  color: var(--cream);
  font: inherit;
  font-size: 1rem;
  transition: border-color .25s ease, background .25s ease, box-shadow .25s ease;
}

.lf-field input::placeholder { color: rgba(244, 240, 230, .5); }

.lf-field input:focus {
  outline: none;
  border-color: var(--lime);
  background: rgba(255, 255, 255, .11);
  box-shadow: 0 0 0 4px rgba(184, 209, 143, .18);
}

.lf-field input.is-invalid {
  border-color: #E8A69A;
  box-shadow: 0 0 0 4px rgba(232, 166, 154, .18);
}

.lf-submit { width: 100%; }

.lf-submit[disabled] { cursor: wait; opacity: .85; }

.lf-submit.is-loading .lf-label::after {
  content: "";
  display: inline-block;
  width: 16px;
  height: 16px;
  margin-left: 10px;
  vertical-align: -3px;
  border: 2.5px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: lf-spin .7s linear infinite;
}

@keyframes lf-spin { to { transform: rotate(360deg); } }

/* trampa antibots */
.lf-hp {
  position: absolute !important;
  left: -9999px !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.lf-consent {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 14px;
  color: rgba(244, 240, 230, .66);
  font-size: .8rem;
  line-height: 1.5;
  text-align: left;
  cursor: pointer;
}

.lf-consent input {
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  margin: 1px 0 0;
  accent-color: var(--lime);
  cursor: pointer;
}

.lf-consent a {
  color: var(--lime);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.lf-consent.is-invalid { color: #F2C2B9; }
.lf-consent.is-invalid input { outline: 2px solid #E8A69A; outline-offset: 2px; }

.lf-error {
  margin: 12px 0 0;
  padding: 10px 16px;
  border-radius: 12px;
  background: rgba(232, 166, 154, .14);
  color: #F6D2CB;
  font-size: .86rem;
  text-align: left;
}

/* en la sección de reserva, centrado */
.lead-form-wrap .lead-form { margin: 0 auto; }

.footer-link {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.footer-link:hover { color: var(--lime); }


/* ---------- POPUP ---------- */

.lead-modal {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: grid;
  place-items: center;
  padding: 20px;
}

.lead-modal[hidden] { display: none; }

.lm-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 20, 22, .72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  animation: lm-fade .3s ease;
}

.lm-card {
  position: relative;
  width: min(520px, 100%);
  max-height: calc(100vh - 40px);
  overflow: auto;
  padding: 42px 36px 32px;
  border-radius: 28px;
  background:
    radial-gradient(90% 60% at 50% 0%, rgba(184, 209, 143, .22), transparent 70%),
    var(--brand);
  color: var(--cream);
  text-align: center;
  box-shadow: 0 40px 100px rgba(0, 0, 0, .45);
  animation: lm-pop .6s var(--ease-spring);
}

.lm-card:focus { outline: none; }

@keyframes lm-fade { from { opacity: 0; } }

@keyframes lm-pop {
  from { opacity: 0; transform: translateY(30px) scale(.92); }
  to { opacity: 1; transform: none; }
}

.lm-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, .08);
  color: var(--cream);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  transition: background .2s ease, transform .3s var(--ease-spring);
}

.lm-close:hover { background: rgba(255, 255, 255, .16); transform: rotate(90deg); }

/* hojas que caen */
.lm-leaves { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }

.lm-leaves svg {
  position: absolute;
  top: -40px;
  width: 22px;
  height: 22px;
  fill: var(--lime);
  opacity: .8;
  animation: lm-fall 3.2s ease-in forwards;
}

.lm-leaves svg:nth-child(1) { left: 8%; animation-delay: .1s; }
.lm-leaves svg:nth-child(2) { left: 24%; width: 16px; animation-delay: .5s; fill: var(--green-light); }
.lm-leaves svg:nth-child(3) { left: 46%; animation-delay: .25s; }
.lm-leaves svg:nth-child(4) { left: 64%; width: 18px; animation-delay: .7s; fill: var(--green-light); }
.lm-leaves svg:nth-child(5) { left: 80%; animation-delay: .35s; }
.lm-leaves svg:nth-child(6) { left: 92%; width: 14px; animation-delay: .9s; }

@keyframes lm-fall {
  0% { transform: translateY(0) rotate(0); opacity: 0; }
  10% { opacity: .9; }
  100% { transform: translateY(620px) rotate(320deg); opacity: 0; }
}

.lm-step {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px 7px 8px;
  border-radius: 100px;
  background: rgba(184, 209, 143, .14);
  color: var(--lime);
  font-size: .74rem;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.lm-step b {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--lime);
  color: var(--brand-dark);
  font-size: .75rem;
}

.lm-hello {
  margin: 20px 0 4px;
  color: var(--lime);
  font-family: var(--f-script);
  font-style: italic;
  font-size: 1.9rem;
  line-height: 1.1;
}

.lm-title {
  margin: 0 0 16px;
  font-family: var(--f-display);
  font-weight: 700;
  font-size: clamp(2rem, 6vw, 2.7rem);
  line-height: 1;
  text-transform: uppercase;
}

.lm-title span {
  color: #F2C2B9;
  text-decoration: underline;
  text-decoration-thickness: 3px;
  text-underline-offset: 5px;
}

.lm-copy {
  margin: 0 0 26px;
  color: rgba(244, 240, 230, .8);
  line-height: 1.65;
}

.lm-copy strong { color: var(--cream); }

.lm-whatsapp {
  width: 100%;
  min-height: 64px;
  color: #fff;
  background: #25D366;
  font-size: 1.02rem;
  box-shadow: 0 16px 36px rgba(37, 211, 102, .35);
  animation: lm-pulse 2s infinite 1s;
}

.lm-whatsapp:hover { background: #1fbd5a; }

.wa-icon { width: 24px; height: 24px; flex: 0 0 24px; fill: currentColor; }

@keyframes lm-pulse {
  0%, 100% { box-shadow: 0 16px 36px rgba(37, 211, 102, .35), 0 0 0 0 rgba(37, 211, 102, .5); }
  70% { box-shadow: 0 16px 36px rgba(37, 211, 102, .35), 0 0 0 18px rgba(37, 211, 102, 0); }
}

.lm-note {
  margin: 18px 0 0;
  color: rgba(244, 240, 230, .55);
  font-size: .8rem;
  line-height: 1.5;
}

.lm-note strong { color: rgba(244, 240, 230, .85); word-break: break-all; }

body.lm-open { overflow: hidden; }


/* ---------- MÓVIL ---------- */

@media (max-width: 620px) {

  .lf-fields { grid-template-columns: 1fr; }

  .lf-field input { min-height: 54px; }

  .lm-card { padding: 38px 22px 26px; border-radius: 24px; }

  .lm-whatsapp { font-size: .94rem; padding: 0 16px; }
}
