/* ============================================================
   AuthorStorefront — newsletter offer popup.

   Loaded on every public surface from templates/footer.php, but only
   ever renders anything when newsletter.js decides to (which it only
   does when the server said the offer is live).

   Scoped entirely under .nl-* so it cannot reach into a page it was
   dropped onto. No Bootstrap classes are used in the modal markup for
   the same reason: this thing appears over every template on the site,
   and inheriting a utility whose meaning changes between them is how a
   popup ends up looking broken on exactly one page nobody checked.

   Colours match the site palette in style.css (amber #854F0B,
   gold #FAC775, parchment #F7F5F0, ink #1C1B18).
   ============================================================ */

.nl-back {
  position: fixed;
  inset: 0;
  z-index: 1090;              /* Above the sticky navbar, below nothing. */
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(28, 27, 24, 0.55);
  backdrop-filter: blur(3px);
  opacity: 0;
  transition: opacity .2s ease;
}

.nl-back.is-open { opacity: 1; }

.nl-modal {
  position: relative;
  width: 100%;
  max-width: 440px;
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 24px 60px rgba(28, 27, 24, 0.28);
  transform: translateY(14px) scale(.98);
  transition: transform .22s cubic-bezier(.2, .8, .3, 1);
}

.nl-back.is-open .nl-modal { transform: none; }

/* The entrance is the only motion here, and it is the first thing to go
   for anyone who has asked the OS not to animate. The popup still
   appears — reduced motion is not "hide the content". */
@media (prefers-reduced-motion: reduce) {
  .nl-back,
  .nl-modal { transition: none; }
  .nl-modal { transform: none; }
}

.nl-close {
  position: absolute;
  top: 10px;
  right: 12px;
  width: 34px;
  height: 34px;
  line-height: 1;
  font-size: 26px;
  color: #888780;
  background: transparent;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  transition: background .15s ease, color .15s ease;
}

.nl-close:hover { background: #F7F5F0; color: #1C1B18; }

.nl-body { padding: 34px 30px 26px; text-align: center; }

.nl-badge {
  display: inline-block;
  margin-bottom: 14px;
  padding: 4px 12px;
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: #854F0B;
  background: #FAEEDA;
  border-radius: 20px;
}

.nl-title {
  margin: 0 0 10px;
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.6rem;
  font-weight: 700;
  line-height: 1.25;
  color: #1C1B18;
}

.nl-copy {
  margin: 0 0 20px;
  font-size: .92rem;
  line-height: 1.65;
  color: #5F5E5A;
}

.nl-form { text-align: left; }

.nl-label {
  display: block;
  margin-bottom: 6px;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .8px;
  text-transform: uppercase;
  color: #888780;
}

.nl-input {
  width: 100%;
  padding: 12px 14px;
  font-size: .95rem;
  color: #1C1B18;
  background: #fff;
  border: 1px solid rgba(60, 55, 40, 0.22);
  border-radius: 8px;
  transition: border-color .15s ease, box-shadow .15s ease;
}

.nl-input:focus {
  outline: 0;
  border-color: #854F0B;
  box-shadow: 0 0 0 3px rgba(133, 79, 11, 0.14);
}

.nl-submit {
  width: 100%;
  margin-top: 12px;
  padding: 13px 20px;
  font-size: .95rem;
  font-weight: 700;
  color: #FAC775;
  background: #854F0B;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  transition: filter .15s ease;
}

.nl-submit:hover:not(:disabled) { filter: brightness(1.12); }
.nl-submit:disabled { opacity: .6; cursor: default; }

.nl-msg {
  min-height: 20px;
  margin-top: 10px;
  font-size: .82rem;
  line-height: 1.5;
  color: #5F5E5A;
}

.nl-msg.is-err { color: #A3351A; }

.nl-decline {
  display: block;
  width: 100%;
  margin-top: 14px;
  padding: 4px;
  font-size: .82rem;
  color: #888780;
  background: none;
  border: 0;
  text-decoration: underline;
  cursor: pointer;
}

.nl-decline:hover { color: #1C1B18; }

.nl-fine {
  margin: 16px 0 0;
  font-size: .72rem;
  line-height: 1.6;
  color: #A8A49B;
}

/* The honeypot. Off-screen rather than display:none — some form-filling
   bots skip anything that is genuinely not rendered, and a trap they
   skip catches nothing. aria-hidden + tabindex="-1" in the markup keep
   it away from anyone using a screen reader or a keyboard. */
.nl-hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

@media (max-width: 480px) {
  .nl-body  { padding: 30px 22px 22px; }
  .nl-title { font-size: 1.4rem; }
}
