/* ══════════════════════════════════════════════
   EXCHANGE CAPITAL — LEGAL PAGES STYLESHEET
   Shared design tokens. Matches index.html exactly.
   Version: 1.0.0 | excap.io
══════════════════════════════════════════════ */

:root {
  --bg:     #04040A;
  --bg2:    #080810;
  --bg3:    #0C0C18;
  --panel:  #0F0F1C;
  --white:  #F8F7F2;
  --w80:    rgba(248,247,242,.92);
  --w55:    rgba(248,247,242,.75);
  --w30:    rgba(248,247,242,.45);
  --w10:    rgba(248,247,242,.08);
  --lime:   #A8FF35;
  --lime2:  #C4FF6A;
  --mid:    #8B8FA8;
  --dim:    #3A3D50;
  --f: 'Inter', -apple-system, 'PingFang SC', 'Microsoft YaHei', system-ui, sans-serif;
  --m: 'DM Mono', 'SF Mono', 'Courier New', monospace;
  --ease:  cubic-bezier(.22,1,.36,1);
  --snap:  cubic-bezier(.76,0,.24,1);
}

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

body {
  background: var(--bg);
  color: var(--white);
  font-family: var(--f);
  font-weight: 400;
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  letter-spacing: .005em;
}

/* ── NAV ── */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 800;
  height: 76px;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 48px;
  background: rgba(4,4,10,.96);
  backdrop-filter: blur(20px) saturate(1.6);
  border-bottom: 1px solid rgba(168,255,53,.1);
}
.logo { display: flex; align-items: center; gap: 16px; text-decoration: none; flex-shrink: 0; }
.logo-mark { width: 54px; height: 54px; position: relative; flex-shrink: 0; }
.logo-mark svg { width: 100%; height: 100%; }
.logo-wordmark { display: flex; flex-direction: column; gap: 4px; }
.logo-company { font-size: 22px; font-weight: 700; letter-spacing: -.035em; color: var(--white); line-height: 1; }
.logo-domain { font-family: var(--m); font-size: 11px; letter-spacing: .4em; color: var(--lime); text-transform: uppercase; opacity: .95; line-height: 1; }

.nav-back {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12px; font-weight: 500; letter-spacing: .01em;
  color: var(--w55); text-decoration: none;
  transition: color .22s;
}
.nav-back:hover { color: var(--lime); }
.nav-back svg { transition: transform .22s; }
.nav-back:hover svg { transform: translateX(-3px); }

/* ── WATERMARK ── */
.watermark {
  position: fixed; top: 0; bottom: 0; right: 28px; z-index: 4000;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  pointer-events: none; user-select: none;
}
.watermark-text {
  font-family: var(--f); font-weight: 700; font-size: 10px;
  letter-spacing: .55em; text-transform: uppercase;
  color: rgba(168,255,53,.14); writing-mode: vertical-rl;
  height: 100vh; line-height: 1;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, rgba(0,0,0,1) 18%, rgba(0,0,0,1) 82%, transparent 100%);
  mask-image: linear-gradient(to bottom, transparent 0%, rgba(0,0,0,1) 18%, rgba(0,0,0,1) 82%, transparent 100%);
}
.watermark-rule {
  position: absolute; top: 10%; bottom: 10%; right: -12px; width: 1px;
  background: linear-gradient(to bottom, transparent, rgba(168,255,53,.2) 50%, transparent);
}

/* ── PAGE HERO ── */
.legal-hero {
  padding: 140px 0 80px;
  border-bottom: 1px solid rgba(168,255,53,.1);
  position: relative; overflow: hidden;
}
.legal-hero::before {
  content: '';
  position: absolute; top: -100px; left: -200px;
  width: 800px; height: 600px;
  background: radial-gradient(ellipse, rgba(168,255,53,.07) 0%, transparent 65%);
  pointer-events: none;
}
.legal-eyebrow {
  font-family: var(--m); font-size: 10px; letter-spacing: .28em;
  text-transform: uppercase; color: var(--lime);
  display: flex; align-items: center; gap: 8px; margin-bottom: 16px;
}
.legal-eyebrow-rule { width: 20px; height: 1px; background: var(--lime); }
.legal-h1 {
  font-size: clamp(36px, 4.5vw, 64px); font-weight: 700;
  line-height: 1.0; letter-spacing: -.035em;
  color: var(--white); margin-bottom: 16px;
}
.legal-h1 em { color: var(--lime); font-style: normal; }
.legal-meta {
  font-family: var(--m); font-size: 11px; letter-spacing: .12em;
  text-transform: uppercase; color: var(--mid);
  display: flex; gap: 24px; flex-wrap: wrap; margin-top: 20px;
}
.legal-meta span { display: flex; align-items: center; gap: 6px; }
.legal-meta span::before { content: ''; width: 4px; height: 4px; background: var(--lime); border-radius: 50%; display: block; }

/* ── LAYOUT ── */
.w { max-width: 1160px; margin: 0 auto; padding: 0 48px; }
.legal-layout {
  display: grid; grid-template-columns: 220px 1fr;
  gap: 64px; padding: 80px 0 120px; align-items: start;
}

/* ── SIDEBAR TOC ── */
.legal-toc {
  position: sticky; top: 96px;
}
.toc-label {
  font-family: var(--m); font-size: 9px; letter-spacing: .26em;
  text-transform: uppercase; color: var(--lime); margin-bottom: 16px;
}
.toc-links { list-style: none; display: flex; flex-direction: column; gap: 2px; }
.toc-links a {
  font-size: 12px; font-weight: 400; color: var(--mid);
  text-decoration: none; padding: 5px 0 5px 12px;
  border-left: 1px solid rgba(168,255,53,.1);
  display: block; transition: color .2s, border-color .2s;
}
.toc-links a:hover { color: var(--white); border-color: var(--lime); }
.toc-links a.active { color: var(--lime); border-color: var(--lime); }

/* ── LEGAL CONTENT ── */
.legal-body { max-width: 780px; }

.legal-section { margin-bottom: 56px; scroll-margin-top: 96px; }

.legal-section-num {
  font-family: var(--m); font-size: 10px; letter-spacing: .22em;
  text-transform: uppercase; color: var(--lime); margin-bottom: 8px;
}
.legal-section h2 {
  font-size: 22px; font-weight: 700; letter-spacing: -.025em;
  color: var(--white); line-height: 1.15; margin-bottom: 18px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(168,255,53,.1);
}
.legal-section h3 {
  font-size: 15px; font-weight: 600; letter-spacing: -.015em;
  color: var(--w80); margin: 24px 0 10px;
}
.legal-section p {
  font-size: 14px; font-weight: 400; line-height: 1.8;
  color: var(--w55); margin-bottom: 14px;
}
.legal-section p strong { color: var(--w80); font-weight: 600; }
.legal-section ul, .legal-section ol {
  padding-left: 0; list-style: none;
  display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px;
}
.legal-section ul li, .legal-section ol li {
  font-size: 14px; line-height: 1.78; color: var(--w55);
  display: flex; align-items: flex-start; gap: 10px;
}
.legal-section ul li::before {
  content: ''; width: 14px; height: 1px; background: var(--lime);
  flex-shrink: 0; margin-top: 11px;
}
.legal-section ol { counter-reset: legal-counter; }
.legal-section ol li { counter-increment: legal-counter; }
.legal-section ol li::before {
  content: counter(legal-counter, decimal-leading-zero);
  font-family: var(--m); font-size: 10px; letter-spacing: .08em;
  color: var(--lime); flex-shrink: 0; margin-top: 3px; min-width: 24px;
}

/* Notice / callout box */
.legal-notice {
  border: 1px solid rgba(168,255,53,.18);
  background: rgba(168,255,53,.03);
  padding: 20px 24px; margin-bottom: 28px;
  position: relative;
}
.legal-notice::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, var(--lime), rgba(168,255,53,.2), transparent);
}
.legal-notice p { color: var(--w80); font-size: 13px; margin-bottom: 0; }
.legal-notice strong { color: var(--lime); }

/* Warning box */
.legal-warning {
  border: 1px solid rgba(255,100,100,.2);
  background: rgba(255,100,100,.03);
  padding: 20px 24px; margin-bottom: 28px;
}
.legal-warning p { color: rgba(248,247,242,.7); font-size: 13px; margin-bottom: 0; }
.legal-warning strong { color: #FF8080; }

/* ── FOOTER ── */
footer {
  border-top: 1px solid rgba(168,255,53,.08);
  padding: 48px 0 0;
}
.foot-bottom {
  max-width: 1160px; margin: 0 auto; padding: 18px 48px;
  border-top: 1px solid rgba(242,240,234,.06);
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 12px;
}
.foot-legal {
  font-family: var(--m); font-size: 10px; letter-spacing: .05em;
  color: rgba(242,240,234,.25); line-height: 1.8;
}
.foot-legal a {
  color: rgba(248,247,242,.35); text-decoration: none; transition: color .2s;
}
.foot-legal a:hover { color: var(--lime); }
.foot-badges { display: flex; gap: 6px; flex-wrap: wrap; }
.badge {
  font-family: var(--m); font-size: 9px; letter-spacing: .1em;
  text-transform: uppercase; color: var(--lime);
  border: 1px solid rgba(168,255,53,.16); padding: 3px 7px; border-radius: 2px;
}

/* ── RESPONSIVE ── */
@media (max-width: 860px) {
  nav { padding: 0 20px; }
  .w { padding: 0 20px; }
  .legal-layout { grid-template-columns: 1fr; gap: 32px; }
  .legal-toc { position: static; }
  .legal-hero { padding: 120px 0 60px; }
  .foot-bottom { flex-direction: column; text-align: center; }
}

/* ── SCROLL REVEAL ── */
.r { opacity: 0; transform: translateY(14px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.r.on { opacity: 1; transform: none; }

/* ── KEYFRAMES ── */
@keyframes ablink { 0%,100% { opacity:1; } 50% { opacity:.2; } }
