/* Leyes Bonitas · Lista de espera
   Lo de la portada vive en el <style> de index.html (CSS crítico).
   Aquí, todo lo que queda por debajo. Mismas variables (:root). */

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* ---------- Bloques: mucho aire ---------- */
.bloque { padding: 64px 0 8px; }
/* Lo que aún no está en pantalla no se maqueta hasta que te acercas: la portada sale antes. */
main > .bloque:not(.bloque--form) { content-visibility: auto; contain-intrinsic-size: auto 1100px; }
.bloque + .bloque { padding-top: 72px; }
.bloque h2 { font-size: clamp(28px, 7.4vw, 40px); }
.rotulo {
  display: inline-block; margin-bottom: 10px; padding: 3px 12px; border-radius: 999px;
  background: var(--menta); color: var(--verde-hondo);
  font-size: 14px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
}
.bajada { margin-top: 10px; color: var(--tinta-2); }

/* ---------- 2 · Qué es ---------- */
.que-es { padding-top: 48px; }
.entradilla { font-size: 21px; line-height: 1.5; }
.entradilla strong { font-weight: 600; color: var(--verde-hondo); }
.aviso-libro {
  display: flex; gap: 14px; align-items: flex-start; margin-top: 28px; padding: 18px;
  border-radius: var(--radio); background: #fff; border: 2px solid var(--menta-2);
}
.aviso-libro img { width: 44px; height: 44px; flex: none; }
.aviso-libro strong { font-weight: 600; }

/* ---------- 3 · Piezas de un artículo ---------- */
.piezas { list-style: none; margin: 26px 0 0; padding: 0; display: grid; gap: 10px; }
.piezas li {
  display: flex; gap: 14px; align-items: center; padding: 12px 14px;
  border-radius: 16px; background: #fff; border: 1px solid #ECEFEC;
}
.piezas img { width: 44px; height: 44px; flex: none; }
.piezas p { font-size: 16px; line-height: 1.4; color: var(--tinta-2); }
.piezas strong { display: block; font-size: 17px; font-weight: 600; color: var(--tinta); }

/* ---------- Carrusel de capturas ---------- */
.carrusel {
  display: flex; gap: 18px; margin-top: 34px; padding: 6px 16px 18px;
  overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding: 0 16px;
  -webkit-overflow-scrolling: touch; scrollbar-width: none;
}
.carrusel::-webkit-scrollbar { display: none; }
.carrusel figure { margin: 0; flex: none; scroll-snap-align: start; }
.carrusel .movil { width: 200px; border-radius: 30px; padding: 7px; box-shadow: 0 18px 36px -22px rgba(10, 60, 50, .5); }
.carrusel .movil img { border-radius: 24px; }
.carrusel figcaption { margin-top: 10px; text-align: center; font-size: 15px; font-weight: 500; color: var(--tinta-2); }
.desliza { margin-top: 2px; text-align: center; font-size: 14px; color: var(--tinta-2); }
@media (min-width: 900px) {
  .carrusel { justify-content: center; flex-wrap: wrap; overflow: visible; }
  .carrusel .movil { width: 168px; }
  .desliza { display: none; }
  /* En pantalla ancha, líneas cortas: se lee mejor. */
  .entradilla, .aviso-libro { max-width: 720px; }
  .oferta, .tarjeta-form { max-width: 640px; margin-left: auto; margin-right: auto; }
}

/* ---------- 4 · Búnker (el único bloque en rosa) ---------- */
.bunker {
  margin-top: 26px; padding: 24px 20px 0; border-radius: 26px; overflow: hidden;
  background: var(--rosa); display: flex; flex-direction: column;
}
.bunker-nombre {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 15px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--rosa-tinta);
}
.bunker-nombre img { width: 36px; height: 36px; }
.bunker h3 { margin-top: 12px; font-size: clamp(25px, 6.6vw, 34px); line-height: 1.18; }
.bunker-texto > p:last-child { margin-top: 12px; color: #4A4644; }
.bunker .movil { width: 250px; margin: 26px auto -150px; border-radius: 36px; padding: 8px; }
.bunker .movil img { border-radius: 28px; }
.piezas--acomp { margin-top: 26px; }
.carrusel--corto { margin-top: 22px; }
.cierre-pilar { margin-top: 18px; text-align: center; font-size: 20px; font-weight: 500; color: var(--verde-hondo); }
@media (min-width: 900px) {
  .bunker { flex-direction: row; align-items: center; gap: 40px; padding: 40px 40px 0; }
  .bunker-texto { flex: 1; padding-bottom: 40px; }
  .bunker .movil { margin: 0 0 -150px; flex: none; }
  .piezas { grid-template-columns: 1fr 1fr; }
  .piezas--acomp { grid-template-columns: 1fr 1fr 1fr; }
}

/* ---------- 5 · Oferta ---------- */
.oferta {
  padding: 26px 20px; border-radius: 26px; background: #fff;
  border: 2px solid var(--verde); box-shadow: 0 20px 40px -30px rgba(14, 116, 102, .55);
}
.ventajas { list-style: none; margin: 18px 0 0; padding: 0; display: grid; gap: 14px; }
.ventajas li { position: relative; padding-left: 36px; color: var(--tinta-2); }
.ventajas li::before {
  content: ""; position: absolute; left: 0; top: 2px; width: 24px; height: 24px; border-radius: 50%;
  background: var(--verde) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6.5 12.5l3.6 3.6L17.5 8.7' fill='none' stroke='%23fff' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/18px no-repeat;
}
.ventajas strong { display: block; color: var(--tinta); font-weight: 600; font-size: 18px; }
.pack {
  display: flex; gap: 12px; align-items: flex-start; margin-top: 20px; padding: 14px;
  border-radius: 14px; background: var(--menta); font-size: 16px; line-height: 1.45;
}
.pack img { width: 34px; height: 34px; flex: none; }
.pack strong { font-weight: 600; }
.letra-pequena { margin-top: 16px; font-size: 15px; color: var(--tinta-2); }

/* ---------- 6 · Apúntate ---------- */
.bloque--form { padding: 48px 0 72px; margin-top: 64px; background: var(--menta); scroll-margin-top: 0; }
.bloque--form:focus { outline: none; }
.tarjeta-form { padding: 26px 20px; border-radius: 26px; background: #fff; box-shadow: 0 18px 40px -28px rgba(10, 60, 50, .5); }
.tarjeta-form h2 { font-size: clamp(29px, 7.6vw, 38px); }
/* Qué pasa, en tres pasos */
.pasos { list-style: none; margin: 18px 0 0; padding: 0; display: grid; gap: 12px; }
.pasos li { display: flex; gap: 12px; align-items: flex-start; }
.paso-num {
  flex: none; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center;
  background: var(--menta); color: var(--verde-hondo); font-weight: 700; font-size: 17px; line-height: 1;
}
.pasos p { padding-top: 3px; font-size: 18px; line-height: 1.4; color: var(--tinta); }
.pasos strong { font-weight: 600; }
#formulario { margin-top: 26px; padding-top: 24px; border-top: 1px solid #E6ECE9; display: grid; gap: 22px; }
.campo { margin: 0; padding: 0; border: 0; min-width: 0; }
.campo > label, .campo legend { display: block; margin-bottom: 8px; padding: 0; font-weight: 600; font-size: 18px; color: var(--tinta); }
.caja-email { position: relative; }
#email {
  width: 100%; min-height: 56px; padding: 14px 48px 14px 16px; border-radius: 14px;
  border: 2px solid #B9CCC4; background: #fff; color: var(--tinta);
  font: 400 18px/1.2 var(--letra); /* ≥16 px: iOS no hace zoom */
  -webkit-appearance: none; appearance: none; transition: border-color .15s;
}
#email::placeholder { color: #8A918D; }
#email:focus { outline: none; border-color: var(--verde); box-shadow: 0 0 0 4px rgba(14, 116, 102, .18); }
#email[aria-invalid="true"] { border-color: var(--error); }
.ok-icono {
  position: absolute; right: 14px; top: 50%; width: 24px; height: 24px; margin-top: -12px;
  border-radius: 50%; opacity: 0; transform: scale(.6); transition: opacity .2s, transform .2s;
  background: var(--verde) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6.5 12.5l3.6 3.6L17.5 8.7' fill='none' stroke='%23fff' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/18px no-repeat;
}
.caja-email.es-valido .ok-icono { opacity: 1; transform: scale(1); }
.msg { margin-top: 6px; font-size: 16px; line-height: 1.4; color: var(--error); }
.msg:empty { display: none; }
.msg .sugerencia {
  display: inline; min-height: 44px; padding: 0; border: 0; background: none; cursor: pointer;
  font: inherit; font-weight: 600; color: var(--verde-hondo); text-decoration: underline; text-underline-offset: 3px;
}
.msg--sugerencia { color: var(--tinta); }

/* Sí / Todavía no: control segmentado de verdad (radios) */
.segmentos { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.segmentos input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.segmentos label {
  display: flex; align-items: center; justify-content: center; min-height: 56px; padding: 10px;
  border-radius: 14px; border: 2px solid #B9CCC4; background: #fff; cursor: pointer;
  font-weight: 500; font-size: 18px; text-align: center; transition: border-color .15s, background .15s, color .15s;
  -webkit-tap-highlight-color: transparent;
}
.segmentos input:checked + label { border-color: var(--verde); background: var(--verde); color: #fff; font-weight: 600; }
.segmentos input:focus-visible + label { outline: 3px solid var(--verde); outline-offset: 3px; }
.segmentos[aria-invalid="true"] label { border-color: var(--error); }

.campo--consent { display: grid; grid-template-columns: 28px 1fr; column-gap: 12px; align-items: start; }
.campo--consent input {
  width: 26px; height: 26px; margin: 2px 0 0; accent-color: var(--verde); cursor: pointer;
}
.campo--consent label { margin: 0; font-weight: 400; font-size: 17px; line-height: 1.45; color: var(--tinta); cursor: pointer; }
.campo--consent label a { color: var(--verde-hondo); font-weight: 500; }
.campo--consent .msg { grid-column: 2; }
/* La casilla se ve de 26 px, pero toda la frase de al lado también la marca. */

.trampa { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

#enviar { position: relative; margin-top: 4px; }
#enviar[disabled] { opacity: .85; cursor: progress; }
.girando {
  display: none; width: 20px; height: 20px; border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, .35); border-top-color: #fff; animation: gira .8s linear infinite;
}
#enviar[aria-busy="true"] .girando { display: inline-block; }
@keyframes gira { to { transform: rotate(360deg); } }
.msg--general { text-align: center; }
.info-datos { font-size: 14px; line-height: 1.5; color: var(--tinta-2); }
.info-datos a { color: var(--verde-hondo); font-weight: 500; }

/* Éxito */
.exito { text-align: center; padding: 6px 0 4px; }
.exito:focus { outline: none; }
.exito-muneco { width: 110px; height: auto; margin: 0 auto 10px; animation: saluda 1.8s ease-in-out 1; transform-origin: 50% 90%; }
@keyframes saluda { 0%, 100% { transform: rotate(0); } 20% { transform: rotate(-7deg); } 40% { transform: rotate(6deg); } 60% { transform: rotate(-4deg); } 80% { transform: rotate(2deg); } }
.exito h2 { font-size: clamp(26px, 7vw, 34px); }
.exito p { margin-top: 12px; }
.exito p strong { overflow-wrap: anywhere; } /* solo parte el correo si no cabe en una línea entera */

/* ---------- 7 · Pie ---------- */
.pie { padding: 40px 0 120px; background: var(--crema); text-align: center; border-top: 1px solid #EEF1EE; }
.pie-simbolo { width: 64px; margin: 0 auto; }
.lema { margin-top: 10px; font-size: 15px; font-weight: 500; color: var(--verde-hondo); }
.pie-legal { margin-top: 14px; display: flex; justify-content: center; align-items: center; gap: 8px; font-size: 15px; color: var(--tinta-2); }
.pie-legal a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 6px; color: var(--tinta-2); }
.pie-sin-cookies { font-size: 13px; color: var(--tinta-2); }

/* ---------- Botón fijo: abajo en el móvil, barra arriba en el ordenador ---------- */
.fijo {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
  background: linear-gradient(180deg, rgba(255, 254, 252, 0) 0%, rgba(255, 254, 252, .96) 30%);
  transform: translateY(0); transition: transform .25s ease, opacity .25s ease;
}
.fijo.esconde { transform: translateY(110%); opacity: 0; pointer-events: none; }
.fijo .boton { max-width: 528px; margin: 0 auto; }
.fijo-logo, .fijo-texto { display: none; }
@media (min-width: 900px) {
  .fijo {
    top: 0; bottom: auto; padding: 10px 24px;
    background: rgba(255, 254, 252, .95); border-bottom: 1px solid #E6ECE9;
    box-shadow: 0 10px 28px -18px rgba(10, 60, 50, .45);
    -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  }
  .fijo.esconde { transform: translateY(-110%); }
  .fijo-dentro { max-width: 1040px; margin: 0 auto; display: flex; align-items: center; gap: 24px; }
  .fijo-logo { display: block; width: 84px; flex: none; }
  .fijo-texto { display: block; flex: 1; font-size: 17px; line-height: 1.35; color: var(--tinta-2); }
  .fijo-texto strong { color: var(--tinta); font-weight: 600; }
  .fijo .boton { width: auto; min-width: 230px; min-height: 52px; margin: 0; flex: none; }
}

/* ---------- Textos legales encima ---------- */
.legal {
  width: min(680px, 100vw); max-width: 100vw; height: min(88vh, 900px); max-height: 100dvh;
  margin: auto; padding: 0; border: 0; border-radius: 22px; background: var(--crema); color: var(--tinta);
}
.legal::backdrop { background: rgba(30, 40, 36, .45); }
@media (max-width: 699px) { .legal { height: 100dvh; max-height: 100dvh; border-radius: 0; } }
.legal-barra {
  position: sticky; top: 0; display: flex; justify-content: space-between; align-items: center;
  padding: 8px 8px 8px 20px; background: var(--crema); border-bottom: 1px solid #EEF1EE;
}
.legal-titulo { font-weight: 600; }
.legal-cerrar {
  width: 48px; height: 48px; border: 0; border-radius: 50%; background: var(--menta);
  font-size: 28px; line-height: 1; color: var(--tinta); cursor: pointer;
}
.legal-cuerpo { padding: 8px 20px 40px; font-size: 16px; }
.legal-cuerpo h1 { font-size: 26px; margin: 16px 0 8px; }
.legal-cuerpo h2 { font-size: 19px; margin: 22px 0 6px; }
.legal-cuerpo p, .legal-cuerpo li { margin: 6px 0; color: var(--tinta-2); }
.legal-cuerpo .volver { display: none; }

/* ---------- Entrada suave al hacer scroll (solo con JS y sin «reducir movimiento») ---------- */
.js-anim .aparece { opacity: 0; transform: translateY(14px); transition: opacity .5s ease, transform .5s ease; }
.js-anim .aparece.visto { opacity: 1; transform: none; }

/* ---------- 4b · En vídeo: tres, grandes ---------- */
.videos {
  display: flex; gap: 16px; margin-top: 26px; padding: 4px 16px 16px;
  overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding: 0 16px; scrollbar-width: none;
}
.videos::-webkit-scrollbar { display: none; }
.video-card { flex: none; width: min(78vw, 320px); margin: 0; scroll-snap-align: start; }
.video-card video {
  display: block; width: 100%; aspect-ratio: 9 / 16; height: auto; border-radius: 22px; background: #F4F3EE;
  box-shadow: 0 18px 36px -22px rgba(10, 60, 50, .55); object-fit: cover;
}
.video-card figcaption { margin-top: 10px; font-size: 17px; text-align: center; }
.video-card figcaption strong { font-weight: 600; }
.video-card figcaption span { color: var(--tinta-2); }
@media (min-width: 900px) {
  .videos { justify-content: center; overflow: visible; }
  .video-card { width: 300px; }
}

/* ---------- 5 · Beneficios de la lista ---------- */
.beneficios { list-style: none; margin: 20px 0 0; padding: 0; display: grid; gap: 12px; }
.beneficio {
  display: flex; gap: 14px; align-items: center; padding: 16px; border-radius: 20px; background: var(--menta);
}
.beneficio img { width: 60px; height: 60px; flex: none; }
.beneficio p { font-size: 16px; line-height: 1.4; color: var(--tinta-2); }
.beneficio .beneficio-titulo { font-size: 19px; font-weight: 600; line-height: 1.25; color: var(--tinta); }
.beneficio--precio { background: #fff; border: 2px solid var(--cta); }
.beneficio-cifra { font-size: 46px !important; font-weight: 700; line-height: 1 !important; letter-spacing: -.02em; color: var(--cta-hondo) !important; }
.beneficio--precio .beneficio-titulo { margin-top: 2px; font-size: 17px; }
@media (min-width: 900px) {
  .beneficios { grid-template-columns: repeat(3, 1fr); }
  .beneficio { flex-direction: column; text-align: center; align-items: center; }
}
