/* ====== BASE ====== */
:root{
  --bg: #ddd;
  --ink: #222;
  --accent: #3fa5ff;
  --accent-dark: #2196f3;
  --green: #24b942;
}

*,
*::before,
*::after{ box-sizing: border-box; }

html, body{
  height: 100%;
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  font-family: Arial, sans-serif;
}

/* ====== SCROLL SNAP ====== */
.snap-container{
  scroll-snap-type: y mandatory;
  overflow-y: auto;
  height: 100vh;
}

.panel{
  min-height: 100vh;
  scroll-snap-align: start;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4vh 5vw;
  position: relative;
}

/* ====== HERO ====== */
.hero-panel{
  text-align: center;
  gap: 24px;
  flex-direction: column;
}
.hero-title{
  font-weight: 800;
  font-size: 40px;
  line-height: 1.15;
  max-width: 900px;
  margin: 0 auto;
  text-shadow: 2px 2px 8px rgba(0,0,0,.4);
}
.glow-green{
  color: var(--green);
  text-shadow:
    0 0 10px rgba(36,185,66,0.7),
    0 0 20px rgba(36,185,66,0.5);
}

.next-btn{
  border: 0;
  background: transparent;
  cursor: pointer;
  animation: arrowBounce 1.5s infinite;
}
@keyframes arrowBounce{
  0% { transform: translateY(0); opacity: 1; }
  60%{ transform: translateY(18px); opacity: 1; }
  85%{ opacity: .7; }
  100%{ transform: translateY(0); opacity: 1; }
}

/* ====== FRASES ====== */
.phrase-panel{
  background:
    radial-gradient(40% 18% at 50% 50%, rgba(0,0,0,0.07), rgba(0,0,0,0) 60%);
}

.phrase{
  position: relative;
  width: 100%;
  max-width: 900px;
  text-align: center;
}
.phrase .text,
.phrase .blur{
  display: inline-block;
  font-weight: 800;
  font-size: 32px;
  line-height: 1.22;
}
.phrase .blur{
  position: absolute;
  inset: 0;
  filter: blur(14px) brightness(1.45);
  opacity: 0.35;
  pointer-events: none;
}

/* ====== CTA / FORM ====== */
.cta-panel{
  flex-direction: column;
  gap: 16px;
  background:
    radial-gradient(40% 18% at 50% 42%, rgba(0,0,0,0.07), rgba(0,0,0,0) 60%);
}
.cta-title{
  margin: 0 0 6px 0;
  font-size: 28px;
  font-weight: 800;
  text-align: center;
}

.cta-form{
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: auto auto auto;
  gap: 10px 10px;
  width: min(680px, 92vw);
  align-items: center;
  justify-content: center;
}

.form-email{
  grid-column: 1 / span 1;
  grid-row: 1;
  border: none;
  outline: none;
  background: #fff;
  font-size: 1.08em;
  padding: 0.8em 1.1em;
  border-radius: 24px 0 0 24px;
  width: 100%;
  min-width: 0;
  box-shadow: 0 2px 12px rgba(51,73,118,0.07);
}

.form-btn{
  grid-column: 2 / span 1;
  grid-row: 1;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 0 24px 24px 0;
  font-size: 1em;
  padding: 0.8em 1.6em;
  cursor: pointer;
  transition: background .17s;
  font-weight: 700;
}
.form-btn:hover{ background: var(--accent-dark); }

.form-check-legal{
  grid-column: 1 / span 2;
  grid-row: 2;
  display: flex;
  align-items: center;
  gap: .55em;
  font-size: .98em;
  color: #333;
}
.form-check-legal a{
  color: var(--accent-dark);
  text-decoration: underline;
}

.mensaje{
  grid-column: 1 / span 2;
  grid-row: 3;
  margin: .2em 0 0 0;
  text-align: center;
  color: #1263a2;
  font-size: 1em;
  font-weight: 500;
  min-height: 1.2em;
}

/* ====== FOOTER ====== */
.footer-legal{
  padding: 18px 16px calc(env(safe-area-inset-bottom,0) + 18px);
  text-align: center;
  color: #444;
}
.footer-legal a{
  color: var(--accent-dark);
  text-decoration: none;
}
.footer-legal a:hover{ text-decoration: underline; }

/* ====== COOKIE BANNER ====== */
#cookie-banner{
  position: fixed;
  left: 0; right: 0; bottom: 0;
  background: #111; color: #fff;
  padding: 14px;
  z-index: 9999;
  display: none;
}
#cookie-banner .wrap{
  max-width: 960px; margin: 0 auto;
  display: flex; gap: 12px; align-items: center; flex-wrap: wrap;
}
#cookie-banner .text{ flex: 1; min-width: 260px; font-size: .95rem; line-height: 1.5 }
#cookie-banner .actions{ display: flex; gap: 8px }
#cookie-banner button{
  border: none; border-radius: 6px; padding: 8px 12px; cursor: pointer; font-weight: 700;
}
#cb-reject{ background: #444; color: #fff }
#cb-accept{ background: #0ea5e9; color: #fff }
#cookie-banner a{ color: #7cc4ff; text-decoration: underline }

/* ====== RESPONSIVE ====== */
@media (max-width: 1024px){
  .hero-title{ font-size: 34px; max-width: 92vw; }
  .phrase .text, .phrase .blur{ font-size: 26px; }
  .cta-title{ font-size: 24px; }
}

@media (max-width: 600px){
  .hero-title{ font-size: 30px; }
  .phrase .text, .phrase .blur{ font-size: 22px; }
  .cta-form{
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto auto;
    gap: 10px;
  }
  .form-email{ grid-column: 1; border-radius: 12px; }
  .form-btn{ grid-column: 1; border-radius: 12px; width: 100%; }
}

/* Accesibilidad: lectores de pantalla */
.sr-only{
  position: absolute !important;
  width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* ======== FIX FORMULARIO SUSCRIPCIÓN ======== */

/* Layout del formulario */
.signup{
  display:flex;
  gap: .6rem;
  align-items: stretch;
  justify-content: center;
  width: 100%;
  max-width: 520px;   /* ancho máximo en desktop */
  margin: 0 auto;
}

/* Campo de email */
.signup .form-email{
  display:block !important;
  flex:1 1 auto;
  min-width: 0;              /* evita que colapse */
  height: 52px;              /* alto claro y uniforme */
  padding: 0 14px;
  font-size: 16px;           /* iOS evita zoom y bug de input invisible */
  line-height: 52px;
  background: #fff;
  color:#111;
  border: 1px solid #e5e5e5;
  border-radius: 14px;
  -webkit-appearance: none;
  appearance: none;
  box-shadow: 0 2px 10px rgba(0,0,0,.06);
}

.signup .form-email::placeholder{ color:#9aa3ad; }

/* Botón */
.signup .form-btn{
  flex: 0 0 auto;
  height: 52px;
  padding: 0 18px;
  font-size: 16px;
  font-weight: 700;
  border: 0;
  border-radius: 14px;
  background: #3fa5ff;
  color:#fff;
  cursor:pointer;
  box-shadow: 0 4px 16px rgba(63,165,255,.28);
}
.signup .form-btn:hover{ background:#2196f3; }

/* Responsive móvil: apila input + botón */
@media (max-width: 600px){
  .signup{
    flex-direction: column;
    max-width: 94vw;
  }
  .signup .form-email,
  .signup .form-btn{
    width: 100%;
    border-radius: 12px !important;
  }
}
/* Fix espaciado en móvil (campo + botón muy juntos) */
@media (max-width: 600px){
  .signup{
    gap: 10px; /* un poco de aire, sin exagerar */
  }

  .signup .form-email{
    height: 44px;        /* altura fija estilizada */
    font-size: 15px;     /* texto claro */
    padding: 0 12px;     /* padding lateral */
    border-radius: 12px; /* bordes más compactos */
  }

  .signup .form-btn{
    height: 44px;        /* igual que el input */
    font-size: 15px;
    padding: 0 14px;
    border-radius: 12px;
  }
}

/* Forzar visibilidad del input en cualquier dispositivo */
input[type="email"].form-email{
  visibility: visible !important;
  opacity: 1 !important;
}
/* ==== iPad / Tablets (solución botón en 2ª línea) ==== */
@media (min-width: 700px) and (max-width: 1180px) {

  /* ancho y posición del bloque del formulario */
  .form-container{
    top: 60%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 86vw;
    max-width: 620px;   /* evita que se quede estrecho en iPad */
  }

  /* el formulario siempre en UNA sola fila */
  #suscripcionForm{
    display: flex;
    flex-direction: row;
    align-items: center;
    flex-wrap: nowrap;   /* ¡clave! no permitir saltos de línea */
    gap: 8px;
    width: 100%;
  }

  /* el input se adapta y puede encogerse */
  #suscripcionForm .form-email{
    flex: 1 1 auto;     /* crece y encoge */
    min-width: 0;       /* Safari/iPad: permite encoger */
    width: auto;
    font-size: 16px;    /* evita zoom raro en iOS */
    padding: .8em 1em;
    border-radius: 24px; /* si prefieres “píldora” completa en iPad */
    /* Si lo quieres unido al botón sin hueco, quita el gap de arriba
       y usa: border-radius: 24px 0 0 24px;  */
  }

  /* el botón NO debe romper línea */
  #suscripcionForm .form-btn{
    flex: 0 0 auto;     /* tamaño fijo, sin saltar */
    white-space: nowrap;
    padding: .8em 1.4em;
    border-radius: 24px; /* o 0 24px 24px 0 si lo quieres unido al input */
  }

  /* separaciones bajo el formulario */
  .privacidad-container{
    margin-top: 12px;
    justify-content: center;
  }

  .footer-legal{
    margin-top: 16px;
  }
}