/* ═══════════════════════════════════════════════════════════════════
   SharpeIQ — Colors & Type
   Import once at the root of any page/prototype using this design system.
   ═════════════════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,700;0,900;1,700&family=DM+Sans:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500;600;700&family=Inter:wght@400;500;600;700;800;900&display=swap');

:root {
  /* ── Brand gold ─────────────────────────────────────────────────── */
  --gold:        #c9a84c;
  --gold-bright: #f0c060;
  --gold-dim:    #8a6f32;
  --gold-bg:     rgba(201,168,76,0.08);
  --gold-border: rgba(201,168,76,0.18);
  --gold-ring:   rgba(201,168,76,0.40);

  /* ── Dark surfaces (deepest → nearest) ──────────────────────────── */
  --bg:       #060709;
  --bg2:      #0a0c10;
  --surface:  #0f1115;
  --surface2: #161920;
  --surface3: #1d2028;

  /* ── Foreground ─────────────────────────────────────────────────── */
  --text:     #e8eaf0;
  --text-dim: #c7ccd6;
  --muted:    #8890a0;
  --muted-2:  #4a4a55;

  /* ── Semantic / signal ──────────────────────────────────────────── */
  --green:    #3ddc84;
  --red:      #ff6b6b;
  --amber:    #fbbf24;
  --blue:     #60a5fa;
  --purple:   #a78bfa;
  --cyan:     #22d3ee;

  /* Chart series (HSL — matches dashboard) */
  --chart-green:  hsl(160 84% 39%);
  --chart-red:    hsl(0 72% 51%);
  --chart-amber:  hsl(42 92% 56%);
  --chart-cyan:   hsl(185 80% 50%);
  --chart-purple: hsl(265 70% 60%);

  /* ── Borders & dividers ─────────────────────────────────────────── */
  --border:      rgba(255,255,255,0.06);
  --border-2:    rgba(255,255,255,0.025);
  --border-gold: rgba(201,168,76,0.18);

  /* ── Elevation ──────────────────────────────────────────────────── */
  --shadow-card:   0 4px 24px rgba(0,0,0,0.30);
  --shadow-glow:   0 0 20px rgba(61,220,132,0.15);
  --shadow-gold:   0 10px 36px rgba(201,168,76,0.32);
  --shadow-term:   0 50px 120px rgba(0,0,0,0.85),
                   0 0 0 1px rgba(201,168,76,0.06),
                   0 0 80px rgba(201,168,76,0.05) inset;

  /* ── Radii ──────────────────────────────────────────────────────── */
  --radius-xs: 2px;
  --radius-sm: 4px;
  --radius:    6px;
  --radius-md: 8px;
  --radius-lg: 10px;
  --radius-xl: 12px;
  --radius-pill: 9999px;

  /* ── Spacing ────────────────────────────────────────────────────── */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 64px;
  --space-9: 88px;

  /* ── Type stacks ────────────────────────────────────────────────── */
  --serif: 'Playfair Display', Georgia, serif;
  --sans:  'DM Sans', system-ui, -apple-system, sans-serif;
  --mono:  'JetBrains Mono', 'Fira Code', monospace;
  --ui:    'Inter', system-ui, -apple-system, sans-serif;

  /* ── Gradients (use sparingly) ──────────────────────────────────── */
  --grad-gold:    linear-gradient(125deg, var(--gold-dim) 0%, var(--gold) 35%, var(--gold-bright) 65%, var(--gold) 100%);
  --grad-scan:    linear-gradient(90deg, transparent 0%, rgba(201,168,76,0.5) 35%, rgba(240,192,96,0.7) 50%, rgba(201,168,76,0.5) 65%, transparent 100%);
  --grad-surface: linear-gradient(180deg, #0a0c10, #060709);
  --grad-cta:     linear-gradient(135deg, rgba(201,168,76,0.07), rgba(201,168,76,0.02));

  /* ── Backgrounds (textures) ─────────────────────────────────────── */
  --dot-grid: radial-gradient(circle, rgba(201,168,76,0.055) 1px, transparent 1px);
  --dot-size: 52px 52px;
}

/* ═══════════════════════════════════════════════════════════════════
   Type roles (semantic classes — use these, not ad-hoc sizes)
   ═════════════════════════════════════════════════════════════════════ */

.sharpe-hero-word {
  font-family: var(--serif);
  font-weight: 900;
  font-size: clamp(3.5rem, 7.5vw, 8.5rem);
  line-height: 0.93;
  letter-spacing: -3px;
  display: block;
  color: var(--text);
}
.sharpe-hero-word--gold {
  background: var(--grad-gold);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.sharpe-h1 {
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(1.9rem, 3.5vw, 3rem);
  line-height: 1.15;
  letter-spacing: -0.5px;
  color: var(--text);
}

.sharpe-h2 {
  font-family: var(--ui);
  font-weight: 800;
  font-size: 1.875rem;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: var(--text);
}

.sharpe-h3 {
  font-family: var(--ui);
  font-weight: 600;
  font-size: 1.125rem;
  letter-spacing: -0.01em;
  color: var(--text);
}

.sharpe-body {
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.78;
  color: var(--muted);
}
.sharpe-body--strong { color: var(--text); }

.sharpe-small {
  font-family: var(--sans);
  font-size: 0.83rem;
  line-height: 1.6;
  color: var(--muted);
}

.sharpe-eyebrow {
  font-family: var(--mono);
  font-size: 0.67rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 3px;
  color: var(--gold);
}

.sharpe-label {
  font-family: var(--mono);
  font-size: 0.63rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--muted);
}

.sharpe-metric-value {
  font-family: var(--mono);
  font-size: 1.85rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1;
  color: var(--gold);
}

.sharpe-code,
.sharpe-mono {
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--text);
}

.sharpe-ticker {
  font-family: var(--mono);
  font-weight: 600;
  color: var(--gold);
  letter-spacing: 0.5px;
}

/* ═══════════════════════════════════════════════════════════════════
   Surface / component atoms (handy when hand-rolling)
   ═════════════════════════════════════════════════════════════════════ */

.sharpe-dotgrid::before {
  content: '';
  position: fixed; inset: 0;
  background-image: var(--dot-grid);
  background-size: var(--dot-size);
  pointer-events: none; z-index: 0;
  animation: sharpe-grid-drift 40s linear infinite;
}
@keyframes sharpe-grid-drift {
  from { background-position: 0 0; }
  to   { background-position: 52px 52px; }
}

.sharpe-divider { border: none; border-top: 1px solid var(--border); margin: 0; }

.sharpe-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
}
.sharpe-card--accent { border-top: 3px solid var(--gold); border-top-left-radius: var(--radius-md); border-top-right-radius: var(--radius-md); }

.sharpe-btn-primary {
  display: inline-block;
  background: var(--gold); color: #060709;
  font-family: var(--sans); font-weight: 700; font-size: 0.92rem;
  padding: 0.72rem 1.8rem; border-radius: var(--radius);
  border: none; cursor: pointer; text-decoration: none;
  transition: background .2s, transform .15s, box-shadow .2s;
}
.sharpe-btn-primary:hover { background: var(--gold-bright); transform: translateY(-1px); box-shadow: var(--shadow-gold); }

.sharpe-btn-secondary {
  display: inline-block;
  background: transparent; color: var(--muted);
  border: 1px solid var(--gold-border);
  font-family: var(--sans); font-weight: 600; font-size: 0.92rem;
  padding: 0.72rem 1.8rem; border-radius: var(--radius);
  cursor: pointer; text-decoration: none;
  transition: border-color .2s, color .2s;
}
.sharpe-btn-secondary:hover { border-color: var(--gold); color: var(--gold); }

.sharpe-badge {
  display: inline-flex; align-items: center; gap: 0.4rem;
  padding: 0.2rem 0.6rem; border-radius: var(--radius-xs);
  font-family: var(--mono); font-size: 0.6rem; font-weight: 700;
  letter-spacing: 1px; text-transform: uppercase;
}
.sharpe-badge--gold { background: var(--gold-bg); color: var(--gold); border: 1px solid var(--gold-border); }
.sharpe-badge--green { background: rgba(61,220,132,0.12); color: var(--green); border: 1px solid rgba(61,220,132,0.30); }
.sharpe-badge--red { background: rgba(255,107,107,0.12); color: var(--red); border: 1px solid rgba(255,107,107,0.30); }

/* Base reset (opt-in — only applied if a page uses .sharpe-base on <body>) */
.sharpe-base {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  line-height: 1.6;
}
.sharpe-base * { box-sizing: border-box; }
.sharpe-base h1, .sharpe-base h2, .sharpe-base h3, .sharpe-base h4 { font-family: var(--ui); }
.sharpe-base code, .sharpe-base pre { font-family: var(--mono); }
.sharpe-base a { color: var(--gold); text-decoration: none; }
.sharpe-base a:hover { color: var(--gold-bright); }
