/* ============================================================
   CCT Canada Inc. — Shared legal stylesheet
   Used by privacy.html and terms-of-service.html
   ============================================================ */

:root {
  --bg: #0E1312;
  --card: #16211E;
  --border: #263430;
  --border-soft: #1E2A27;
  --text: #E7F1EE;
  --muted: #9CB4AC;
  --teal: #0F766E;
  --teal-bright: #14B8A6;
  --aqua: #CCFBF1;
  --footer-bg: #090D0C;
}

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

html {
  scroll-behavior: smooth;
}

.legal-page {
  background-color: #0E1312;
  color: #E7F1EE;
  font-size: 16px;
  font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  line-height: 1.7;
  overflow-x: hidden;
}

.legal-page a {
  color: inherit;
  text-decoration: none;
}

/* ---------- Header ---------- */
.legal-header {
  background: linear-gradient(180deg, #0B100F 0%, #0F1715 100%);
  border-bottom: 2px solid var(--teal);
}

.legal-header-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.legal-wordmark {
  font-weight: 800;
  font-size: 18px;
  letter-spacing: 0.12em;
  color: #E7F1EE;
}

.legal-header-title {
  color: var(--aqua);
  font-size: 14px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 600;
}

/* ---------- Content ---------- */
.legal-content {
  padding: 56px 0 40px;
}

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

/* Scope isolation: neutralize any shared background rules */
.legal-page .legal-content section {
  background-color: transparent !important;
}

.legal-hero {
  margin-bottom: 40px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--border);
}

.legal-hero h1 {
  font-size: 40px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #E7F1EE;
  margin-bottom: 12px;
}

.legal-updated {
  color: var(--muted);
  font-size: 15px;
}

/* ---------- Table of contents ---------- */
.toc {
  background-color: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 28px 32px;
  margin-bottom: 48px;
}

.toc h2 {
  font-size: 16px;
  font-weight: 700;
  color: var(--aqua);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.toc ol {
  list-style: none;
  counter-reset: toc;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 32px;
}

.toc li {
  counter-increment: toc;
}

.toc a {
  color: var(--muted);
  font-size: 15px;
  transition: color 0.2s ease;
}

.toc a::before {
  content: counter(toc) ". ";
  color: var(--teal-bright);
  font-weight: 600;
}

.toc a:hover {
  color: var(--aqua);
}

/* ---------- Sections ---------- */
.legal-content section {
  margin-bottom: 44px;
}

.legal-content section h2 {
  font-size: 24px;
  font-weight: 700;
  color: var(--aqua);
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-soft);
}

.legal-content section p {
  color: var(--muted);
  font-size: 16px;
  margin-bottom: 16px;
}

/* ---------- Footer ---------- */
.legal-footer {
  background-color: var(--footer-bg);
  border-top: 2px solid var(--teal);
  padding: 24px;
}

.legal-footer-inner {
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.legal-footer-inner span {
  color: var(--muted);
  font-size: 14px;
}

.legal-footer-inner a {
  color: var(--aqua);
  font-size: 14px;
  font-weight: 600;
  transition: color 0.2s ease;
}

.legal-footer-inner a:hover {
  color: #FFFFFF;
}

/* ---------- Responsive ---------- */
@media (max-width: 640px) {
  .toc ol {
    grid-template-columns: 1fr;
  }

  .legal-hero h1 {
    font-size: 30px;
  }

  .legal-header-inner,
  .legal-footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }
}
