/* ========== LEGAL PAGE BASE STYLES ========== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --legal-bg: #0D0B18;
  --legal-surface: #1A1628;
  --legal-border: #2E2850;
  --legal-text: #E2DFF0;
  --legal-muted: #9C95B8;
  --legal-accent: #A78BFA;
  --legal-link: #C4B5FD;
  --radius: 10px;
  --transition: 0.25s ease;
}

html { scroll-behavior: smooth; }

.legal-page {
  background-color: var(--legal-bg);
  color: var(--legal-text);
  font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { text-decoration: none; color: var(--legal-link); transition: color var(--transition); }
a:hover { color: var(--legal-accent); }

/* ========== LEGAL HEADER ========== */
.legal-header {
  background: linear-gradient(135deg, #120F20 0%, #1A1530 50%, #0D0B18 100%);
  border-bottom: 1px solid var(--legal-border);
  padding: 48px 0 40px;
  text-align: center;
}

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

.legal-header h1 {
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  font-weight: 900;
  letter-spacing: -0.02em;
  color: #FFFFFF;
  margin-bottom: 12px;
}

.legal-header .last-updated {
  font-size: 0.85rem;
  color: var(--legal-muted);
}

/* ========== LEGAL CONTENT ========== */
.legal-content {
  flex: 1;
  padding: 48px 0 32px;
}

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

/* Scope isolation: prevent homepage section styles from leaking into legal pages */
.legal-page .legal-content section {
  background-color: transparent !important;
}

.legal-content h2 {
  font-size: 1.35rem;
  font-weight: 700;
  color: #FFFFFF;
  margin: 40px 0 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--legal-border);
  letter-spacing: -0.01em;
}

.legal-content h2:first-of-type { margin-top: 0; }

.legal-content p {
  font-size: 0.95rem;
  color: var(--legal-muted);
  margin-bottom: 16px;
  line-height: 1.8;
}

.legal-content ul,
.legal-content ol {
  margin: 8px 0 20px 24px;
}

.legal-content li {
  font-size: 0.93rem;
  color: var(--legal-muted);
  margin-bottom: 8px;
  line-height: 1.7;
}

.legal-content strong {
  color: var(--legal-text);
  font-weight: 600;
}

/* ========== TABLE OF CONTENTS ========== */
.toc {
  background: var(--legal-surface);
  border: 1px solid var(--legal-border);
  border-radius: var(--radius);
  padding: 24px 28px;
  margin-bottom: 40px;
}

.toc h3 {
  font-size: 1rem;
  font-weight: 700;
  color: #FFFFFF;
  margin-bottom: 16px;
  letter-spacing: 0.02em;
}

.toc ol {
  list-style: decimal;
  margin: 0;
  padding-left: 20px;
}

.toc ol li {
  margin-bottom: 8px;
  font-size: 0.9rem;
}

.toc ol li a {
  color: var(--legal-muted);
  transition: color var(--transition);
}

.toc ol li a:hover { color: var(--legal-accent); }

/* ========== LEGAL FOOTER ========== */
.legal-footer {
  background: #090712;
  border-top: 1px solid var(--legal-border);
  padding: 24px 0;
  text-align: center;
}

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

.legal-footer p {
  font-size: 0.85rem;
  color: var(--legal-muted);
  margin-bottom: 8px;
}

.legal-footer a {
  font-size: 0.85rem;
  color: var(--legal-link);
}

.legal-footer a:hover { color: var(--legal-accent); }

.footer-nav-links {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 8px;
}

/* Contact section styles */
.contact-info {
  background: var(--legal-surface);
  border: 1px solid var(--legal-border);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin-top: 16px;
}

.contact-info p { margin-bottom: 6px; }

/* ========== RESPONSIVE ========== */
@media (max-width: 640px) {
  .legal-header { padding: 36px 0 28px; }
  .legal-content { padding: 32px 0 24px; }
  .toc { padding: 18px 20px; }
  .legal-content h2 { font-size: 1.2rem; }
}
