/* LODE legal pages. Matches lode-strength.clad-ventures.com: black canvas,
   electric-blue accents, Audiowide for the wordmark and headings, Inter for
   reading. Self-contained (fonts live beside this file) because this site is
   served from a different origin than the marketing site. */

@font-face {
  font-family: "Audiowide";
  src: url("fonts/Audiowide-Regular.ttf") format("truetype");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("fonts/Inter-Variable.ttf") format("truetype");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --bg: #000000;
  --surface: #0f0f12;
  --card: #161619;
  --card-hover: #1f1f23;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.16);
  --text: #ffffff;
  --text-body: #c7c7cc;
  --text-secondary: #98989e;
  --text-tertiary: #636368;
  --blue: #1c6bff;
  --blue-bright: #2e8bff;
  --blue-deep: #0b3ce0;
  --amber: #f5a623;
  --red: #ff453a;
  --font-display: "Audiowide", -apple-system, system-ui, sans-serif;
  --font-ui: "Inter", -apple-system, "SF Pro Text", system-ui, "Helvetica Neue", Arial, sans-serif;
  --gutter: 48px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 96px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text-body);
  font-family: var(--font-ui);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: var(--blue-bright); text-decoration: none; }
a:hover { color: #5ea4ff; }
a:focus-visible { outline: 2px solid var(--blue-bright); outline-offset: 3px; border-radius: 4px; }

.skip {
  position: absolute; left: -9999px; top: 8px; z-index: 100;
  background: var(--blue); color: #fff; padding: 8px 14px; border-radius: 999px;
}
.skip:focus { left: 16px; }

.wrap { max-width: 1200px; margin: 0 auto; padding: 0 var(--gutter); }
.label {
  margin: 0;
  font-size: 12px; font-weight: 700; letter-spacing: 0.14em;
  color: var(--blue-bright);
}

/* ---- Nav (same shape as the marketing site) ---- */
.site-nav {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 16px var(--gutter);
  background: rgba(0, 0, 0, 0.82);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}
.brand { display: flex; align-items: center; gap: 12px; color: var(--text); }
.brand img { height: 34px; width: auto; }
.wordmark { font-family: var(--font-display); font-size: 20px; color: var(--text); letter-spacing: 0.02em; }
.nav-links { display: flex; align-items: center; gap: 32px; flex-wrap: wrap; }
.nav-links a { font-size: 15px; font-weight: 600; color: var(--text-secondary); }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--text); }
.nav-links .cta {
  display: inline-flex; align-items: center;
  padding: 10px 22px; border-radius: 999px;
  background: var(--blue); color: #fff;
  box-shadow: 0 0 20px rgba(28, 107, 255, 0.45);
  transition: transform 150ms cubic-bezier(0.4, 0, 0.2, 1);
}
.nav-links .cta:hover { color: #fff; }
.nav-links .cta:active { transform: scale(0.96); }

/* ---- Hero ---- */
.hero { position: relative; overflow: hidden; border-bottom: 1px solid var(--border); }
.hero-glow {
  position: absolute; inset: -40% -10% auto; height: 520px;
  background: radial-gradient(ellipse at 50% 60%, rgba(28, 107, 255, 0.30), rgba(11, 60, 224, 0.10) 40%, transparent 70%);
  pointer-events: none;
}
.hero .wrap { position: relative; padding-top: 88px; padding-bottom: 56px; }
.hero h1 {
  margin: 14px 0 0;
  font-family: var(--font-display); font-weight: 400;
  font-size: 56px; line-height: 1.08; color: var(--text);
  text-wrap: balance;
}
.lede { margin: 18px 0 0; max-width: 680px; font-size: 19px; line-height: 1.55; color: var(--text-body); text-wrap: pretty; }
.facts { display: flex; flex-wrap: wrap; gap: 12px; margin: 32px 0 0; }
.facts div {
  padding: 12px 18px; border-radius: 16px;
  background: var(--card); border: 1px solid var(--border);
}
.facts dt { font-size: 11px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-tertiary); }
.facts dd { margin: 2px 0 0; font-size: 15px; font-weight: 600; color: var(--text); }

/* ---- Body layout: sticky contents + reading column ---- */
.layout {
  display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 64px;
  padding-top: 56px; padding-bottom: 96px;
}
.toc { position: sticky; top: 96px; align-self: start; max-height: calc(100vh - 120px); overflow: auto; }
.toc ol { list-style: none; margin: 14px 0 0; padding: 0; counter-reset: toc; }
.toc li { margin: 0; }
.toc a {
  display: block; padding: 7px 12px; border-radius: 10px;
  font-size: 14px; line-height: 1.35; color: var(--text-secondary);
}
.toc a:hover { color: var(--text); background: var(--card); }

.doc { max-width: 760px; }
.doc h2 {
  margin: 64px 0 18px; padding-top: 28px;
  border-top: 1px solid var(--border);
  font-family: var(--font-display); font-weight: 400;
  font-size: 26px; line-height: 1.2; color: var(--text);
}
.doc > h2:first-child, .doc > .glance + h2, .doc > .callout:first-child + h2 { margin-top: 48px; }
.doc h3 { margin: 32px 0 10px; font-size: 18px; font-weight: 700; color: var(--text); }
.doc p { margin: 0 0 16px; }
.doc strong { color: var(--text); font-weight: 650; }
.doc ul { margin: 0 0 18px; padding-left: 0; list-style: none; }
.doc li { position: relative; margin: 0 0 10px; padding-left: 22px; }
.doc li::before {
  content: ""; position: absolute; left: 4px; top: 0.72em;
  width: 7px; height: 7px; border-radius: 2px;
  background: var(--blue);
  box-shadow: 0 0 8px rgba(28, 107, 255, 0.6);
}
.doc .table-wrap { margin: 0 0 20px; overflow-x: auto; border: 1px solid var(--border); border-radius: 12px; }
.doc table { width: 100%; border-collapse: collapse; font-size: 15px; }
.doc th, .doc td { padding: 10px 14px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--border); }
.doc th { color: var(--text); font-weight: 650; background: var(--card); }
.doc tr:last-child td { border-bottom: 0; }
.doc code { font-size: 0.92em; padding: 1px 6px; border-radius: 6px; background: var(--card); color: var(--text); }

/* At a glance cards */
.glance {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px;
  margin: 0 0 8px;
}
.glance-card {
  padding: 20px 20px 18px; border-radius: 16px;
  background: var(--card); border: 1px solid var(--border);
}
.glance-card h3 { margin: 0 0 6px; font-size: 16px; font-weight: 700; color: var(--text); }
.glance-card p { margin: 0; font-size: 14.5px; line-height: 1.5; color: var(--text-secondary); }

/* Callouts */
.callout {
  margin: 0 0 24px; padding: 20px 22px; border-radius: 16px;
  background: var(--card); border: 1px solid var(--border-strong);
}
.callout p:last-child, .callout ul:last-child { margin-bottom: 0; }
.callout-title { font-weight: 700; color: var(--text); margin-bottom: 8px !important; }
.callout-note { border-color: rgba(46, 139, 255, 0.45); box-shadow: 0 0 24px rgba(28, 107, 255, 0.12) inset; }
.callout-warn { border-color: rgba(245, 166, 35, 0.55); }
.callout-warn .callout-title { color: var(--amber); }

/* ---- Footer ---- */
.site-footer { border-top: 1px solid var(--border); }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding-top: 40px; padding-bottom: 40px; flex-wrap: wrap; }
.footer-brand { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--text-tertiary); }
.footer-links { display: flex; gap: 28px; flex-wrap: wrap; }
.footer-links a { font-size: 13px; color: var(--text-secondary); }
.footer-links a:hover { color: var(--text); }

/* ---- Small screens ---- */
@media (max-width: 960px) {
  .layout { grid-template-columns: 1fr; gap: 0; }
  .toc {
    position: static; max-height: none;
    margin-bottom: 8px; padding: 18px; border-radius: 16px;
    background: var(--surface); border: 1px solid var(--border);
  }
  .toc ol { columns: 2; column-gap: 12px; }
}
@media (max-width: 720px) {
  :root { --gutter: 20px; }
  body { font-size: 16px; }
  .site-nav { flex-wrap: wrap; padding-top: 12px; padding-bottom: 12px; row-gap: 10px; }
  .nav-links { flex: 0 0 100%; gap: 18px; row-gap: 8px; }
  .nav-links .cta { position: absolute; top: 10px; right: 16px; padding: 8px 16px; font-size: 14px; }
  .brand img { height: 28px; }
  .wordmark { font-size: 17px; }
  .hero .wrap { padding-top: 48px; padding-bottom: 36px; }
  .hero h1 { font-size: 36px; }
  .lede { font-size: 17px; }
  .toc ol { columns: 1; }
  .layout { padding-top: 32px; padding-bottom: 64px; }
  .doc h2 { font-size: 21px; margin-top: 48px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .nav-links .cta { transition: none; }
}

@media print {
  body { background: #fff; color: #111; }
  .site-nav, .toc, .site-footer, .hero-glow, .skip { display: none; }
  .hero h1, .doc h2, .doc h3, .doc strong { color: #000; }
  .layout { display: block; }
}
