/* ============================================================
   MaLuce — legal / long-form document pages
   Layers on top of styles.css (variables, nav, footer).
   ============================================================ */

body.legal {
  background: var(--off-white);
  color: var(--text-primary);
}

/* Solid nav on legal pages (no hero behind it).
   Direct-child selector so this doesn't also match the <nav class="legal-toc">
   table of contents nested inside .legal-body further down the page. */
body.legal > nav {
  position: sticky;
  background: var(--midnight);
  backdrop-filter: none;
}

.legal-hero {
  background: var(--midnight);
  padding: 120px 80px 64px;
}

.legal-hero .section-eyebrow { color: var(--gold); }

.legal-hero h1 {
  font-family: 'Manrope', sans-serif;
  font-size: clamp(32px, 4.5vw, 52px);
  font-weight: 800;
  letter-spacing: -1.2px;
  line-height: 1.08;
  color: var(--white);
  margin-bottom: 16px;
}

.legal-hero .legal-updated {
  font-size: 13px;
  color: rgba(255,255,255,0.55);
  letter-spacing: 0.3px;
}

.legal-body {
  max-width: 820px;
  margin: 0 auto;
  padding: 72px 40px 96px;
}

/* Table of contents.
   This is a <nav> element (a legitimate landmark for a TOC), but styles.css's
   base `nav { position: fixed; top: 0; ... }` rule targets any <nav> tag —
   reset those here so the TOC renders inline instead of pinned over the page. */
.legal-toc {
  position: static;
  background: var(--white);
  border: 1px solid var(--muted);
  border-radius: var(--radius);
  padding: 24px 28px;
  margin-bottom: 56px;
}
.legal-toc h2 {
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: 14px;
}
.legal-toc ol {
  margin: 0;
  padding-left: 20px;
  columns: 2;
  column-gap: 40px;
}
.legal-toc li {
  margin-bottom: 8px;
  font-size: 14px;
  break-inside: avoid;
}
.legal-toc a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.15s;
}
.legal-toc a:hover { color: var(--gold-dark); }

/* Content typography */
.legal-content h2 {
  font-family: 'Manrope', sans-serif;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.5px;
  color: var(--text-primary);
  margin: 48px 0 16px;
  padding-top: 16px;
  scroll-margin-top: 90px;
}
.legal-content h2:first-child { margin-top: 0; }

.legal-content h3 {
  font-family: 'Inter', sans-serif;
  font-size: 17px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 28px 0 10px;
}

.legal-content p {
  font-size: 15.5px;
  line-height: 1.75;
  color: var(--text-secondary);
  margin-bottom: 16px;
}

.legal-content ul,
.legal-content ol {
  margin: 0 0 16px;
  padding-left: 24px;
}
.legal-content li {
  font-size: 15.5px;
  line-height: 1.75;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.legal-content a {
  color: var(--gold-dark);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.legal-content a:hover { color: #74581A; }

.legal-content strong { color: var(--text-primary); font-weight: 600; }

.legal-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 24px;
  font-size: 14.5px;
}
.legal-content th,
.legal-content td {
  text-align: left;
  padding: 10px 14px;
  border: 1px solid var(--muted);
  color: var(--text-secondary);
}
.legal-content th {
  background: var(--white);
  font-weight: 600;
  color: var(--text-primary);
}

/* Callout box for compliance-critical statements */
.legal-callout {
  background: var(--gold-pale);
  border: 1px solid rgba(201,168,76,0.35);
  border-left: 4px solid var(--gold);
  border-radius: var(--radius-sm);
  padding: 18px 22px;
  margin: 0 0 24px;
}
.legal-callout p { margin: 0; color: var(--text-primary); }

.legal-contact {
  background: var(--white);
  border: 1px solid var(--muted);
  border-radius: var(--radius);
  padding: 24px 28px;
  margin-top: 40px;
}
.legal-contact p { margin-bottom: 6px; }

@media (max-width: 768px) {
  .legal-hero { padding: 100px 24px 48px; }
  .legal-body { padding: 48px 24px 72px; }
  .legal-toc ol { columns: 1; }
}
