/* RateAI — Legal & Policy Pages */

@import url('https://fonts.googleapis.com/css2?family=Rajdhani:wght@400;500;600;700&family=Barlow:wght@300;400;500;600&family=Barlow+Condensed:wght@300;400;600;700&display=swap');

:root {
  --blue-primary: #1a6fd4;
  --blue-bright: #2d8eff;
  --white: #ffffff;
  --off-white: #d8e4f0;
  --muted: #7a92b0;
  --bg-deep: #050a12;
  --bg-card: #0b1524;
  --bg-card-border: rgba(45, 142, 255, 0.18);
  --grid-line: rgba(45, 142, 255, 0.06);
  --radius: 4px;
  --radius-lg: 8px;
  --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: 'Barlow', sans-serif;
  background-color: var(--bg-deep);
  color: var(--off-white);
  overflow-x: hidden;
  line-height: 1.65;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
  z-index: 0;
}

/* ─── NAV ─── */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 48px;
  background: rgba(5, 10, 18, 0.88);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--bg-card-border);
}

.nav-logo img { height: 40px; width: auto; }

.nav-back {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: color var(--transition);
}
.nav-back:hover { color: var(--blue-bright); }

/* ─── PAGE HEADER ─── */
.legal-header {
  position: relative;
  z-index: 1;
  padding: 140px 48px 60px;
  max-width: 860px;
  margin: 0 auto;
  border-bottom: 1px solid var(--bg-card-border);
}

.legal-type {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--blue-bright);
  margin-bottom: 12px;
}

.legal-title {
  font-family: 'Rajdhani', sans-serif;
  font-size: clamp(32px, 5vw, 52px);
  font-weight: 700;
  color: var(--white);
  line-height: 1.05;
  margin-bottom: 16px;
}

.legal-meta {
  font-size: 13px;
  color: var(--muted);
}

/* ─── LAYOUT ─── */
.legal-layout {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 0;
  max-width: 860px;
  margin: 0 auto;
  padding-bottom: 80px;
}

@media (max-width: 700px) {
  .legal-layout { grid-template-columns: 1fr; }
  .legal-toc { display: none; }
  .legal-header { padding: 120px 24px 48px; }
}

/* ─── TABLE OF CONTENTS ─── */
.legal-toc {
  padding: 48px 24px 48px 0;
  position: sticky;
  top: 80px;
  align-self: start;
  max-height: calc(100vh - 100px);
  overflow-y: auto;
}

.toc-label {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 16px;
}

.toc-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.toc-list a {
  display: block;
  font-size: 13px;
  color: var(--muted);
  text-decoration: none;
  padding: 6px 10px;
  border-radius: var(--radius);
  border-left: 2px solid transparent;
  transition: color var(--transition), border-color var(--transition), background var(--transition);
  line-height: 1.4;
}
.toc-list a:hover {
  color: var(--blue-bright);
  border-left-color: var(--blue-bright);
  background: rgba(45, 142, 255, 0.06);
}

/* ─── CONTENT ─── */
.legal-content {
  padding: 48px 0 48px 48px;
  border-left: 1px solid var(--bg-card-border);
}

@media (max-width: 700px) {
  .legal-content { padding: 32px 24px; border-left: none; }
}

.legal-section {
  margin-bottom: 52px;
}
.legal-section:last-child { margin-bottom: 0; }

.legal-section h2 {
  font-family: 'Rajdhani', sans-serif;
  font-size: 22px;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--bg-card-border);
  scroll-margin-top: 100px;
}

.legal-section h3 {
  font-family: 'Barlow', sans-serif;
  font-size: 15px;
  font-weight: 600;
  color: var(--off-white);
  margin: 20px 0 8px;
}

.legal-section p {
  font-size: 14.5px;
  color: var(--muted);
  line-height: 1.8;
  margin-bottom: 14px;
}
.legal-section p:last-child { margin-bottom: 0; }

.legal-section ul, .legal-section ol {
  margin: 10px 0 14px 20px;
}
.legal-section li {
  font-size: 14.5px;
  color: var(--muted);
  line-height: 1.8;
  margin-bottom: 4px;
}

.legal-section a {
  color: var(--blue-bright);
  text-decoration: none;
}
.legal-section a:hover { text-decoration: underline; }

.legal-highlight {
  background: var(--bg-card);
  border: 1px solid var(--bg-card-border);
  border-left: 3px solid var(--blue-primary);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin: 16px 0;
  font-size: 14px;
  color: var(--off-white);
  line-height: 1.7;
}

/* ─── FOOTER ─── */
footer {
  position: relative;
  z-index: 1;
  padding: 32px 48px;
  border-top: 1px solid var(--bg-card-border);
  background: var(--bg-deep);
}

.footer-bottom {
  max-width: 860px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 12px;
  color: var(--muted);
}

.footer-bottom-links {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}
.footer-bottom-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 12px;
  transition: color var(--transition);
}
.footer-bottom-links a:hover { color: var(--blue-bright); }

@media (max-width: 700px) {
  nav { padding: 16px 24px; }
  footer { padding: 24px; }
}
