/* ===== NH Home Builder – Newsletter / Subscribe ===== */

:root {
  --nl-bg:        #1E3932;
  --nl-forest:    #14332B;
  --nl-mint:      #2EA26F;
  --nl-text:      #ffffff;
  --nl-muted:     rgba(255,255,255,.75);
  --nl-pill-bg:   #ffffff;
  --nl-radius:    10px;
  --nl-field-h:   50px;
}

/* ---- Section wrapper ---- */
.nhhb-newsletter {
  margin: 40px 0;
}

/* ---- Inner card ---- */
.nhhb-newsletter .nhhb-nl-inner {
  position: relative;
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  align-items: center;
  gap: 24px;
  padding: 44px clamp(24px, 4vw, 52px);
  border-radius: var(--nl-radius);
  color: var(--nl-text);
  overflow: hidden;

  /* Rich layered background */
  background:
    radial-gradient(ellipse 60% 80% at 10% 50%, rgba(46,162,111,.18) 0%, transparent 70%),
    radial-gradient(ellipse 40% 60% at 90% 20%, rgba(46,162,111,.12) 0%, transparent 65%),
    linear-gradient(125deg, #1E3932 0%, #14332B 55%, #0d2420 100%);

  box-shadow:
    0 12px 40px rgba(0,0,0,.22),
    0 2px 8px rgba(0,0,0,.10),
    inset 0 1px 0 rgba(255,255,255,.06);
}

/* Dot-grid texture overlay */
.nhhb-newsletter .nhhb-nl-inner::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(255,255,255,.07) 1px, transparent 1px);
  background-size: 22px 22px;
  pointer-events: none;
  z-index: 0;
}

/* Decorative mint ring top-right */
.nhhb-newsletter .nhhb-nl-inner::after {
  content: "";
  position: absolute;
  top: -60px;
  right: -60px;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  border: 40px solid rgba(46,162,111,.10);
  pointer-events: none;
  z-index: 0;
}

/* All direct children above pseudo-elements */
.nhhb-newsletter .nhhb-nl-copy,
.nhhb-newsletter .nhhb-nl-form {
  position: relative;
  z-index: 1;
}

/* ---- Copy side ---- */
.nhhb-newsletter .nhhb-nl-copy {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Title */
.nhhb-newsletter .nhhb-nl-title {
  margin: 0;
  font-weight: 800;
  letter-spacing: -.02em;
  line-height: 1.12;
  font-size: clamp(22px, 2.8vw, 32px);
  color: #fff !important;
  text-shadow: 0 2px 12px rgba(0,0,0,.30);
}

/* Mint underline accent on title */
.nhhb-newsletter .nhhb-nl-title::after {
  content: "";
  display: block;
  width: 44px;
  height: 3px;
  border-radius: 3px;
  background: var(--nl-mint);
  margin-top: 10px;
  box-shadow: 0 0 10px rgba(46,162,111,.55);
}

/* Subtitle text */
.nhhb-newsletter .nhhb-nl-text {
  margin: 0;
  font-size: clamp(14px, 1.5vw, 15.5px);
  color: rgba(255,255,255,.85);
  line-height: 1.55;
  max-width: 42ch;
}

/* ---- Form side ---- */
.nhhb-newsletter .nhhb-nl-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
}

/* Row: input + button */
.nhhb-newsletter .nhhb-nl-form-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* If no .nhhb-nl-form-row wrapper exists, keep flex on form itself */
.nhhb-newsletter .nhhb-nl-field {
  flex: 1;
  display: flex;
  align-items: center;
  height: var(--nl-field-h);
  background: rgba(255,255,255,.97);
  border-radius: 6px;
  padding: 0 16px;
  border: none;
  box-shadow:
    0 4px 16px rgba(0,0,0,.18),
    inset 0 0 0 1px rgba(0,0,0,.06);
  transition: box-shadow .18s ease;
}

.nhhb-newsletter .nhhb-nl-field:focus-within {
  box-shadow:
    0 4px 20px rgba(46,162,111,.30),
    inset 0 0 0 2px var(--nl-mint);
}

.nhhb-newsletter .nhhb-nl-field input {
  width: 100%;
  height: 100%;
  border: none !important;
  outline: none !important;
  background: transparent !important;
  box-shadow: none !important;
  font-size: 15px;
  color: #1f2937;
}

.nhhb-newsletter .nhhb-nl-field input::placeholder {
  color: #9aa3af;
}

/* Subscribe button */
.nhhb-newsletter .nhhb-nl-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: var(--nl-field-h);
  padding: 0 26px;
  border: 0;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 700;
  font-size: 15px;
  white-space: nowrap;
  background: var(--nl-mint);
  color: #fff;
  box-shadow:
    0 6px 20px rgba(46,162,111,.40),
    0 2px 6px rgba(0,0,0,.12);
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}

.nhhb-newsletter .nhhb-nl-btn::after {
  content: "→";
  font-size: 14px;
  transition: transform .18s ease;
}

.nhhb-newsletter .nhhb-nl-btn:hover {
  background: #25915f;
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(46,162,111,.50);
}

.nhhb-newsletter .nhhb-nl-btn:hover::after {
  transform: translateX(3px);
}

.nhhb-newsletter .nhhb-nl-btn:active {
  transform: translateY(0);
}

/* Privacy / consent note */
.nhhb-newsletter .nhhb-nl-consent {
  margin: 0;
  font-size: 11.5px;
  color: rgba(255,255,255,.55);
  line-height: 1.4;
}

/* Subscriber count / social proof (optional, shown if element exists) */
.nhhb-newsletter .nhhb-nl-proof {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: rgba(255,255,255,.65);
  margin-top: 2px;
}

.nhhb-newsletter .nhhb-nl-proof::before {
  content: "👥";
  font-size: 14px;
}

/* =========================================================
   Dark Mode
   ========================================================= */
body.dark-mode .nhhb-newsletter .nhhb-nl-inner {
  background:
    radial-gradient(ellipse 60% 80% at 10% 50%, rgba(46,162,111,.14) 0%, transparent 70%),
    radial-gradient(ellipse 40% 60% at 90% 20%, rgba(46,162,111,.08) 0%, transparent 65%),
    linear-gradient(125deg, #14332B 0%, #0d2420 55%, #091a15 100%);
  box-shadow:
    0 14px 44px rgba(0,0,0,.40),
    inset 0 1px 0 rgba(255,255,255,.05);
}

body.dark-mode .nhhb-newsletter .nhhb-nl-title {
  color: #fff !important;
}

body.dark-mode .nhhb-newsletter .nhhb-nl-field {
  background: rgba(255,255,255,.08);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.12);
}

body.dark-mode .nhhb-newsletter .nhhb-nl-field:focus-within {
  box-shadow:
    0 4px 20px rgba(46,162,111,.25),
    inset 0 0 0 2px #36B47A;
}

body.dark-mode .nhhb-newsletter .nhhb-nl-field input {
  color: #ECEAE6;
}

body.dark-mode .nhhb-newsletter .nhhb-nl-field input::placeholder {
  color: rgba(255,255,255,.45);
}

body.dark-mode .nhhb-newsletter .nhhb-nl-btn {
  background: #36B47A;
  color: #0f2019;
  box-shadow: 0 6px 20px rgba(54,180,122,.35);
}

body.dark-mode .nhhb-newsletter .nhhb-nl-btn:hover {
  background: #2EA26F;
  color: #fff;
}

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 900px) {
  .nhhb-newsletter .nhhb-nl-inner {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 22px;
    padding: 36px 24px;
  }

  .nhhb-newsletter .nhhb-nl-copy {
    align-items: center;
  }

  .nhhb-newsletter .nhhb-nl-copy::before {
    align-self: center;
  }

  .nhhb-newsletter .nhhb-nl-title::after {
    margin: 10px auto 0;
  }

  .nhhb-newsletter .nhhb-nl-text {
    max-width: 100%;
  }

  .nhhb-newsletter .nhhb-nl-form {
    align-items: stretch;
  }

  .nhhb-newsletter .nhhb-nl-btn {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 540px) {
  .nhhb-newsletter {
    margin: 20px 0;
  }

  .nhhb-newsletter .nhhb-nl-inner {
    padding: 24px 16px;
  }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .nhhb-newsletter .nhhb-nl-btn,
  .nhhb-newsletter .nhhb-nl-field {
    transition: none !important;
  }
}
