/* ============================================================
   VEYRON PRO — Web Design System
   Tokens · Base · Components  (8px grid)
   ============================================================ */

/* ---------- Fonts ---------- */
@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&family=Space+Grotesk:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500;600&display=swap');

/* ---------- Design Tokens ---------- */
:root {
  /* Accent — Indigo system (matches mobile prototype) */
  --ac-1: #5B5FFF;
  --ac-2: #8A63FF;
  --ac-glow: #6E63FF;
  --grad: linear-gradient(135deg, var(--ac-1) 0%, var(--ac-2) 100%);
  --grad-soft: linear-gradient(135deg, rgba(91,95,255,0.16), rgba(138,99,255,0.16));

  /* Backgrounds */
  --bg: #06060c;
  --bg-1: #08080f;
  --bg-2: #0d0d18;
  --surface: rgba(255,255,255,0.04);
  --surface-2: rgba(255,255,255,0.06);
  --surface-3: rgba(255,255,255,0.09);
  --surface-solid: #12121c;

  /* Lines */
  --line: rgba(255,255,255,0.08);
  --line-2: rgba(255,255,255,0.13);
  --line-3: rgba(255,255,255,0.18);

  /* Text */
  --tx: #ffffff;
  --tx-mute: rgba(235,235,245,0.62);
  --tx-faint: rgba(235,235,245,0.38);
  --tx-ghost: rgba(235,235,245,0.22);

  /* Status */
  --ok: #34C759;
  --warn: #FF9F0A;
  --err: #FF453A;

  /* Effects */
  --glow-ac: 0 18px 60px rgba(110,99,255,0.35);
  --shadow-card: 0 24px 60px rgba(0,0,0,0.5);
  --shadow-lift: 0 12px 32px rgba(0,0,0,0.4);
  --blur: blur(22px);

  /* Spacing scale (8px grid) */
  --s1: 4px;  --s2: 8px;  --s3: 12px; --s4: 16px;
  --s5: 24px; --s6: 32px; --s7: 48px; --s8: 64px;
  --s9: 96px; --s10: 128px;

  /* Radii */
  --r-sm: 10px; --r-md: 14px; --r-lg: 20px; --r-xl: 28px; --r-pill: 999px;

  /* Type */
  --f-display: 'Space Grotesk', sans-serif;
  --f-body: 'Manrope', sans-serif;
  --f-mono: 'JetBrains Mono', monospace;

  --container: 1200px;
}

/* ---------- Reset / Base ---------- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 96px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--f-body);
  background: var(--bg);
  color: var(--tx);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
::selection { background: rgba(110,99,255,0.4); color: #fff; }
a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, textarea { font-family: inherit; }

/* Atmospheric backdrop glow */
.bg-aura {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(60% 50% at 50% -8%, rgba(110,99,255,0.22) 0%, transparent 60%),
    radial-gradient(40% 40% at 88% 8%, rgba(138,99,255,0.12) 0%, transparent 55%),
    radial-gradient(45% 45% at 6% 28%, rgba(91,95,255,0.10) 0%, transparent 55%);
}
.bg-grid {
  position: fixed; inset: 0; z-index: 0; pointer-events: none; opacity: 0.4;
  background-image:
    linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(80% 60% at 50% 0%, #000 0%, transparent 75%);
  -webkit-mask-image: radial-gradient(80% 60% at 50% 0%, #000 0%, transparent 75%);
}

/* ---------- Layout ---------- */
.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 24px; }
.section { position: relative; z-index: 1; padding: var(--s9) 0; }
.section--tight { padding: var(--s8) 0; }

/* ---------- Typography ---------- */
.display { font-family: var(--f-display); font-weight: 600; letter-spacing: -0.02em; line-height: 1.05; margin: 0; }
.h-hero  { font-size: clamp(40px, 6vw, 76px); }
.h1 { font-family: var(--f-display); font-weight: 600; font-size: clamp(32px, 4.4vw, 52px); letter-spacing: -0.02em; line-height: 1.08; margin: 0; }
.h2 { font-family: var(--f-display); font-weight: 600; font-size: clamp(26px, 3vw, 38px); letter-spacing: -0.015em; line-height: 1.15; margin: 0; }
.h3 { font-family: var(--f-display); font-weight: 600; font-size: 22px; letter-spacing: -0.01em; margin: 0; }
.lead { font-size: clamp(17px, 1.5vw, 20px); color: var(--tx-mute); line-height: 1.6; margin: 0; }
.body { color: var(--tx-mute); }
.muted { color: var(--tx-mute); }
.faint { color: var(--tx-faint); }
.grad-text {
  background: var(--grad); -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}
.mono { font-family: var(--f-mono); }

/* Eyebrow / kicker */
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--f-mono); font-size: 12px; font-weight: 500;
  letter-spacing: 0.16em; text-transform: uppercase; color: var(--tx-mute);
  padding: 7px 14px; border-radius: var(--r-pill);
  background: var(--surface); border: 1px solid var(--line);
}
.eyebrow .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--ac-1); box-shadow: 0 0 10px var(--ac-glow); }

.section-head { max-width: 640px; }
.section-head.center { margin: 0 auto; text-align: center; }
.section-head .h2 { margin-top: 18px; }
.section-head .lead { margin-top: 16px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  font-weight: 700; font-size: 15px; line-height: 1;
  padding: 14px 24px; border-radius: var(--r-pill);
  transition: transform .18s ease, box-shadow .25s ease, background .2s ease, border-color .2s ease, opacity .2s;
  white-space: nowrap;
}
.btn svg { width: 18px; height: 18px; }
.btn:active { transform: translateY(1px) scale(0.99); }

.btn--primary { background: var(--grad); color: #fff; box-shadow: 0 10px 30px rgba(110,99,255,0.4); }
.btn--primary:hover { box-shadow: 0 14px 40px rgba(110,99,255,0.55); transform: translateY(-1px); }

.btn--glass { background: var(--surface-2); color: var(--tx); border: 1px solid var(--line-2); }
.btn--glass:hover { background: var(--surface-3); border-color: var(--line-3); }

.btn--ghost { background: transparent; color: var(--tx-mute); }
.btn--ghost:hover { color: var(--tx); background: var(--surface); }

.btn--sm { padding: 10px 18px; font-size: 13.5px; }
.btn--lg { padding: 17px 30px; font-size: 16px; }
.btn--block { width: 100%; }

/* ---------- Pills / Badges ---------- */
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--f-mono); font-size: 12px; font-weight: 500; letter-spacing: 0.04em;
  padding: 5px 12px; border-radius: var(--r-pill);
  background: var(--surface-2); border: 1px solid var(--line); color: var(--tx-mute);
}
.pill--ac { background: var(--grad-soft); border-color: rgba(110,99,255,0.3); color: #cfd0ff; }
.pill--ok { color: #8fe6a8; background: rgba(52,199,89,0.12); border-color: rgba(52,199,89,0.28); }
.pill .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

/* ---------- Cards ---------- */
.card {
  position: relative; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-lg); padding: var(--s6);
  transition: transform .25s ease, border-color .25s ease, background .25s ease;
}
.card--hover:hover { transform: translateY(-4px); border-color: var(--line-2); background: var(--surface-2); }
.card__icon {
  width: 48px; height: 48px; border-radius: 13px; display: grid; place-items: center;
  background: var(--grad-soft); border: 1px solid rgba(110,99,255,0.25); color: #c9caff; margin-bottom: 18px;
}
.card__icon svg { width: 24px; height: 24px; }
.card h3 { margin: 0 0 8px; }
.card p { margin: 0; color: var(--tx-mute); font-size: 15px; }

/* Glass tag chip with gradient hairline on hover */
.card--glow::before {
  content: ''; position: absolute; inset: -1px; border-radius: inherit; padding: 1px;
  background: var(--grad); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  opacity: 0; transition: opacity .3s;
}
.card--glow:hover::before { opacity: 0.6; }

/* ---------- Logo ---------- */
.logo { display: inline-flex; align-items: center; gap: 11px; }
.logo__mark {
  width: 34px; height: 34px; border-radius: 10px; background: var(--grad);
  display: grid; place-items: center; flex-shrink: 0;
  box-shadow: 0 6px 18px rgba(110,99,255,0.45), inset 0 1px 1px rgba(255,255,255,0.4);
}
.logo__mark svg { width: 19px; height: 19px; }
.logo__word {
  font-family: var(--f-display); font-weight: 700; font-size: 18px; letter-spacing: 0.01em;
  display: inline-flex; align-items: center; gap: 7px; color: #fff;
}
.logo__pro {
  font-size: 10px; font-weight: 700; letter-spacing: 0.12em; padding: 3px 7px;
  border-radius: 7px; background: var(--grad); color: #fff;
}

/* ---------- Nav ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  transition: background .3s, border-color .3s, backdrop-filter .3s;
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  background: rgba(8,8,15,0.72); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur);
  border-bottom-color: var(--line);
}
.nav__inner { display: flex; align-items: center; justify-content: space-between; height: 70px; }
.nav__links { display: flex; align-items: center; gap: 4px; }
.nav__links a {
  font-size: 14.5px; font-weight: 600; color: var(--tx-mute); padding: 9px 14px; border-radius: 10px;
  white-space: nowrap;
  transition: color .18s, background .18s;
}
.nav__links a:hover { color: var(--tx); background: var(--surface); }
.nav__links a.active { color: var(--tx); }
.nav__cta { display: flex; align-items: center; gap: 10px; }
.nav__burger { display: none; width: 42px; height: 42px; border-radius: 11px; background: var(--surface-2); border: 1px solid var(--line-2); place-items: center; }
.nav__burger svg { width: 22px; height: 22px; }

.mobile-menu {
  position: fixed; inset: 70px 0 0; z-index: 49; background: rgba(6,6,12,0.96);
  backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur);
  padding: 24px; display: none; flex-direction: column; gap: 6px;
}
.mobile-menu.open { display: flex; }
.mobile-menu a { font-family: var(--f-display); font-size: 22px; font-weight: 600; padding: 16px 12px; border-bottom: 1px solid var(--line); color: var(--tx); }
.mobile-menu .btn { margin-top: 16px; }

/* ---------- Footer ---------- */
.footer { position: relative; z-index: 1; border-top: 1px solid var(--line); padding: var(--s8) 0 var(--s6); }
.footer__grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 48px; }
.footer__brand p { color: var(--tx-mute); font-size: 14.5px; max-width: 280px; margin: 18px 0 0; }
.footer__col h4 { font-family: var(--f-mono); font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--tx-faint); margin: 0 0 18px; font-weight: 500; }
.footer__col a { display: block; color: var(--tx-mute); font-size: 14.5px; padding: 7px 0; transition: color .18s; }
.footer__col a:hover { color: var(--tx); }
.footer__bottom { display: flex; align-items: center; justify-content: space-between; margin-top: var(--s7); padding-top: var(--s5); border-top: 1px solid var(--line); }
.footer__bottom p { color: var(--tx-faint); font-size: 13px; margin: 0; }
.footer__socials { display: flex; gap: 10px; }
.footer__socials a { width: 38px; height: 38px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line); display: grid; place-items: center; color: var(--tx-mute); transition: all .18s; }
.footer__socials a:hover { color: var(--tx); border-color: var(--line-2); background: var(--surface-2); }
.footer__socials svg { width: 18px; height: 18px; }

/* ---------- Inputs ---------- */
.field { display: flex; flex-direction: column; gap: 8px; }
.field label { font-size: 13px; font-weight: 600; color: var(--tx-mute); }
.input {
  width: 100%; padding: 13px 16px; border-radius: var(--r-md);
  background: var(--surface-2); border: 1px solid var(--line-2); color: var(--tx); font-size: 15px;
  transition: border-color .18s, box-shadow .18s, background .18s;
}
.input::placeholder { color: var(--tx-faint); }
.input:focus { outline: none; border-color: rgba(110,99,255,0.6); box-shadow: 0 0 0 4px rgba(110,99,255,0.16); background: var(--surface-3); }
.input--icon { padding-left: 44px; }
.input-wrap { position: relative; }
.input-wrap > svg { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--tx-faint); }

/* ---------- Reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s cubic-bezier(.2,.7,.2,1), transform .7s cubic-bezier(.2,.7,.2,1); }
.reveal.in { opacity: 1; transform: none; }
.reveal.d1 { transition-delay: .07s; }
.reveal.d2 { transition-delay: .14s; }
.reveal.d3 { transition-delay: .21s; }
.reveal.d4 { transition-delay: .28s; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ---------- Utilities ---------- */
.divider { height: 1px; background: var(--line); border: 0; }
.center { text-align: center; }
.flex { display: flex; }
.hr-fade { height: 1px; border: 0; background: linear-gradient(90deg, transparent, var(--line-2), transparent); }

/* ============================================================
   LEGAL PAGES (Privacy / Terms)
   ============================================================ */
.legal-hero { position: relative; z-index: 1; padding: 140px 0 40px; }
.legal-hero .eyebrow { margin-bottom: 22px; }
.legal-hero h1 { max-width: 760px; }
.legal-hero .meta { display: flex; align-items: center; gap: 18px; margin-top: 22px; flex-wrap: wrap; }
.legal-hero .meta .pill { font-size: 12.5px; }
.legal__search { position: relative; max-width: 440px; margin-top: 30px; }
.legal__search svg { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--tx-faint); }
.legal__search input {
  width: 100%; padding: 14px 16px 14px 46px; border-radius: var(--r-md);
  background: var(--surface-2); border: 1px solid var(--line-2); color: var(--tx); font-size: 15px;
  transition: border-color .18s, box-shadow .18s, background .18s;
}
.legal__search input::placeholder { color: var(--tx-faint); }
.legal__search input:focus { outline: none; border-color: rgba(110,99,255,0.6); box-shadow: 0 0 0 4px rgba(110,99,255,0.16); }

.legal-layout { position: relative; z-index: 1; padding: 30px 0 var(--s9); }
.legal-grid { display: grid; grid-template-columns: 264px 1fr; gap: 56px; align-items: start; }

/* sidebar */
.legal__aside { position: sticky; top: 100px; }
.legal__aside h4 { font-family: var(--f-mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--tx-faint); margin: 0 0 14px; font-weight: 500; }
.legal__progress { height: 3px; border-radius: 3px; background: var(--surface-3); overflow: hidden; margin-bottom: 20px; }
.legal__progress span { display: block; height: 100%; width: 0; background: var(--grad); transition: width .15s linear; }
.legal__nav { display: flex; flex-direction: column; gap: 2px; }
.legal__nav a {
  display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 9px;
  font-size: 14px; color: var(--tx-mute); border-left: 2px solid transparent; transition: all .18s;
}
.legal__nav a .n { font-family: var(--f-mono); font-size: 11px; color: var(--tx-ghost); width: 18px; flex-shrink: 0; }
.legal__nav a:hover { color: var(--tx); background: var(--surface); }
.legal__nav a.active { color: #fff; background: var(--grad-soft); border-left-color: var(--ac-1); }
.legal__nav a.active .n { color: #c9caff; }

/* content */
.legal__content { max-width: 760px; }
.legal__section { scroll-margin-top: 100px; padding: 28px 0; border-bottom: 1px solid var(--line); }
.legal__section:first-child { padding-top: 0; }
.legal__section:last-child { border-bottom: 0; }
.legal__section .sec-num { font-family: var(--f-mono); font-size: 13px; color: var(--ac-1); letter-spacing: 0.08em; }
.legal__section h2 { font-family: var(--f-display); font-size: 27px; font-weight: 600; letter-spacing: -0.015em; margin: 10px 0 18px; }
.legal__section p { color: var(--tx-mute); font-size: 16px; line-height: 1.72; margin: 0 0 16px; }
.legal__section p:last-child { margin-bottom: 0; }
.legal__section strong { color: var(--tx); font-weight: 700; }
.legal__section ul { margin: 0 0 16px; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 12px; }
.legal__section ul li { position: relative; padding-left: 28px; color: var(--tx-mute); font-size: 15.5px; line-height: 1.6; }
.legal__section ul li::before { content: ''; position: absolute; left: 6px; top: 9px; width: 7px; height: 7px; border-radius: 2px; background: var(--grad); }
.legal-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 22px 24px; margin: 18px 0; }
.legal-card.accent { background: var(--grad-soft); border-color: rgba(110,99,255,0.25); }
.legal-card h5 { margin: 0 0 8px; font-family: var(--f-display); font-size: 16px; font-weight: 600; display: flex; align-items: center; gap: 9px; }
.legal-card h5 svg { width: 18px; height: 18px; color: var(--ac-1); }
.legal-card p { font-size: 14.5px !important; margin: 0 !important; }
.legal__empty { display: none; text-align: center; padding: 60px 20px; color: var(--tx-faint); }

@media (max-width: 900px) {
  .legal-grid { grid-template-columns: 1fr; gap: 8px; }
  .legal__aside { position: static; margin-bottom: 32px; padding: 20px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); }
  .legal__nav { flex-direction: row; flex-wrap: wrap; gap: 6px; }
  .legal__nav a { border-left: 0; border: 1px solid var(--line); }
  .legal__nav a.active { border-color: rgba(110,99,255,0.4); }
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .nav__links, .nav__cta .btn--glass { display: none; }
  .nav__burger { display: grid; }
  .footer__grid { grid-template-columns: 1fr 1fr; gap: 36px; }
  .footer__brand { grid-column: 1 / -1; }
  .section { padding: var(--s8) 0; }
}
@media (max-width: 560px) {
  .footer__grid { grid-template-columns: 1fr; }
  .footer__bottom { flex-direction: column; gap: 16px; align-items: flex-start; }
  .container { padding: 0 18px; }
}
