/* =========================================================
   NARVEX — Design Tokens
   Color, typography, spacing and motion variables.
   Light theme is the default; dark theme overrides via
   [data-theme="dark"] on the <html> element (see js/theme.js).
   ========================================================= */

:root {
  /* ---- Brand palette ---- */
  --c-ink: #0B0F1C;         /* primary text / dark surfaces */
  --c-ink-soft: #1B2340;
  --c-signal: #2F5AFF;      /* primary brand accent — vivid blue */
  --c-signal-dark: #1B3FCC;
  --c-amber: #FF6B4A;       /* secondary accent — coral */
  --c-steel: #4A5568;       /* secondary text */
  --c-steel-soft: #8992A3;  /* muted text */

  /* ---- Surfaces (light theme) ---- */
  --bg-page: #F5F6FA;
  --bg-raised: #FFFFFF;
  --bg-sunken: #ECEEF5;
  --line: rgba(11, 15, 28, 0.10);
  --line-strong: rgba(11, 15, 28, 0.20);
  --text-primary: var(--c-ink);
  --text-secondary: var(--c-steel);
  --text-muted: var(--c-steel-soft);
  --text-on-ink: #F3F5FF;

  /* ---- Shadows ---- */
  --shadow-sm: 0 1px 2px rgba(11, 15, 28, 0.06);
  --shadow-md: 0 10px 28px rgba(20, 40, 120, 0.12);

  /* ---- Type ---- */
  --font-display: "Space Grotesk", "IBM Plex Sans Arabic", "Segoe UI", sans-serif;
  --font-body: "IBM Plex Sans Arabic", "IBM Plex Sans", "Segoe UI", sans-serif;

  --fs-h1: clamp(2.4rem, 1.7rem + 2.6vw, 4.2rem);
  --fs-h2: clamp(1.8rem, 1.4rem + 1.6vw, 2.7rem);
  --fs-h3: clamp(1.3rem, 1.1rem + 0.8vw, 1.7rem);
  --fs-lead: clamp(1.05rem, 0.98rem + 0.3vw, 1.25rem);
  --fs-body: 1rem;
  --fs-small: 0.875rem;

  /* ---- Spacing scale ---- */
  --sp-1: 0.25rem;
  --sp-2: 0.5rem;
  --sp-3: 0.75rem;
  --sp-4: 1rem;
  --sp-5: 1.5rem;
  --sp-6: 2rem;
  --sp-7: 3rem;
  --sp-8: 4.5rem;
  --sp-9: 7rem;

  /* ---- Layout ---- */
  --container-max: 1180px;
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-pill: 999px;

  /* ---- Motion ---- */
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --dur-fast: 160ms;
  --dur-med: 320ms;
}

/* ---- Dark theme overrides ---- */
html[data-theme="dark"] {
  --bg-page: #070A14;
  --bg-raised: #10152A;
  --bg-sunken: #0C1120;
  --line: rgba(255, 255, 255, 0.10);
  --line-strong: rgba(255, 255, 255, 0.20);
  --text-primary: #EDEFF7;
  --text-secondary: #A6AFC4;
  --text-muted: #737C93;
  --text-on-ink: #F3F5FF;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.35);
  --shadow-md: 0 16px 34px rgba(0, 0, 0, 0.5);
}

@media (prefers-reduced-motion: reduce) {
  :root { --dur-fast: 0ms; --dur-med: 0ms; }
}
