/* SDR site chrome shared by every public page: privacy notice, sticky
 * mobile CTA, and form validation states. Tokens mirror sdr.css and the
 * inline palettes on the long-form pages so this file works on both. */
:root {
  --sdr-bg: #0d1311;
  --sdr-card: #161e1a;
  --sdr-ink: #f0eee5;
  --sdr-text: #d6dcd2;
  --sdr-muted: #97a39a;
  --sdr-sage: #82af90;
  --sdr-sage-bright: #a4cdb0;
  --sdr-line-strong: rgba(195, 215, 200, 0.12);
  --sdr-danger: #d27a66;
}

/* ── Privacy notice ─────────────────────────────────────────────── */
.sdr-notice {
  position: fixed;
  left: 1rem;
  right: 1rem;
  bottom: 1rem;
  z-index: 70;
  max-width: 28rem;
  padding: 1rem 1.1rem;
  background: var(--sdr-card);
  border: 1px solid var(--sdr-line-strong);
  border-radius: 14px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 18px 48px rgba(0, 0, 0, 0.45);
  color: var(--sdr-text);
  font-family: Inter, -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  font-size: 0.86rem;
  line-height: 1.55;
  animation: sdr-notice-in 0.28s ease-out;
}
.sdr-notice.is-closing { opacity: 0; transform: translateY(8px); transition: opacity 0.22s, transform 0.22s; }
@keyframes sdr-notice-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.sdr-notice-text { margin: 0 0 0.8rem; color: var(--sdr-text); }
.sdr-notice-text a { color: var(--sdr-sage-bright); text-decoration: none; border-bottom: 1px solid rgba(130, 175, 144, 0.35); padding-bottom: 1px; }
.sdr-notice-text a:hover { color: var(--sdr-ink); }
.sdr-notice-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.sdr-notice-btn {
  appearance: none;
  font: inherit;
  font-weight: 600;
  padding: 0.5rem 0.95rem;
  border-radius: 999px;
  border: 1px solid var(--sdr-line-strong);
  background: transparent;
  color: var(--sdr-ink);
  cursor: pointer;
  transition: background 0.14s, border-color 0.14s, color 0.14s;
}
.sdr-notice-btn:hover { border-color: rgba(130, 175, 144, 0.4); color: var(--sdr-sage-bright); }
.sdr-notice-btn.primary { background: var(--sdr-sage); border-color: var(--sdr-sage); color: #0d1311; }
.sdr-notice-btn.primary:hover { background: var(--sdr-sage-bright); border-color: var(--sdr-sage-bright); color: #0d1311; }
.sdr-notice-btn:focus-visible { outline: 2px solid var(--sdr-sage); outline-offset: 2px; }
@media (max-width: 560px) {
  .sdr-notice { left: 0.6rem; right: 0.6rem; bottom: 0.6rem; max-width: none; }
}

/* ── Sticky mobile CTA ──────────────────────────────────────────── */
.sticky-cta {
  display: none;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 60;
  padding: 0.65rem 1rem calc(0.65rem + env(safe-area-inset-bottom, 0px));
  background: rgba(13, 19, 17, 0.92);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border-top: 1px solid var(--sdr-line-strong);
  transform: translateY(110%);
  transition: transform 0.25s ease;
}
.sticky-cta-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.85rem 1.2rem;
  border-radius: 999px;
  background: var(--sdr-sage);
  color: #0d1311;
  font-family: Inter, -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-decoration: none;
  box-shadow: 0 6px 22px rgba(130, 175, 144, 0.28);
}
.sticky-cta-btn:active { background: var(--sdr-sage-bright); }
.sticky-cta-btn svg { width: 16px; height: 16px; }
@media (max-width: 720px) {
  .sticky-cta { display: block; }
  .sticky-cta.is-visible { transform: none; }
  body.sticky-cta-visible { padding-bottom: 5rem; }
  /* Never stack two bars: the notice wins until it is dismissed. */
  body.sdr-notice-open .sticky-cta { display: none; }
}

/* ── Form states ────────────────────────────────────────────────── */
.field-err {
  display: none;
  margin-top: 0.4rem;
  font-size: 0.82rem;
  color: var(--sdr-danger);
}
.field-err.is-visible { display: block; }
input[aria-invalid="true"],
textarea[aria-invalid="true"],
select[aria-invalid="true"] {
  border-color: var(--sdr-danger) !important;
  box-shadow: 0 0 0 3px rgba(210, 122, 102, 0.18);
}
.form-alert {
  display: none;
  margin-top: 1rem;
  padding: 0.85rem 1rem;
  border-radius: 10px;
  border: 1px solid rgba(210, 122, 102, 0.4);
  background: rgba(210, 122, 102, 0.08);
  color: #e8a898;
  font-size: 0.9rem;
  line-height: 1.5;
}
.form-alert.is-visible { display: block; }
button[aria-busy="true"] { position: relative; color: transparent !important; pointer-events: none; }
button[aria-busy="true"]::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 18px;
  height: 18px;
  margin: -9px 0 0 -9px;
  border-radius: 50%;
  border: 2px solid rgba(13, 19, 17, 0.35);
  border-top-color: #0d1311;
  animation: sdr-spin 0.7s linear infinite;
}
@keyframes sdr-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .sdr-notice, .sticky-cta, .sdr-notice.is-closing { animation: none; transition: none; }
}
