/* ============================================================
   THE PRIVATE LIST — signup card, modal / bottom sheet,
   floating button. Built by js/private-list.js.

   Deliberately dark on every page theme (near-black / deep maroon,
   matching the proposal page) with an ivory accent. Ivory is only
   ever used on these dark surfaces, never on the light site, and
   the site's own accent (--gold) is not touched.
   ============================================================ */
:root {
  --accent-private:     #E4DCCB;
  --accent-private-hi:  #F1EBDD;
  --pl-ink:             #140307;   /* dark text on ivory */
  --pl-bg:              #140307;
  --pl-bg-deep:         #0a0a0a;
  --pl-text:            #f5f0eb;
  --pl-muted:           rgba(245,240,235,0.62);
  --pl-faint:           rgba(245,240,235,0.40);
  --pl-line:            rgba(228,220,203,0.20);
  --pl-line-strong:     rgba(228,220,203,0.36);
  --pl-error:           #f0a5b2;
}

/* ---- Card -------------------------------------------------- */
.pl-card {
  position: relative;
  width: 100%;
  max-width: 580px;
  margin: 0 auto;
  padding: 40px 36px 32px;
  background: linear-gradient(160deg, #22070e 0%, var(--pl-bg) 42%, var(--pl-bg-deep) 100%);
  border: 1px solid var(--pl-line);
  border-radius: 14px;
  box-shadow: 0 18px 48px rgba(20,3,7,0.28);
  color: var(--pl-text);
  text-align: center;
  font-family: var(--fb, 'Inter', system-ui, sans-serif);
}
.pl-eyebrow {
  display: block;
  font-size: 0.68rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--accent-private);
  margin-bottom: 14px;
}
.pl-heading {
  font-family: var(--fh, 'Cormorant Garamond', Georgia, serif);
  font-weight: 300;
  font-size: clamp(1.7rem, 4.6vw, 2.25rem);
  line-height: 1.18;
  color: var(--accent-private);
  margin: 0 0 12px;
}
.pl-sub {
  font-size: 0.92rem;
  line-height: 1.65;
  color: var(--pl-muted);
  margin: 0 auto 26px;
  max-width: 440px;
}

/* ---- Form -------------------------------------------------- */
.pl-form { margin: 0; }
.pl-row {
  display: flex;
  gap: 10px;
  max-width: 460px;
  margin: 0 auto;
}
.pl-input {
  -webkit-appearance: none;
  appearance: none;
  flex: 1;
  min-width: 0;
  height: 48px;
  padding: 0 20px;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--pl-line-strong);
  border-radius: 999px;
  color: var(--pl-text);
  font-family: inherit;
  font-size: 0.95rem;
  outline: none;
  box-shadow: none;
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}
.pl-input::placeholder { color: var(--pl-faint); opacity: 1; }
.pl-input:hover { border-color: rgba(228,220,203,0.5); }
.pl-input:focus {
  border-color: var(--accent-private);
  background: rgba(255,255,255,0.07);
  box-shadow: 0 0 0 3px rgba(228,220,203,0.14);
}
.pl-input:-webkit-autofill,
.pl-input:-webkit-autofill:hover,
.pl-input:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--pl-text);
  -webkit-box-shadow: 0 0 0 40px #1d080d inset;
  caret-color: var(--pl-text);
  transition: background-color 9999s ease;
}
.pl-input[aria-invalid="true"] { border-color: var(--pl-error); }
.pl-join {
  -webkit-appearance: none;
  appearance: none;
  flex: 0 0 auto;
  height: 48px;
  padding: 0 30px;
  border: 1px solid var(--accent-private);
  border-radius: 999px;
  background: var(--accent-private);
  color: var(--pl-ink);
  font-family: inherit;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 160ms ease, border-color 160ms ease, opacity 160ms ease;
}
.pl-join:hover { background: var(--accent-private-hi); border-color: var(--accent-private-hi); }
.pl-join:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(228,220,203,0.35); }
.pl-join:disabled { opacity: 0.7; cursor: default; }
/* Screen-reader-only label */
.pl-sr {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
/* Honeypot — off-screen, never visible or focusable */
.pl-hp {
  position: absolute !important;
  left: -10000px !important;
  width: 1px; height: 1px;
  overflow: hidden;
}
.pl-error {
  min-height: 0;
  margin: 10px 0 0;
  font-size: 0.8rem;
  color: var(--pl-error);
}
.pl-error:empty { display: none; }
.pl-note {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 8px;
  max-width: 440px;
  margin: 20px auto 0;
  font-size: 0.76rem;
  line-height: 1.6;
  color: var(--pl-faint);
  text-align: left;
}
.pl-note svg {
  flex: 0 0 auto;
  width: 12px;
  height: 12px;
  margin-top: 3px;
  color: var(--accent-private);
  opacity: 0.85;
}
.pl-privacy {
  margin: 6px 0 0;
  font-size: 0.72rem;
  line-height: 1.6;
}
.pl-privacy a {
  color: var(--pl-faint);
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color 0.2s ease;
}
.pl-privacy a:hover,
.pl-privacy a:focus-visible { color: var(--accent-private); }
.pl-dismiss {
  -webkit-appearance: none;
  appearance: none;
  display: inline-block;
  margin-top: 18px;
  padding: 4px 8px;
  background: none;
  border: none;
  color: var(--pl-faint);
  font-family: inherit;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  cursor: pointer;
  text-decoration: underline;
  text-decoration-color: transparent;
  text-underline-offset: 3px;
  transition: color 160ms ease, text-decoration-color 160ms ease;
}
.pl-dismiss:hover,
.pl-dismiss:focus-visible { color: var(--pl-text); text-decoration-color: currentColor; outline: none; }

/* Done states ("Check your inbox", "You're on the list") */
.pl-done-msg {
  font-family: var(--fh, 'Cormorant Garamond', Georgia, serif);
  font-style: italic;
  font-size: 1.25rem;
  color: var(--pl-text);
  margin: 6px 0 0;
}
.pl-done-sub {
  font-size: 0.86rem;
  color: var(--pl-muted);
  margin: 10px 0 0;
}
.pl-cta {
  display: inline-block;
  margin-top: 24px;
  padding: 13px 30px;
  border-radius: 999px;
  background: var(--accent-private);
  color: var(--pl-ink);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  text-decoration: none;
  transition: background 160ms ease;
}
.pl-cta:hover { background: var(--accent-private-hi); }

@media (max-width: 520px) {
  .pl-card { padding: 34px 20px 26px; border-radius: 12px; }
  .pl-row { flex-direction: column; }
  .pl-input { flex: 0 0 auto; width: 100%; }
  .pl-join { width: 100%; }
}

/* ---- Inline block (Home, Angels, Packages) ----------------- */
.pl-inline-section { padding: 72px 0; }
@media (max-width: 768px) { .pl-inline-section { padding: 52px 0; } }

/* ---- Modal / bottom sheet ---------------------------------- */
.pl-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(10,6,6,0.72);
  opacity: 0;
  visibility: hidden;
  transition: opacity 260ms ease, visibility 0s linear 260ms;
}
.pl-overlay.active {
  opacity: 1;
  visibility: visible;
  transition: opacity 260ms ease;
}
.pl-sheet {
  position: relative;
  width: 100%;
  max-width: 580px;
  max-height: 90vh;
  overflow-y: auto;
  border-radius: 14px;
  transform: translateY(8px);
  transition: transform 260ms ease;
  scrollbar-width: thin;
  scrollbar-color: var(--accent-private) rgba(0,0,0,0.3);
}
.pl-overlay.active .pl-sheet { transform: translateY(0); }
.pl-sheet::-webkit-scrollbar { width: 7px; }
.pl-sheet::-webkit-scrollbar-track { background: rgba(0,0,0,0.3); }
.pl-sheet::-webkit-scrollbar-thumb { background: var(--accent-private); border-radius: 4px; }
.pl-sheet::-webkit-scrollbar-thumb:hover { background: var(--accent-private-hi); }
.pl-sheet .pl-card { max-width: none; padding-top: 48px; }
.pl-close {
  -webkit-appearance: none;
  appearance: none;
  position: absolute;
  top: 12px;
  right: 14px;
  z-index: 1;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  border-radius: 50%;
  color: var(--pl-faint);
  cursor: pointer;
  transition: color 160ms ease, background 160ms ease;
}
.pl-close svg { width: 14px; height: 14px; }
.pl-close:hover,
.pl-close:focus-visible { color: var(--pl-text); background: rgba(255,255,255,0.06); outline: none; }

/* Phone: bottom sheet — same slide-up pattern as the admin drawers */
@media (max-width: 640px) {
  .pl-overlay { align-items: flex-end; padding: 0; }
  .pl-sheet {
    max-width: none;
    max-height: 88vh;
    border-radius: 16px 16px 0 0;
    transform: translateY(100%);
  }
  .pl-sheet .pl-card {
    border-radius: 16px 16px 0 0;
    border-bottom: none;
    padding-bottom: calc(26px + env(safe-area-inset-bottom, 0px));
  }
}

/* ---- Floating button -------------------------------------- */
.pl-fab {
  -webkit-appearance: none;
  appearance: none;
  position: fixed;
  right: 20px;
  bottom: calc(20px + env(safe-area-inset-bottom, 0px));
  z-index: 290;   /* under the Angels page's access gate (300) and profile modal (1000) */
  display: flex;
  align-items: center;
  gap: 9px;
  height: 46px;
  padding: 0 20px 0 16px;
  background: var(--pl-bg);
  border: 1px solid var(--pl-line-strong);
  border-radius: 999px;
  box-shadow: 0 10px 28px rgba(20,3,7,0.30);
  color: var(--accent-private);
  font-family: var(--fb, 'Inter', system-ui, sans-serif);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  white-space: nowrap;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: opacity 600ms ease, visibility 0s linear 600ms,
              padding 220ms ease, background 160ms ease, border-color 160ms ease;
}
.pl-fab.pl-fab--in {
  opacity: 1;
  visibility: visible;
  transition: opacity 600ms ease, padding 220ms ease, background 160ms ease, border-color 160ms ease;
}
.pl-fab:hover { background: #22070e; border-color: var(--accent-private); }
.pl-fab:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(228,220,203,0.35), 0 10px 28px rgba(20,3,7,0.30); }
.pl-fab svg { flex: 0 0 auto; width: 18px; height: 18px; }
.pl-fab-label {
  display: inline-block;
  max-width: 140px;
  overflow: hidden;
  transition: max-width 220ms ease, opacity 220ms ease;
}
/* Phone, after scrolling: icon only */
@media (max-width: 640px) {
  .pl-fab { right: 16px; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); }
  .pl-fab.pl-fab--compact { padding: 0; width: 46px; justify-content: center; gap: 0; }
  .pl-fab.pl-fab--compact .pl-fab-label { max-width: 0; opacity: 0; }
}
body.pl-modal-open .pl-fab { opacity: 0; visibility: hidden; }

@media (prefers-reduced-motion: reduce) {
  .pl-overlay, .pl-sheet, .pl-fab, .pl-fab-label { transition: none !important; }
}
