/* ============================================================
   Ottawa Group Buy Ltd. — Shared Legal Stylesheet
   Used by: privacy.html, terms-of-service.html
   ============================================================ */

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background-color: #0F1219;
  color: #E2E0D8;
  line-height: 1.8;
  font-size: 16px;
  overflow-x: hidden;
  min-height: 100vh;
}

a {
  color: #FFCA3A;
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  color: #FF4D6A;
}

/* ---------- Legal Header ---------- */
.legal-header {
  background: linear-gradient(150deg, #141820 0%, #1A1E27 60%, #141820 100%);
  border-bottom: 1px solid #2A2E3A;
  padding: 64px 0 48px;
  text-align: center;
}

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

.legal-header h1 {
  font-size: 2.8rem;
  font-weight: 900;
  color: #FEFDF9;
  letter-spacing: -1px;
  margin-bottom: 12px;
}

.legal-header-sub {
  font-size: 1rem;
  color: #FF4D6A;
  font-weight: 500;
}

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

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

/* --- Scope Isolation --- */
.legal-page .legal-content section {
  background-color: transparent !important;
}

.legal-content section {
  margin-bottom: 48px;
  padding-bottom: 0;
}

.legal-content section:last-of-type {
  margin-bottom: 40px;
}

.legal-content h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: #FEFDF9;
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid #2A2E3A;
}

.legal-content p {
  font-size: 1rem;
  color: #C5C1B8;
  line-height: 1.85;
  margin-bottom: 14px;
}

.legal-content strong {
  color: #E8E5DB;
  font-weight: 600;
}

.legal-content ul {
  list-style: disc;
  padding-left: 24px;
  margin: 12px 0 18px;
}

.legal-content ul li {
  font-size: 1rem;
  color: #C5C1B8;
  line-height: 1.85;
  margin-bottom: 8px;
}

.legal-content ol {
  list-style: decimal;
  padding-left: 0;
}

/* ---------- Table of Contents ---------- */
.toc {
  background: #1A1E27;
  border: 1px solid #2A2E3A;
  border-radius: 12px;
  padding: 28px 32px;
  margin-bottom: 48px;
}

.toc-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: #FEFDF9;
  margin-bottom: 16px;
  padding-bottom: 0;
  border-bottom: none;
}

.toc-list {
  list-style: decimal;
  padding-left: 20px;
  columns: 2;
  column-gap: 32px;
}

.toc-list li {
  margin-bottom: 8px;
  break-inside: avoid;
}

.toc-list a {
  font-size: 0.9rem;
  color: #9CA3B0;
  transition: color 0.2s;
}

.toc-list a:hover {
  color: #FFCA3A;
}

/* ---------- TOC Footer Navigation ---------- */
.toc-footer {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid #2A2E3A;
  text-align: center;
}

.toc-footer a {
  font-size: 0.95rem;
  font-weight: 600;
  color: #FFCA3A;
}

.toc-footer a:hover {
  color: #FF4D6A;
}

/* ---------- Legal Footer ---------- */
.legal-footer {
  background: #0B0E14;
  border-top: 1px solid #2A2E3A;
  padding: 32px 0;
  text-align: center;
}

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

.legal-footer p {
  font-size: 0.85rem;
  color: #6B7280;
  margin-bottom: 8px;
}

.legal-footer-links {
  display: flex;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
}

.legal-footer-links a {
  font-size: 0.85rem;
  color: #9CA3B0;
  transition: color 0.2s;
}

.legal-footer-links a:hover {
  color: #FEFDF9;
}

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
  .legal-header h1 {
    font-size: 2rem;
  }

  .legal-content .container {
    padding: 0 20px;
  }

  .toc-list {
    columns: 1;
  }

  .toc {
    padding: 20px 24px;
  }

  .legal-content h2 {
    font-size: 1.3rem;
  }
}

@media (max-width: 480px) {
  .legal-header {
    padding: 40px 0 28px;
  }

  .legal-header h1 {
    font-size: 1.6rem;
  }

  .legal-content {
    padding: 36px 0 24px;
  }

  .legal-footer {
    padding: 24px 0;
  }

  .legal-footer-links {
    gap: 14px;
  }
}
