/* ============================================================
   LEGAL PAGES — shared layout for Privacy / Terms-Mums / Terms-Students
   Brand tokens live in css/styles.css. This file is layout only.
   ============================================================ */

body { background: var(--soft); }

/* ── HERO ─────────────────────────────────────────────────────
   Same CoCE-style entry glow as Our Story (top-edge purple-pool
   + top-left corner). Tighter padding since legal pages are
   text-heavy and the hero is just a heading anchor. */
.lg-hero {
  position: relative;
  isolation: isolate;
  padding: calc(var(--nav-height) + 56px) var(--section-pad-h) 64px;
  overflow: hidden;
  background: var(--soft);
}
.lg-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(ellipse 140% 40% at 50% -8%,
      rgba(124,58,237,0.38) 0%,
      rgba(124,58,237,0.22) 14%,
      rgba(124,58,237,0.10) 28%,
      rgba(124,58,237,0.04) 40%,
      transparent 50%),
    radial-gradient(ellipse 60% 48% at -5% -5%,
      rgba(124,58,237,0.24) 0%,
      rgba(124,58,237,0.14) 22%,
      rgba(124,58,237,0.06) 45%,
      rgba(124,58,237,0.015) 65%,
      transparent 78%);
}
.lg-hero-inner {
  position: relative; z-index: 1;
  max-width: 880px;
  margin: 0 auto;
  text-align: center;
}
.lg-hero .section-label {
  color: var(--purple);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 700;
  margin-bottom: 18px;
  display: inline-block;
}
.lg-hero h1 {
  font-family: var(--font-body);
  font-size: clamp(40px, 5.6vw, 64px);
  line-height: 1.04;
  letter-spacing: -2px;
  font-weight: 600;
  color: var(--plum);
  margin-bottom: 20px;
  text-wrap: balance;
}
.lg-hero h1 em {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  color: var(--purple);
}
.lg-hero-meta {
  font-size: 14px;
  color: var(--mid);
  letter-spacing: 0.04em;
  font-weight: 400;
  margin-top: 8px;
}
.lg-hero-meta strong { color: var(--ink); font-weight: 600; }


/* ── BODY LAYOUT ───────────────────────────────────────────── */
.lg-body {
  background: white;
  padding: 80px var(--section-pad-h) 120px;
  position: relative;
}
.lg-body-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 64px;
  align-items: start;
}

/* Sticky table of contents (left rail on desktop) */
.lg-toc {
  position: sticky;
  top: calc(var(--nav-height) + 24px);
  align-self: start;
}
.lg-toc h4 {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--purple);
  margin-bottom: 14px;
}
.lg-toc ol {
  list-style: none;
  margin: 0; padding: 0;
}
.lg-toc li { margin: 0 0 8px; }
.lg-toc a {
  font-size: 13px;
  line-height: 1.4;
  color: var(--mid);
  text-decoration: none;
  display: block;
  padding: 4px 0;
  border-left: 2px solid transparent;
  padding-left: 12px;
  margin-left: -12px;
  transition: color 0.2s ease, border-color 0.2s ease;
}
.lg-toc a:hover { color: var(--purple); border-left-color: var(--purple); }
.lg-toc a.is-active { color: var(--purple); border-left-color: var(--purple); font-weight: 500; }


/* ── CONTENT ──────────────────────────────────────────────── */
.lg-content {
  max-width: 720px;
  font-family: var(--font-body);
  color: var(--ink);
}
.lg-content > section {
  margin-bottom: 48px;
  scroll-margin-top: calc(var(--nav-height) + 24px);
}
.lg-content h2 {
  font-family: var(--font-body);
  font-size: 22px;
  font-weight: 600;
  color: var(--plum);
  letter-spacing: -0.4px;
  margin: 0 0 16px;
  display: flex;
  align-items: baseline;
  gap: 12px;
}
.lg-content h2 .lg-h2-num {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  font-size: 22px;
  color: var(--purple);
  flex-shrink: 0;
}
.lg-content h3 {
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
  margin: 28px 0 10px;
  letter-spacing: -0.1px;
}
.lg-content p {
  font-size: 15px;
  line-height: 1.7;
  color: var(--mid);
  margin: 0 0 14px;
  font-weight: 400;
}
.lg-content p strong { color: var(--ink); font-weight: 600; }
.lg-content p em {
  font-family: var(--font-display);
  font-style: italic;
  color: var(--ink);
}
.lg-content a {
  color: var(--purple);
  text-decoration: none;
  border-bottom: 1px solid rgba(124,58,237,0.3);
  transition: border-color 0.2s ease;
}
.lg-content a:hover { border-bottom-color: var(--purple); }

/* Section counter — increments once per <section> inside .lg-content,
   so clauses can render as section.clause (e.g. 2.1, 2.2, 2.3). */
.lg-content {
  counter-reset: section-counter;
}
.lg-content > section {
  counter-increment: section-counter;
}

/* Numbered clauses (e.g. 1.1, 1.2) — use ordered lists */
.lg-content ol.lg-clauses {
  list-style: none;
  counter-reset: clause;
  margin: 0; padding: 0;
}
.lg-content ol.lg-clauses > li {
  counter-increment: clause;
  position: relative;
  padding-left: 52px;
  margin: 0 0 18px;
  font-size: 15px;
  line-height: 1.7;
  color: var(--mid);
}
.lg-content ol.lg-clauses > li::before {
  content: counter(section-counter) "." counter(clause);
  position: absolute;
  left: 0; top: 0;
  font-family: var(--font-body);
  font-weight: 600;
  color: var(--purple);
  font-size: 14px;
  letter-spacing: -0.2px;
  min-width: 44px;
}

/* Sub-lists (a, b, c) under clauses */
.lg-content ol.lg-sub {
  list-style: lower-alpha;
  margin: 12px 0 0 4px;
  padding-left: 24px;
}
.lg-content ol.lg-sub > li {
  margin: 0 0 8px;
  padding-left: 6px;
  font-size: 14.5px;
  line-height: 1.65;
  color: var(--mid);
}
.lg-content ol.lg-sub > li::marker {
  color: var(--purple);
  font-weight: 600;
}
.lg-content ol.lg-sub-roman {
  list-style: lower-roman;
  margin: 8px 0 0 4px;
  padding-left: 28px;
}
.lg-content ol.lg-sub-roman > li {
  margin: 0 0 6px;
  padding-left: 6px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--mid);
}
.lg-content ol.lg-sub-roman > li::marker { color: var(--purple); }


/* Definitions list (clause 22 / 24) — two-column on desktop */
.lg-content dl.lg-defs {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 12px 20px;
  margin: 0;
}
.lg-content dl.lg-defs dt {
  font-weight: 700;
  color: var(--ink);
  font-size: 14px;
  padding-top: 2px;
}
.lg-content dl.lg-defs dd {
  margin: 0;
  font-size: 14px;
  line-height: 1.6;
  color: var(--mid);
}

/* Callout box for key clauses (privacy notice, liability cap) */
.lg-callout {
  background: var(--lavender);
  border-left: 3px solid var(--purple);
  border-radius: 0 12px 12px 0;
  padding: 16px 20px;
  margin: 20px 0;
}
.lg-callout p { margin: 0; color: var(--ink); font-size: 14px; }
.lg-callout p strong { color: var(--plum); }


/* ── FOOTER CTA ────────────────────────────────────────────── */
.lg-footer-cta {
  background: var(--cream);
  padding: 80px var(--section-pad-h);
  text-align: center;
  border-top: 1px solid var(--cream-deep);
}
.lg-footer-cta-inner {
  max-width: 720px;
  margin: 0 auto;
}
.lg-footer-cta h2 {
  font-family: var(--font-body);
  font-size: clamp(28px, 3.4vw, 40px);
  font-weight: 600;
  color: var(--plum);
  letter-spacing: -1px;
  margin-bottom: 18px;
}
.lg-footer-cta h2 em {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  color: var(--purple);
}
.lg-footer-cta p {
  font-size: 16px;
  line-height: 1.7;
  color: var(--mid);
  margin: 0 0 32px;
}
.lg-footer-cta a {
  color: var(--purple);
  text-decoration: none;
  font-weight: 600;
  border-bottom: 1px solid rgba(124,58,237,0.3);
}
.lg-footer-cta a:hover { border-bottom-color: var(--purple); }


/* ── RESPONSIVE ────────────────────────────────────────────── */
@media (max-width: 900px) {
  .lg-body-inner {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .lg-toc {
    position: static;
    padding: 16px 18px;
    background: var(--lavender);
    border-radius: 14px;
  }
  .lg-content { max-width: none; }
  .lg-content ol.lg-clauses > li { padding-left: 44px; }
  .lg-content dl.lg-defs {
    grid-template-columns: 1fr;
    gap: 4px 0;
  }
  .lg-content dl.lg-defs dt { padding-top: 14px; }
}
@media (max-width: 600px) {
  .lg-hero { padding: calc(var(--nav-height) + 36px) 20px 48px; }
  .lg-body { padding: 56px 20px 80px; }
  .lg-content h2 { font-size: 20px; }
  .lg-footer-cta { padding: 64px 20px; }
}
