/* ══════════════════════════════════════════════════════════
   ADHYAYAN — Design System Tokens
   Single source of truth for all design values
   ══════════════════════════════════════════════════════════ */

/* ── Google Fonts: Poppins, Doto, Righteous ────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700;800&family=Doto:wght@400;500;600;700;800&family=Righteous&display=swap');

:root {
  /* ── Color Palette ─────────────────────────────────────────── */

  /* Primary Background — Clean white */
  --color-bg-primary: #FFFFFF;
  --color-bg-secondary: #F8F9FA;
  --color-bg-tertiary: #F0F2F5;

  /* Text Colors */
  --color-text-primary: #1A1A2E;
  --color-text-secondary: #4A5568;
  --color-text-tertiary: #718096;
  --color-text-muted: #A0AEC0;
  --color-text-inverse: #FFFFFF;

  /* Accent Colors */
  --color-accent-blue: #2E86AB;
  --color-accent-blue-light: #E8F4F8;
  --color-accent-blue-dark: #1E5A75;

  --color-accent-green: #2D6A4F;
  --color-accent-green-light: #E8F5E9;

  --color-accent-orange: #E76F51;
  --color-accent-orange-light: #FFF3E0;

  --color-accent-yellow: #E9C46A;
  --color-accent-yellow-light: #FFFDE7;

  --color-accent-red: #C1121F;
  --color-accent-red-light: #FFEBEE;

  /* Legacy colors (for backward compatibility during migration) */
  --navy: #1B3A6B;
  --blue: #2E86AB;
  --orange: #E76F51;
  --green: #2D6A4F;
  --yellow: #E9C46A;
  --red: #C1121F;
  --light: #F0F6FF;
  --white: #FFFFFF;
  --gray: #F5F5F5;
  --dark: #1A1A2E;
  --mid: #718096;

  /* ── Typography ────────────────────────────────────────────── */

  /* Font Family */
  --font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  /* Font Sizes */
  --font-size-xs: 10px;
  --font-size-sm: 12px;
  --font-size-base: 14px;
  --font-size-md: 16px;
  --font-size-lg: 18px;
  --font-size-xl: 20px;
  --font-size-2xl: 24px;
  --font-size-3xl: 28px;
  --font-size-4xl: 32px;

  /* Font Weights */
  --font-weight-regular: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;
  --font-weight-extrabold: 800;

  /* Line Heights */
  --line-height-tight: 1.2;
  --line-height-normal: 1.4;
  --line-height-relaxed: 1.6;
  --line-height-loose: 1.8;

  /* ── Spacing ───────────────────────────────────────────────── */

  --space-0: 0;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-7: 28px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-16: 64px;

  /* ── Sizing ────────────────────────────────────────────────── */

  /* Border Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-full: 9999px;

  /* Legacy radius */
  --radius: 16px;

  /* Icon Sizes */
  --icon-sm: 16px;
  --icon-md: 20px;
  --icon-lg: 24px;
  --icon-xl: 32px;

  /* Button Heights */
  --button-height-sm: 36px;
  --button-height-md: 44px;
  --button-height-lg: 52px;

  /* Touch Targets (minimum 44px for accessibility) */
  --touch-target-min: 44px;

  /* ── Shadows ───────────────────────────────────────────────── */

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.07);
  --shadow-lg: 0 10px 20px rgba(0, 0, 0, 0.1);
  --shadow-card: 0 2px 8px rgba(0, 0, 0, 0.08);

  /* ── Transitions ───────────────────────────────────────────── */

  --transition-fast: 150ms ease;
  --transition-normal: 200ms ease;
  --transition-slow: 300ms ease;

  /* ── Z-Index Scale ─────────────────────────────────────────── */

  --z-base: 0;
  --z-dropdown: 100;
  --z-modal: 500;
  --z-toast: 900;
  --z-tooltip: 1000;
}

/* ── Base Reset ──────────────────────────────────────────────── */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  font-family: var(--font-family);
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-regular);
  line-height: var(--line-height-normal);
  color: var(--color-text-primary);
  background-color: var(--color-bg-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

/* ── Typography Utilities ────────────────────────────────────── */

.text-xs { font-size: var(--font-size-xs); }
.text-sm { font-size: var(--font-size-sm); }
.text-base { font-size: var(--font-size-base); }
.text-md { font-size: var(--font-size-md); }
.text-lg { font-size: var(--font-size-lg); }
.text-xl { font-size: var(--font-size-xl); }
.text-2xl { font-size: var(--font-size-2xl); }

.font-regular { font-weight: var(--font-weight-regular); }
.font-medium { font-weight: var(--font-weight-medium); }
.font-semibold { font-weight: var(--font-weight-semibold); }
.font-bold { font-weight: var(--font-weight-bold); }

.text-primary { color: var(--color-text-primary); }
.text-secondary { color: var(--color-text-secondary); }
.text-tertiary { color: var(--color-text-tertiary); }
.text-muted { color: var(--color-text-muted); }

/* ── Scrollbar (light theme) ─────────────────────────────────── */

::-webkit-scrollbar {
  width: 4px;
}

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

::-webkit-scrollbar-thumb {
  background: var(--color-text-muted);
  border-radius: 2px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--color-text-tertiary);
}
