/* QMI AlphaBots — institutional dark system
   Type: Fraunces (Tiempos-style display serif) + Inter (body) + JetBrains Mono (data)
   Palette: deep charcoal base + brochure-faithful asset accents */
:root {
  /* Surfaces */
  --bg-0: oklch(0.13 0.008 240);
  --bg-1: oklch(0.17 0.009 240);
  --bg-2: oklch(0.21 0.010 240);
  --bg-3: oklch(0.26 0.011 240);
  --line: oklch(0.30 0.012 240);
  --line-soft: oklch(0.24 0.010 240);
  --fg-0: oklch(0.97 0.004 240);
  --fg-1: oklch(0.86 0.006 240);
  --fg-2: oklch(0.70 0.008 240);
  --fg-3: oklch(0.62 0.010 240);

  /* Brochure-faithful asset accents */
  --a-btc: #3B7ED6;        /* Bitcoin AlphaBot navy blue (from brochure art) */
  --a-btc-soft: #6FA3E8;
  --a-eth: #C43032;        /* Ethereum red */
  --a-eth-soft: #E25558;
  --a-gold: #D4AF37;       /* Gold metallic */
  --a-gold-soft: #E8C760;
  --a-silver: #C0C8D0;     /* Silver steel */
  --a-silver-soft: #DDE3E9;
  --a-sol: #9945FF;        /* Solana purple */
  --a-sol-soft: #B47BFF;

  --pos: oklch(0.78 0.14 150);
  --neg: oklch(0.70 0.18 25);

  --radius: 4px;
  --radius-lg: 10px;

  /* Typography — modern hedge-fund magazine */
  --font-display: 'Fraunces', 'Tiempos', 'Domaine', Georgia, serif;
  --font-body: 'Manrope', system-ui, sans-serif;
  --font-mono: 'Azeret Mono', ui-monospace, monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body {
  background: var(--bg-0);
  color: var(--fg-0);
  font-family: var(--font-body);
  font-feature-settings: 'ss01', 'cv11';
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body { overflow-x: hidden; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: -0.02em;
  font-feature-settings: 'ss01';
}
em, .display-italic {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 300;
  font-variation-settings: 'SOFT' 100;
  color: var(--fg-1);
}

/* Global grid backdrop */
.bg-grid {
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background-image:
    linear-gradient(var(--line-soft) 1px, transparent 1px),
    linear-gradient(90deg, var(--line-soft) 1px, transparent 1px);
  background-size: 120px 120px;
  opacity: 0.22;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, black 20%, transparent 80%);
}

/* Layout primitives */
.container { max-width: 1360px; margin: 0 auto; padding: 0 40px; position: relative; z-index: 1; }
@media (max-width: 768px) { .container { padding: 0 20px; } }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--fg-2);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.eyebrow::before {
  content: ''; width: 6px; height: 6px; background: var(--fg-2); border-radius: 50%;
}

.mono { font-family: var(--font-mono); font-feature-settings: 'tnum' 1; }
.divider { height: 1px; background: var(--line-soft); border: 0; }

/* Buttons */
.site-nav::before {
  content: ''; position: absolute; inset: 0; z-index: 0;
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background 0.2s ease, border-color 0.2s ease, backdrop-filter 0.2s ease;
  pointer-events: none;
}
.site-nav.scrolled::before {
  background: color-mix(in oklch, var(--bg-0) 82%, transparent);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid var(--line-soft);
}
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 13px 20px;
  border: 1px solid var(--line);
  background: var(--bg-1);
  color: var(--fg-0);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  transition: all 0.15s ease;
  border-radius: var(--radius);
}
.btn:hover { background: var(--bg-2); border-color: var(--fg-2); transform: translateY(-1px); }
.btn-primary {
  background: var(--fg-0); color: var(--bg-0); border-color: var(--fg-0);
}
.btn-primary:hover { background: var(--fg-1); border-color: var(--fg-1); }
.btn .arrow { width: 9px; height: 9px; border-top: 1px solid currentColor; border-right: 1px solid currentColor; transform: rotate(45deg); }

/* Section structure */
section { position: relative; padding: 120px 0; z-index: 1; }
@media (max-width: 768px) { section { padding: 80px 0; } }
.section-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 56px; margin-bottom: 74px; flex-wrap: wrap; }
.section-head h2 {
  font-size: clamp(36px, 4.4vw, 60px);
  font-weight: 400;
  letter-spacing: -0.025em;
  line-height: 1.02;
  max-width: 760px;
}
.section-head p { color: var(--fg-2); max-width: 470px; font-size: 15px; line-height: 1.62; }

/* Cards */
.card {
  background: linear-gradient(180deg, var(--bg-1), var(--bg-0));
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-lg);
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.card:hover { border-color: var(--line); }

/* Utility */
.row { display: flex; gap: 24px; }
.grid { display: grid; gap: 24px; }
.text-pos { color: var(--pos); }
.text-neg { color: var(--neg); }
.text-dim { color: var(--fg-2); }
.tabular { font-variant-numeric: tabular-nums; }

/* Scrollbars */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--bg-0); }
::-webkit-scrollbar-thumb { background: var(--bg-3); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--fg-3); }

:focus-visible { outline: 1px solid var(--fg-1); outline-offset: 2px; }

/* Page load fade-in */
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
body { animation: fadeIn 0.4s ease-out; }

/* Card hover lift */
.card:hover, .m-card:hover, .kpi:hover { transform: translateY(-2px); box-shadow: 0 8px 32px rgba(0,0,0,0.3); }
.card, .m-card, .kpi { transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease; }

/* Consistent btn sizing */
.btn { padding: 12px 20px; font-size: 11px; }

/* Back to top */
.back-to-top {
  position: fixed; bottom: 24px; right: 24px; z-index: 90;
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--bg-2); border: 1px solid var(--line);
  color: var(--fg-1); display: flex; align-items: center; justify-content: center;
  cursor: pointer; opacity: 0; pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
}
.back-to-top.visible { opacity: 1; pointer-events: auto; }
.back-to-top:hover { background: var(--bg-3); transform: translateY(-2px); }

/* Smooth scroll offset */
html { scroll-padding-top: 80px; }

/* Mobile hamburger */
.hamburger {
  display: none; width: 32px; height: 32px; border: 1px solid var(--line);
  border-radius: 4px; align-items: center; justify-content: center;
  cursor: pointer; background: transparent; color: var(--fg-0);
  flex-shrink: 0;
}
.mobile-menu {
  display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  background: var(--bg-0); z-index: 99; padding: 80px 40px 40px;
  flex-direction: column; gap: 0;
}
.mobile-menu.open { display: flex; }
.mobile-menu a {
  padding: 16px 0; font-family: var(--font-mono); font-size: 14px;
  text-transform: uppercase; letter-spacing: 0.1em; color: var(--fg-1);
  border-bottom: 1px solid var(--line-soft);
}
.mobile-menu .close-btn {
  position: absolute; top: 20px; right: 20px;
  width: 32px; height: 32px; display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--line); border-radius: 4px; cursor: pointer;
  background: transparent; color: var(--fg-0); font-size: 16px;
}

@media (max-width: 1100px) {
  .hamburger { display: flex; }
}

/* Minimal mobile nav: logo + primary CTA only */
@media (max-width: 700px) {
  .nav-cta-secondary { display: none !important; }
}

/* Reduced motion: disable decorative animation loops */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto !important; }
}

/* Footer mobile */
@media (max-width: 600px) {
  .footer-grid { grid-template-columns: 1fr !important; gap: 32px !important; }
}

/* Team monogram gradients */
.team-mono-bg {
  background: linear-gradient(135deg, var(--bg-2) 0%, var(--bg-1) 100%);
  position: relative;
}
.team-mono-bg::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(59,126,214,0.06) 0%, rgba(153,69,255,0.06) 100%);
}
