/* ============================================================
   Azica — legal.css
   Standalone light "document" theme for Azvault legal pages
   (Privacy Policy, Terms of Service). Intentionally separate
   from the dark marketing theme in styles.css.
   ============================================================ */

:root {
  --lp-bg:          #ffffff;
  --lp-bg-soft:     #f6f7fa;
  --lp-text:        #1a1d29;
  --lp-text-soft:   #565b6f;
  --lp-text-faint:  #9398a8;
  --lp-border:      #e6e8ee;
  --lp-accent:      #2563eb;
  --lp-accent-soft: #eef3ff;
  --font-main: 'Inter', system-ui, sans-serif;
  --font-head: 'Space Grotesk', 'Inter', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body.legal-page {
  font-family: var(--font-main);
  background: var(--lp-bg);
  color: var(--lp-text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
button { font-family: inherit; cursor: pointer; }

/* ---------- Header ----------
   Two controls only: a TOC toggle (left) and a return-to-site
   button (right). No logo/wordmark — deliberately minimal so
   it reads the same at every screen size. */
.legal-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--lp-border);
}
.legal-header__inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.legal-toc-toggle {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: .84rem;
  font-weight: 600;
  color: var(--lp-text);
  background: var(--lp-bg-soft);
  border: 1px solid var(--lp-border);
  padding: 7px 13px;
  border-radius: 8px;
  transition: border-color .15s ease, color .15s ease;
}
.legal-toc-toggle:hover { border-color: var(--lp-accent); color: var(--lp-accent); }
.legal-toc-toggle svg { width: 16px; height: 16px; flex-shrink: 0; }

.legal-header__back {
  display: inline-flex;
  align-items: center;
  font-size: .84rem;
  font-weight: 600;
  color: var(--lp-text);
  text-decoration: none;
  white-space: nowrap;
  background: var(--lp-bg-soft);
  border: 1px solid var(--lp-border);
  padding: 8px 16px;
  border-radius: 8px;
  transition: border-color .15s ease, color .15s ease;
}
.legal-header__back:hover { border-color: var(--lp-accent); color: var(--lp-accent); }

/* ---------- Page shell ---------- */
.legal-shell {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- TOC — an off-canvas drawer at every screen size ---------- */
.legal-toc {
  position: fixed;
  top: 0; left: 0; bottom: 0;
  width: min(340px, 86vw);
  background: #fff;
  border-right: 1px solid var(--lp-border);
  transform: translateX(-100%);
  transition: transform .28s ease;
  z-index: 200;
}
.legal-toc.open { transform: translateX(0); box-shadow: 10px 0 34px rgba(0,0,0,.14); }
.legal-toc__scroll {
  height: 100%;
  overflow-y: auto;
  padding: 20px 22px 28px;
}
.legal-toc__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.legal-toc__label {
  display: block;
  font-size: .72rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--lp-text-faint);
  font-weight: 700;
}
.legal-toc ol {
  list-style: none;
  counter-reset: toc;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.legal-toc li { counter-increment: toc; }
.legal-toc a {
  display: flex;
  gap: 10px;
  align-items: baseline;
  padding: 7px 10px;
  border-radius: 7px;
  font-size: .855rem;
  line-height: 1.4;
  color: var(--lp-text-soft);
  text-decoration: none;
  transition: background .15s ease, color .15s ease;
}
.legal-toc a::before {
  content: counter(toc) ".";
  color: var(--lp-text-faint);
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
}
.legal-toc a:hover { background: var(--lp-bg-soft); color: var(--lp-text); }
.legal-toc a.active {
  background: var(--lp-accent-soft);
  color: var(--lp-accent);
  font-weight: 600;
}
.legal-toc a.active::before { color: var(--lp-accent); }
.legal-toc__cross {
  display: block;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--lp-border);
  font-size: .85rem;
  font-weight: 600;
  color: var(--lp-accent);
  text-decoration: none;
}
.legal-toc__cross:hover { text-decoration: underline; }
.legal-toc__close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  font-size: 1.5rem;
  line-height: 1;
  color: var(--lp-text-soft);
  padding: 4px 8px;
}
.legal-toc__close:hover { color: var(--lp-text); }

.legal-scrim {
  position: fixed;
  inset: 0;
  background: rgba(15,17,23,.4);
  z-index: 190;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease;
}
.legal-scrim.open { opacity: 1; pointer-events: auto; }

/* ---------- Main content ---------- */
.legal-main {
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  padding: 48px 0 110px;
}

.legal-title {
  margin-bottom: 40px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--lp-border);
}
.legal-eyebrow {
  display: inline-block;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--lp-accent);
  margin-bottom: 12px;
}
.legal-title h1 {
  font-family: var(--font-head);
  font-size: clamp(2rem, 4vw, 2.6rem);
  font-weight: 700;
  letter-spacing: -.02em;
  color: var(--lp-text);
  margin-bottom: 14px;
}
.legal-dates { font-size: .9rem; color: var(--lp-text-soft); margin-bottom: 10px; }
.legal-cross-link {
  display: inline-block;
  font-size: .9rem;
  font-weight: 600;
  color: var(--lp-accent);
  text-decoration: none;
}
.legal-cross-link:hover { text-decoration: underline; }

.legal-content { color: var(--lp-text); font-size: 1.02rem; line-height: 1.75; }
.legal-content > p:first-child {
  font-size: 1.1rem;
  color: var(--lp-text-soft);
  margin-bottom: 40px;
}
.legal-content section { scroll-margin-top: 96px; }
.legal-content h2 {
  font-family: var(--font-head);
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: -.01em;
  color: var(--lp-text);
  margin: 52px 0 18px;
}
.legal-content section:first-of-type h2 { margin-top: 0; }
.legal-content h3 {
  font-family: var(--font-head);
  font-size: 1.08rem;
  font-weight: 600;
  color: var(--lp-text);
  margin: 30px 0 12px;
}
.legal-content p { margin-bottom: 16px; }
.legal-content ul, .legal-content ol.legal-list {
  margin: 0 0 18px 22px;
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.legal-content ul { list-style: disc; }
.legal-content ul li::marker { color: var(--lp-text-faint); }
.legal-content ol.legal-list { list-style: decimal; }
.legal-content a {
  color: var(--lp-accent);
  text-decoration: underline;
  text-decoration-color: rgba(37,99,235,.3);
  text-underline-offset: 2px;
}
.legal-content a:hover { text-decoration-color: var(--lp-accent); }
.legal-content strong { color: var(--lp-text); font-weight: 600; }
.legal-content hr { border: none; border-top: 1px solid var(--lp-border); margin: 44px 0; }

.legal-table-wrap {
  overflow-x: auto;
  margin: 0 0 22px;
  border: 1px solid var(--lp-border);
  border-radius: 10px;
}
.legal-content table { width: 100%; min-width: 480px; border-collapse: collapse; font-size: .88rem; }
.legal-content th, .legal-content td {
  padding: 11px 15px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--lp-border);
}
.legal-content tbody tr:last-child td { border-bottom: none; }
.legal-content th {
  background: var(--lp-bg-soft);
  color: var(--lp-text);
  font-weight: 600;
  font-size: .76rem;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.legal-callout {
  background: var(--lp-accent-soft);
  border: 1px solid rgba(37,99,235,.18);
  border-left: 3px solid var(--lp-accent);
  border-radius: 10px;
  padding: 20px 22px;
  margin-bottom: 22px;
}
.legal-callout p { margin-bottom: 12px; }
.legal-callout p:last-child { margin-bottom: 0; }

.legal-footer-note {
  margin-top: 60px;
  padding-top: 28px;
  border-top: 1px solid var(--lp-border);
  color: var(--lp-text-soft);
  font-size: .88rem;
  font-style: italic;
}

/* ---------- Footer ---------- */
.legal-footer { border-top: 1px solid var(--lp-border); background: var(--lp-bg-soft); }
.legal-footer__inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 26px 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 14px 28px;
  align-items: center;
  justify-content: space-between;
  font-size: .82rem;
  color: var(--lp-text-soft);
}
.legal-footer__links { display: flex; gap: 22px; }
.legal-footer__links a { color: var(--lp-text-soft); text-decoration: none; }
.legal-footer__links a:hover { color: var(--lp-accent); }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 420px) {
  .legal-toc-toggle span { display: none; }
  .legal-toc-toggle { padding: 8px 10px; }
  .legal-header__back { padding: 8px 12px; font-size: .78rem; }
}

@media (max-width: 480px) {
  .legal-header__inner { padding: 12px 16px; }
  .legal-shell { padding: 0 16px; }
  .legal-main { padding: 32px 0 80px; }
  .legal-footer__inner { padding: 22px 16px; }
}
