/* ═══════════════════════════════════════════════════════════════════════════
   legal.css — shared shell for secondary pages (terms, privacy, 404).
   Mirrors the index.html tokens so the visual language stays 1:1 with the
   landing and the app. Kept compact on purpose (no above-the-fold CSS here
   since these pages aren't performance-critical like the landing).
   ═══════════════════════════════════════════════════════════════════════════ */

:root {
  --bg-1:        #0a0e1a;
  --bg-2:        #0f172a;
  --surface:     rgba(255,255,255,.035);
  --surface-2:   rgba(255,255,255,.06);
  --border:      rgba(255,255,255,.08);
  --border-soft: rgba(255,255,255,.05);
  --indigo:       #6366f1;
  --indigo-light: #818cf8;
  --indigo-soft:  rgba(99,102,241,.14);
  --indigo-mid:   rgba(99,102,241,.28);
  --purple:       #a855f7;
  --text:        #f1f5f9;
  --text-soft:   #cbd5e1;
  --sub:         #94a3b8;
  --muted:       #64748b;
  --font-head:  'Space Grotesk', 'Segoe UI', system-ui, sans-serif;
  --font-body:  'Inter', 'Segoe UI', system-ui, sans-serif;
  --radius:    14px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  background: var(--bg-1);
  color: var(--text);
  margin: 0;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
body::before {
  content: ''; position: fixed; inset: 0;
  background:
    radial-gradient(ellipse at 15% 0%,  rgba(99,102,241,.12) 0%, transparent 55%),
    radial-gradient(ellipse at 85% 20%, rgba(168,85,247,.08) 0%, transparent 50%);
  pointer-events: none; z-index: 0;
}
a { color: var(--indigo-light); text-decoration: none; }
a:hover { text-decoration: underline; }

.container {
  max-width: 820px; margin: 0 auto; padding: 0 1.2rem;
  position: relative; z-index: 1;
}
.container.wide { max-width: 1180px; }

/* ═══ Skip link ═══ */
.skip-link {
  position: absolute; left: -9999px; top: auto;
  width: 1px; height: 1px; overflow: hidden;
  background: var(--indigo); color: #fff;
  padding: .6rem 1rem; border-radius: 8px;
  font-weight: 600; font-size: .88rem;
  z-index: 1000;
}
.skip-link:focus {
  left: 1rem; top: 1rem;
  width: auto; height: auto;
  outline: 2px solid #fff; outline-offset: 2px;
}

:focus { outline: none; }
:focus-visible {
  outline: 2px solid var(--indigo-light);
  outline-offset: 3px; border-radius: 6px;
}

/* ═══ Nav ═══ */
.nav-cjf {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  background: rgba(10,14,26,.72);
  border-bottom: 1px solid var(--border-soft);
}
.nav-inner {
  max-width: 1180px; margin: 0 auto; padding: .85rem 1.2rem;
  display: flex; align-items: center; justify-content: space-between;
}
.nav-brand {
  display: inline-flex; align-items: center; gap: .6rem;
  font-weight: 800; font-family: var(--font-head); font-size: 1.05rem;
  color: var(--text);
}
.nav-brand:hover { text-decoration: none; color: var(--text); }
.nav-brand-icon {
  width: 32px; height: 32px; border-radius: 9px;
  background: linear-gradient(135deg, #6366f1, #a855f7);
  display: flex; align-items: center; justify-content: center;
  color: #fff; box-shadow: 0 4px 14px rgba(139,92,246,.38);
  overflow: hidden;
}
.nav-actions { display: flex; align-items: center; gap: .55rem; }

/* ═══ Buttons ═══ */
.btn-cjf {
  display: inline-flex; align-items: center; gap: .5rem;
  font-family: var(--font-body); font-weight: 600; font-size: .88rem;
  padding: .6rem 1.05rem; border-radius: 10px;
  border: 1px solid transparent; cursor: pointer;
  transition: transform .12s ease, opacity .12s, background .12s;
  white-space: nowrap; text-decoration: none;
}
.btn-cjf:hover { text-decoration: none; }
.btn-primary-cjf {
  background: linear-gradient(135deg, #6366f1, #818cf8);
  color: #fff; box-shadow: 0 6px 22px rgba(99,102,241,.35);
}
.btn-primary-cjf:hover { transform: translateY(-1px); opacity: .95; color: #fff; }
.btn-ghost-cjf {
  background: var(--surface); color: var(--text-soft);
  border-color: var(--border);
}
.btn-ghost-cjf:hover { background: var(--surface-2); color: var(--text); }
.btn-lg { padding: .85rem 1.4rem; font-size: .98rem; }

/* ═══ Labels & headings ═══ */
.section-label {
  display: inline-flex; align-items: center; gap: .4rem;
  font-size: .68rem; font-weight: 700; letter-spacing: 2px;
  text-transform: uppercase; color: var(--indigo-light);
  background: var(--indigo-soft);
  border: 1px solid var(--indigo-mid);
  padding: .3rem .85rem; border-radius: 999px;
  margin-bottom: 1rem;
}
h1, h2, h3 { font-family: var(--font-head); letter-spacing: -.02em; color: var(--text); }
h1 { font-size: clamp(2rem, 4vw, 2.6rem); font-weight: 800; line-height: 1.15; margin: 0 0 .5rem; }
h2 { font-size: 1.2rem; font-weight: 700; margin: 2rem 0 .8rem; }
h3 { font-size: 1rem; font-weight: 700; margin: 1.3rem 0 .4rem; }

/* ═══ Doc page ═══ */
.doc-page { padding: 3rem 0 5rem; }
.doc-meta {
  color: var(--sub); font-size: .86rem; margin: 0 0 2.4rem;
}
.doc-body {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.8rem 2rem;
}
.doc-body p, .doc-body li { color: var(--text-soft); font-size: .95rem; }
.doc-body ul { padding-left: 1.2rem; }
.doc-body li { margin: .35rem 0; }
.doc-body strong { color: var(--text); }

.doc-note {
  margin-top: 2rem; padding: .9rem 1.1rem;
  background: var(--indigo-soft);
  border: 1px solid var(--indigo-mid);
  border-radius: 10px;
  color: var(--text-soft); font-size: .85rem;
  display: flex; gap: .5rem; align-items: flex-start;
}
.doc-note i { color: var(--indigo-light); margin-top: .15rem; }

.doc-footer-cta {
  margin-top: 2rem; display: flex; gap: .6rem; flex-wrap: wrap;
  justify-content: flex-end;
}

/* ═══ 404 page specifics ═══ */
.doc-page.notfound { padding: 5rem 0 6rem; min-height: 70vh; display: flex; align-items: center; }
.nf-code {
  font-family: var(--font-head); font-weight: 800;
  font-size: clamp(6rem, 14vw, 9rem); line-height: .95;
  background: linear-gradient(120deg, #818cf8 20%, #c084fc 55%, #2dd4bf 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
  margin-bottom: .5rem;
}
.nf-sub {
  color: var(--sub); font-size: 1rem; line-height: 1.65;
  max-width: 520px; margin: 1rem auto 2rem;
}
.nf-actions { display: inline-flex; gap: .6rem; flex-wrap: wrap; justify-content: center; }

/* ═══ Footer ═══ */
footer {
  padding: 2.5rem 0 1.6rem; color: var(--sub);
  border-top: 1px solid var(--border-soft);
}
.footer-bottom {
  display: flex; justify-content: space-between; gap: 1rem;
  font-size: .82rem; flex-wrap: wrap;
}
footer a { color: var(--sub); }
footer a:hover { color: var(--text); }

/* ═══ Motion prefs ═══ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}
