/* ============================================================
   Fitenome — Legal documents shared stylesheet.
   Apple HIG inspired, Geist font, fitenome cyan/blue palette.
   ============================================================ */

:root {
  --primary:        #0A84FF;
  --primary-dark:   #0066CC;
  --primary-light:  #5AC8FA;
  --accent-violet:  #5E5CE6;
  --accent-mint:    #00E5C8;

  --ink:        #0A0A0C;
  --ink-2:      #1B1B1F;
  --ink-3:      #333336;
  --slate-700:  #334155;
  --slate-600:  #475569;
  --slate-500:  #64748B;
  --slate-400:  #94A3B8;
  --slate-300:  #CBD5E1;
  --slate-200:  #E2E8F0;
  --slate-100:  #F1F5F9;
  --slate-50:   #F8FAFC;
  --white:      #FFFFFF;

  --warning:        #F59E0B;
  --warning-light:  #FEF3C7;
  --danger:         #EF4444;
  --danger-light:   #FEE2E2;
  --success:        #10B981;
  --success-light:  #D1FAE5;
  --info:           #3B82F6;
  --info-light:     #DBEAFE;

  --font-sans: 'Geist', -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --font-mono: 'Geist Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;

  --radius: 14px;
  --radius-lg: 22px;
  --shadow-card: 0 1px 2px rgba(0,0,0,0.04), 0 8px 24px rgba(10,30,80,0.05);
  --shadow-float: 0 24px 60px rgba(10,30,80,0.10);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink-2);
  background: var(--slate-50);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: var(--primary); text-decoration: none; transition: color 200ms; }
a:hover { color: var(--primary-dark); }

img { max-width: 100%; height: auto; }

/* ── Header ────────────────────────────────────────────────── */
.legal-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255,255,255,0.85);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid rgba(0,0,0,0.06);
}
.legal-header__inner {
  max-width: 980px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.legal-header__brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  color: var(--ink);
  font-size: 16px;
  letter-spacing: -0.012em;
}
.legal-header__brand img {
  width: 26px; height: 26px; border-radius: 7px;
}
.legal-header__nav {
  display: flex;
  gap: 18px;
  font-size: 13px;
  font-weight: 500;
  color: var(--slate-600);
}
.legal-header__nav a { color: inherit; }
.legal-header__nav a:hover { color: var(--ink); }
.legal-header__lang {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--slate-500);
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--slate-100);
  border: 1px solid var(--slate-200);
}

/* ── Hero ──────────────────────────────────────────────────── */
.legal-hero {
  background: linear-gradient(180deg, var(--ink) 0%, #0F141F 100%);
  color: var(--white);
  padding: 88px 24px 64px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.legal-hero::before {
  content: '';
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 50% 0%, rgba(90,200,250,0.20) 0%, rgba(10,132,255,0.10) 30%, transparent 65%);
  pointer-events: none;
}
.legal-hero__eyebrow {
  position: relative;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--primary-light);
  margin-bottom: 16px;
}
.legal-hero__title {
  position: relative;
  font-size: clamp(36px, 5vw, 56px);
  font-weight: 600;
  letter-spacing: -0.030em;
  line-height: 1.06;
  margin: 0 0 14px;
}
.legal-hero__meta {
  position: relative;
  display: inline-flex;
  flex-wrap: wrap;
  gap: 18px;
  margin-top: 14px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: rgba(255,255,255,0.62);
}
.legal-hero__meta b {
  color: rgba(255,255,255,0.92);
  font-weight: 500;
}

/* ── Layout ────────────────────────────────────────────────── */
.legal-wrap {
  max-width: 980px;
  margin: 0 auto;
  padding: 48px 24px 96px;
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 56px;
  align-items: start;
}
@media (max-width: 820px) {
  .legal-wrap { grid-template-columns: 1fr; gap: 36px; }
  .legal-toc { position: static !important; max-height: none !important; }
}

/* ── TOC ───────────────────────────────────────────────────── */
.legal-toc {
  position: sticky;
  top: 96px;
  max-height: calc(100vh - 120px);
  overflow-y: auto;
  padding-right: 8px;
}
.legal-toc__title {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--slate-500);
  margin-bottom: 14px;
}
.legal-toc ol {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: toc;
}
.legal-toc li {
  counter-increment: toc;
  margin-bottom: 8px;
  font-size: 13px;
  line-height: 1.4;
}
.legal-toc li::before {
  content: counter(toc) ".";
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--slate-400);
  margin-right: 6px;
}
.legal-toc a {
  color: var(--slate-700);
}
.legal-toc a:hover { color: var(--primary); }

/* ── Content ───────────────────────────────────────────────── */
.legal-content {
  min-width: 0;
}
.legal-content h2 {
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -0.020em;
  line-height: 1.18;
  color: var(--ink);
  margin: 56px 0 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--slate-200);
}
.legal-content h2:first-child { margin-top: 0; }
.legal-content h3 {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.012em;
  color: var(--ink);
  margin: 32px 0 10px;
}
.legal-content h4 {
  font-size: 15px;
  font-weight: 600;
  color: var(--slate-700);
  margin: 22px 0 8px;
}
.legal-content p {
  margin: 0 0 14px;
  color: var(--slate-700);
}
.legal-content ul, .legal-content ol {
  padding-left: 22px;
  margin: 0 0 16px;
  color: var(--slate-700);
}
.legal-content li { margin-bottom: 6px; }
.legal-content strong { color: var(--ink); font-weight: 600; }
.legal-content code {
  font-family: var(--font-mono);
  font-size: 13px;
  background: var(--slate-100);
  padding: 2px 6px;
  border-radius: 5px;
  color: var(--ink);
}
.legal-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 14px 0 22px;
  font-size: 14px;
  background: var(--white);
  border: 1px solid var(--slate-200);
  border-radius: var(--radius);
  overflow: hidden;
}
.legal-content th, .legal-content td {
  padding: 12px 14px;
  text-align: left;
  border-bottom: 1px solid var(--slate-200);
  vertical-align: top;
}
.legal-content th {
  background: var(--slate-50);
  font-weight: 600;
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.legal-content tr:last-child td { border-bottom: 0; }

/* Callouts */
.callout {
  margin: 18px 0;
  padding: 14px 18px;
  border-radius: var(--radius);
  border-left: 3px solid var(--primary);
  background: var(--info-light);
  color: var(--slate-700);
  font-size: 14px;
}
.callout--warning { border-color: var(--warning); background: var(--warning-light); }
.callout--danger  { border-color: var(--danger);  background: var(--danger-light); }
.callout--success { border-color: var(--success); background: var(--success-light); }
.callout strong { color: var(--ink); }

/* Definitions list */
.def-list {
  background: var(--white);
  border: 1px solid var(--slate-200);
  border-radius: var(--radius);
  padding: 18px 22px;
  margin: 14px 0 18px;
}
.def-list dt {
  font-weight: 600;
  color: var(--ink);
  margin-top: 12px;
}
.def-list dt:first-child { margin-top: 0; }
.def-list dd {
  margin: 4px 0 0;
  color: var(--slate-700);
  font-size: 14px;
}

/* Footer */
.legal-footer {
  background: var(--ink);
  color: rgba(255,255,255,0.62);
  padding: 56px 24px;
  font-size: 13px;
}
.legal-footer__inner {
  max-width: 980px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  justify-content: space-between;
  align-items: center;
}
.legal-footer a { color: rgba(255,255,255,0.82); }
.legal-footer a:hover { color: var(--white); }
.legal-footer__brand {
  display: inline-flex; align-items: center; gap: 12px;
  color: var(--white);
  font-weight: 600;
  letter-spacing: -0.012em;
}
.legal-footer__links {
  display: inline-flex; gap: 22px; flex-wrap: wrap;
}

/* Reduce motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
