/* ===== Watch Guard — Legal Pages Stylesheet ===== */
/* Legal pages load this in addition to style.css */

.legal-page {
  background: var(--bg-deep);
  color: var(--text-on-dark);
}

/* Legal page header — MUST be <header> or <div>, NEVER <section> */
.legal-header {
  background: linear-gradient(160deg, #151B28 0%, #1C2234 100%);
  padding: 130px 0 64px;
  text-align: center;
  border-bottom: 1px solid var(--border-dark);
}
.legal-header .legal-badge {
  display: inline-block;
  background: rgba(77,143,208,0.12);
  color: var(--primary);
  font-size: 0.8em;
  font-weight: 700;
  padding: 6px 18px;
  border-radius: 50px;
  border: 1px solid rgba(77,143,208,0.2);
  margin-bottom: 20px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.legal-header h1 {
  font-size: 2.8em;
  font-weight: 800;
  color: var(--surface);
  margin-bottom: 12px;
}
.legal-header .effective-date {
  color: var(--text-muted-light);
  font-size: 0.95em;
}

/* Legal content area */
.legal-content {
  padding: 64px 0 80px;
  background: var(--bg-deep);
}

/* TABLE OF CONTENTS */
.legal-toc {
  background: var(--bg-card);
  border: 1px solid var(--border-dark);
  border-radius: var(--radius-lg);
  padding: 32px;
  margin-bottom: 48px;
}
.legal-toc h2 {
  color: var(--surface);
  font-size: 1.2em;
  margin-bottom: 20px;
  font-weight: 700;
}
.legal-toc ol {
  list-style: decimal;
  padding-left: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.legal-toc ol li a {
  color: var(--primary);
  font-size: 0.93em;
  text-decoration: none;
  transition: color var(--transition);
}
.legal-toc ol li a:hover { color: var(--accent); }

/* Legal body text */
.legal-body h2 {
  font-size: 1.5em;
  color: var(--surface);
  margin: 40px 0 16px;
  padding-top: 20px;
  border-top: 1px solid var(--border-dark);
  font-weight: 700;
  scroll-margin-top: 90px;
}
.legal-body h2:first-of-type {
  border-top: none;
  padding-top: 0;
}

.legal-body h3 {
  font-size: 1.15em;
  color: var(--text-muted-light);
  margin: 24px 0 12px;
}

.legal-body p {
  color: var(--text-muted-light);
  margin-bottom: 16px;
  line-height: 1.8;
  font-size: 0.98em;
}
.legal-body ul, .legal-body ol {
  color: var(--text-muted-light);
  margin-bottom: 16px;
  padding-left: 24px;
  line-height: 1.8;
}
.legal-body ul li, .legal-body ol li {
  margin-bottom: 8px;
  font-size: 0.98em;
}

.legal-body strong { color: var(--surface); font-weight: 600; }
.legal-body em { color: var(--text-muted-light); font-style: italic; }

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

/* SCOPE ISOLATION — prevent homepage section styles from leaking into legal pages
   This matches the .legal-page class on the body of legal pages */
.legal-page .legal-content section {
  background-color: transparent !important;
  background: transparent !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
}

.legal-page .legal-content section .container-narrow {
  padding: 0 24px;
}

/* Back to top link */
.back-to-top {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--primary);
  font-size: 0.88em;
  margin-top: 12px;
  text-decoration: none;
  font-weight: 500;
}
.back-to-top:hover { color: var(--accent); }

/* Legal footer note */
.legal-footer-note {
  text-align: center;
  padding: 40px 0 24px;
  border-top: 1px solid var(--border-dark);
  margin-top: 40px;
}
.legal-footer-note p {
  color: var(--text-muted);
  font-size: 0.88em;
}
.legal-footer-note a { color: var(--primary); }

@media (max-width: 820px) {
  .legal-header { padding: 110px 0 48px; }
  .legal-header h1 { font-size: 2em; }
  .legal-content { padding: 48px 0 60px; }
  .legal-toc { padding: 24px; }
}
