/* ==========================================================================
   OMNI COLOR — CORE STYLESHEET
   File: assets/css/core.css
   Purpose: Design tokens, CSS reset, base typography, root variables
   Author: Omni Color
   Version: 1.0.0
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. DESIGN TOKENS — COLOR SYSTEM
   -------------------------------------------------------------------------- */
:root {
  /* Brand — Primary */
  --brand-primary: #4f46e5;
  --brand-primary-hover: #4338ca;
  --brand-primary-active: #3730a3;
  --brand-primary-soft: #eef2ff;
  --brand-primary-subtle: #c7d2fe;
  --brand-primary-text: #312e81;

  /* Brand — Accent */
  --brand-accent: #0ea5e9;
  --brand-accent-hover: #0284c7;
  --brand-accent-active: #0369a1;
  --brand-accent-soft: #e0f2fe;

  /* Brand — Secondary */
  --brand-secondary: #14b8a6;
  --brand-secondary-hover: #0d9488;
  --brand-secondary-soft: #ccfbf1;

  /* Neutrals */
  --neutral-0: #ffffff;
  --neutral-25: #fcfcfd;
  --neutral-50: #f9fafb;
  --neutral-100: #f3f4f6;
  --neutral-150: #eceef1;
  --neutral-200: #e5e7eb;
  --neutral-300: #d1d5db;
  --neutral-400: #9ca3af;
  --neutral-500: #6b7280;
  --neutral-600: #4b5563;
  --neutral-700: #374151;
  --neutral-800: #1f2937;
  --neutral-900: #111827;
  --neutral-950: #030712;

  /* Semantic — Success */
  --success-50: #f0fdf4;
  --success-100: #dcfce7;
  --success-200: #bbf7d0;
  --success-500: #22c55e;
  --success-600: #16a34a;
  --success-700: #15803d;
  --success-900: #14532d;

  /* Semantic — Warning */
  --warning-50: #fffbeb;
  --warning-100: #fef3c7;
  --warning-200: #fde68a;
  --warning-500: #f59e0b;
  --warning-600: #d97706;
  --warning-700: #b45309;
  --warning-900: #78350f;

  /* Semantic — Danger */
  --danger-50: #fef2f2;
  --danger-100: #fee2e2;
  --danger-200: #fecaca;
  --danger-500: #ef4444;
  --danger-600: #dc2626;
  --danger-700: #b91c1c;
  --danger-900: #7f1d1d;

  /* Semantic — Info */
  --info-50: #eff6ff;
  --info-100: #dbeafe;
  --info-200: #bfdbfe;
  --info-500: #3b82f6;
  --info-600: #2563eb;
  --info-700: #1d4ed8;
  --info-900: #1e3a8a;

  /* Surfaces */
  --surface-base: var(--neutral-0);
  --surface-raised: var(--neutral-0);
  --surface-sunken: var(--neutral-50);
  --surface-muted: var(--neutral-100);
  --surface-inverse: var(--neutral-900);
  --surface-overlay: rgba(17, 24, 39, 0.55);
  --surface-glass: rgba(255, 255, 255, 0.72);
  --surface-code: var(--neutral-100);

  /* Borders */
  --border-subtle: var(--neutral-150);
  --border-default: var(--neutral-200);
  --border-strong: var(--neutral-300);
  --border-inverse: var(--neutral-700);
  --border-focus: var(--brand-primary);

  /* Text */
  --text-primary: var(--neutral-900);
  --text-secondary: var(--neutral-600);
  --text-tertiary: var(--neutral-500);
  --text-disabled: var(--neutral-400);
  --text-inverse: var(--neutral-0);
  --text-link: var(--brand-primary);
  --text-link-hover: var(--brand-primary-hover);
  --text-code: #be185d;
  --text-code-bg: var(--neutral-100);

  /* Focus Ring */
  --focus-ring-color: rgba(79, 70, 229, 0.35);
  --focus-ring-width: 3px;
  --focus-ring-offset: 2px;

  /* Shadows */
  --shadow-xs: 0 1px 2px 0 rgba(15, 23, 42, 0.05);
  --shadow-sm: 0 1px 3px 0 rgba(15, 23, 42, 0.08), 0 1px 2px -1px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 4px 6px -1px rgba(15, 23, 42, 0.08), 0 2px 4px -2px rgba(15, 23, 42, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(15, 23, 42, 0.10), 0 4px 6px -4px rgba(15, 23, 42, 0.08);
  --shadow-xl: 0 20px 25px -5px rgba(15, 23, 42, 0.12), 0 8px 10px -6px rgba(15, 23, 42, 0.08);
  --shadow-2xl: 0 25px 50px -12px rgba(15, 23, 42, 0.25);
  --shadow-inset: inset 0 1px 2px 0 rgba(15, 23, 42, 0.06);
  --shadow-focus: 0 0 0 var(--focus-ring-width) var(--focus-ring-color);

  /* Gradients */
  --gradient-brand: linear-gradient(135deg, var(--brand-primary) 0%, var(--brand-accent) 100%);
  --gradient-brand-soft: linear-gradient(135deg, #eef2ff 0%, #e0f2fe 100%);
  --gradient-rainbow: linear-gradient(90deg,
      #ef4444 0%, #f97316 14%, #f59e0b 28%,
      #22c55e 42%, #06b6d4 56%, #3b82f6 70%,
      #8b5cf6 84%, #ec4899 100%);
  --gradient-subtle: linear-gradient(180deg, var(--neutral-0) 0%, var(--neutral-50) 100%);

  /* --------------------------------------------------------------------------
     2. TYPOGRAPHY TOKENS
     -------------------------------------------------------------------------- */
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji",
    "Segoe UI Emoji", "Segoe UI Symbol";
  --font-mono: "JetBrains Mono", "SF Mono", "Fira Code", "Roboto Mono",
    Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  --font-display: var(--font-sans);

  /* Font sizes — fluid where useful */
  --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: 1.25rem;      /* 20px */
  --fs-2xl: 1.5rem;      /* 24px */
  --fs-3xl: 1.875rem;    /* 30px */
  --fs-4xl: 2.25rem;     /* 36px */
  --fs-5xl: 3rem;        /* 48px */
  --fs-6xl: 3.75rem;     /* 60px */
  --fs-7xl: 4.5rem;      /* 72px */

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

  /* Line heights */
  --lh-none: 1;
  --lh-tight: 1.15;
  --lh-snug: 1.3;
  --lh-normal: 1.5;
  --lh-relaxed: 1.65;
  --lh-loose: 1.85;

  /* Letter spacing */
  --ls-tighter: -0.03em;
  --ls-tight: -0.015em;
  --ls-normal: 0;
  --ls-wide: 0.015em;
  --ls-wider: 0.03em;
  --ls-widest: 0.08em;

  /* --------------------------------------------------------------------------
     3. SPACING SCALE (4px base)
     -------------------------------------------------------------------------- */
  --space-0: 0;
  --space-1: 0.25rem;    /* 4px */
  --space-2: 0.5rem;     /* 8px */
  --space-3: 0.75rem;    /* 12px */
  --space-4: 1rem;       /* 16px */
  --space-5: 1.25rem;    /* 20px */
  --space-6: 1.5rem;     /* 24px */
  --space-7: 1.75rem;    /* 28px */
  --space-8: 2rem;       /* 32px */
  --space-10: 2.5rem;    /* 40px */
  --space-12: 3rem;      /* 48px */
  --space-14: 3.5rem;    /* 56px */
  --space-16: 4rem;      /* 64px */
  --space-20: 5rem;      /* 80px */
  --space-24: 6rem;      /* 96px */
  --space-32: 8rem;      /* 128px */

  /* --------------------------------------------------------------------------
     4. RADII
     -------------------------------------------------------------------------- */
  --radius-none: 0;
  --radius-xs: 0.25rem;
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-2xl: 1.25rem;
  --radius-3xl: 1.5rem;
  --radius-full: 9999px;

  /* --------------------------------------------------------------------------
     5. Z-INDEX SCALE
     -------------------------------------------------------------------------- */
  --z-base: 0;
  --z-dropdown: 1000;
  --z-sticky: 1100;
  --z-fixed: 1200;
  --z-modal-backdrop: 1300;
  --z-modal: 1400;
  --z-popover: 1500;
  --z-tooltip: 1600;
  --z-toast: 1700;

  /* --------------------------------------------------------------------------
     6. MOTION TOKENS
     -------------------------------------------------------------------------- */
  --ease-linear: linear;
  --ease-in: cubic-bezier(0.4, 0, 1, 1);
  --ease-out: cubic-bezier(0, 0, 0.2, 1);
  --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);

  --duration-instant: 75ms;
  --duration-fast: 150ms;
  --duration-normal: 250ms;
  --duration-slow: 400ms;
  --duration-slower: 600ms;

  /* --------------------------------------------------------------------------
     7. LAYOUT TOKENS
     -------------------------------------------------------------------------- */
  --container-narrow: 46rem;    /* 736px */
  --container-default: 72rem;   /* 1152px */
  --container-wide: 80rem;      /* 1280px */
  --container-max: 90rem;       /* 1440px */

  --header-height: 4rem;        /* 64px */
  --sidebar-width: 17.5rem;     /* 280px */
  --drawer-width: 20rem;        /* 320px */

  /* --------------------------------------------------------------------------
     8. COMPONENT-SPECIFIC TOKENS
     -------------------------------------------------------------------------- */
  --swatch-size-sm: 1.75rem;    /* 28px */
  --swatch-size-md: 2.5rem;     /* 40px */
  --swatch-size-lg: 4rem;       /* 64px */
  --swatch-radius: var(--radius-md);

  --input-height-sm: 2rem;      /* 32px */
  --input-height-md: 2.5rem;    /* 40px */
  --input-height-lg: 3rem;      /* 48px */

  --button-height-sm: 2rem;
  --button-height-md: 2.5rem;
  --button-height-lg: 3rem;

  /* --------------------------------------------------------------------------
     9. THEME COLOR-SCHEME
     -------------------------------------------------------------------------- */
  color-scheme: light;
}

/* --------------------------------------------------------------------------
   10. DARK THEME OVERRIDES
   -------------------------------------------------------------------------- */
[data-theme="dark"] {
  --surface-base: #0b0f17;
  --surface-raised: #111827;
  --surface-sunken: #050810;
  --surface-muted: #1a2231;
  --surface-inverse: var(--neutral-50);
  --surface-overlay: rgba(0, 0, 0, 0.7);
  --surface-glass: rgba(17, 24, 39, 0.72);
  --surface-code: #1a2231;

  --border-subtle: #1e293b;
  --border-default: #263244;
  --border-strong: #334155;
  --border-inverse: var(--neutral-200);

  --text-primary: #f1f5f9;
  --text-secondary: #cbd5e1;
  --text-tertiary: #94a3b8;
  --text-disabled: #64748b;
  --text-inverse: var(--neutral-900);
  --text-link: #a5b4fc;
  --text-link-hover: #c7d2fe;
  --text-code: #f9a8d4;
  --text-code-bg: #1a2231;

  --brand-primary-soft: #1e1b4b;
  --brand-accent-soft: #082f49;
  --brand-secondary-soft: #042f2e;

  --shadow-xs: 0 1px 2px 0 rgba(0, 0, 0, 0.4);
  --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.5), 0 1px 2px -1px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.5), 0 2px 4px -2px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.55), 0 4px 6px -4px rgba(0, 0, 0, 0.4);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.6), 0 8px 10px -6px rgba(0, 0, 0, 0.4);
  --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.8);

  --gradient-subtle: linear-gradient(180deg, #0b0f17 0%, #050810 100%);

  --focus-ring-color: rgba(165, 180, 252, 0.45);

  color-scheme: dark;
}

/* --------------------------------------------------------------------------
   11. MODERN RESET
   -------------------------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  -webkit-text-size-adjust: 100%;
  -moz-text-size-adjust: 100%;
  text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + var(--space-6));
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

body {
  font-family: var(--font-sans);
  font-size: var(--fs-base);
  font-weight: var(--fw-regular);
  line-height: var(--lh-normal);
  color: var(--text-primary);
  background-color: var(--surface-base);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-feature-settings: "cv02", "cv03", "cv04", "cv11", "ss01";
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
  transition: background-color var(--duration-normal) var(--ease-out),
    color var(--duration-normal) var(--ease-out);
}

/* Media elements */
img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
  height: auto;
}

svg {
  fill: currentColor;
}

/* Form elements inherit fonts */
input,
button,
textarea,
select {
  font: inherit;
  color: inherit;
}

button {
  background: none;
  border: none;
  cursor: pointer;
  color: inherit;
}

button:disabled {
  cursor: not-allowed;
}

/* Lists */
ul,
ol {
  list-style: none;
}

/* Tables */
table {
  border-collapse: collapse;
  border-spacing: 0;
  width: 100%;
}

/* Links */
a {
  color: var(--text-link);
  text-decoration: none;
  transition: color var(--duration-fast) var(--ease-out);
}

a:hover {
  color: var(--text-link-hover);
}

a:focus-visible {
  outline: none;
  box-shadow: var(--shadow-focus);
  border-radius: var(--radius-xs);
}

/* Headings */
h1, h2, h3, h4, h5, h6 {
  font-weight: var(--fw-semibold);
  line-height: var(--lh-tight);
  letter-spacing: var(--ls-tight);
  color: var(--text-primary);
  text-wrap: balance;
}

h1 {
  font-size: clamp(2rem, 4vw + 1rem, 3.25rem);
  font-weight: var(--fw-bold);
  letter-spacing: var(--ls-tighter);
}

h2 {
  font-size: clamp(1.5rem, 2.5vw + 1rem, 2.25rem);
}

h3 {
  font-size: clamp(1.25rem, 1.5vw + 1rem, 1.75rem);
}

h4 {
  font-size: var(--fs-xl);
}

h5 {
  font-size: var(--fs-lg);
}

h6 {
  font-size: var(--fs-base);
  text-transform: uppercase;
  letter-spacing: var(--ls-wider);
  color: var(--text-secondary);
}

/* Paragraphs */
p {
  line-height: var(--lh-relaxed);
  color: var(--text-secondary);
  text-wrap: pretty;
}

p + p {
  margin-top: var(--space-4);
}

/* Strong / emphasis */
strong,
b {
  font-weight: var(--fw-semibold);
  color: var(--text-primary);
}

em,
i {
  font-style: italic;
}

/* Small */
small {
  font-size: var(--fs-sm);
  color: var(--text-tertiary);
}

/* Horizontal rule */
hr {
  border: none;
  border-top: 1px solid var(--border-subtle);
  margin: var(--space-8) 0;
}

/* Code */
code,
kbd,
samp,
pre {
  font-family: var(--font-mono);
  font-size: 0.9em;
}

code {
  background-color: var(--text-code-bg);
  color: var(--text-code);
  padding: 0.125rem 0.375rem;
  border-radius: var(--radius-sm);
  font-weight: var(--fw-medium);
}

pre {
  background-color: var(--surface-code);
  color: var(--text-primary);
  padding: var(--space-4);
  border-radius: var(--radius-lg);
  overflow-x: auto;
  line-height: var(--lh-relaxed);
  border: 1px solid var(--border-subtle);
  font-size: var(--fs-sm);
}

pre code {
  background: none;
  color: inherit;
  padding: 0;
  font-weight: var(--fw-regular);
}

kbd {
  background-color: var(--surface-muted);
  border: 1px solid var(--border-default);
  border-bottom-width: 2px;
  border-radius: var(--radius-sm);
  padding: 0.125rem 0.375rem;
  font-size: 0.85em;
  color: var(--text-primary);
}

/* Selection */
::selection {
  background-color: var(--brand-primary);
  color: var(--neutral-0);
}

::-moz-selection {
  background-color: var(--brand-primary);
  color: var(--neutral-0);
}

/* Placeholder */
::placeholder {
  color: var(--text-tertiary);
  opacity: 1;
}

/* Focus visible — global */
:focus {
  outline: none;
}

:focus-visible {
  outline: 2px solid var(--border-focus);
  outline-offset: var(--focus-ring-offset);
  border-radius: var(--radius-xs);
}

/* Scrollbar styling */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--neutral-300) transparent;
}

[data-theme="dark"] * {
  scrollbar-color: var(--neutral-700) transparent;
}

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background-color: var(--neutral-300);
  border-radius: var(--radius-full);
  border: 2px solid var(--surface-base);
}

::-webkit-scrollbar-thumb:hover {
  background-color: var(--neutral-400);
}

[data-theme="dark"] ::-webkit-scrollbar-thumb {
  background-color: var(--neutral-700);
}

[data-theme="dark"] ::-webkit-scrollbar-thumb:hover {
  background-color: var(--neutral-600);
}

/* --------------------------------------------------------------------------
   12. GLOBAL UTILITY — BASE HELPERS
   -------------------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--container-default);
  margin-inline: auto;
  padding-inline: var(--space-4);
}

@media (min-width: 40rem) {
  .container {
    padding-inline: var(--space-6);
  }
}

@media (min-width: 64rem) {
  .container {
    padding-inline: var(--space-8);
  }
}

.container-narrow {
  max-width: var(--container-narrow);
}

.container-wide {
  max-width: var(--container-wide);
}

.container-max {
  max-width: var(--container-max);
}

/* Screen-reader only */
.visually-hidden,
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Skip link */
.skip-link {
  position: absolute;
  top: -100%;
  left: var(--space-4);
  z-index: var(--z-tooltip);
  padding: var(--space-3) var(--space-5);
  background-color: var(--brand-primary);
  color: var(--neutral-0);
  border-radius: var(--radius-md);
  font-weight: var(--fw-semibold);
  box-shadow: var(--shadow-lg);
  transition: top var(--duration-fast) var(--ease-out);
}

.skip-link:focus,
.skip-link:focus-visible {
  top: var(--space-4);
  color: var(--neutral-0);
  outline: none;
}

/* Text alignment helpers */
.text-left { text-align: left; }
.text-center { text-align: center; }
.text-right { text-align: right; }

/* Text color helpers */
.text-primary { color: var(--text-primary); }
.text-secondary { color: var(--text-secondary); }
.text-tertiary { color: var(--text-tertiary); }
.text-brand { color: var(--brand-primary); }
.text-success { color: var(--success-600); }
.text-warning { color: var(--warning-600); }
.text-danger { color: var(--danger-600); }

/* Font weight helpers */
.fw-regular { font-weight: var(--fw-regular); }
.fw-medium { font-weight: var(--fw-medium); }
.fw-semibold { font-weight: var(--fw-semibold); }
.fw-bold { font-weight: var(--fw-bold); }

/* Display helpers */
.hidden { display: none !important; }
.block { display: block; }
.inline-block { display: inline-block; }
.flex { display: flex; }
.inline-flex { display: inline-flex; }
.grid { display: grid; }

/* Flex helpers */
.flex-row { flex-direction: row; }
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.flex-nowrap { flex-wrap: nowrap; }
.items-start { align-items: flex-start; }
.items-center { align-items: center; }
.items-end { align-items: flex-end; }
.items-stretch { align-items: stretch; }
.justify-start { justify-content: flex-start; }
.justify-center { justify-content: center; }
.justify-end { justify-content: flex-end; }
.justify-between { justify-content: space-between; }
.flex-1 { flex: 1 1 0%; }
.flex-auto { flex: 1 1 auto; }
.flex-none { flex: none; }

/* Gap helpers */
.gap-1 { gap: var(--space-1); }
.gap-2 { gap: var(--space-2); }
.gap-3 { gap: var(--space-3); }
.gap-4 { gap: var(--space-4); }
.gap-5 { gap: var(--space-5); }
.gap-6 { gap: var(--space-6); }
.gap-8 { gap: var(--space-8); }

/* Margin helpers */
.m-0 { margin: 0; }
.mt-1 { margin-top: var(--space-1); }
.mt-2 { margin-top: var(--space-2); }
.mt-3 { margin-top: var(--space-3); }
.mt-4 { margin-top: var(--space-4); }
.mt-6 { margin-top: var(--space-6); }
.mt-8 { margin-top: var(--space-8); }
.mb-1 { margin-bottom: var(--space-1); }
.mb-2 { margin-bottom: var(--space-2); }
.mb-3 { margin-bottom: var(--space-3); }
.mb-4 { margin-bottom: var(--space-4); }
.mb-6 { margin-bottom: var(--space-6); }
.mb-8 { margin-bottom: var(--space-8); }

/* Padding helpers */
.p-0 { padding: 0; }
.p-2 { padding: var(--space-2); }
.p-3 { padding: var(--space-3); }
.p-4 { padding: var(--space-4); }
.p-5 { padding: var(--space-5); }
.p-6 { padding: var(--space-6); }
.p-8 { padding: var(--space-8); }

/* Width helpers */
.w-full { width: 100%; }
.w-auto { width: auto; }
.max-w-full { max-width: 100%; }

/* Position helpers */
.relative { position: relative; }
.absolute { position: absolute; }
.fixed { position: fixed; }
.sticky { position: sticky; }

/* Overflow helpers */
.overflow-hidden { overflow: hidden; }
.overflow-auto { overflow: auto; }
.overflow-x-auto { overflow-x: auto; }
.overflow-y-auto { overflow-y: auto; }

/* Border helpers */
.rounded-sm { border-radius: var(--radius-sm); }
.rounded-md { border-radius: var(--radius-md); }
.rounded-lg { border-radius: var(--radius-lg); }
.rounded-xl { border-radius: var(--radius-xl); }
.rounded-2xl { border-radius: var(--radius-2xl); }
.rounded-full { border-radius: var(--radius-full); }

/* Shadow helpers */
.shadow-xs { box-shadow: var(--shadow-xs); }
.shadow-sm { box-shadow: var(--shadow-sm); }
.shadow-md { box-shadow: var(--shadow-md); }
.shadow-lg { box-shadow: var(--shadow-lg); }
.shadow-xl { box-shadow: var(--shadow-xl); }
.shadow-none { box-shadow: none; }

/* --------------------------------------------------------------------------
   13. ANIMATIONS
   -------------------------------------------------------------------------- */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes fadeOut {
  from { opacity: 1; }
  to { opacity: 0; }
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-12px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.96); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

.animate-fade-in { animation: fadeIn var(--duration-normal) var(--ease-out); }
.animate-slide-up { animation: slideUp var(--duration-normal) var(--ease-out); }
.animate-slide-down { animation: slideDown var(--duration-normal) var(--ease-out); }
.animate-scale-in { animation: scaleIn var(--duration-fast) var(--ease-spring); }
.animate-pulse { animation: pulse 2s var(--ease-in-out) infinite; }
.animate-spin { animation: spin 1s linear infinite; }

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .animate-fade-in,
  .animate-slide-up,
  .animate-slide-down,
  .animate-scale-in,
  .animate-pulse,
  .animate-spin {
    animation: none !important;
  }
}

/* --------------------------------------------------------------------------
   14. LOADING SKELETON
   -------------------------------------------------------------------------- */
.skeleton {
  background: linear-gradient(90deg,
      var(--surface-muted) 0%,
      var(--surface-sunken) 50%,
      var(--surface-muted) 100%);
  background-size: 200% 100%;
  animation: shimmer 1.4s linear infinite;
  border-radius: var(--radius-md);
}

/* --------------------------------------------------------------------------
   15. BADGE / PILL
   -------------------------------------------------------------------------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: 0.125rem 0.5rem;
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
  line-height: 1;
  border-radius: var(--radius-full);
  white-space: nowrap;
}

.badge-brand {
  background-color: var(--brand-primary-soft);
  color: var(--brand-primary-text);
}

.badge-success {
  background-color: var(--success-100);
  color: var(--success-700);
}

.badge-warning {
  background-color: var(--warning-100);
  color: var(--warning-700);
}

.badge-danger {
  background-color: var(--danger-100);
  color: var(--danger-700);
}

.badge-neutral {
  background-color: var(--surface-muted);
  color: var(--text-secondary);
}

[data-theme="dark"] .badge-brand {
  color: #c7d2fe;
}

[data-theme="dark"] .badge-success {
  background-color: #052e16;
  color: #86efac;
}

[data-theme="dark"] .badge-warning {
  background-color: #451a03;
  color: #fde68a;
}

[data-theme="dark"] .badge-danger {
  background-color: #450a0a;
  color: #fca5a5;
}

/* --------------------------------------------------------------------------
   16. DIVIDER
   -------------------------------------------------------------------------- */
.divider {
  display: block;
  width: 100%;
  height: 1px;
  background-color: var(--border-subtle);
  border: none;
  margin: var(--space-6) 0;
}

.divider-vertical {
  display: inline-block;
  width: 1px;
  height: 1.25rem;
  background-color: var(--border-subtle);
  margin: 0 var(--space-3);
  vertical-align: middle;
}

/* --------------------------------------------------------------------------
   17. SURFACE CARD (BASE)
   -------------------------------------------------------------------------- */
.surface {
  background-color: var(--surface-raised);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
}

.surface-sunken {
  background-color: var(--surface-sunken);
}

.surface-muted {
  background-color: var(--surface-muted);
}

/* --------------------------------------------------------------------------
   18. GRADIENT TEXT UTILITY
   -------------------------------------------------------------------------- */
.gradient-text {
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

/* --------------------------------------------------------------------------
   19. FOCUS TRAP VISUAL AID
   -------------------------------------------------------------------------- */
:focus-visible {
  outline: 2px solid var(--border-focus);
  outline-offset: 2px;
}

button:focus-visible,
a:focus-visible,
[role="button"]:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

/* --------------------------------------------------------------------------
   20. PRINT STYLES (BASE)
   -------------------------------------------------------------------------- */
@media print {
  body {
    background: #ffffff !important;
    color: #000000 !important;
  }

  a {
    color: #000000 !important;
    text-decoration: underline !important;
  }

  .no-print,
  header nav,
  footer,
  .skip-link {
    display: none !important;
  }
}

/* --------------------------------------------------------------------------
   21. HIGH CONTRAST MODE
   -------------------------------------------------------------------------- */
@media (prefers-contrast: more) {
  :root {
    --border-subtle: var(--neutral-400);
    --border-default: var(--neutral-500);
    --text-secondary: var(--neutral-800);
  }

  [data-theme="dark"] {
    --border-subtle: var(--neutral-500);
    --border-default: var(--neutral-400);
    --text-secondary: var(--neutral-100);
  }
}

/* --------------------------------------------------------------------------
   22. FORCED COLORS MODE
   -------------------------------------------------------------------------- */
@media (forced-colors: active) {
  .badge,
  .surface {
    border: 1px solid CanvasText;
  }

  a {
    color: LinkText;
  }

  button {
    border: 1px solid ButtonText;
  }
}

/* --------------------------------------------------------------------------
   END OF FILE
   -------------------------------------------------------------------------- */