/* ===== Subscribe =====
   Shared by the homepage (a full section) and every journal page
   (the floating invite + a one-line entry). Colours come from each
   page's own :root vars, so it settles into whatever page it's on. */

/* ---- homepage section ---- */
.subscribe {
  padding: 5vh 6vw 12vh;
  max-width: 760px;
}
.subscribe-kicker {
  font-size: 13px;
  letter-spacing: 0.06em;
  opacity: 0.92;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5), 0 2px 10px rgba(0, 0, 0, 0.32);
  margin-bottom: 26px;
}
.subscribe-lede {
  font-family: var(--sans);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(19px, 2.2vw, 27px);
  line-height: 1.5;
  margin: 0 0 6vh;
}

.sb-field { display: block; margin-bottom: 30px; }
.sb-label {
  display: block;
  font-size: 12px;
  letter-spacing: 0.1em;
  opacity: 0.55;
  margin-bottom: 8px;
}
.sb-optional { font-style: normal; opacity: 0.7; letter-spacing: 0.04em; }
.sb-input {
  width: 100%;
  border: none;
  border-bottom: 1px solid rgba(237, 231, 219, 0.35);
  background: none;
  padding: 6px 0 10px;
  font-family: var(--mono);
  font-size: 15px;
  color: var(--fg);
  transition: border-color 0.25s;
}
.sb-input::placeholder { color: var(--fg); opacity: 0.35; }
.sb-input:focus { outline: none; border-bottom-color: rgba(237, 231, 219, 0.9); }

/* honeypot: bots fill this, humans never see it */
.sb-trap { position: absolute; left: -6000px; width: 1px; height: 1px; opacity: 0; }

.sb-actions {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 2em;
  flex-wrap: wrap;
}
.sb-note {
  font-size: 12.5px;
  letter-spacing: 0.04em;
  opacity: 0.6;
  min-height: 1.6em;
  margin: 0;
}
.sb-note.is-error { opacity: 0.85; }
.sb-send {
  border: none;
  background: none;
  font-family: var(--mono);
  font-size: 14px;
  letter-spacing: 0.05em;
  color: var(--fg);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 5px;
  opacity: 0.85;
  transition: opacity 0.2s;
}
.sb-send:hover:not(:disabled) { opacity: 1; }
.sb-send:disabled { opacity: 0.4; cursor: wait; }
.sb-fineprint {
  margin-top: 4vh;
  font-size: 12px;
  letter-spacing: 0.04em;
  opacity: 0.42;
  line-height: 1.9;
}

/* ---- one-line entry on journal pages ---- */
.sb-inline {
  padding: 0 6vw 8vh;
  font-size: 13px;
  letter-spacing: 0.04em;
  opacity: 0.6;
}
.sb-inline a {
  color: var(--fg);
  text-decoration: underline;
  text-underline-offset: 4px;
}
.sb-inline a:hover { opacity: 1; }

/* ---- floating invite (all pages) ---- */
.sb-invite {
  position: fixed;
  right: 28px;
  bottom: 28px;
  z-index: 50;
  width: min(340px, calc(100vw - 40px));
  padding: 22px 22px 18px;
  background: rgba(38, 35, 31, 0.94);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(237, 231, 219, 0.16);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.42);
  color: #ede7db;
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.7s ease, transform 0.7s ease;
  pointer-events: none;
}
.sb-invite.is-in { opacity: 1; transform: none; pointer-events: auto; }
.sb-invite[hidden] { display: none; }
.sb-invite-kicker { font-size: 11.5px; letter-spacing: 0.12em; opacity: 0.5; margin: 0 0 12px; }
.sb-invite-line {
  font-family: var(--sans);
  font-style: italic;
  font-size: 16.5px;
  line-height: 1.55;
  margin: 0 0 18px;
}
.sb-invite .sb-input { font-size: 13.5px; }
.sb-invite-name { margin-bottom: 14px; }
.sb-invite-row { display: flex; align-items: flex-end; gap: 14px; }
.sb-invite-row .sb-send { font-size: 13px; white-space: nowrap; }
.sb-invite .sb-note { margin-top: 12px; }
.sb-close {
  position: absolute;
  top: 10px;
  right: 12px;
  background: none;
  border: none;
  color: #ede7db;
  font-family: var(--mono);
  font-size: 15px;
  line-height: 1;
  opacity: 0.35;
  cursor: pointer;
  padding: 4px;
}
.sb-close:hover { opacity: 0.8; }

@media (max-width: 560px) {
  .sb-invite { right: 12px; left: 12px; bottom: 12px; width: auto; }

  /* keep the top nav on a single line even with five items */
  .site-nav { white-space: nowrap; }
  .site-nav a { font-size: 11px; margin: 0 5px; letter-spacing: 0.02em; }
}

@media (prefers-reduced-motion: reduce) {
  .sb-invite { transition: opacity 0.2s ease; transform: none; }
}
