/* ═══════════════════════════════════════════════════════════
   MARCIANUS DESIGN SYSTEM (MDS)
   Dark Enterprise — The Behavioral UI Framework
   colors_and_type.css — Design tokens + semantic selectors
═══════════════════════════════════════════════════════════ */

/* Satoshi — Fontshare (primary) + Inter fallback + JetBrains Mono */
@import url('https://api.fontshare.com/v2/css?f[]=satoshi@400,500,700,900&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;700;800&family=JetBrains+Mono:wght@400;500;700&display=swap');

:root {
  /* ── BASE / DARK CORE ─────────────────────────────────── */
  --mds-bg-0:        #050508; /* Deep Space — page root */
  --mds-bg-1:        #0B0F1A; /* Dark Core — primary canvas */
  --mds-bg-2:        #0F0F1A; /* Surface — cards */
  --mds-bg-3:        #111827; /* Raised — depth / elevated cards */
  --mds-bg-4:        #141424; /* Hover surface */
  --mds-bg-5:        #1A1A2E; /* Pressed / active surface */
  --mds-bg-glass:    rgba(17, 24, 39, 0.70);

  /* ── IDENTITY (PRIMARY) — AI Purple ───────────────────── */
  --mds-purple:       #7B61FF; /* Marcianus Purple — spec token */
  --mds-purple-deep:  #5D3FD3; /* Deeper variant used in code */
  --mds-purple-50:    #A78BFA; /* Soft / text on dark */
  --mds-purple-20:    rgba(123, 97, 255, 0.20);
  --mds-purple-10:    rgba(123, 97, 255, 0.10);
  --mds-purple-glow:  rgba(123, 97, 255, 0.40);

  /* ── ACCENT — cirurgical CTA only ─────────────────────── */
  --mds-gold:         #FFD700; /* Primary CTA conversion */
  --mds-gold-warm:    #F5C518; /* Alt used in marketing */
  --mds-blue-tech:    #00D1FF; /* Secondary accent / info */

  /* ── SEMANTIC FEEDBACK ────────────────────────────────── */
  --mds-success:      #00C48C;
  --mds-success-alt:  #00E676;
  --mds-warning:      #FFB020;
  --mds-danger:       #FF3B5C;

  /* ── TEXT ─────────────────────────────────────────────── */
  --mds-fg-100:       #FFFFFF;
  --mds-fg-80:        rgba(255,255,255,0.80);
  --mds-fg-60:        rgba(255,255,255,0.60);
  --mds-fg-40:        rgba(255,255,255,0.40);
  --mds-fg-20:        rgba(255,255,255,0.20);
  --mds-fg-secondary: #9CA3AF;
  --mds-fg-muted:     #606078;

  /* ── BORDERS ──────────────────────────────────────────── */
  --mds-border-1:     rgba(255,255,255,0.06);
  --mds-border-2:     rgba(255,255,255,0.12);
  --mds-border-3:     rgba(255,255,255,0.20);
  --mds-border-accent: rgba(123, 97, 255, 0.40);

  /* ── SPACING (strict 8pt grid) ───────────────────────── */
  --sp-0:  4px;
  --sp-1:  8px;
  --sp-2:  16px;
  --sp-3:  24px;
  --sp-4:  32px;
  --sp-5:  48px;
  --sp-6:  64px;
  --sp-7:  96px;
  --sp-8: 128px;

  /* ── RADIUS (precise — 8/12/16) ──────────────────────── */
  --r-xs:   4px;
  --r-sm:   8px;
  --r-md:  12px;
  --r-lg:  16px;
  --r-xl:  24px;
  --r-full: 9999px;

  /* ── TYPOGRAPHY FAMILIES ─────────────────────────────── */
  --font-display: 'Satoshi', 'Inter', system-ui, sans-serif;    /* H1/H2 impact (900) */
  --font-heading: 'Satoshi', 'Inter', system-ui, sans-serif;    /* H3-H4 (500-700) */
  --font-body:    'Satoshi', 'Inter', system-ui, sans-serif;    /* Body / UI (400-500) */
  --font-ui:      'Satoshi', 'Inter', system-ui, sans-serif;    /* UI labels (500) */
  --font-metric:  'Satoshi', 'Inter', system-ui, sans-serif;    /* Metrics */
  --font-mono:    'JetBrains Mono', ui-monospace, monospace;    /* code / eyebrow ticker */

  /* ── TYPE SCALE · Satoshi doctrine ──────────────────── */
  --fs-h1:        clamp(3rem, 6vw, 6rem);      /* 72–96 */
  --fs-h2:        clamp(2.5rem, 4vw, 3.5rem);  /* 40–56 */
  --fs-h3:        clamp(1.75rem, 2.5vw, 2.25rem); /* 28–36 */
  --fs-h4:        1.5rem;                      /* 20–24 */
  --fs-h5:        1.125rem;                    /* 18 */
  --fs-body-lg:   1.125rem;                    /* 18 */
  --fs-body:      1rem;                        /* 16 */
  --fs-ui:        0.9375rem;                   /* 15 · UI labels */
  --fs-body-sm:   0.875rem;                    /* 14 */
  --fs-caption:   0.75rem;                     /* 12 */
  --fs-micro:     0.6875rem;                   /* 11 */

  --lh-tight:   1.1;
  --lh-snug:    1.3;
  --lh-normal:  1.6;
  --lh-relaxed: 1.75;

  --tracking-tighter: -0.04em;
  --tracking-tight:   -0.02em;
  --tracking-normal:  0;
  --tracking-wide:    0.04em;
  --tracking-widest:  0.18em;

  /* ── EFFECTS ─────────────────────────────────────────── */
  --blur-sm:    blur(8px);
  --blur-md:    blur(16px);
  --blur-lg:    blur(32px);

  --shadow-sm:  0 2px 8px rgba(0,0,0,0.30);
  --shadow-md:  0 8px 24px rgba(0,0,0,0.40);
  --shadow-lg:  0 20px 60px rgba(0,0,0,0.50);
  --shadow-xl:  0 32px 80px rgba(0,0,0,0.60);
  --glow-purple: 0 0 40px rgba(123,97,255,0.40);
  --glow-gold:   0 0 28px rgba(255,215,0,0.35);

  /* ── MOTION (150–250ms, ease-out doctrine) ───────────── */
  --t-fast: 150ms ease-out;
  --t-base: 200ms ease-out;
  --t-slow: 250ms cubic-bezier(0.16, 1, 0.3, 1);
}

/* ═══════════════════════════════════════════════════════════
   SEMANTIC SELECTORS — body, h1..h6, code, small, kbd
═══════════════════════════════════════════════════════════ */

body {
  background: var(--mds-bg-1);
  color: var(--mds-fg-100);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: var(--lh-normal);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1 {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: var(--fs-h1);
  line-height: 0.98;
  letter-spacing: -0.04em;
  color: var(--mds-fg-100);
}
h2 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: var(--fs-h2);
  line-height: 1.02;
  letter-spacing: -0.03em;
  color: var(--mds-fg-100);
}
h3 {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: var(--fs-h3);
  line-height: 1.1;
  letter-spacing: -0.01em;
  color: var(--mds-fg-100);
}
h4 {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: var(--fs-h4);
  line-height: 1.2;
  letter-spacing: 0;
  color: var(--mds-fg-100);
}
h5 { font-family: var(--font-heading); font-weight: 600; font-size: var(--fs-h5); line-height: 1.3; color: var(--mds-fg-100); }
h6 { font-family: var(--font-ui); font-weight: 500; font-size: var(--fs-body); text-transform: uppercase; letter-spacing: var(--tracking-wide); color: var(--mds-fg-100); }

p {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: var(--fs-body);
  line-height: 1.65;
  color: var(--mds-fg-80);
}

/* UI labels — Satoshi 500, 14–16 */
.ui, button, input, select, textarea {
  font-family: var(--font-ui);
  font-weight: 500;
}

small, .caption {
  font-size: var(--fs-caption);
  color: var(--mds-fg-60);
}

/* Mono is OBLIGATORY for metrics, dashboards, MatchScore™ */
code, kbd, samp, pre, .metric, .mono-eyebrow {
  font-family: var(--font-mono);
  font-weight: 500;
  letter-spacing: var(--tracking-wide);
}

.mono-eyebrow {
  font-size: var(--fs-micro);
  text-transform: uppercase;
  letter-spacing: var(--tracking-widest);
  color: var(--mds-purple-50);
}

/* Metrics — Satoshi 900, tabular */
.metric-xl { font-family: var(--font-metric); font-weight: 900; font-size: 3rem; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; color: var(--mds-fg-100); }
.metric-lg { font-family: var(--font-metric); font-weight: 900; font-size: 2rem; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; color: var(--mds-fg-100); }
.metric-md { font-family: var(--font-metric); font-weight: 700; font-size: 1.25rem; font-variant-numeric: tabular-nums; color: var(--mds-fg-100); }
