/* newsletter.css — Path of Sitting. The "by email" subscribe, on its
   centred stage (module.css .page.stage). Requires shared.css +
   module.css first. */

.newsletter-subscribe {
  padding: 8px 0 0;
}
/* On a computer the stage's gaps, sized for longer pages, leave this
   small page's few lines floating apart; drawn together and lifted
   above centre, they read as one thing. */
@media (min-width: 769px) {
  .page.stage .book-hero:has(+ .newsletter-subscribe) { padding-bottom: 36px; }
  .newsletter-subscribe { padding-top: 0; }
  .newsletter-subscribe-copy { margin-top: 14px; }
  body.stage .page.stage:has(.newsletter-subscribe) { padding-bottom: 140px; }
}
.newsletter-subscribe-copy {
  font-family: var(--read);
  font-style: italic;
  font-size: clamp(15px, 1.5vw, 16.5px);
  line-height: 1.7;
  color: var(--muted);
}

/* ── The Kit form: the email and Send as one rounded field, Send a
   pill inside it, like the Sit page's. ──────────────────────────────── */
.newsletter-form {
  display: flex;
  align-items: center;
  gap: 6px;
  max-width: 420px;
  margin: 0 auto;
  padding: 5px;
  border: 1px solid var(--outline);
  border-radius: 50px;
  transition: border-color 0.3s;
}
.newsletter-form:focus-within { border-color: var(--accent-mark); }
@media (hover: hover) {
  .newsletter-form:hover { border-color: var(--accent-tint-strong); }
  .newsletter-form:focus-within { border-color: var(--accent-mark); }
}
/* 16px: under it, iOS zooms the page on focus. */
.newsletter-input {
  flex: 1 1 auto;
  min-width: 0;
  font-family: var(--sans);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.4;
  color: var(--text);
  background: none;
  border: none;
  padding: 10px 8px 10px 18px;
}
.newsletter-input::placeholder { color: var(--muted); opacity: 0.6; }
.newsletter-input:focus { outline: none; }
/* Autofill paints its own background. Covering it with an inset shadow
   leaves the shadow's edge as a box inside the pill, so instead the
   background change is delayed past any visit and never shows. */
.newsletter-input:-webkit-autofill {
  transition: background-color 0s 600000s;
  -webkit-text-fill-color: var(--text);
  caret-color: var(--text);
}
.newsletter-send {
  flex: 0 0 auto;
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-label);
  background: none;
  border: 1px solid var(--accent-tint-strong);
  border-radius: 50px;
  padding: 11px 28px;
  cursor: pointer;
  touch-action: manipulation;
  transition: border-color 0.3s, color 0.3s;
}
.newsletter-send:hover {
  border-color: var(--accent-mark);
  color: var(--text);
}
.newsletter-send:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.newsletter-form + .newsletter-subscribe-copy { margin-top: 18px; }
