/* ============================================================
   QuantVault — Main Stylesheet
   Owns: all visual design tokens, layout, component styles
   Does NOT own: JS behavior, server routing, data layer
   ============================================================ */

/* ── Tokens ── */
:root {
  --bg:         #0D1117;
  --surface:    #161B22;
  --border:     #30363D;
  --text:       #E6EDF3;
  --muted:      #8B949E;
  --gold:       #D4AF37;
  --gold-dim:   rgba(212, 175, 55, 0.12);
  --gold-glow:  rgba(212, 175, 55, 0.20);
  --profit:     #00C853;
  --loss:       #FF3D00;
  --radius:     8px;
  --max-w:      1280px;
  --gutter:     80px;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { text-decoration: none; color: inherit; }
img, svg { display: block; }

/* ── Utility ── */
.mono  { font-family: 'Roboto Mono', monospace; }
.profit { color: var(--profit); }
.loss   { color: var(--loss); }
.accent-gold { color: var(--gold); }

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

/* ── Buttons ── */
.btn-gold {
  display: inline-flex;
  align-items: center;
  padding: 10px 22px;
  background: var(--gold);
  color: #0D1117;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 0.875rem;
  border-radius: 6px;
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
  white-space: nowrap;
}
.btn-gold:hover {
  background: #e8c44a;
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(212, 175, 55, 0.35);
}
.btn-gold.btn-large { padding: 14px 32px; font-size: 1rem; border-radius: 8px; }

.btn-ghost {
  display: inline-flex;
  align-items: center;
  padding: 14px 32px;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--muted);
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  font-size: 1rem;
  border-radius: 8px;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}
.btn-ghost:hover {
  border-color: var(--muted);
  color: var(--text);
  background: rgba(230, 237, 243, 0.04);
}

/* ============================================================
   NAV
   ============================================================ */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 0;
  transition: background 0.3s, border-bottom 0.3s, backdrop-filter 0.3s;
}
.nav--scrolled {
  background: rgba(13, 17, 23, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 20px var(--gutter);
  display: flex;
  align-items: center;
  gap: 40px;
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: -0.01em;
  color: var(--text);
  flex-shrink: 0;
}
.nav-logo-icon { width: 32px; height: 32px; }

.nav-links {
  display: flex;
  list-style: none;
  gap: 32px;
  margin: 0 auto; /* center */
}
.nav-links a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--muted);
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--text); }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  min-height: 100vh;
  padding: 140px var(--gutter) 80px;
  overflow: hidden;
  display: flex;
  align-items: flex-start;
}

/* Dot-grid background */
.hero-bg-grid {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle, rgba(48, 54, 61, 0.6) 1px, transparent 1px);
  background-size: 32px 32px;
  pointer-events: none;
  opacity: 0.5;
}

/* Radial gold glow behind hero */
.hero-glow {
  position: absolute;
  top: -200px;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 800px;
  background: radial-gradient(ellipse at center, rgba(212, 175, 55, 0.08) 0%, transparent 70%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  width: 100%;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  border: 1px solid var(--border);
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--muted);
  margin-bottom: 32px;
  background: rgba(22, 27, 34, 0.8);
}
.badge-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--profit);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.5; transform: scale(0.85); }
}

.hero-h1 {
  font-size: clamp(40px, 5vw, 64px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: var(--text);
  margin-bottom: 24px;
  max-width: 760px;
}

.hero-sub {
  font-size: clamp(16px, 1.5vw, 20px);
  font-weight: 400;
  color: var(--muted);
  margin-bottom: 40px;
  max-width: 580px;
  line-height: 1.6;
}

.hero-cta-row {
  display: flex;
  gap: 16px;
  align-items: center;
  margin-bottom: 56px;
  flex-wrap: wrap;
  justify-content: center;
}

/* Hero stats strip */
.hero-stats {
  display: flex;
  align-items: center;
  gap: 40px;
  margin-bottom: 64px;
  flex-wrap: wrap;
  justify-content: center;
}
.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.stat-item.is-visible { opacity: 1; transform: translateY(0); }
.stat-num { font-size: 1.75rem; font-weight: 700; color: var(--text); }
.stat-label { font-size: 0.75rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }
.stat-divider {
  width: 1px; height: 36px;
  background: var(--border);
}

/* ── Dashboard Mockup ── */
.dashboard-wrap {
  position: relative;
  width: 100%;
  max-width: 860px;
}
.dashboard-glow-ring {
  /* Radial glow behind the mockup — 100px blur, 20% opacity gold */
  position: absolute;
  inset: -60px;
  border-radius: 24px;
  background: radial-gradient(ellipse at center, rgba(212, 175, 55, 0.20) 0%, transparent 70%);
  filter: blur(100px);
  pointer-events: none;
  z-index: 0;
}
.dashboard-mockup {
  position: relative;
  z-index: 1;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  box-shadow:
    0 0 0 1px rgba(212, 175, 55, 0.06),
    0 24px 64px rgba(0, 0, 0, 0.5);
}
.db-header {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  background: rgba(13, 17, 23, 0.6);
}
.db-dot { width: 10px; height: 10px; border-radius: 50%; }
.db-dot.red    { background: #FF5F57; }
.db-dot.amber  { background: #FFBD2E; }
.db-dot.green-dot { background: #28CA41; }
.db-title {
  margin-left: 8px;
  font-size: 0.75rem;
  color: var(--muted);
}
.db-body { display: flex; }
.db-sidebar {
  width: 120px;
  padding: 16px 12px;
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex-shrink: 0;
}
.db-nav-item {
  padding: 7px 10px;
  border-radius: 5px;
  font-size: 0.75rem;
  color: var(--muted);
  cursor: default;
  transition: background 0.15s, color 0.15s;
}
.db-nav-item.active {
  background: rgba(212, 175, 55, 0.10);
  color: var(--gold);
}
.db-main { flex: 1; padding: 16px; }
.db-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 16px; }
.db-card {
  background: rgba(13, 17, 23, 0.6);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 12px;
}
.db-card-label { font-size: 0.65rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 6px; }
.db-card-value { font-size: 1.2rem; font-weight: 700; margin-bottom: 4px; }
.db-card-sub, .db-card-limit { font-size: 0.65rem; color: var(--muted); }
.db-progress-bar {
  margin-top: 8px;
  height: 3px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
}
.db-progress-fill {
  height: 100%;
  background: var(--loss);
  border-radius: 2px;
  transition: width 1s ease;
}
.db-chart-area { position: relative; }
.db-chart-svg { width: 100%; height: 72px; }
.db-chart-label { font-size: 0.65rem; color: var(--muted); text-align: right; margin-top: 4px; }

/* ============================================================
   INTEGRATIONS BANNER
   ============================================================ */
.integrations {
  padding: 48px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  overflow: hidden;
}
.integrations-label {
  text-align: center;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 28px;
}
.integrations-track-wrap {
  overflow: hidden;
  mask-image: linear-gradient(to right, transparent 0%, black 10%, black 90%, transparent 100%);
  -webkit-mask-image: linear-gradient(to right, transparent 0%, black 10%, black 90%, transparent 100%);
}
.integrations-track {
  display: flex;
  gap: 40px;
  animation: scroll-track 20s linear infinite;
  width: max-content;
}
@keyframes scroll-track {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
.integrations-track:hover { animation-play-state: paused; }

.integration-chip {
  display: flex;
  align-items: center;
  gap: 12px;
  opacity: 0.5;
  transition: opacity 0.25s;
  cursor: default;
  flex-shrink: 0;
}
.integration-chip:hover { opacity: 1; }
.int-icon { width: 36px; height: 36px; border-radius: 6px; flex-shrink: 0; }
.integration-chip span {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--muted);
  white-space: nowrap;
}

/* ============================================================
   FEATURES
   ============================================================ */
.features {
  padding: 120px 0;
}
.section-header {
  text-align: center;
  margin-bottom: 72px;
}
.section-eyebrow {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--gold);
  margin-bottom: 16px;
}
.section-h2 {
  font-size: clamp(28px, 3.5vw, 44px);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.15;
  color: var(--text);
  margin-bottom: 16px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}
.section-sub {
  font-size: 1rem;
  color: var(--muted);
  max-width: 520px;
  margin: 0 auto;
  line-height: 1.65;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: border-color 0.25s, transform 0.25s, box-shadow 0.25s;
  opacity: 0;
  transform: translateY(20px);
}
.feature-card.is-visible {
  opacity: 1;
  transform: translateY(0);
  transition: border-color 0.25s, transform 0.5s ease, box-shadow 0.25s, opacity 0.5s ease;
}
.feature-card:hover {
  border-color: rgba(212, 175, 55, 0.35);
  transform: translateY(-4px);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.3);
}

/* Feature icon */
.feature-icon-wrap {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.icon-shield { background: rgba(255, 61, 0, 0.12); color: var(--loss); }
.icon-clock  { background: rgba(212, 175, 55, 0.12); color: var(--gold); }
.icon-sync   { background: rgba(0, 200, 83, 0.12); color: var(--profit); }
.feature-icon { width: 22px; height: 22px; }

/* Feature tag */
.feature-tag {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  padding: 4px 10px;
  border: 1px solid var(--border);
  border-radius: 100px;
  display: inline-block;
  align-self: flex-start;
}
.loss-tag { border-color: rgba(255, 61, 0, 0.3); color: var(--loss); }

.feature-h3 {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
}
.feature-p {
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.65;
  flex: 1;
}

/* Feature stat */
.feature-stat {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: rgba(13, 17, 23, 0.7);
  border: 1px solid var(--border);
  border-radius: 6px;
  margin-top: auto;
}
.feature-stat .mono { font-size: 1rem; font-weight: 700; }
.feature-stat-label { font-size: 0.75rem; color: var(--muted); }

/* Session bars */
.session-breakdown {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: auto;
}
.session-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.session-name { font-size: 0.75rem; color: var(--muted); width: 64px; flex-shrink: 0; }
.session-bar-track {
  flex: 1;
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
}
.session-bar-fill { height: 100%; border-radius: 2px; transition: width 1s ease; }
.profit-bar { background: var(--profit); }
.loss-bar   { background: var(--loss); }
.session-pct { font-size: 0.75rem; font-weight: 700; width: 36px; text-align: right; flex-shrink: 0; }

/* Journal preview */
.journal-preview {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: auto;
  padding: 12px;
  background: rgba(13, 17, 23, 0.7);
  border: 1px solid var(--border);
  border-radius: 6px;
}
.journal-row {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.75rem;
}
.journal-pair { color: var(--text); font-weight: 500; flex: 1; }
.journal-lots { color: var(--muted); flex-shrink: 0; }
.journal-time { color: var(--muted); flex-shrink: 0; }

/* ============================================================
   CTA SECTION
   ============================================================ */
.cta-section {
  padding: 120px 0;
  position: relative;
  overflow: hidden;
  border-top: 1px solid var(--border);
}
.cta-inner {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 20px;
}
.cta-glow {
  position: absolute;
  inset: -100px;
  background: radial-gradient(ellipse at center, rgba(212, 175, 55, 0.10) 0%, transparent 65%);
  pointer-events: none;
}
.cta-eyebrow {
  font-size: 0.75rem;
  color: var(--muted);
  letter-spacing: 0.04em;
}
.cta-h2 {
  font-size: clamp(28px, 3.5vw, 48px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: var(--text);
}
.cta-sub {
  font-size: 1rem;
  color: var(--muted);
  max-width: 440px;
  line-height: 1.6;
}
.btn-cta-main { font-size: 1.1rem; padding: 16px 40px; }
.cta-fine { font-size: 0.75rem; color: var(--muted); margin-top: -4px; }

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  border-top: 1px solid var(--border);
  padding: 32px 0;
}
.footer-inner {
  display: flex;
  align-items: center;
  gap: 32px;
  flex-wrap: wrap;
}
.footer-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--text);
  opacity: 0.8;
  transition: opacity 0.2s;
}
.footer-logo:hover { opacity: 1; }
.footer-logo-icon { width: 20px; height: 20px; }
.footer-links {
  display: flex;
  gap: 24px;
  margin-left: auto;
}
.footer-links a {
  font-size: 0.8rem;
  color: var(--muted);
  transition: color 0.2s;
}
.footer-links a:hover { color: var(--text); }
.footer-copy { font-size: 0.75rem; color: var(--muted); }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
  :root { --gutter: 40px; }
  .feature-grid { grid-template-columns: 1fr 1fr; }
  .db-sidebar { display: none; }
  .db-row { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 768px) {
  :root { --gutter: 24px; }
  .nav-links { display: none; }
  .nav-inner { justify-content: space-between; }
  .hero { padding: 120px 24px 60px; }
  .hero-stats { gap: 20px; }
  .stat-divider { display: none; }
  .feature-grid { grid-template-columns: 1fr; }
  .db-row { grid-template-columns: 1fr; }
  .hero-cta-row { flex-direction: column; }
  .hero-cta-row .btn-ghost { width: 100%; justify-content: center; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
  .footer-links { margin-left: 0; }
}
