/* ============================================================
   HorizonHub — legal.css
   Shared stylesheet for privacy.html and terms-of-service.html
   Loaded ALONE on legal pages (style.css is NOT loaded here)
   Dark theme, deep teal accent, near-black canvas
   ============================================================ */

:root {
  --bg: #0D1214;
  --bg-1: #121B1E;
  --bg-2: #172326;
  --ink: #E8EFF1;
  --ink-2: #B9C9CC;
  --ink-3: #8FA6A9;
  --teal: #0F766E;
  --teal-deep: #115E59;
  --teal-bright: #14B8A6;
  --line: #203235;
  --line-2: #2B4044;
}

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

html { scroll-behavior: smooth; }

body {
  font-size: 16px;
  line-height: 1.7;
  font-family: "Inter", "Segoe UI", system-ui, -apple-system, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Root scope for legal pages: own background and text colors */
.legal-page {
  background-color: #0D1214;
  color: #E8EFF1;
}

a { color: var(--teal-bright); text-decoration: none; }
a:hover { text-decoration: underline; }

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

/* ---------- Legal header ---------- */
.legal-header {
  background-color: var(--teal-deep);
  border-bottom: 4px solid var(--teal-bright);
  padding: 72px 0 56px;
}
.legal-header .container {
  max-width: 920px;
  margin: 0 auto;
  padding: 0 24px;
}
.legal-header .legal-eyebrow {
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #B7E6E1;
  margin-bottom: 14px;
}
.legal-header h1 {
  color: #FFFFFF;
  font-size: clamp(30px, 4vw, 46px);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}
.legal-header .legal-updated {
  color: #D2EEEA;
  font-size: 15px;
}
.legal-header .legal-home {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 26px;
  color: #FFFFFF;
  font-weight: 600;
  font-size: 15px;
  border: 1px solid #8FD4CD;
  padding: 9px 18px;
  border-radius: 999px;
}
.legal-header .legal-home:hover {
  background-color: #FFFFFF;
  color: var(--teal-deep);
  text-decoration: none;
}

/* ---------- Table of contents ---------- */
.legal-toc-wrap {
  background-color: var(--bg-1);
  border-bottom: 1px solid var(--line);
}
.legal-toc {
  max-width: 920px;
  margin: 0 auto;
  padding: 26px 24px;
}
.legal-toc h2 {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--teal-bright);
  margin-bottom: 14px;
}
.legal-toc ol {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 28px;
}
.legal-toc a {
  display: block;
  color: var(--ink-2);
  font-size: 14.5px;
  padding: 4px 0;
  transition: color 0.18s ease;
}
.legal-toc a:hover { color: var(--teal-bright); text-decoration: none; }
.legal-toc a .toc-num {
  color: var(--teal-bright);
  font-weight: 700;
  margin-right: 8px;
}

/* ---------- Legal content ---------- */
.legal-content {
  padding: 64px 0 24px;
}
.legal-content .container {
  max-width: 920px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Scope isolation: legal sections never inherit homepage backgrounds */
.legal-page .legal-content section {
  background-color: transparent !important;
  margin-bottom: 48px;
}
.legal-page .legal-content section:last-child { margin-bottom: 0; }

.legal-content h2 {
  color: var(--ink);
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.015em;
  line-height: 1.2;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}
.legal-content h2 .legal-sec-num {
  color: var(--teal-bright);
  font-weight: 700;
  margin-right: 10px;
  font-size: 20px;
  letter-spacing: 0;
}
.legal-content h3 {
  color: var(--ink);
  font-size: 18px;
  font-weight: 700;
  margin: 22px 0 10px;
}
.legal-content p {
  color: var(--ink-2);
  font-size: 16.5px;
  line-height: 1.75;
  margin-bottom: 16px;
}
.legal-content ul {
  color: var(--ink-2);
  font-size: 16.5px;
  line-height: 1.75;
  margin: 0 0 16px 22px;
  padding: 0;
}
.legal-content ul li { margin-bottom: 8px; }
.legal-content strong { color: var(--ink); }

/* ---------- Legal footer ---------- */
.legal-footer {
  background-color: var(--bg-1);
  border-top: 1px solid var(--line);
  padding: 40px 0;
}
.legal-footer .container {
  max-width: 920px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}
.legal-footer p {
  color: var(--ink-3);
  font-size: 14px;
}
.legal-footer a {
  color: var(--teal-bright);
  font-size: 14px;
  font-weight: 600;
}

@media (max-width: 720px) {
  .legal-toc ol { grid-template-columns: 1fr; }
  .legal-header { padding: 56px 0 44px; }
  .legal-content { padding: 44px 0 16px; }
  .legal-footer .container { flex-direction: column; align-items: flex-start; }
}
