/* =============================================================================
 * Reclaim — Legal document pages (Terms of Service / Privacy Policy)
 * Loaded after styles.css — reuses its :root tokens (--serif, --sans, --ink,
 * --moss, --rule, etc). Scoped to .legal-* classes so it never leaks into the
 * marketing page. Plain flat background by design — no photographic art.
 *
 * Headings use --sans, not --serif — the marketing page's display serif reads
 * as decorative, which is wrong for a document people read for its terms.
 * ========================================================================== */

body.legal-page { background: var(--ink); }

/* ──────────────────── PAGE HEADER ──────────────────── */
.legal-hero {
  padding: calc(150px + env(safe-area-inset-top)) 0 64px;
  border-bottom: 1px solid var(--rule);
}
.legal-hero .container { max-width: 900px; }
.legal-hero .eyebrow { margin-bottom: 18px; }
.legal-hero h1 {
  font-family: var(--sans); font-weight: 700; letter-spacing: -0.015em;
  font-size: clamp(36px, 4.8vw, 56px); line-height: 1.08;
}
.legal-meta {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px;
  margin-top: 20px; font-size: 15px; color: var(--ink-fg2);
}
.legal-meta .dot { width: 4px; height: 4px; border-radius: 999px; background: var(--ink-fg2); }
.legal-intro { margin-top: 24px; font-size: 19px; line-height: 1.8; letter-spacing: 0.006em; word-spacing: 0.04em; color: var(--ink-fg2); max-width: 68ch; }
.legal-intro strong { color: var(--ink-fg); font-weight: 600; }
.legal-intro a { color: var(--moss-bright); }

/* ──────────────────── BODY LAYOUT ──────────────────── */
.legal-body { padding: 64px 0 120px; }
.legal-body .container { max-width: 900px; }

/* ──────────────────── SECTIONS ──────────────────── */
.legal-section {
  padding: 0 0 44px; margin: 0 0 44px; position: static;
  border-bottom: 1px solid var(--rule);
  scroll-margin-top: calc(96px + env(safe-area-inset-top));
}
.legal-section:last-child { border-bottom: 0; margin-bottom: 0; padding-bottom: 0; }
.legal-section h2 {
  font-family: var(--sans); font-weight: 700; letter-spacing: -0.01em;
  font-size: clamp(23px, 2.6vw, 30px); line-height: 1.2; margin-bottom: 20px;
  scroll-margin-top: calc(96px + env(safe-area-inset-top));
}
.legal-section h3 {
  font-family: var(--sans); font-size: 17px; font-weight: 700; letter-spacing: -0.005em;
  color: var(--ink-fg); margin: 30px 0 14px;
}
.legal-section > h3:first-of-type { margin-top: 8px; }

.legal-section p {
  max-width: none; margin: 0 0 22px; font-size: 18px; line-height: 1.85;
  letter-spacing: 0.006em; word-spacing: 0.04em; color: var(--ink-fg2);
}
.legal-section p:last-child { margin-bottom: 0; }
.legal-section strong { color: var(--ink-fg); font-weight: 600; }
.legal-section em { font-style: italic; }
.legal-section a { color: var(--moss-bright); text-decoration: underline; text-decoration-color: rgba(169,205,175,0.35); text-underline-offset: 2px; }
.legal-section a:hover { text-decoration-color: currentColor; }

.legal-section ul, .legal-section ol.legal-list, .legal-section ol.legal-steps {
  margin: 0 0 18px; padding: 0; list-style: none;
}
.legal-section ul:last-child,
.legal-section ol.legal-list:last-child,
.legal-section ol.legal-steps:last-child { margin-bottom: 0; }
.legal-section ul li, .legal-section ol.legal-list li, .legal-section ol.legal-steps li {
  position: relative; padding-left: 24px; margin: 0 0 14px;
  font-size: 18px; line-height: 1.8; letter-spacing: 0.006em; word-spacing: 0.04em;
  color: var(--ink-fg2);
}
.legal-section ul li:last-child,
.legal-section ol.legal-list li:last-child,
.legal-section ol.legal-steps li:last-child { margin-bottom: 0; }
.legal-section ul li::before {
  content: ''; position: absolute; left: 2px; top: 13px;
  width: 5px; height: 5px; border-radius: 999px; background: var(--moss);
}
.legal-section ol.legal-list { counter-reset: llist; }
.legal-section ol.legal-list li { counter-increment: llist; padding-left: 28px; }
.legal-section ol.legal-list li::before {
  content: '(' counter(llist, lower-alpha) ')'; position: absolute; left: 0; top: 0;
  color: var(--moss); font-weight: 700; font-size: 15px;
}

/* Numbered steps (e.g. "how to delete your account") — same shape as
   .legal-list but with plain decimal markers instead of (a)(b)(c). */
.legal-section ol.legal-steps { counter-reset: lstep; }
.legal-section ol.legal-steps li { counter-increment: lstep; padding-left: 30px; }
.legal-section ol.legal-steps li::before {
  content: counter(lstep) '.'; position: absolute; left: 0; top: 0;
  color: var(--moss); font-weight: 700; font-size: 16px;
}

.legal-note {
  background: var(--ink-2); border: 1px solid rgba(244,237,227,0.14); border-radius: 16px;
  padding: 18px 20px; margin: 0 0 18px; font-size: 17px; line-height: 1.75;
  letter-spacing: 0.006em; word-spacing: 0.04em; color: var(--ink-fg2);
}
.legal-note:last-child { margin-bottom: 0; }

/* ──────────────────── TABLE ──────────────────── */
.legal-table-wrap { overflow-x: auto; margin: 0 0 18px; border: 1px solid var(--rule); border-radius: 14px; }
.legal-table-wrap:last-child { margin-bottom: 0; }
.legal-table { width: 100%; border-collapse: collapse; font-size: 15.5px; min-width: 480px; }
.legal-table th, .legal-table td { text-align: left; padding: 13px 18px; vertical-align: top; }
.legal-table th {
  font-family: var(--sans); font-size: 11px; font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--ink-fg2); background: rgba(244,237,227,0.04);
  border-bottom: 1px solid var(--rule);
}
.legal-table td { color: var(--ink-fg2); border-bottom: 1px solid var(--rule); }
.legal-table tr:last-child td { border-bottom: 0; }
.legal-table td:first-child { color: var(--ink-fg); font-weight: 600; white-space: nowrap; }

@media (max-width: 720px) {
  .legal-hero { padding-top: calc(112px + env(safe-area-inset-top)); padding-bottom: 48px; }
  .legal-body { padding: 48px 0 96px; }
  .legal-section { padding-bottom: 36px; margin-bottom: 36px; }
  .legal-section p,
  .legal-section ul li,
  .legal-section ol.legal-list li,
  .legal-section ol.legal-steps li { font-size: 17px; }
}
