/* ==================================================
   CODEXA TECH ACADEMY — DESIGN TOKENS
   Single source of truth for color, type, spacing,
   radius and motion. Every component pulls from here.
   ================================================== */

:root {
  /* ---------- Color: Brand ---------- */
  --cx-primary: #2563EB;
  --cx-primary-dark: #1D4ED8;
  --cx-primary-light: #DBEAFE;
  --cx-secondary: #22D3EE;
  --cx-accent: #4F46E5;

  /* ---------- Color: Surface ---------- */
  --cx-bg: #F8FAFC;
  --cx-bg-alt: #FFFFFF;
  --cx-bg-dark: #0B1220;

  /* ---------- Color: Text ---------- */
  --cx-heading: #0F172A;
  --cx-text: #475569;
  --cx-text-muted: #94A3B8;
  --cx-text-on-dark: #E2E8F0;

  /* ---------- Color: Structure ---------- */
  --cx-border: #E2E8F0;
  --cx-border-dark: #1E293B;

  /* ---------- Gradients (used sparingly, on the signature elements only) ---------- */
  --cx-gradient-brand: linear-gradient(135deg, var(--cx-primary) 0%, var(--cx-accent) 100%);
  --cx-gradient-glow: linear-gradient(135deg, var(--cx-secondary) 0%, var(--cx-primary) 100%);
  --cx-gradient-accent-text: linear-gradient(90deg, #1D4ED8 0%, #7C3AED 55%, #DB2777 100%);

  /* ---------- Typography ---------- */
  --cx-font-display: 'Plus Jakarta Sans', 'Inter', -apple-system, sans-serif;
  --cx-font-body: 'Inter', -apple-system, sans-serif;

  --cx-fs-xs: 0.8125rem;   /* 13px */
  --cx-fs-sm: 0.9375rem;   /* 15px */
  --cx-fs-base: 1rem;      /* 16px */
  --cx-fs-lg: 1.125rem;    /* 18px */
  --cx-fs-xl: 1.375rem;    /* 22px */
  --cx-fs-2xl: 1.75rem;    /* 28px */
  --cx-fs-3xl: 2.25rem;    /* 36px */
  --cx-fs-4xl: 3rem;       /* 48px */
  --cx-fs-5xl: 3.75rem;    /* 60px */

  /* ---------- Spacing scale ---------- */
  --cx-space-xs: 0.5rem;
  --cx-space-sm: 1rem;
  --cx-space-md: 1.5rem;
  --cx-space-lg: 2.5rem;
  --cx-space-xl: 4rem;
  --cx-space-2xl: 6rem;
  --cx-space-3xl: 8rem;

  /* ---------- Radius ---------- */
  --cx-radius: 14px;
  --cx-radius-sm: 8px;
  --cx-radius-lg: 20px;
  --cx-radius-pill: 999px;

  /* ---------- Shadow ---------- */
  --cx-shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04);
  --cx-shadow-md: 0 4px 16px rgba(15, 23, 42, 0.06);
  --cx-shadow-lg: 0 12px 32px rgba(15, 23, 42, 0.10);
  --cx-shadow-brand: 0 8px 24px rgba(37, 99, 235, 0.20);

  /* ---------- Motion ---------- */
  --cx-ease: cubic-bezier(0.4, 0, 0.2, 1);
  --cx-transition-fast: 0.18s var(--cx-ease);
  --cx-transition: 0.28s var(--cx-ease);
  --cx-transition-slow: 0.5s var(--cx-ease);

  /* ---------- Layout ---------- */
  --cx-container-max: 1240px;
  --cx-navbar-height: 84px;

  /* Tells the browser to render native controls (scrollbars,
     form fields) in a light-appropriate style by default. */
  color-scheme: light;

  /* Translucent navbar background (used with backdrop-filter blur) */
  --cx-navbar-bg: rgba(248, 250, 252, 0.72);
  --cx-navbar-shadow: 0 1px 24px rgba(15, 23, 42, 0.08);
}

/* ==================================================
   DARK THEME
   --------------------------------------------------
   Toggled by setting data-theme="dark" on <html> (see
   js/theme.js). Only surface/text tokens change — brand
   colors (primary/secondary/accent) stay the same in
   both themes for consistent identity.
   ================================================== */
[data-theme="dark"] {
  --cx-bg: #0B1220;
  --cx-bg-alt: #141B2E;
  --cx-bg-dark: #05070D;

  --cx-heading: #F1F5F9;
  --cx-text: #CBD5E1;
  --cx-text-muted: #94A3B8;
  --cx-text-on-dark: #E2E8F0;

  --cx-border: #263049;
  --cx-border-dark: #334155;

  --cx-primary-light: rgba(37, 99, 235, 0.18);

  --cx-navbar-bg: rgba(11, 18, 32, 0.72);
  --cx-navbar-shadow: 0 1px 24px rgba(0, 0, 0, 0.35);

  --cx-gradient-accent-text: linear-gradient(90deg, #3B82F6 0%, #8B5CF6 55%, #EC4899 100%);

  color-scheme: dark;
}