/* =========================================================
   GlobeWarn — newsletter.css

   Two things live here: the sign-up page, and the strip that sits above the
   footer on the index. They share their colours with the rest of the site
   through the theme variables, so a theme change reaches both without a
   second edit.

   Every input is 16 px, which is what stops iOS zooming the page the moment
   a finger lands in one. Nothing is smaller than 14 px at the default size.
   ========================================================= */

/* --- the page ------------------------------------------------------------ */

#newsletter {
  box-sizing: border-box;
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 2rem var(--gutter, 1.1rem) 4rem;
}

#newsletter *,
#newsletter *::before,
#newsletter *::after { box-sizing: border-box; }

.nl-back { margin: 0 0 1.4rem; font-size: 0.92rem; }
.nl-back a { color: var(--ink-soft, #55606d); text-decoration: none; }
.nl-back a:hover { color: var(--accent, #D9480F); }

#newsletter h1 {
  margin: 0 0 0.5rem;
  font-family: var(--font-display);
  font-size: 2rem;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.nl-lede {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.6;
  color: var(--ink-soft, #55606d);
  max-width: 44rem;
}

.nl-head {
  padding-bottom: 1.6rem;
  margin-bottom: 2rem;
  border-bottom: 1px solid var(--line, #c9d2dc);
}

.nl-grid {
  display: grid;
  gap: 2.4rem;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  align-items: start;
}

@media (max-width: 52rem) {
  .nl-grid { grid-template-columns: 1fr; gap: 2rem; }
}

/* --- the card ------------------------------------------------------------ */

.nl-card {
  padding: 1.5rem;
  border: 1px solid var(--line, #c9d2dc);
  border-radius: 12px;
  background: var(--surface, #fff);
}

.nl-form .field { margin-bottom: 1.1rem; }

.nl-form label {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.92rem;
  font-weight: 600;
}

.nl-form input[type="email"] {
  width: 100%;
  font: inherit;
  font-size: 1rem;             /* 16 px: iOS will not zoom the page */
  line-height: 1.5;
  padding: 0.62rem 0.75rem;
  border: 1px solid var(--line-strong, #8c99a8);
  border-radius: 8px;
  background: var(--surface, #fff);
  color: inherit;
}

.nl-form input[type="email"]:focus-visible {
  outline: 2px solid var(--accent, #D9480F);
  outline-offset: 1px;
  border-color: transparent;
}

/* --- continents ---------------------------------------------------------- */

.nl-regions {
  margin: 0 0 1.2rem;
  padding: 0;
  border: 0;
}

.nl-regions legend {
  padding: 0;
  margin-bottom: 0.3rem;
  font-size: 0.92rem;
  font-weight: 600;
}

.nl-hint {
  margin: 0 0 0.7rem;
  font-size: 0.86rem;
  line-height: 1.45;
  color: var(--ink-soft, #55606d);
}

.nl-boxes {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* A tick that reads as a chip: the whole thing is the target, which is what
   a thumb needs, and the state is legible without hunting for a small box. */
.nl-box {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0;
  padding: 0.42rem 0.75rem;
  font-size: 0.9rem;
  font-weight: 500;
  border: 1px solid var(--line-strong, #8c99a8);
  border-radius: 999px;
  cursor: pointer;
  user-select: none;
}

.nl-box input { margin: 0; accent-color: var(--accent, #D9480F); }

.nl-box:has(input:checked) {
  border-color: var(--accent, #D9480F);
  background: var(--accent-wash, rgba(217, 72, 15, 0.08));
}

.nl-box:has(input:focus-visible) {
  outline: 2px solid var(--accent, #D9480F);
  outline-offset: 2px;
}

/* --- the trap ------------------------------------------------------------ */
/* Off the page rather than display:none, because some bots skip anything
   hidden and fill anything that is not. */
.nl-trap {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* --- sending ------------------------------------------------------------- */

.nl-send {
  font: inherit;
  font-size: 1rem;
  font-weight: 600;
  padding: 0.66rem 1.5rem;
  border-radius: 8px;
  border: 1px solid var(--accent, #D9480F);
  background: var(--accent, #D9480F);
  color: var(--accent-ink, #fff);
  cursor: pointer;
}

.nl-send:hover { filter: brightness(1.06); }

.nl-send:focus-visible {
  outline: 2px solid var(--accent, #D9480F);
  outline-offset: 3px;
}

.nl-send[disabled] { opacity: 0.6; cursor: default; }

.nl-note {
  margin: 0.9rem 0 0;
  font-size: 0.95rem;
  line-height: 1.55;
}

/* Nothing to say, nothing to take up room. The jump this used to prevent
   happens once, after a button is pressed; the gap it created was there for
   everyone who never pressed one. */
.nl-note:empty {
  display: none;
}

.nl-note.is-good { color: var(--sev-green, #2E8B57); }
.nl-note.is-bad { color: var(--sev-red, #D7263D); }

.nl-small {
  margin: 1rem 0 0;
  font-size: 0.86rem;
  line-height: 1.55;
  color: var(--ink-soft, #55606d);
}

/* --- what it is ---------------------------------------------------------- */

.nl-side h2 {
  margin: 1.4rem 0 0.4rem;
  font-size: 1rem;
  letter-spacing: 0.01em;
}

.nl-side h2:first-child { margin-top: 0; }

.nl-side p {
  margin: 0 0 0.7rem;
  font-size: 0.94rem;
  line-height: 1.6;
  color: var(--ink-soft, #55606d);
}

.nl-side a { color: var(--accent, #D9480F); }

/* --- the states a link arrives in ---------------------------------------- */

.nl-state {
  padding: 1.5rem;
  border: 1px solid var(--line, #c9d2dc);
  border-left: 4px solid var(--accent, #D9480F);
  border-radius: 12px;
  background: var(--surface, #fff);
}

.nl-state.is-good { border-left-color: var(--sev-green, #2E8B57); }
.nl-state.is-bad { border-left-color: var(--sev-red, #D7263D); }

.nl-state h2 {
  margin: 0 0 0.5rem;
  font-family: var(--font-display);
  font-size: 1.3rem;
  line-height: 1.25;
}

.nl-state p {
  margin: 0 0 0.8rem;
  font-size: 0.98rem;
  line-height: 1.6;
  color: var(--ink-soft, #55606d);
}

.nl-state p:last-child { margin-bottom: 0; }

.nl-again {
  font: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  padding: 0.5rem 1.1rem;
  border-radius: 8px;
  border: 1px solid var(--line-strong, #8c99a8);
  background: transparent;
  color: inherit;
  cursor: pointer;
}

.nl-again:hover { border-color: var(--accent, #D9480F); }

/* --- the strip above the footer ------------------------------------------ */

/* The strip sits outside <main>, so it has to reproduce the page's own
   measure rather than invent one. It was written to 64rem and the page is
   var(--content-max); the difference showed as a block wider than everything
   above it. The outer element carries the page's width and side padding, and
   the card inside it carries the border — so the card lines up with the
   cards in the page above, to the pixel. */
.nl-strip {
  box-sizing: border-box;
  max-width: var(--content-max, 64rem);
  margin: 0 auto;
  padding: 0 16px 2.4rem;
}

.nl-strip__inner {
  box-sizing: border-box;
  padding: 1.2rem 1.4rem;
  border: 1px solid var(--line, #c9d2dc);
  border-radius: 12px;
  background: var(--surface, #fff);
  display: grid;
  gap: 0.9rem 1.6rem;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.nl-strip__text { min-width: 0; }

.nl-strip__title {
  margin: 0 0 0.25rem;
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--ink);
}

/* Full ink, not the soft grey the section notes use. This is the one place
   on the page asking a reader to do something, and it was set at the weight
   of a footnote — which is how it read. */
.nl-strip__line {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.55;
  color: var(--ink);
}

.nl-strip__form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-items: center;
}

.nl-strip input[type="email"] {
  font: inherit;
  font-size: 1rem;
  line-height: 1.5;
  width: 15rem;
  max-width: 100%;
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--line-strong, #8c99a8);
  border-radius: 8px;
  background: var(--surface, #fff);
  color: inherit;
}

.nl-strip input[type="email"]:focus-visible {
  outline: 2px solid var(--accent, #D9480F);
  outline-offset: 1px;
  border-color: transparent;
}

.nl-strip__note {
  grid-column: 1 / -1;
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.5;
  color: var(--ink-soft, #405A72);
}

/* The status line held 1.2em of reserved space plus a grid gap on every
   visit, for a message that is not there — a visible hole between the offer
   and the small print. Reserving space stops a jump when the message
   arrives, but the jump happens once, after somebody has pressed a button,
   and the hole was there for everyone who never pressed anything. */
.nl-strip__note:empty {
  display: none;
}

.nl-strip__note.is-good { color: var(--sev-green, #2E8B57); }
.nl-strip__note.is-bad { color: var(--sev-red, #D7263D); }

@media (max-width: 44rem) {
  .nl-strip__inner { grid-template-columns: 1fr; }
  .nl-strip input[type="email"] { width: 100%; }
  .nl-strip .nl-send { width: 100%; }
}
