/* ==========================================================================
   Mmj Infotech Inc. — shared legal stylesheet
   Used by privacy.html and terms-of-service.html ONLY.
   These pages load this file exclusively (never style.css).
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,400;9..144,500;9..144,600&family=Inter:wght@400;500;600;700&display=swap');

/* ---------- Theme (must match homepage dark theme) ---------- */
:root {
  --bg: #0c0f14;
  --bg-soft: #11141b;
  --surface: #151923;
  --border: #262c39;
  --text: #e8eaed;
  --text-soft: #b6bcc7;
  --text-muted: #8b929e;
  --accent: #f43f5e;
  --accent-deep: #e11d48;
  --light-band: #f4f5f7;
  --light-band-text: #12151c;
  --light-band-soft: #4b515c;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-size: 16px;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.8;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* The legal page body gets this class so we can scope everything safely. */
.legal-page {
  background-color: var(--bg);
  color: var(--text);
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

h1, h2, h3, h4 {
  font-family: "Fraunces", Georgia, "Times New Roman", serif;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: var(--text);
}

/* ---------- Legal header (MUST be header/div, never section) ---------- */
.legal-header {
  background: linear-gradient(135deg, #141824 0%, #1a0f1c 100%);
  border-bottom: 1px solid var(--border);
  padding: 72px 0 56px;
}

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

.legal-header .kicker {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 18px;
}

.legal-header h1 {
  font-size: clamp(2.1rem, 5vw, 3.2rem);
  color: #ffffff;
  margin-bottom: 16px;
}

.legal-header .effective {
  font-size: 0.95rem;
  color: var(--text-soft);
}

/* ---------- Main content ---------- */
.legal-main {
  padding: 64px 0 88px;
}

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

/* Scope isolation: never let homepage section styles paint over legal text. */
.legal-page .legal-content section {
  background-color: transparent !important;
}

.legal-intro {
  font-size: 1.08rem;
  color: var(--text-soft);
  line-height: 1.85;
  margin-bottom: 16px;
}

.legal-content section {
  margin-bottom: 56px;
  padding-top: 8px;
}

.legal-content h2 {
  font-size: 1.7rem;
  color: var(--text);
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.legal-content h3 {
  font-size: 1.2rem;
  color: var(--text);
  margin: 28px 0 12px;
}

.legal-content p {
  font-size: 1rem;
  color: var(--text-soft);
  line-height: 1.85;
  margin-bottom: 18px;
}

.legal-content ul,
.legal-content ol {
  margin: 0 0 18px 24px;
  color: var(--text-soft);
}

.legal-content li {
  margin-bottom: 10px;
  line-height: 1.75;
}

.legal-content li::marker {
  color: var(--accent);
}

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

/* ---------- Table of contents ---------- */
.legal-toc {
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 32px 32px 26px;
  margin-bottom: 56px;
}

.legal-toc h2 {
  font-family: "Inter", system-ui, sans-serif;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-muted);
  border-bottom: none;
  padding-bottom: 0;
  margin-bottom: 18px;
}

.legal-toc nav.toc {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 24px;
}

.legal-toc nav.toc a {
  font-size: 0.94rem;
  color: var(--text-soft);
  padding: 4px 0;
}

.legal-toc nav.toc a:hover {
  color: var(--accent);
  text-decoration: none;
}

/* ---------- Address / contact block ---------- */
.legal-contact-block {
  background-color: var(--surface);
  border-left: 3px solid var(--accent);
  border-radius: 8px;
  padding: 24px 28px;
  margin: 24px 0 32px;
}

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

.legal-contact-block .title {
  font-weight: 600;
  color: var(--text);
  letter-spacing: 0.04em;
}

/* ---------- Back to home link ---------- */
.back-home {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 40px;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--accent);
}

.back-home:hover {
  text-decoration: none;
  color: var(--accent-deep);
}

/* ---------- Legal footer ---------- */
.legal-footer {
  background-color: var(--bg-soft);
  border-top: 1px solid var(--border);
  padding: 40px 0;
}

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

.legal-footer .brand {
  font-family: "Fraunces", Georgia, serif;
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text);
}

.legal-footer p {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.legal-footer nav {
  display: flex;
  gap: 20px;
}

.legal-footer nav a {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-soft);
}

.legal-footer nav a:hover {
  color: var(--accent);
  text-decoration: none;
}

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

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

  .legal-header {
    padding: 56px 0 44px;
  }
}
