/* ─────────────────────────────────────────
   legal.css — Privacy Policy & Terms of Use
   Background matches the hero block on the homepage
───────────────────────────────────────── */

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font, 'Inter', system-ui, sans-serif);
  background: var(--bg);
  color: var(--white);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

/* Headings — Schibsted Grotesk */
h1, h2 {
  font-family: 'Schibsted Grotesk', 'Inter', system-ui, sans-serif;
}

/* ── Hero-style background with glow orbs ── */
.legal-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  background: var(--bg);
  overflow: hidden;
  pointer-events: none;
}

.legal-glow {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}

.legal-glow-1 {
  width: 1028px;
  height: 1028px;
  left: -180px;
  top: -346px;
  background: radial-gradient(circle,
    rgba(118,165,255,.18) 0%,
    rgba(118,165,255,.06) 35%,
    transparent 70%);
}

.legal-glow-2 {
  width: 831px;
  height: 831px;
  right: -239px;
  bottom: -102px;
  background: radial-gradient(circle,
    rgba(242,119,53,.14) 0%,
    rgba(242,119,53,.05) 35%,
    transparent 70%);
}

/* ── Main content shell ── */
main {
  flex: 1;
  width: 100%;
  max-width: var(--container-width, 1440px);
  margin: 0 auto;
  padding: calc(var(--header-height) + 40px) 24px 80px;
  position: relative;
}

/* Two-column layout on desktop: content + sticky TOC */
.legal-layout {
  display: block;
}

/* ── Heading block ── */
.doc-label {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 20px;
}

h1 {
  font-size: clamp(32px, 6vw, 56px);
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.01em;
  text-transform: uppercase;
  margin-bottom: 12px;
  color: var(--white);
}

.doc-date {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 48px;
}

/* ── Body content ── */
.legal-content > p:first-of-type {
  margin-top: 0;
}

h2 {
  font-size: 18px;
  font-weight: 600;
  margin-top: 48px;
  margin-bottom: 14px;
  color: var(--white);
  scroll-margin-top: calc(var(--header-height) + 24px);
}

p {
  font-size: 15px;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.75);
  margin-bottom: 14px;
}

ul {
  margin: 0 0 14px 22px;
}

li {
  font-size: 15px;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.75);
  margin-bottom: 4px;
}

a.inline {
  color: var(--blue);
  text-decoration: none;
}
a.inline:hover { text-decoration: underline; }

/* ── On-this-page TOC sidebar ── */
.legal-toc {
  display: none;
}

.legal-toc-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--white);
  margin-bottom: 18px;
}

.legal-toc-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: relative;
  border-left: 1px solid rgba(255, 255, 255, 0.08);
  padding-left: 16px;
}

.legal-toc-list a {
  font-size: 13px;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.55);
  text-decoration: none;
  transition: color .25s ease;
  position: relative;
}

.legal-toc-list a:hover {
  color: var(--white);
}

.legal-toc-list a.is-active {
  color: var(--blue);
}

.legal-toc-list a.is-active::before {
  content: '';
  position: absolute;
  left: -17px;
  top: 0;
  bottom: 0;
  width: 1px;
  background: var(--blue);
}

/* ── Tablet ≥640px ── */
@media (min-width: 640px) and (min-height: 600px) {
  main {
    padding: calc(var(--header-height) + 60px) 40px 100px;
  }
  h2 { font-size: 19px; }
  p, li { font-size: 16px; }
  .doc-date { margin-bottom: 56px; }
}

/* ── Tablet ≥768px ── */
@media (min-width: 768px) and (min-height: 600px) {
  main {
    padding: calc(var(--header-height) + 80px) 48px 120px;
  }
  h1 { margin-bottom: 14px; }
}

/* ── Desktop ≥1024px — sidebar TOC ── */
@media (min-width: 1024px) and (min-height: 600px) {
  main {
    padding: calc(var(--header-height) + 80px) 120px 160px;
  }

  .legal-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 260px;
    column-gap: 80px;
    align-items: start;
  }

  .legal-content {
    min-width: 0;
    max-width: 680px;
  }

  .legal-toc {
    display: block;
    position: sticky;
    top: calc(var(--header-height) + 24px);
  }
}

/* ── Desktop ≥1280px ── */
@media (min-width: 1280px) and (min-height: 600px) {
  .legal-layout {
    grid-template-columns: minmax(0, 1fr) 300px;
    column-gap: 120px;
  }
}
