/* ============================================================
   OMNI RESUME — DESIGN TOKENS
   Single source of truth for color, type, spacing, motion.
   ============================================================ */

:root {
  /* ---------- Color: brand ---------- */
  --c-primary-900: #06286A;
  --c-primary-800: #083584;
  --c-primary-700: #0B3D91;
  --c-primary-600: #1354B5;
  --c-primary-500: #1E6FE8;
  --c-primary-400: #4A8DF0;
  --c-primary-300: #7FAFF5;
  --c-primary-200: #B7D2FA;
  --c-primary-100: #E1ECFD;
  --c-primary-50:  #F2F7FE;

  --c-primary: var(--c-primary-700);
  --c-primary-hover: var(--c-primary-600);
  --c-primary-active: var(--c-primary-800);
  --c-primary-soft: rgba(30, 111, 232, 0.12);

  /* ---------- Color: accent ---------- */
  --c-accent-700: #0E7490;
  --c-accent-500: #06B6D4;
  --c-accent-400: #22D3EE;
  --c-accent-300: #7FD1FF;
  --c-accent-100: #CFFAFE;
  --c-accent: var(--c-accent-300);

  /* ---------- Color: semantic ---------- */
  --c-success-700: #047857;
  --c-success-500: #10B981;
  --c-success-100: #D1FAE5;
  --c-success: var(--c-success-500);

  --c-warning-700: #B45309;
  --c-warning-500: #F59E0B;
  --c-warning-100: #FEF3C7;
  --c-warning: var(--c-warning-500);

  --c-danger-700: #B91C1C;
  --c-danger-500: #EF4444;
  --c-danger-100: #FEE2E2;
  --c-danger: var(--c-danger-500);

  --c-info-700: #1D4ED8;
  --c-info-500: #3B82F6;
  --c-info-100: #DBEAFE;
  --c-info: var(--c-info-500);

  /* ---------- Color: neutrals ---------- */
  --c-white: #FFFFFF;
  --c-black: #000000;

  --c-neutral-50:  #F8FAFC;
  --c-neutral-100: #F1F5F9;
  --c-neutral-200: #E2E8F0;
  --c-neutral-300: #CBD5E1;
  --c-neutral-400: #94A3B8;
  --c-neutral-500: #64748B;
  --c-neutral-600: #475569;
  --c-neutral-700: #334155;
  --c-neutral-800: #1E293B;
  --c-neutral-900: #0F172A;
  --c-neutral-950: #020617;

  /* ---------- Color: surfaces ---------- */
  --c-bg:           #FFFFFF;
  --c-bg-subtle:    var(--c-neutral-50);
  --c-bg-muted:     var(--c-neutral-100);
  --c-bg-elevated:  #FFFFFF;
  --c-bg-inverse:   var(--c-neutral-900);

  /* ---------- Color: text ---------- */
  --c-text-strong:  var(--c-neutral-900);
  --c-text:         var(--c-neutral-800);
  --c-text-muted:   var(--c-neutral-500);
  --c-text-subtle:  var(--c-neutral-400);
  --c-text-invert:  #FFFFFF;
  --c-text-on-primary: #FFFFFF;

  /* ---------- Color: borders ---------- */
  --c-border:        var(--c-neutral-200);
  --c-border-strong: var(--c-neutral-300);
  --c-border-subtle: var(--c-neutral-100);
  --c-border-focus:  var(--c-primary-500);

  /* ---------- Color: overlay ---------- */
  --c-overlay:      rgba(15, 23, 42, 0.55);
  --c-overlay-soft: rgba(15, 23, 42, 0.08);
  --c-backdrop:     rgba(15, 23, 42, 0.6);

  /* ---------- Typography: families ---------- */
  --font-sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --font-mono: ui-monospace, "SFMono-Regular", "Menlo", "Consolas", "Liberation Mono", monospace;

  /* ---------- Typography: fluid scale ---------- */
  --fs-2xs:  0.6875rem; /* 11px */
  --fs-xs:   0.75rem;   /* 12px */
  --fs-sm:   0.875rem;  /* 14px */
  --fs-base: 1rem;      /* 16px */
  --fs-md:   1.0625rem; /* 17px */
  --fs-lg:   1.125rem;  /* 18px */
  --fs-xl:   clamp(1.25rem, 0.9vw + 1.05rem, 1.375rem);
  --fs-2xl:  clamp(1.5rem,  1.2vw + 1.2rem,  1.75rem);
  --fs-3xl:  clamp(1.875rem, 1.8vw + 1.4rem, 2.25rem);
  --fs-4xl:  clamp(2.25rem,  2.6vw + 1.6rem, 3rem);
  --fs-5xl:  clamp(2.75rem,  4vw + 1.8rem,   4rem);
  --fs-6xl:  clamp(3.25rem,  6vw + 2rem,     5.25rem);

  /* ---------- Typography: weights ---------- */
  --fw-regular: 400;
  --fw-medium:  500;
  --fw-semibold: 600;
  --fw-bold:    700;
  --fw-extrabold: 800;

  /* ---------- Typography: line heights ---------- */
  --lh-tight:  1.15;
  --lh-snug:   1.3;
  --lh-normal: 1.5;
  --lh-relaxed: 1.65;
  --lh-loose:  1.85;

  /* ---------- Typography: letter spacing ---------- */
  --ls-tighter: -0.03em;
  --ls-tight:   -0.015em;
  --ls-normal:  0;
  --ls-wide:    0.01em;
  --ls-wider:   0.04em;
  --ls-widest:  0.12em;

  /* ---------- Spacing scale ---------- */
  --sp-0:  0;
  --sp-1:  0.25rem;   /* 4 */
  --sp-2:  0.5rem;    /* 8 */
  --sp-3:  0.75rem;   /* 12 */
  --sp-4:  1rem;      /* 16 */
  --sp-5:  1.25rem;   /* 20 */
  --sp-6:  1.5rem;    /* 24 */
  --sp-7:  1.75rem;   /* 28 */
  --sp-8:  2rem;      /* 32 */
  --sp-10: 2.5rem;    /* 40 */
  --sp-12: 3rem;      /* 48 */
  --sp-14: 3.5rem;    /* 56 */
  --sp-16: 4rem;      /* 64 */
  --sp-20: 5rem;      /* 80 */
  --sp-24: 6rem;      /* 96 */
  --sp-32: 8rem;      /* 128 */

  /* ---------- Radii ---------- */
  --r-xs:  4px;
  --r-sm:  6px;
  --r-md:  10px;
  --r-lg:  14px;
  --r-xl:  20px;
  --r-2xl: 28px;
  --r-pill: 999px;
  --r-full: 50%;

  /* ---------- Shadows ---------- */
  --sh-xs:   0 1px 2px rgba(15, 23, 42, 0.05);
  --sh-sm:   0 1px 3px rgba(15, 23, 42, 0.08), 0 1px 2px rgba(15, 23, 42, 0.04);
  --sh-md:   0 4px 12px rgba(15, 23, 42, 0.08), 0 2px 4px rgba(15, 23, 42, 0.04);
  --sh-lg:   0 12px 24px rgba(15, 23, 42, 0.10), 0 4px 8px rgba(15, 23, 42, 0.04);
  --sh-xl:   0 24px 48px rgba(15, 23, 42, 0.12), 0 8px 16px rgba(15, 23, 42, 0.05);
  --sh-2xl:  0 40px 80px rgba(15, 23, 42, 0.16);
  --sh-focus: 0 0 0 3px rgba(30, 111, 232, 0.28);
  --sh-focus-danger: 0 0 0 3px rgba(239, 68, 68, 0.28);
  --sh-inset: inset 0 1px 2px rgba(15, 23, 42, 0.06);

  /* ---------- Transitions ---------- */
  --tr-fast:    120ms cubic-bezier(0.4, 0, 0.2, 1);
  --tr-base:    200ms cubic-bezier(0.4, 0, 0.2, 1);
  --tr-slow:    320ms cubic-bezier(0.4, 0, 0.2, 1);
  --tr-emphasis: 400ms cubic-bezier(0.2, 0.9, 0.3, 1);
  --tr-bounce:  500ms cubic-bezier(0.34, 1.56, 0.64, 1);

  /* ---------- Z-index ---------- */
  --z-base:      0;
  --z-raised:    10;
  --z-dropdown:  100;
  --z-sticky:    200;
  --z-header:    300;
  --z-overlay:   400;
  --z-modal:     500;
  --z-popover:   600;
  --z-toast:     700;
  --z-tooltip:   800;
  --z-max:       9999;

  /* ---------- Layout ---------- */
  --container-max:  1280px;
  --container-wide: 1440px;
  --container-narrow: 960px;
  --container-prose:  760px;
  --header-h:      64px;
  --header-h-lg:   72px;

  /* ---------- Breakpoints (referenced in media queries as px) ---------- */
  /* 320  360  375  390  412  480  768  1024  1280  1440  1920 */

  /* ---------- Editor specific ---------- */
  --editor-sidebar-w: 260px;
  --editor-panel-w:   320px;
  --editor-toolbar-h: 56px;
  --editor-mobile-tab-h: 64px;
  --editor-canvas-bg: #EEF2F7;
  --editor-ruler:     8px;

  /* ---------- Resume canvas ---------- */
  --resume-w: 794px;   /* A4 @ 96dpi */
  --resume-h: 1123px;
  --resume-letter-w: 816px;
  --resume-letter-h: 1056px;
  --resume-scale: 1;

  /* ---------- Motion preference ---------- */
  --motion-reduced: 0;

  /* ---------- Radius shorthand used in many components ---------- */
  --radius: var(--r-md);

  /* ---------- Focus ring ---------- */
  --focus-ring: 2px solid var(--c-primary-500);
  --focus-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  :root {
    --motion-reduced: 1;
    --tr-fast: 0ms;
    --tr-base: 0ms;
    --tr-slow: 0ms;
    --tr-emphasis: 0ms;
    --tr-bounce: 0ms;
  }
}

@media (prefers-contrast: more) {
  :root {
    --c-border: #94A3B8;
    --c-text-muted: #475569;
    --c-text-subtle: #475569;
  }
}