/* ==========================================================================
   VaultScore design system — shared across every page in web/.
   Dark, fintech-grade UI. One source of truth for tokens + components so
   index / report / methodology / track / developers all feel like one
   product, not five prototypes stapled together.
   ========================================================================== */

:root {
  color-scheme: dark;

  /* Surfaces */
  --bg: #08090d;
  --bg-elevated: #0d0f16;
  --panel: #12151c;
  --panel-2: #171b24;
  --border: #23283333;
  --border-solid: #262b36;
  --border-strong: #333a49;

  /* Text */
  --text: #eef0f3;
  --text-dim: #b7bec9;
  --muted: #8992a3;
  --faint: #5b6474;

  /* Brand */
  --accent: #5eead4;
  --accent-dim: #2dd4bf;
  --accent-ink: #04211c;
  --violet: #a78bfa;
  --violet-dim: #8b5cf6;
  --gold: #fbbf24;

  /* Semantic */
  --positive: #5eead4;
  --negative: #fb7185;
  --warning: #fbbf24;

  /* Effects */
  --glow: 0 0 0 1px rgba(94, 234, 212, 0.15), 0 8px 40px -8px rgba(94, 234, 212, 0.25);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 8px 24px -8px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 24px 64px -16px rgba(0, 0, 0, 0.6);
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --radius-full: 999px;

  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-display: "Space Grotesk", var(--font-sans);
  --font-mono: "IBM Plex Mono", "SF Mono", Menlo, Consolas, monospace;

  --container: 1120px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  position: relative;
  overflow-x: hidden;
}

/* Ambient background: a couple of soft radial glows fixed behind everything. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(60vw 60vw at 85% -10%, rgba(94, 234, 212, 0.10), transparent 60%),
    radial-gradient(50vw 50vw at -10% 20%, rgba(167, 139, 250, 0.08), transparent 60%),
    radial-gradient(80vw 80vw at 50% 120%, rgba(94, 234, 212, 0.05), transparent 60%);
  pointer-events: none;
}

img, svg { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0;
  color: #fff;
}

p { margin: 0; }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 96px 0;
  position: relative;
}

.section-tight { padding: 56px 0; }

@media (max-width: 720px) {
  .section { padding: 64px 0; }
  .container { padding: 0 20px; }
}

/* ---------- Eyebrow / kicker ---------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  background: rgba(94, 234, 212, 0.08);
  border: 1px solid rgba(94, 234, 212, 0.2);
  padding: 6px 14px;
  border-radius: var(--radius-full);
}
.eyebrow .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
}

/* ---------- Nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(16px) saturate(140%);
  background: rgba(8, 9, 13, 0.72);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 19px;
  color: #fff;
}
.brand-mark {
  width: 28px; height: 28px;
  flex-shrink: 0;
  display: block;
  filter: drop-shadow(0 4px 10px rgba(94, 234, 212, 0.35));
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  font-size: 14.5px;
  color: var(--text-dim);
}
.nav-links a { transition: color 0.15s ease; white-space: nowrap; }
.nav-links a:hover { color: #fff; }
.nav-cta { display: flex; align-items: center; gap: 12px; }
.nav-toggle {
  display: none;
  background: none; border: 1px solid var(--border-solid); border-radius: 8px;
  color: var(--text); padding: 8px 10px; cursor: pointer;
}

@media (max-width: 860px) {
  .nav-links { display: none; }
  .nav-toggle { display: inline-flex; }
  .nav-links.nav-links-open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-elevated);
    border-bottom: 1px solid var(--border-solid);
    padding: 16px 24px 20px;
    gap: 4px;
  }
  .nav-links.nav-links-open a { padding: 10px 0; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 14.5px;
  font-weight: 600;
  padding: 12px 22px;
  border-radius: var(--radius-full);
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, border-color 0.15s ease;
  white-space: nowrap;
}
.btn:active { transform: scale(0.97); }
.btn-primary {
  background: var(--accent);
  color: var(--accent-ink);
  box-shadow: 0 4px 20px -4px rgba(94, 234, 212, 0.45);
}
.btn-primary:hover { background: #7ff2df; box-shadow: 0 6px 28px -4px rgba(94, 234, 212, 0.6); }
.btn-secondary {
  background: rgba(255,255,255,0.04);
  color: var(--text);
  border-color: var(--border-solid);
}
.btn-secondary:hover { border-color: var(--border-strong); background: rgba(255,255,255,0.07); }
.btn-ghost {
  background: transparent;
  color: var(--text-dim);
}
.btn-ghost:hover { color: #fff; }
.btn-sm { padding: 8px 16px; font-size: 13.5px; }
.btn-lg { padding: 15px 30px; font-size: 15.5px; }
.btn:disabled { opacity: 0.5; cursor: default; transform: none; }
.btn-block { width: 100%; }

/* ---------- Cards ---------- */
.card {
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  border: 1px solid var(--border-solid);
  border-radius: var(--radius-lg);
  padding: 28px;
}
.card-hover { transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease; }
.card-hover:hover {
  transform: translateY(-3px);
  border-color: rgba(94, 234, 212, 0.35);
  box-shadow: var(--shadow-md);
}

/* ---------- Badges / pills ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 600;
  padding: 4px 11px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-solid);
  color: var(--muted);
}
.badge-positive { color: var(--positive); border-color: rgba(94,234,212,0.3); background: rgba(94,234,212,0.06); }
.badge-negative { color: var(--negative); border-color: rgba(251,113,133,0.3); background: rgba(251,113,133,0.06); }
.badge-warning { color: var(--warning); border-color: rgba(251,191,36,0.3); background: rgba(251,191,36,0.06); }

/* ---------- Inputs ---------- */
.input-row {
  display: flex;
  gap: 8px;
  background: var(--panel);
  border: 1px solid var(--border-solid);
  border-radius: var(--radius-md);
  padding: 8px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.input-row:focus-within {
  border-color: rgba(94, 234, 212, 0.5);
  box-shadow: 0 0 0 3px rgba(94, 234, 212, 0.12);
}
.input-row input {
  flex: 1;
  min-width: 0;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text);
  font-size: 15px;
  font-family: var(--font-mono);
  padding: 12px 14px;
}
.input-row input::placeholder { color: var(--faint); font-family: var(--font-sans); }

/* ---------- Typography helpers ---------- */
.text-muted { color: var(--muted); }
.text-dim { color: var(--text-dim); }
.text-accent { color: var(--accent); }
.text-gradient {
  background: linear-gradient(90deg, #fff 20%, var(--accent) 60%, var(--violet) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.mono { font-family: var(--font-mono); }
.center { text-align: center; }

/* ---------- Grid ---------- */
.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

/* ---------- Footer ---------- */
.footer {
  border-top: 1px solid var(--border);
  padding: 56px 0 40px;
  color: var(--muted);
  font-size: 14px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr repeat(3, 1fr);
  gap: 32px;
  margin-bottom: 40px;
}
.footer-col h4 {
  font-size: 12.5px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--faint);
  margin-bottom: 14px;
  font-family: var(--font-sans);
  font-weight: 600;
}
.footer-col a, .footer-col p { display: block; color: var(--muted); margin-bottom: 10px; transition: color 0.15s ease; }
.footer-col a:hover { color: var(--text); }
.footer-bottom {
  display: flex; justify-content: space-between; align-items: center;
  padding-top: 24px; border-top: 1px solid var(--border);
  flex-wrap: wrap; gap: 12px;
}
@media (max-width: 760px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

/* ---------- Scroll reveal ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.in { opacity: 1; transform: translateY(0); }

/* ---------- Score gauge ---------- */
.gauge-wrap { position: relative; width: 220px; height: 220px; margin: 0 auto; }
.gauge-wrap svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.gauge-track { fill: none; stroke: var(--border-solid); stroke-width: 12; }
.gauge-fill { fill: none; stroke-width: 12; stroke-linecap: round; transition: stroke-dashoffset 1.2s cubic-bezier(0.16, 1, 0.3, 1); }
.gauge-center {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.gauge-score { font-family: var(--font-display); font-size: 52px; font-weight: 700; color: #fff; line-height: 1; }
.gauge-scale { font-size: 12.5px; color: var(--muted); margin-top: 4px; font-family: var(--font-mono); }

/* ---------- Utility ---------- */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-8 { gap: 8px; } .gap-12 { gap: 12px; } .gap-16 { gap: 16px; } .gap-24 { gap: 24px; }
.mt-8 { margin-top: 8px; } .mt-16 { margin-top: 16px; } .mt-24 { margin-top: 24px; } .mt-32 { margin-top: 32px; } .mt-48 { margin-top: 48px; }
.mb-8 { margin-bottom: 8px; } .mb-16 { margin-bottom: 16px; } .mb-24 { margin-bottom: 24px; }
.hidden { display: none !important; }
.w-full { width: 100%; }

/* ---------- Spinner ---------- */
.spinner {
  width: 16px; height: 16px;
  border: 2px solid rgba(255,255,255,0.2);
  border-top-color: currentColor;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Code block ---------- */
pre.code-block {
  background: #0a0c11;
  border: 1px solid var(--border-solid);
  border-radius: var(--radius-md);
  padding: 20px 22px;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 13.5px;
  line-height: 1.7;
  color: #c9d1e0;
}
code { font-family: var(--font-mono); }
pre.code-block .k { color: var(--accent); }
pre.code-block .s { color: var(--gold); }
pre.code-block .c { color: var(--faint); }
