/* =================================================================
   AIVS Design System — Colors & Type
   Source: apps/web/app/globals.css (aivs-platform @ main)
   Last sync: 2026-04-30 — design-token-migration PR
              (https://github.com/meettonyg/aivs-platform/pull/442)

   Prefix convention difference vs. platform:
     Platform's @theme block uses --color-brand-*, --color-signal-*, etc.
     This standalone mirror uses bare --brand-*, --signal-*, etc.
     Hex values are byte-identical; only the variable names differ.
   ================================================================= */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=Oswald:wght@500;600;700&display=swap');

:root {
  /* ---------- SURFACES (light) ---------- */
  --background: #F8FAFC;         /* slate-50 page */
  --foreground: #0F172A;         /* slate-900 text */

  /* ---------- SURFACES (dark) ---------- */
  --dark-base: #020617;          /* slate-950 page */
  --dark-card: #0F172A;          /* slate-900 card */
  --dark-border: #1E293B;        /* slate-800 border */
  --dark-card-soft: #151c2c;     /* mid tier between dark-base and dark-card; used in 17+ dashboard call sites */
  --dark-base-deep: #0b1222;     /* deeper than dark-base; sticky table headers, terminal chrome */

  /* ---------- BRAND (indigo ramp) ---------- */
  --brand-50:  #EEF2FF;
  --brand-100: #E0E7FF;
  --brand-200: #C7D2FE;
  --brand-300: #A5B4FC;
  --brand-400: #818CF8;
  --brand-500: #6366F1;   /* primary */
  --brand-600: #4F46E5;   /* primary-hover */
  --brand-700: #4338CA;
  --brand-800: #3730A3;
  --brand-900: #312E81;
  --brand-950: #1E1B4B;

  /* ---------- SIGNAL ---------- */
  --signal-red:        #EF4444;
  --signal-red-strong: #B91C1C;
  --signal-red-soft:   #FCA5A5;
  --signal-yellow:     #F59E0B;
  --signal-green:      #10B981;
  --signal-blue:       #3B82F6;   /* AI Extractable tier — distinct semantic role from --accent-blue */

  /* ---------- ACCENTS ---------- */
  --accent-blue:   #3B82F6;   /* crawler / scan iconography */
  --accent-neon:   #22C55E;   /* firehose green / live */
  --accent-purple: #9333EA;

  /* ---------- LAYER PALETTES (the AI Visibility Stack — methodology IP, locked) ----------
     Order is access → understanding → extractability; never reorder.
     Soft pairs (-bg/-fg) are for FixCard tag pills; saturated values
     are for LayerChart bars. */
  --layer-access:        #3B82F6;
  --layer-understanding: #8B5CF6;
  --layer-extractability:#EC4899;
  --layer-access-bg: #DBEAFE;  --layer-access-fg: #1E40AF;
  --layer-understanding-bg: #E0E7FF;  --layer-understanding-fg: #3730A3;
  --layer-extractability-bg: #FCE7F3; --layer-extractability-fg: #9D174D;

  /* ---------- NEUTRALS (slate) ---------- */
  --slate-50:  #F8FAFC;
  --slate-100: #F1F5F9;
  --slate-200: #E2E8F0;
  --slate-300: #CBD5E1;
  --slate-400: #94A3B8;
  --slate-500: #64748B;
  --slate-600: #475569;
  --slate-700: #334155;
  --slate-800: #1E293B;
  --slate-900: #0F172A;
  --slate-950: #020617;

  /* ---------- TYPE FAMILIES ---------- */
  --font-sans: 'Inter', ui-sans-serif, system-ui, -apple-system, sans-serif;
  --font-heading: 'Oswald', 'Inter', sans-serif;   /* uppercase tracked display */
  --font-mono: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;

  /* ---------- RADIUS ---------- */
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-2xl: 1rem;     /* cards */
  --radius-full: 9999px;

  /* ---------- SHADOWS ---------- */
  --shadow-glass: 0 4px 20px -2px rgba(0, 0, 0, 0.05);
  --shadow-dark-glass: 0 4px 20px -2px rgba(0, 0, 0, 0.4);
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 4px 10px -2px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 10px 30px -10px rgba(15, 23, 42, 0.15);
  --shadow-glow-score: 0 0 24px rgba(34, 197, 94, 0.35);

  /* ---------- SPACING STEP (4px) ---------- */
  --space-1: 4px;   --space-2: 8px;   --space-3: 12px;
  --space-4: 16px;  --space-5: 20px;  --space-6: 24px;
  --space-8: 32px;  --space-10: 40px; --space-12: 48px;
  --space-16: 64px; --space-20: 80px;
}

/* =================================================================
   BASE TYPOGRAPHY
   ================================================================= */

body {
  font-family: var(--font-sans);
  color: var(--foreground);
  background: var(--background);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-feature-settings: 'cv11', 'ss01', 'ss03';
}

/* Display (Oswald, uppercase, tracked) — used for H1/H2 hero & dashboard */
.font-heading,
h1.aivs-display,
h2.aivs-display {
  font-family: var(--font-heading);
  text-transform: uppercase;
  letter-spacing: 0.02em;
  font-weight: 700;
}

/* Semantic classes */
.aivs-h1 {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: clamp(2rem, 4vw, 3.25rem);   /* 32-52 */
  line-height: 1.05;
  letter-spacing: -0.01em;
  text-transform: uppercase;
  color: var(--foreground);
}

.aivs-h2 {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: clamp(1.5rem, 2.5vw, 2rem);  /* 24-32 */
  line-height: 1.1;
  letter-spacing: 0.01em;
  text-transform: uppercase;
}

.aivs-h3 {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 1.25rem;        /* 20 */
  line-height: 1.3;
  letter-spacing: -0.005em;
}

.aivs-eyebrow {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.75rem;        /* 12 */
  line-height: 1;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--slate-500);
}

.aivs-body {
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: 0.9375rem;      /* 15 */
  line-height: 1.55;
  color: var(--slate-700);
}

.aivs-body-sm {
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: 0.875rem;       /* 14 */
  line-height: 1.5;
  color: var(--slate-600);
}

.aivs-caption {
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 0.75rem;        /* 12 */
  line-height: 1.3;
  color: var(--slate-500);
}

.aivs-score {
  /* The 0-100 number in score rings */
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: clamp(3rem, 6vw, 4rem);
  line-height: 1;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
  color: var(--foreground);
}

.aivs-mono {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  line-height: 1.45;
  color: var(--slate-700);
}
