/* ─────────────────────────────────────────────────────────────────────────
 * Dream Home Fund — newsletter welcome modal
 *
 * Self-contained styles for the first-visit subscribe popup. Loaded
 * alongside newsletter-modal.js on pages that opt in via a <link> +
 * <script> pair in <head>.
 *
 * Suppression is handled in JS via localStorage flags that work
 * site-wide, so showing on multiple pages is safe — visitors who
 * dismiss on one page won't see it again on another.
 * ──────────────────────────────────────────────────────────────────────── */

#nl-modal {
  position: fixed; inset: 0; z-index: 1100;
  display: none; align-items: center; justify-content: center;
  padding: 1rem;
  font-family: 'DM Sans', sans-serif;
}
#nl-modal.show { display: flex; }
#nl-modal.show .nl-modal-backdrop { animation: nl-fade-in 0.35s ease; }
#nl-modal.show .nl-modal-card { animation: nl-card-in 0.55s cubic-bezier(0.22, 1, 0.36, 1); }

.nl-modal-backdrop {
  position: absolute; inset: 0;
  background: rgba(26, 51, 32, 0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.nl-modal-card {
  position: relative;
  background: var(--cream, #faf8f3);
  max-width: 460px; width: 100%;
  border-radius: 14px;
  padding: 2.5rem 2.25rem 1.75rem;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.28);
  border-top: 4px solid var(--gold, #b8922a);
}

.nl-modal-close {
  position: absolute; top: 0.5rem; right: 0.65rem;
  background: none; border: none; cursor: pointer;
  font-size: 1.6rem; line-height: 1;
  color: var(--text-muted, #6b7c6e);
  width: 36px; height: 36px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.15s, color 0.15s;
}
.nl-modal-close:hover {
  background: rgba(26, 51, 32, 0.06);
  color: var(--green-dark, #1a3320);
}

.nl-modal-eyebrow {
  font-size: 0.7rem; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--gold, #b8922a); font-weight: 600; margin-bottom: 0.6rem;
  display: flex; align-items: center; gap: 0.55rem;
}
.nl-modal-eyebrow::before {
  content: ''; display: block; width: 3px; height: 12px;
  background: var(--gold, #b8922a); border-radius: 2px;
}

.nl-modal-card h2 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 2rem; font-weight: 400;
  color: var(--green-dark, #1a3320);
  margin-bottom: 0.6rem; line-height: 1.15;
}
.nl-modal-card h2 em {
  font-style: italic; color: var(--gold, #b8922a);
}

.nl-modal-card .nl-desc {
  font-size: 0.95rem; color: var(--text-muted, #6b7c6e);
  line-height: 1.7; margin-bottom: 1.5rem;
}

#nl-modal-form {
  display: flex; gap: 0.5rem; margin-bottom: 0.4rem;
}

#nl-modal-email {
  flex: 1; min-width: 0;
  padding: 0.8rem 1rem;
  border: 1.5px solid rgba(26, 51, 32, 0.18);
  border-radius: 6px;
  font-family: inherit; font-size: 0.95rem;
  color: var(--text-dark, #1a3320);
  background: var(--white, #ffffff);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
#nl-modal-email:focus {
  border-color: var(--gold, #b8922a);
  box-shadow: 0 0 0 3px rgba(184, 146, 42, 0.15);
}

#nl-modal-form button[type="submit"] {
  background: var(--green-dark, #1a3320);
  color: var(--cream, #faf8f3);
  padding: 0.8rem 1.4rem;
  border: none; border-radius: 6px;
  font-family: inherit; font-size: 0.9rem; font-weight: 500;
  letter-spacing: 0.03em;
  cursor: pointer;
  transition: background 0.15s;
  white-space: nowrap;
}
#nl-modal-form button[type="submit"]:hover {
  background: var(--green-mid, #24472e);
}
#nl-modal-form button[type="submit"]:disabled {
  opacity: 0.6; cursor: default;
}

.nl-modal-msg {
  font-size: 0.85rem; padding-top: 0.5rem;
  min-height: 1.5em; line-height: 1.5;
}

.nl-modal-skip {
  display: block; margin: 1rem auto 0;
  background: none; border: none;
  color: var(--text-muted, #6b7c6e); font-size: 0.8rem;
  cursor: pointer; text-decoration: underline;
  text-decoration-color: rgba(107, 124, 110, 0.4);
  text-underline-offset: 3px;
  font-family: inherit;
}
.nl-modal-skip:hover {
  color: var(--green-dark, #1a3320);
}

@keyframes nl-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes nl-card-in {
  from { opacity: 0; transform: translateY(20px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@media (max-width: 500px) {
  .nl-modal-card { padding: 2rem 1.5rem 1.5rem; }
  .nl-modal-card h2 { font-size: 1.6rem; }
  #nl-modal-form { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  #nl-modal.show .nl-modal-backdrop,
  #nl-modal.show .nl-modal-card { animation: none; }
}
