/* ════════════════════════════════════════════════════════════════════
   Pop-up de suscripcion · temporada de festivales

   Aparece una sola vez, cuando el visitante ya bajo media pagina. Si lo
   cierra o se suscribe no vuelve a salir en 60 dias (localStorage).

   Formato panoramico: foto a la izquierda, panel oscuro a la derecha con
   el membrete arriba y el formulario en una sola columna. El filete dorado
   del borde es lo que lo separa del fondo sin necesidad de sombra dura.
   ════════════════════════════════════════════════════════════════════ */

.nl-pop {
  position: fixed; inset: 0; z-index: 120;
  display: grid; place-items: center;
  padding: clamp(14px, 3vw, 40px);
}
.nl-pop[hidden] { display: none; }

.nl-pop__backdrop {
  position: absolute; inset: 0;
  background: rgba(8, 7, 5, 0.72);
  backdrop-filter: blur(7px);
  -webkit-backdrop-filter: blur(7px);
  animation: nlFade 240ms var(--pg-ease) both;
}

.nl-pop__card {
  position: relative;
  display: grid; grid-template-columns: 1.1fr 1fr;
  width: min(1040px, 100%);
  max-height: calc(100svh - 28px);
  overflow: hidden;
  border: 1px solid rgba(201, 166, 86, 0.42);
  border-radius: 14px;
  background: #0D0B08;
  color: #F4EFE6;
  box-shadow: 0 40px 100px rgba(6, 5, 3, 0.55);
  animation: nlRise 320ms var(--pg-ease) both;
}

.nl-pop__art {
  background-image: linear-gradient(90deg, rgba(13,11,8,0) 72%, rgba(13,11,8,0.55) 100%),
                    url('/images/events/tulum-festival-season-hero.webp');
  background-size: cover;
  background-position: center 58%;
  min-height: 420px;
}

.nl-pop__body {
  display: flex; flex-direction: column; justify-content: center;
  padding: clamp(30px, 3.4vw, 54px) clamp(28px, 3.2vw, 50px);
  overflow-y: auto;
}

/* ─── Membrete ─────────────────────────────────────────────────────── */
.nl-pop__brand { text-align: center; margin-bottom: clamp(24px, 3vw, 38px); }
.nl-pop__brand-name {
  display: block;
  font-family: var(--pg-serif);
  font-size: clamp(21px, 1.9vw, 26px);
  font-weight: 500; letter-spacing: 0.3em;
  text-indent: 0.3em;
  color: #F4EFE6;
}
.nl-pop__brand-sub {
  display: block; margin-top: 5px;
  font-family: var(--pg-mono);
  font-size: 9.5px; letter-spacing: 0.34em;
  text-indent: 0.34em;
  color: rgba(244, 239, 230, 0.55);
}

.nl-pop__kicker {
  margin: 0;
  font-family: var(--pg-mono);
  font-size: 10.5px; font-weight: 500;
  letter-spacing: 0.24em; text-transform: uppercase;
  color: var(--pg-gold);
}

.nl-pop__card h2 {
  margin: 16px 0 0;
  font-family: var(--pg-serif);
  font-size: clamp(30px, 3.1vw, 44px);
  font-weight: 400;
  letter-spacing: -0.015em; line-height: 1.08;
  color: #F4EFE6;
}

/* Filete corto bajo el titulo: separa sin meter una linea de lado a lado */
.nl-pop__rule {
  width: 64px; height: 1px; margin: clamp(18px, 2vw, 26px) 0;
  background: rgba(201, 166, 86, 0.55);
  border: 0;
}

.nl-pop__desc {
  margin: 0;
  font-family: var(--pg-serif);
  font-size: clamp(16px, 1.3vw, 18.5px);
  line-height: 1.55;
  color: rgba(244, 239, 230, 0.78);
}

/* ─── Formulario ───────────────────────────────────────────────────── */
.nl-pop__form { display: flex; flex-direction: column; gap: 12px; margin-top: clamp(22px, 2.6vw, 32px); }
.nl-pop__form[hidden] { display: none; }

.nl-pop__form input[type="email"] {
  width: 100%;
  padding: 16px 18px;
  border: 1px solid rgba(201, 166, 86, 0.38);
  border-radius: 4px;
  background: transparent;
  color: #F4EFE6;
  font-family: var(--pg-mono);
  font-size: 14px; letter-spacing: 0.02em;
  transition: border-color var(--pg-dur-fast) var(--pg-ease);
}
.nl-pop__form input[type="email"]::placeholder { color: rgba(244, 239, 230, 0.38); }
.nl-pop__form input[type="email"]:focus { outline: none; border-color: var(--pg-gold); }

.nl-pop__form button {
  width: 100%;
  padding: 16px 20px;
  border: 0; border-radius: 4px;
  background: #E8D5A3; color: #17120A;
  font-family: var(--pg-display);
  font-size: 12.5px; font-weight: 600;
  letter-spacing: 0.18em; text-transform: uppercase;
  cursor: pointer;
  transition: background var(--pg-dur-fast) var(--pg-ease);
}
.nl-pop__form button:hover { background: #F0E1BC; }
.nl-pop__form button:disabled { opacity: 0.55; cursor: default; }

.nl-pop__fine {
  margin: 14px 0 0;
  font-size: 12.5px; line-height: 1.5;
  color: rgba(244, 239, 230, 0.42);
}
.nl-pop__fine[hidden] { display: none; }

.nl-pop__error {
  margin: 12px 0 0;
  font-size: 13px; color: #E0A68C;
}
.nl-pop__error[hidden] { display: none; }

/* Estado de gracias: reemplaza el formulario sin cerrar la ventana, para
   que el visitante vea que si quedo registrado. */
.nl-pop__done { margin-top: clamp(22px, 2.6vw, 32px); }
.nl-pop__done[hidden] { display: none; }
.nl-pop__done p {
  margin: 0;
  font-family: var(--pg-serif);
  font-size: 17px; line-height: 1.55;
  color: rgba(244, 239, 230, 0.82);
}
.nl-pop__done strong {
  display: block; margin-bottom: 8px;
  font-family: var(--pg-mono);
  font-size: 10.5px; font-weight: 500;
  letter-spacing: 0.24em; text-transform: uppercase;
  color: var(--pg-gold);
}

.nl-pop__close {
  position: absolute; top: 18px; right: 18px; z-index: 2;
  display: grid; place-items: center;
  width: 38px; height: 38px; padding: 0;
  border: 1px solid rgba(244, 239, 230, 0.34);
  border-radius: 50%;
  background: transparent;
  color: #F4EFE6;
  font-size: 17px; line-height: 1; cursor: pointer;
  transition: border-color var(--pg-dur-fast) var(--pg-ease), background var(--pg-dur-fast) var(--pg-ease);
}
.nl-pop__close:hover { border-color: var(--pg-gold); background: rgba(244, 239, 230, 0.07); }
.nl-pop__close:focus-visible { outline: 2px solid var(--pg-gold); outline-offset: 2px; }

.nl-sr {
  position: absolute; width: 1px; height: 1px;
  margin: -1px; padding: 0; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

@keyframes nlFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes nlRise { from { opacity: 0; transform: translateY(16px) scale(0.99); } to { opacity: 1; transform: none; } }

@media (max-width: 860px) {
  /* En vertical la foto pasa a ser una franja y el panel se queda con
     todo el ancho: el campo debe verse sin tener que desplazar. */
  .nl-pop__card { grid-template-columns: 1fr; width: min(480px, 100%); }
  .nl-pop__art { min-height: 150px; background-position: center 55%; }
  .nl-pop__body { justify-content: flex-start; }
  .nl-pop__brand { margin-bottom: 20px; }
}

@media (max-height: 640px) {
  .nl-pop__art { display: none; }
  .nl-pop__card { grid-template-columns: 1fr; }
  .nl-pop__brand { margin-bottom: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  .nl-pop__backdrop, .nl-pop__card { animation: none; }
}
