/* ════════════════════════════════════════════════════════════
   The Physicians' Greenbook — Legal pages (privacy / terms)
   Shares the homepage editorial system: Newsreader + Outfit, cream
   ════════════════════════════════════════════════════════════ */

:root {
  --paper:        #F6F3EB;
  --forest:       #244F26;
  --forest-deep:  #19371A;
  --plum:         #241623;
  --lime:         #A2D729;
  --ink:          #241623;
  --muted:        #5A5059;
  --tertiary:     #6B636B;   /* AA on paper */
  --label:        #AD5125;   /* AA terracotta label on paper */
  --on-dark:      #FAFBF6;
  --border:       #E3DDCD;
  --serif: 'Newsreader', Georgia, 'Times New Roman', serif;
  --sans:  'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --max-w: 1180px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--sans);
  background: var(--paper);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
::selection { background: var(--lime); color: var(--forest-deep); }

.skip-link {
  position: absolute;
  top: -56px; left: 16px;
  z-index: 100;
  background: var(--lime);
  color: var(--forest-deep);
  padding: 12px 20px;
  font-weight: 600;
  text-decoration: none;
  transition: top 0.2s ease;
}
.skip-link:focus { top: 0; }
a:focus-visible, .skip-link:focus-visible { outline: 2px solid var(--lime); outline-offset: 3px; box-shadow: 0 0 0 5px var(--plum); }

/* ── Nav (sticky cream glass — matches homepage) ─────── */
.nav {
  position: sticky;
  top: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px clamp(20px, 4vw, 56px);
  background: rgba(246,243,235,0.9);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.nav__logo { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); }
.nav__logo-icon { width: 38px; height: 38px; background: transparent; display: flex; align-items: center; justify-content: center; flex: none; }
.nav__logo-icon img { width: 100%; height: 100%; object-fit: contain; }
.nav__logo-text { font-family: var(--serif); font-size: 19px; font-weight: 500; letter-spacing: -0.01em; }
.nav__links { display: flex; align-items: center; gap: 30px; }
.nav__links a { text-decoration: none; font-size: 14px; font-weight: 500; color: var(--muted); transition: color 0.25s ease; }
.nav__links a:hover { color: var(--forest); }
.nav__links a.nav__cta {
  color: var(--on-dark); background: var(--forest);
  font-size: 12px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; padding: 12px 22px;
}
.nav__links a.nav__cta:hover { color: var(--on-dark); background: var(--forest-deep); }

/* ── Legal document ──────────────────────────────────── */
.legal {
  max-width: 760px;
  margin: 0 auto;
  padding: clamp(48px,7vw,96px) clamp(24px,5vw,40px) clamp(64px,9vw,120px);
}
.legal__eyebrow { font-family: var(--sans); font-size: 12px; font-weight: 600; letter-spacing: 0.22em; text-transform: uppercase; color: var(--label); display: block; margin-bottom: 22px; }
.legal h1 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(38px,5.5vw,64px);
  line-height: 1.04;
  letter-spacing: -0.022em;
  color: var(--ink);
}
.legal__effective { font-family: var(--sans); font-size: 14px; color: var(--tertiary); margin-top: 12px; margin-bottom: 8px; }
.legal__rule { width: 64px; height: 1px; background: var(--border); margin: 36px 0 40px; }
.legal h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(22px,2.5vw,30px);
  line-height: 1.2;
  letter-spacing: -0.012em;
  color: var(--forest);
  margin-top: 44px;
  margin-bottom: 14px;
}
.legal p, .legal li { font-family: var(--sans); font-size: 16px; line-height: 1.75; color: var(--muted); margin-bottom: 12px; }
.legal ul { padding-left: 22px; margin-bottom: 12px; }
.legal strong { color: var(--ink); font-weight: 600; }
.legal a { color: var(--forest); text-decoration: underline; text-underline-offset: 2px; }
.legal a:hover { color: var(--forest-deep); }

/* ── Footer (dark purple — matches homepage) ─────────── */
.footer-legal { background: var(--plum); color: var(--on-dark); }
.footer-legal__inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 44px clamp(24px,5vw,64px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 24px;
}
.footer-legal__brand { display: flex; align-items: center; gap: 12px; }
.footer-legal__brand .nav__logo-icon { width: 40px; height: 40px; background: var(--paper); border-radius: 50%; padding: 5px; }
.footer-legal__brand .nav__logo-icon img { width: 100%; height: 100%; }
.footer-legal__wordmark { font-family: var(--serif); font-size: 17px; color: var(--on-dark); }
.footer-legal__links { display: flex; gap: 26px; flex-wrap: wrap; }
.footer-legal__links a { text-decoration: none; color: rgba(250,251,246,0.66); font-family: var(--sans); font-size: 13px; transition: color 0.25s ease; }
.footer-legal__links a:hover { color: var(--lime); }
.footer-legal__copy { text-align: center; font-family: var(--sans); font-size: 12px; color: rgba(250,251,246,0.5); padding: 0 0 32px; }

@media (max-width: 720px) {
  .nav__links a:not(.nav__cta) { display: none; }
  .footer-legal__inner { justify-content: center; text-align: center; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; }
}
