/* Halor legal pages — shared stylesheet
   Matches Sanctuary palette + typography from index.html.
   Body text optimized for reading: ~70 chars per line. */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #121414;
  --surface-low: #1a1c1c;
  --surface: #1e2020;
  --surface-high: #282a2a;
  --outline: #85948f;
  --outline-variant: #3c4a46;
  --on-surface: #e2e2e2;
  --on-surface-variant: #bbcac5;
  --primary: #55e5cb;
  --primary-container: #2cc9b0;
  --on-primary: #00382f;
  --error: #ffb4ab;
  --warning: #ffc1b4;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--on-surface);
  font-family: 'Manrope', sans-serif;
  -webkit-font-smoothing: antialiased;
  line-height: 1.65;
  font-size: 16px;
}

/* ── Layout ─────────────────────────────────────────── */

.legal-container {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 24px;
}

.legal-main {
  padding: 64px 0 96px;
}

/* ── Top nav ─────────────────────────────────────────── */

nav.legal-nav {
  border-bottom: 1px solid var(--outline-variant);
  padding: 20px 0;
  background: rgba(18, 20, 20, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 10;
}
.legal-nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.legal-wordmark {
  font-family: 'Noto Serif', serif;
  font-size: 22px;
  font-weight: 300;
  color: var(--on-surface);
  text-decoration: none;
  letter-spacing: -0.01em;
}
.legal-back {
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--outline);
  text-decoration: none;
  transition: color 0.2s ease;
}
.legal-back:hover { color: var(--on-surface-variant); }

/* ── Typography ───────────────────────────────────────── */

h1.legal-title {
  font-family: 'Noto Serif', serif;
  font-size: clamp(28px, 5vw, 40px);
  font-weight: 300;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
  color: var(--on-surface);
}
.legal-meta {
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--outline);
  margin-bottom: 32px;
}
.legal-meta strong { color: var(--on-surface-variant); font-weight: 600; }

h2 {
  font-family: 'Noto Serif', serif;
  font-size: 22px;
  font-weight: 400;
  letter-spacing: -0.01em;
  margin-top: 40px;
  margin-bottom: 12px;
  color: var(--on-surface);
}
h3 {
  font-family: 'Manrope', sans-serif;
  font-size: 16px;
  font-weight: 600;
  margin-top: 24px;
  margin-bottom: 8px;
  color: var(--on-surface);
}

p { margin-bottom: 16px; color: var(--on-surface-variant); }

a {
  color: var(--primary);
  text-decoration: none;
  border-bottom: 1px solid rgba(85, 229, 203, 0.3);
  transition: border-color 0.2s ease;
}
a:hover { border-bottom-color: var(--primary); }

ul, ol {
  margin-bottom: 16px;
  margin-left: 24px;
  color: var(--on-surface-variant);
}
ul li, ol li { margin-bottom: 6px; }

strong { color: var(--on-surface); font-weight: 600; }
em { color: var(--on-surface-variant); font-style: italic; }

hr {
  border: none;
  border-top: 1px solid var(--outline-variant);
  margin: 40px 0;
}

/* ── Tables ─────────────────────────────────────────── */

table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0 24px;
  font-size: 14px;
}
th, td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--outline-variant);
  vertical-align: top;
}
th {
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--outline);
}
td { color: var(--on-surface-variant); }
td:first-child { color: var(--on-surface); font-weight: 500; }

/* ── Callouts ─────────────────────────────────────────── */

.starter-draft {
  background: rgba(255, 193, 180, 0.06);
  border: 1px solid rgba(255, 193, 180, 0.25);
  border-left: 3px solid var(--warning);
  border-radius: 12px;
  padding: 16px 20px;
  margin-bottom: 32px;
  font-size: 13px;
  color: var(--on-surface-variant);
}
.starter-draft strong { color: var(--warning); }

.read-first {
  background: rgba(85, 229, 203, 0.06);
  border: 1px solid rgba(85, 229, 203, 0.25);
  border-left: 3px solid var(--primary);
  border-radius: 12px;
  padding: 24px 28px;
  margin: 24px 0 40px;
}
.read-first h2 {
  margin-top: 0;
  margin-bottom: 12px;
  font-size: 18px;
  color: var(--primary);
}
.read-first p { color: var(--on-surface); }
.read-first p:last-child { margin-bottom: 0; }

blockquote {
  border-left: 2px solid var(--outline-variant);
  padding: 4px 0 4px 20px;
  margin: 16px 0;
  color: var(--on-surface-variant);
  font-style: italic;
}

/* ── Footer ─────────────────────────────────────────── */

footer.legal-footer {
  border-top: 1px solid var(--outline-variant);
  padding: 32px 0 28px;
}
.legal-footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.legal-footer-wordmark {
  font-family: 'Noto Serif', serif;
  font-size: 16px;
  font-weight: 300;
  color: var(--on-surface);
}
.legal-footer-links {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}
.legal-footer-links a {
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--outline);
  border-bottom: none;
  text-decoration: none;
}
.legal-footer-links a:hover { color: var(--on-surface-variant); }
.legal-footer-disclaimer {
  width: 100%;
  font-size: 12px;
  line-height: 1.5;
  color: var(--outline);
  padding-top: 16px;
  border-top: 1px solid var(--outline-variant);
  margin-top: 12px;
}

/* ── Mobile ─────────────────────────────────────────── */

@media (max-width: 700px) {
  .legal-main { padding: 40px 0 64px; }
  h2 { font-size: 20px; }
  table { font-size: 13px; }
  th, td { padding: 8px 8px; }
  .legal-footer-inner { flex-direction: column; align-items: flex-start; }
}

.legal-wordmark, .legal-footer-wordmark { text-transform: uppercase; letter-spacing: 0.28em; }
