/* ------------------------------------------------------------------
   Eleva legal pages – Neptune theme overrides.
   Loaded after each page's inline styles (whose palette is remapped to
   Neptune values); this file fixes text-on-dark contrast, typography,
   and adds the landing page's motion language. No JS required.
------------------------------------------------------------------ */

:root { color-scheme: dark; }

html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }
body { font-weight: 400; }

h1 { font-weight: 900; letter-spacing: -0.02em; }
h2 { font-weight: 800; letter-spacing: -0.01em; border-bottom-color: rgba(155, 111, 232, 0.35); }
h3, h4 { font-weight: 700; }
h2 .num {
  background: linear-gradient(90deg, #6c2bd9, #9b6fe8);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* Pages define no anchor styles - give links a Neptune treatment. */
main a { color: #b18ff0; border-bottom: 1px solid rgba(177, 143, 240, 0.35); transition: color .25s ease, border-color .25s ease; }
main a:hover { color: #d3bdf7; border-bottom-color: currentColor; }

/* Brand link color was a hex remapped to a background tone. */
.brand-link-legal { color: #f0ecff; }
.legal-links a:hover { color: #d3bdf7; border-bottom-color: #9b6fe8; }

/* Header hero: purple glow + entrance, matching the landing hero. */
header {
  background:
    radial-gradient(circle at 50% 135%, rgba(108, 43, 217, 0.4), transparent 55%),
    radial-gradient(circle at 12% 0%, rgba(155, 111, 232, 0.15), transparent 45%),
    #130d22;
}
@keyframes legalFadeUp {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: none; }
}
header .brand, header h1, header .meta { animation: legalFadeUp 0.7s ease-out both; }
header h1 { animation-delay: 0.1s; }
header .meta { animation-delay: 0.2s; }

/* Table headers: one step lighter than even rows so zebra stays visible. */
th { background: #1d1433 !important; }

/* Scroll-driven section reveals where supported (CSS only, no JS). */
@supports (animation-timeline: view()) {
  main > section, main > .callout, main > nav.toc {
    animation: legalFadeUp 0.7s ease-out both;
    animation-timeline: view();
    animation-range: entry 0% entry 30%;
  }
}

@media (prefers-reduced-motion: reduce) {
  header .brand, header h1, header .meta,
  main > section, main > .callout, main > nav.toc { animation: none !important; }
  html { scroll-behavior: auto; }
}

::selection { background: #6c2bd9; color: #fff; }

/* Legal documents get printed - flip back to ink on paper. */
@media print {
  :root { color-scheme: light; }
  html, body { background: #fff !important; color: #111 !important; }
  .site-nav-legal { display: none; }
  header, footer { background: #fff !important; color: #111 !important; border-color: #999 !important; }
  header .brand, header .meta { color: #555 !important; }
  main * { background: transparent !important; color: #111 !important; border-color: #999 !important; box-shadow: none !important; }
  main a { color: #111 !important; border-bottom: none; text-decoration: underline; }
}
