/* Shared styles for legal pages — inherits the landing page's design system.
   Anything shared with marketing/index.html should stay visually consistent. */

:root {
  --navy: #082B60;
  --navy-deep: #051B3D;
  --navy-mid: #1A4A8A;
  --orange: #FF6B00;
  --orange-deep: #E85A00;
  --cream: #FBF7EF;
  --cream-dim: #F3ECDD;
  --ink: #1B1A17;
  --ink-soft: #56534A;
  --line: rgba(27, 26, 23, 0.12);
  --paper: #FFFDF8;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: 'Manrope', sans-serif;
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, .display {
  font-family: 'Fraunces', serif;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0;
  color: var(--navy);
}

a { color: var(--orange-deep); }
a:hover { color: var(--orange); }

img, svg { display: block; max-width: 100%; }

.container {
  max-width: 820px;
  margin: 0 auto;
  padding: 0 32px;
}

/* subtle grain overlay for warmth — matches landing page */
.grain {
  position: fixed; inset: 0; pointer-events: none; z-index: 2000;
  opacity: 0.035; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- Nav ---------- */
header.nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(251, 247, 239, 0.86);
  backdrop-filter: blur(10px) saturate(1.1);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 32px; max-width: 1180px; margin: 0 auto;
}
.brand { display: flex; align-items: center; gap: 9px; text-decoration: none; }
.brand .mark { width: 34px; height: 34px; object-fit: contain; display: block; }
.brand .wordmark {
  font-family: 'Inter', 'Manrope', sans-serif;
  font-weight: 800; font-size: 21px; letter-spacing: -0.8px;
}
.brand .wordmark .w-stuff { color: var(--navy); }
.brand .wordmark .w-buff { color: var(--orange); }
nav.links { display: flex; align-items: center; gap: 34px; }
nav.links a {
  font-size: 14.5px; font-weight: 600; text-decoration: none; color: var(--ink-soft);
  transition: color .2s ease;
}
nav.links a:hover { color: var(--navy); }
.nav-cta { display: flex; align-items: center; gap: 14px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: 'Manrope', sans-serif; font-weight: 700; font-size: 14.5px;
  padding: 11px 22px; border-radius: 100px; text-decoration: none;
  border: 1.5px solid transparent; cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
  white-space: nowrap;
}
.btn-primary {
  background: var(--orange); color: #fff;
  box-shadow: 0 6px 18px rgba(255, 107, 0, 0.35);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(255, 107, 0, 0.42);
  background: var(--orange-deep);
}
.btn-ghost { color: var(--navy); border-color: rgba(8, 43, 96, 0.25); }
.btn-ghost:hover { border-color: var(--navy); background: rgba(8, 43, 96, 0.05); }

/* ---------- Page head ---------- */
.page-head {
  padding: 72px 0 40px;
  border-bottom: 1px solid var(--line);
  background: var(--paper);
}
.page-head .kicker {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--orange-deep); background: rgba(255, 107, 0, 0.1);
  padding: 7px 14px; border-radius: 100px; margin-bottom: 22px;
}
.page-head .kicker .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--orange); }
.page-head h1 {
  font-size: clamp(36px, 5vw, 52px);
  line-height: 1.08;
}
.page-head .doc-nav {
  margin-top: 32px;
  display: flex; flex-wrap: wrap; gap: 8px;
}
.page-head .doc-nav a {
  font-size: 13.5px; font-weight: 600; color: var(--ink-soft);
  text-decoration: none;
  padding: 8px 16px; border-radius: 100px;
  border: 1px solid var(--line); background: #fff;
  transition: all .18s ease;
}
.page-head .doc-nav a:hover { border-color: var(--navy); color: var(--navy); }
.page-head .doc-nav a.current {
  background: var(--navy); color: #fff; border-color: var(--navy);
}

/* ---------- Rendered markdown ---------- */
main.doc { padding: 56px 0 96px; }
main.doc .content > *:first-child { margin-top: 0; }
main.doc h1 { font-size: 34px; line-height: 1.2; margin: 44px 0 16px; }
main.doc h2 {
  font-size: 24px; line-height: 1.3;
  margin: 56px 0 14px;
  padding-top: 32px;
  border-top: 1px solid var(--line);
  color: var(--navy);
}
main.doc h3 {
  font-size: 18px; line-height: 1.4;
  margin: 32px 0 10px;
  color: var(--navy);
  font-family: 'Manrope', sans-serif;
  font-weight: 700;
  letter-spacing: 0;
}
main.doc p { margin: 14px 0; color: var(--ink); }
main.doc a { color: var(--orange-deep); text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
main.doc a:hover { color: var(--orange); }
main.doc strong { color: var(--navy); font-weight: 700; }

main.doc blockquote {
  margin: 24px 0;
  padding: 18px 22px;
  background: rgba(255, 107, 0, 0.06);
  border-left: 4px solid var(--orange);
  border-radius: 4px;
  color: var(--ink);
}
main.doc blockquote > *:first-child { margin-top: 0; }
main.doc blockquote > *:last-child { margin-bottom: 0; }

main.doc ul, main.doc ol { padding-left: 24px; margin: 14px 0; }
main.doc li { margin: 6px 0; }
main.doc li::marker { color: var(--navy-mid); }

main.doc hr {
  border: 0;
  height: 1px;
  background: var(--line);
  margin: 40px 0;
}

main.doc table {
  border-collapse: collapse;
  width: 100%;
  margin: 24px 0;
  font-size: 14px;
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(8, 43, 96, 0.06);
  border: 1px solid var(--line);
}
main.doc th, main.doc td {
  padding: 12px 14px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--line);
}
main.doc th {
  background: var(--paper);
  color: var(--navy);
  font-weight: 700;
  font-family: 'Manrope', sans-serif;
  font-size: 13px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
main.doc tr:last-child td { border-bottom: 0; }

main.doc code {
  background: var(--cream-dim);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.92em;
  font-family: 'SF Mono', Menlo, monospace;
  color: var(--navy);
}

.loading, .load-error {
  padding: 60px 0;
  text-align: center;
  color: var(--ink-soft);
  font-style: italic;
}

/* ---------- Footer ---------- */
footer.legal-footer {
  background: var(--navy);
  color: rgba(255, 255, 255, 0.86);
  padding: 40px 0;
  margin-top: 0;
  font-size: 14px;
}
footer.legal-footer .container {
  max-width: 1180px;
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px;
}
footer.legal-footer a { color: #fff; text-decoration: none; }
footer.legal-footer a:hover { color: var(--orange); }
footer.legal-footer .footer-links { display: flex; gap: 20px; flex-wrap: wrap; }

/* ---------- Responsive ---------- */
@media (max-width: 820px) {
  nav.links { display: none; }
  .nav-cta .btn-ghost { display: none; }
  .page-head { padding: 48px 0 32px; }
  main.doc { padding: 40px 0 72px; }
  main.doc h2 { font-size: 21px; }
  main.doc table { display: block; overflow-x: auto; }
}
@media (max-width: 600px) {
  .container { padding: 0 20px; }
  .nav-inner { padding: 14px 20px; }
}
