/* Newsletter signup popup -- shared across all public pages via
   assets/newsletter-popup.js. Namespaced with nlp- to avoid collisions with
   per-tool CSS (mbc-, ic-, etc.) per assets/content.css conventions. */

.nlp-overlay {
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(6, 6, 9, 0.45);
  opacity: 0;
  transition: opacity var(--nlp-overlay-dur, 200ms) ease-out;
}

.nlp-overlay.is-open {
  opacity: 1;
}

.nlp-modal {
  position: relative;
  width: 460px;
  max-width: calc(100vw - 48px);
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  padding: 32px;
  border-radius: var(--r, 14px);
  border: 1px solid var(--border-strong, rgba(255, 255, 255, 0.1));
  background: var(--surface-2, #17171d);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45), 0 2px 8px rgba(0, 0, 0, 0.3);
  font-family: var(--font-sans, "Manrope", sans-serif);
  color: var(--text-1, #f0eef8);
  opacity: 0;
  transform: translateY(12px) scale(0.988);
  transition:
    opacity var(--nlp-modal-dur, 260ms) cubic-bezier(0.22, 1, 0.36, 1),
    transform var(--nlp-modal-dur, 260ms) cubic-bezier(0.22, 1, 0.36, 1);
}

.nlp-overlay.is-open .nlp-modal {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.nlp-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid var(--border, rgba(255, 255, 255, 0.06));
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-2, #8a879e);
  cursor: pointer;
  transition: background 150ms, color 150ms, border-color 150ms;
}

.nlp-close:hover,
.nlp-close:focus-visible {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-1, #f0eef8);
  border-color: var(--border-strong, rgba(255, 255, 255, 0.1));
}

.nlp-close svg {
  width: 16px;
  height: 16px;
}

/* ---- decorative motif: three subtly offset card silhouettes ---- */
.nlp-motif {
  display: flex;
  align-items: flex-end;
  height: 22px;
  margin-bottom: 14px;
}

.nlp-motif span {
  display: block;
  width: 16px;
  height: 22px;
  border-radius: 3px;
  background: linear-gradient(180deg, var(--accent-soft, #efd58b), var(--accent, #c9a84c));
  border: 1px solid rgba(0, 0, 0, 0.15);
}

.nlp-motif span:nth-child(1) { transform: rotate(-8deg) translateX(6px); opacity: 0.55; }
.nlp-motif span:nth-child(2) { transform: rotate(-2deg) translateX(2px); opacity: 0.78; z-index: 1; }
.nlp-motif span:nth-child(3) { transform: rotate(5deg); opacity: 1; z-index: 2; }

.nlp-content-group {
  opacity: 0;
  transform: translateY(6px);
  transition: opacity var(--nlp-stagger-dur, 200ms) ease-out, transform var(--nlp-stagger-dur, 200ms) ease-out;
}

.nlp-overlay.is-open .nlp-content-group {
  opacity: 1;
  transform: translateY(0);
}

.nlp-overlay.is-open .nlp-group-1 { transition-delay: 0ms; }
.nlp-overlay.is-open .nlp-group-2 { transition-delay: 45ms; }
.nlp-overlay.is-open .nlp-group-3 { transition-delay: 90ms; }
.nlp-overlay.is-open .nlp-group-4 { transition-delay: 135ms; }

.nlp-eyebrow {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-soft, #efd58b);
  margin: 0 0 7px;
}

.nlp-headline {
  font-size: 22px;
  font-weight: 750;
  letter-spacing: -0.01em;
  line-height: 1.25;
  margin: 0 0 11px;
  color: var(--text-1, #f0eef8);
}

.nlp-body-copy {
  max-width: 48ch;
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--text-2, #8a879e);
  margin: 0 0 20px;
}

.nlp-form {
  display: grid;
  gap: 7px;
}

.nlp-label {
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0.03em;
  color: var(--text-2, #8a879e);
}

.nlp-input {
  width: 100%;
  min-height: 46px;
  padding: 0 14px;
  border-radius: var(--r-sm, 10px);
  border: 1px solid var(--border, rgba(255, 255, 255, 0.06));
  background: rgba(0, 0, 0, 0.18);
  color: var(--text-1, #f0eef8);
  font-family: inherit;
  font-size: 15px;
  transition: border-color 140ms, box-shadow 140ms;
}

.nlp-input:focus-visible {
  outline: none;
  border-color: var(--accent, #c9a84c);
  box-shadow: 0 0 0 3px var(--accent-dim, rgba(201, 168, 76, 0.12));
}

.nlp-input[aria-invalid="true"] {
  border-color: var(--red-text, #e87070);
}

.nlp-field-error {
  display: none;
  font-size: 12.5px;
  color: var(--red-text, #e87070);
  margin-top: 2px;
}

.nlp-field-error.is-visible {
  display: block;
}

/* Hidden honeypot field -- kept in the tab/DOM flow off-screen rather than
   display:none so basic bots that skip hidden inputs still fill it. */
.nlp-hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
  overflow: hidden;
}

.nlp-submit {
  margin-top: 12px;
  width: 100%;
  min-height: 46px;
  border-radius: var(--r-sm, 10px);
  border: 1px solid rgba(201, 168, 76, 0.5);
  background: linear-gradient(180deg, var(--accent-soft, #efd58b), var(--accent, #c9a84c));
  color: var(--bg, #0a0a0c);
  font-family: inherit;
  font-size: 14.5px;
  font-weight: 700;
  cursor: pointer;
  transition: background 140ms, box-shadow 140ms, transform 140ms, filter 140ms;
}

.nlp-submit:hover,
.nlp-submit:focus-visible {
  background: linear-gradient(180deg, #f6e2a4, var(--accent-soft, #efd58b));
  box-shadow: 0 10px 24px rgba(201, 168, 76, 0.22);
  transform: translateY(-1px);
}

.nlp-submit:active {
  transform: translateY(0);
  filter: brightness(0.96);
}

.nlp-submit:disabled {
  cursor: not-allowed;
  opacity: 0.75;
  transform: none;
}

.nlp-spin {
  display: inline-block;
  width: 12px;
  height: 12px;
  margin-right: 7px;
  vertical-align: -2px;
  border: 2px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
  animation: nlp-spin 650ms linear infinite;
}

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

.nlp-consent {
  margin-top: 11px;
  font-size: 11.5px;
  line-height: 1.5;
  color: var(--text-3, #56536a);
}

.nlp-status {
  margin-top: 16px;
  font-size: 13px;
  min-height: 0;
}

.nlp-status:empty {
  margin-top: 0;
}

.nlp-status.is-error {
  color: var(--red-text, #e87070);
}

/* ---- success state ---- */
.nlp-success {
  display: none;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 180ms ease-out, transform 180ms ease-out;
}

.nlp-success.is-visible {
  display: block;
}

.nlp-success.is-shown {
  opacity: 1;
  transform: translateY(0);
}

.nlp-form-wrap {
  transition: opacity 120ms ease-out;
}

.nlp-form-wrap.is-hidden {
  display: none;
}

.nlp-success .nlp-eyebrow {
  color: var(--ok, #46b17b);
}

.nlp-success-close {
  margin-top: 20px;
  width: 100%;
  min-height: 46px;
  border-radius: var(--r-sm, 10px);
  border: 1px solid var(--border-strong, rgba(255, 255, 255, 0.1));
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-1, #f0eef8);
  font-family: inherit;
  font-size: 14.5px;
  font-weight: 650;
  cursor: pointer;
  transition: background 140ms, border-color 140ms;
}

.nlp-success-close:hover,
.nlp-success-close:focus-visible {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--accent, #c9a84c);
}

@media (max-width: 640px) {
  .nlp-modal {
    width: calc(100vw - 32px);
    max-width: 440px;
    padding: 24px;
    padding-bottom: max(24px, calc(env(safe-area-inset-bottom, 0px) + 16px));
  }

  .nlp-headline {
    font-size: 20px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .nlp-overlay,
  .nlp-modal,
  .nlp-content-group,
  .nlp-success,
  .nlp-submit,
  .nlp-input {
    transition-duration: 80ms !important;
    transform: none !important;
  }

  .nlp-overlay.is-open .nlp-modal,
  .nlp-overlay.is-open .nlp-content-group {
    transform: none !important;
  }

  .nlp-spin {
    animation-duration: 900ms;
  }
}
