/* ============================================
   legal.css — Privacy Policy & Terms of Service
   ============================================ */

/* ── DESIGN TOKENS (Bridging to Global Light Theme) ── */
:root {
  --text-primary:   #0f172a;
  --text-body:      #334155;
  --text-muted:     #64748b;
  --text-light:     #94a3b8;
  
  --bg-white:       #ffffff;
  --bg-soft:        #f8fafc;
  --bg-tint:        #eff6ff;
  --bg-deep:        #0f172a;
  
  --brand:          #2563eb;
  --brand-hover:    #1d4ed8;
  --brand-light:    #3b82f6;
  --brand-pale:     #dbeafe;
  
  --orange:         #f97316;
  --orange-h:       #ea6c0a;
  
  --border:         #e2e8f0;
  --border-light:   #f1f5f9;
  
  --shadow-sm:      0 1px 2px rgba(15,23,42,0.06);
  --shadow:         0 4px 12px rgba(15,23,42,0.08);

  /* Legacy mappings */
  --navy:           var(--text-primary);
  --gold:           var(--brand);
  --gold-lt:        var(--brand-light);
  --white:          var(--bg-white);
  --offwhite:       var(--bg-soft);
}

body {
  background: var(--bg-soft);
  color: var(--text-body);
}

/* ── HEADER ── */
.header-back {
  color: var(--brand); font-family: 'Sora', sans-serif;
  font-weight: 600; font-size: 0.88rem; text-decoration: none;
  display: flex; align-items: center; gap: 6px;
  transition: color 0.2s;
}
.header-back:hover { color: var(--brand-hover); }
.header-back::before { content: '←'; font-weight: bold; }

/* ── HERO BANNER ── */
/* Light theme hero: Soft blue gradient */
.legal-hero {
  background-color: var(--bg-white);
  background-image: radial-gradient(ellipse 70% 60% at 50% 100%, rgba(37,99,235,0.05) 0%, transparent 70%);
  padding: 56px 5% 52px;
  text-align: center;
  border-bottom: 1px solid var(--border);
}
.legal-tag {
  display: inline-block;
  font-family: 'Sora', sans-serif; font-size: 0.72rem;
  font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--brand); border: 1px solid rgba(37,99,235,0.2);
  background: var(--brand-pale);
  padding: 5px 14px; border-radius: 4px; margin-bottom: 16px;
}
.legal-hero h1 {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 800; color: var(--text-primary); margin-bottom: 12px;
}
.legal-hero p {
  color: var(--text-muted); font-size: 0.88rem; font-weight: 500;
}

/* ── LAYOUT ── */
.legal-layout {
  display: flex; align-items: flex-start; gap: 40px;
  max-width: 1100px; margin: 0 auto;
  padding: 56px 5% 80px;
}

/* ── SIDEBAR TOC ── */
.legal-toc {
  flex: 0 0 220px;
  position: sticky; top: 84px; /* adjusted for standard header height */
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: 10px; padding: 20px;
  box-shadow: var(--shadow-sm);
}
.legal-toc h4 {
  font-family: 'Sora', sans-serif; font-size: 0.72rem;
  font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--text-muted); margin-bottom: 14px;
}
.legal-toc ol {
  list-style: none; padding: 0; margin: 0;
  display: flex; flex-direction: column; gap: 2px;
  counter-reset: toc-counter;
}
.legal-toc ol li { counter-increment: toc-counter; }
.legal-toc ol li a {
  display: flex; align-items: center; gap: 8px;
  font-size: 0.82rem; color: var(--text-body); text-decoration: none;
  padding: 6px 8px; border-radius: 5px; font-weight: 500;
  transition: background 0.15s, color 0.15s;
}
.legal-toc ol li a::before {
  content: counter(toc-counter, decimal-leading-zero);
  font-family: 'Sora', sans-serif; font-size: 0.68rem;
  font-weight: 700; color: var(--brand); flex-shrink: 0;
}
.legal-toc ol li a:hover {
  background: var(--bg-tint); color: var(--brand);
}

/* ── CONTENT ── */
.legal-content {
  flex: 1; min-width: 0;
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: 12px; padding: 48px 52px;
  box-shadow: var(--shadow-sm);
}

.legal-section {
  padding-top: 8px; margin-bottom: 44px;
  border-bottom: 1px solid var(--border-light); padding-bottom: 44px;
}
.legal-section:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }

.legal-section-num {
  display: inline-block;
  font-family: 'Sora', sans-serif; font-size: 0.7rem;
  font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--brand-light); margin-bottom: 8px;
}
.legal-section h2 {
  font-size: 1.2rem; font-weight: 800; color: var(--text-primary);
  margin-bottom: 16px; scroll-margin-top: 90px;
}
.legal-section p {
  font-size: 0.92rem; color: var(--text-body); line-height: 1.8; margin-bottom: 12px;
}
.legal-section p:last-child { margin-bottom: 0; }
.legal-section ul {
  margin: 12px 0 12px 0; padding: 0; list-style: none;
  display: flex; flex-direction: column; gap: 8px;
}
.legal-section ul li {
  display: flex; align-items: flex-start; gap: 10px;
  font-size: 0.92rem; color: var(--text-body); line-height: 1.65;
}
.legal-section ul li::before {
  content: '';
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--brand); flex-shrink: 0; margin-top: 8px;
}
.legal-section a {
  color: var(--orange); text-decoration: none; border-bottom: 1px solid rgba(249,115,22,0.3);
  transition: border-color 0.2s;
}
.legal-section a:hover { border-color: var(--orange); }

/* Highlight box: Light blue */
.legal-highlight {
  background: var(--bg-tint);
  border-left: 3px solid var(--brand);
  border-radius: 0 8px 8px 0;
  padding: 14px 18px; margin: 16px 0;
  font-size: 0.88rem; color: var(--text-primary); line-height: 1.7;
}

/* ── FOOTER ── */
.site-footer-meta {
  background: var(--bg-deep); color: rgba(255,255,255,0.4);
  text-align: center; padding: 20px 5%; font-size: 0.78rem;
  border-top: 1px solid rgba(255,255,255,0.06);
}
.site-footer-meta a { color: rgba(255,255,255,0.55); text-decoration: none; }
.site-footer-meta a:hover { color: var(--brand-pale); }

/* ── RESPONSIVE ── */
@media (max-width: 820px) {
  .legal-layout { flex-direction: column; gap: 24px; }
  .legal-toc { flex: none; width: 100%; position: static; }
  .legal-toc ol { flex-direction: row; flex-wrap: wrap; gap: 4px; }
  .legal-content { padding: 28px 24px; }
}
@media (max-width: 480px) {
  .legal-hero { padding: 40px 4% 36px; }
  .legal-content { padding: 24px 18px; }
}