/* ==========================================================================
   Newsletter signup in the footer. Rendered by js/newsletter.js.
   ========================================================================== */

.nl {
  --nl-accent: var(--red);
  --nl-field-bg: #fff;
  --nl-field-border: oklch(20% 0.01 40 / 0.18);
  --nl-error: #b3261e;
  padding: 56px 24px 48px;
  color: var(--ink);
  text-align: center;
}
.nl-inner { max-width: 560px; margin: 0 auto; }

.nl-sr {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}
.nl-hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

.nl-title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: .04em; text-transform: uppercase;
  font-size: clamp(20px, 2.4vw, 26px);
  line-height: 1.2;
  color: var(--nl-accent);
}
.nl-text {
  margin: 10px auto 0;
  max-width: 44ch;
  font-size: 15px; line-height: 1.6;
  color: var(--muted);
}

.nl-form { margin: 24px 0 0; }

/* Country choice */
.nl-countries { border: 0; margin: 0 0 14px; padding: 0; min-width: 0; }
.nl-legend {
  width: 100%; padding: 0; margin-bottom: 10px;
  font-size: 12px; font-weight: 500; letter-spacing: .1em; text-transform: uppercase;
  text-align: center;
  color: var(--muted);
}
.nl-country-list { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.nl-country { position: relative; cursor: pointer; }
.nl-country input { position: absolute; inset: 0; margin: 0; opacity: 0; cursor: pointer; }
.nl-country__box {
  display: inline-flex; align-items: center; gap: 10px;
  min-height: 46px; padding: 10px 18px 10px 14px;
  border: 1px solid var(--nl-field-border);
  border-radius: 999px;
  background: var(--nl-field-bg);
  font-size: 14px; font-weight: 500;
  user-select: none;
  transition: border-color .2s ease, background .2s ease, box-shadow .2s ease;
}
.nl-country:hover .nl-country__box { border-color: var(--nl-accent); }
.nl-check {
  flex: none; display: grid; place-items: center;
  width: 18px; height: 18px;
  border: 1.5px solid currentColor; border-radius: 4px;
  opacity: .55;
  transition: background .2s ease, border-color .2s ease, opacity .2s ease;
}
.nl-check svg { width: 12px; height: 12px; opacity: 0; transition: opacity .15s ease; }
.nl-flag { flex: none; width: 22px; height: auto; border-radius: 2px; box-shadow: 0 0 0 1px oklch(0% 0 0 / .08); }

.nl-country input:checked + .nl-country__box { border-color: var(--nl-accent); box-shadow: inset 0 0 0 1px var(--nl-accent); }
.nl-country input:checked + .nl-country__box .nl-check { background: var(--nl-accent); border-color: var(--nl-accent); color: #fff; opacity: 1; }
.nl-country input:checked + .nl-country__box .nl-check svg { opacity: 1; }
.nl-country input:focus-visible + .nl-country__box { outline: 2px solid var(--nl-accent); outline-offset: 3px; }
.nl-countries.is-invalid .nl-country__box { border-color: var(--nl-error); border-style: dashed; }

/* Email + button */
.nl-row { display: flex; gap: 10px; }
.nl-input {
  flex: 1; min-width: 0; height: 50px; padding: 0 16px;
  font: inherit; font-size: 16px; /* 16px stops iOS zooming in */
  color: var(--ink);
  background: var(--nl-field-bg);
  border: 1px solid var(--nl-field-border);
  border-radius: var(--radius);
  transition: border-color .2s ease, box-shadow .2s ease;
}
.nl-input::placeholder { color: oklch(45% 0.02 40 / .8); }
.nl-input:focus { outline: none; border-color: var(--nl-accent); box-shadow: 0 0 0 3px oklch(60% 0.18 35 / .18); }
.nl-input[aria-invalid="true"] { border-color: var(--nl-error); }
.nl-btn {
  flex: none; height: 50px; padding: 0 26px;
  font: inherit; font-size: 13px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase;
  color: #fff; background: var(--nl-accent);
  border: 0; border-radius: var(--radius);
  cursor: pointer;
  transition: background .2s ease;
}
.nl-btn:hover { background: var(--navy); }
.nl-btn:disabled { opacity: .6; cursor: progress; }

.nl-consent { margin: 12px 0 0; font-size: 12px; line-height: 1.6; color: var(--muted); }

.nl-status { margin: 10px 0 0; font-size: 14px; line-height: 1.5; }
.nl-status:empty { display: none; }
.nl-status[data-state="error"] { color: var(--nl-error); font-weight: 500; }
.nl-form.is-done .nl-fields { display: none; }
.nl-form.is-done .nl-status {
  margin-top: 4px;
  font-family: var(--font-script);
  font-style: italic;
  font-weight: 600;
  font-size: 22px;
  color: var(--nl-accent);
}

@media (max-width: 520px) {
  .nl-row { flex-direction: column; }
  .nl-input { flex: none; width: 100%; }
  .nl-btn { width: 100%; }
}
