/* legal.css — shared stylesheet for /privacy/ and /terms/.
   Matches the /about/ editorial system: warm off-white ground, Geist,
   single brand purple used as ink, hairline section rules, numbered
   section chips, subtle grain. OKLCH tokens, light + dark. */

:root {
  --ink: oklch(0.20 0.012 295);
  --ink-soft: oklch(0.42 0.012 295);
  --ink-mute: oklch(0.56 0.010 295);
  --rule: oklch(0.90 0.006 295);
  --bg: oklch(0.985 0.005 90);
  --bg-tint: oklch(0.965 0.010 295);
  --brand: #6A1B9A;
  --brand-ink: oklch(0.38 0.18 305);
  --brand-bg: oklch(0.95 0.030 305);
  --focus: oklch(0.65 0.18 305);
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink: oklch(0.96 0.008 90);
    --ink-soft: oklch(0.78 0.012 295);
    --ink-mute: oklch(0.60 0.012 295);
    --rule: oklch(0.28 0.008 295);
    --bg: oklch(0.16 0.012 295);
    --bg-tint: oklch(0.21 0.014 295);
    --brand: oklch(0.74 0.16 305);
    --brand-ink: oklch(0.78 0.18 305);
    --brand-bg: oklch(0.27 0.05 305);
    --focus: oklch(0.74 0.16 305);
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Geist', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
    Oxygen, Ubuntu, sans-serif;
  font-feature-settings: 'ss01', 'ss02', 'cv11';
  font-variant-numeric: tabular-nums;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  position: relative;
}

/* Subtle grain — fixed, GPU-cheap, never intercepts pointer events. */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 999;
  opacity: 0.035;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 0.6 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  background-size: 180px 180px;
}

@media (prefers-color-scheme: dark) {
  body::before { opacity: 0.06; mix-blend-mode: overlay; }
}

.wrap {
  max-width: 680px;
  margin: 0 auto;
  padding: 0 24px;
}

a {
  color: var(--brand);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color 120ms ease-out;
}
a:hover { color: var(--ink); }

::selection { background: var(--brand); color: #fff; }

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ─── Header ───────────────────────────────────────── */

.page-header {
  padding: clamp(56px, 9vw, 104px) 0 clamp(28px, 4vw, 44px);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin-bottom: 32px;
}
.eyebrow .dot {
  width: 7px;
  height: 7px;
  background: var(--brand);
  border-radius: 50%;
  flex-shrink: 0;
}

.page-header h1 {
  margin: 0;
  font-size: clamp(38px, 6.6vw, 64px);
  font-weight: 800;
  line-height: 0.98;
  letter-spacing: -0.038em;
  color: var(--ink);
  text-wrap: balance;
}

.page-header .lede {
  margin: 20px 0 0;
  max-width: 48ch;
  font-size: clamp(16px, 1.5vw, 18px);
  line-height: 1.5;
  color: var(--ink-soft);
  text-wrap: balance;
}

/* ─── Body content ─────────────────────────────────── */

main {
  padding-bottom: clamp(48px, 7vw, 88px);
}

.intro {
  margin: 0 0 clamp(12px, 2vw, 20px);
  font-size: clamp(16px, 1.5vw, 17.5px);
  line-height: 1.6;
  color: var(--ink-soft);
  max-width: 64ch;
}
.intro strong { color: var(--ink); font-weight: 600; }

.legal-section {
  padding-top: clamp(34px, 4.5vw, 48px);
  margin-top: clamp(34px, 4.5vw, 48px);
  border-top: 1px solid var(--rule);
}
.legal-section:first-of-type {
  border-top: 0;
  margin-top: 0;
  padding-top: clamp(8px, 2vw, 16px);
}

main h2 {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0 0 18px;
  font-size: clamp(20px, 2.4vw, 26px);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
  line-height: 1.2;
  text-wrap: balance;
}

main h2 .num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--brand);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
}

main h3 {
  margin: 24px 0 6px;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink);
  line-height: 1.4;
}

main p {
  margin: 0 0 14px;
  font-size: 15.5px;
  line-height: 1.66;
  color: var(--ink-soft);
  max-width: 68ch;
}
main p:last-child { margin-bottom: 0; }
main p strong, main li strong { color: var(--ink); font-weight: 600; }
main em { font-style: normal; color: var(--ink); font-weight: 500; }

main ul {
  margin: 0 0 14px;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 9px;
}
main li {
  position: relative;
  padding-left: 22px;
  font-size: 15.5px;
  line-height: 1.6;
  color: var(--ink-soft);
  max-width: 66ch;
}
main li::before {
  content: '';
  position: absolute;
  left: 3px;
  top: 0.62em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--brand);
}

.meta {
  margin-top: clamp(36px, 5vw, 56px);
  padding-top: 20px;
  border-top: 1px solid var(--rule);
  font-size: 13px;
  line-height: 1.7;
  color: var(--ink-mute);
}
.meta strong { color: var(--ink-soft); font-weight: 600; }

/* ─── Footer ───────────────────────────────────────── */

.page-footer {
  border-top: 1px solid var(--rule);
  background: var(--bg-tint);
  padding: 32px 0;
}
.page-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 20px;
  font-size: 13px;
  color: var(--ink-mute);
}
.page-footer .mark {
  font-weight: 700;
  font-size: 14px;
  letter-spacing: -0.015em;
  color: var(--ink);
}
.page-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}
.page-footer nav a {
  color: var(--ink-mute);
  text-decoration: none;
}
.page-footer nav a:hover { color: var(--ink); }
.page-footer .copy { margin-left: auto; }

@media (max-width: 640px) {
  .page-footer .copy { margin-left: 0; width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
