/* Argha - 2026-03-03 - #11 - Design system: CSS custom properties + base resets */

/* ─── Color tokens ─────────────────────────────────────────────────── */
:root {
  /* Canvas & surfaces */
  --bg-base:        #f8fafc;
  --bg-surface:     #ffffff;
  --bg-subtle:      #f1f5f9;
  --bg-muted:       #e2e8f0;

  /* Primary (indigo) */
  --primary:        #6366f1;
  --primary-hover:  #4f46e5;
  --primary-active: #4338ca;
  --primary-light:  #eef2ff;
  --primary-mid:    #c7d2fe;

  /* Semantic */
  --success:        #10b981;
  --success-light:  #d1fae5;
  --success-text:   #065f46;
  --warning:        #f59e0b;
  --warning-light:  #fef3c7;
  --warning-text:   #92400e;
  --danger:         #ef4444;
  --danger-light:   #fee2e2;
  --danger-text:    #991b1b;
  --info:           #06b6d4;
  --info-light:     #cffafe;
  --info-text:      #164e63;

  /* Text */
  --text-primary:   #0f172a;
  --text-secondary: #475569;
  --text-muted:     #94a3b8;
  --text-inverse:   #ffffff;

  /* Borders */
  --border:         #e2e8f0;
  --border-focus:   #6366f1;
  --border-subtle:  #f1f5f9;

  /* Shadows */
  --shadow-xs:  0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-sm:  0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-md:  0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -1px rgba(0, 0, 0, 0.04);
  --shadow-lg:  0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.04);
  --shadow-xl:  0 20px 25px -5px rgba(0, 0, 0, 0.08), 0 10px 10px -5px rgba(0, 0, 0, 0.03);

  /* Border radii */
  --radius-xs:  4px;
  --radius-sm:  6px;
  --radius-md:  10px;
  --radius-lg:  16px;
  --radius-xl:  24px;
  --radius-full: 9999px;

  /* Spacing (multiples of 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;

  /* Typography */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', monospace;

  --text-xs:   0.75rem;   /* 12px */
  --text-sm:   0.8125rem; /* 13px */
  --text-base: 0.875rem;  /* 14px */
  --text-md:   0.9375rem; /* 15px */
  --text-lg:   1rem;      /* 16px */
  --text-xl:   1.125rem;  /* 18px */
  --text-2xl:  1.25rem;   /* 20px */
  --text-3xl:  1.5rem;    /* 24px */

  --weight-normal:   400;
  --weight-medium:   500;
  --weight-semibold: 600;
  --weight-bold:     700;

  /* Transitions */
  --transition-fast: 100ms ease;
  --transition-base: 150ms ease;
  --transition-slow: 250ms ease;

  /* Navbar */
  --navbar-height: 60px;
}

/* ─── Base reset ───────────────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  font-size: var(--text-base);
  color: var(--text-primary);
  background-color: var(--bg-base);
  line-height: 1.6;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ─── Focus ring ───────────────────────────────────────────────────── */
:focus-visible {
  outline: 2px solid var(--border-focus);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

/* ─── Scrollbar ────────────────────────────────────────────────────── */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

/* ─── Selection ────────────────────────────────────────────────────── */
::selection {
  background: var(--primary-mid);
  color: var(--primary-active);
}
