/* ═══════════════════════════════════════════════════════════
   GLOBAL.CSS — IntakhabAlam Onboarding
   Design System: Variables, Reset, Base Typography
═══════════════════════════════════════════════════════════ */

/* ─── CSS Variables ─────────────────────────────────────── */
:root {
  /* Core Backgrounds */
  --bg-canvas:        #070C18;
  --bg-base:          #0B1020;
  --bg-surface:       #111827;
  --bg-elevated:      #151F35;
  --bg-overlay:       #1A2540;

  /* Accent Palette */
  --accent-blue:      #3B82F6;
  --accent-cyan:      #06B6D4;
  --accent-purple:    #8B5CF6;
  --accent-blue-dim:  rgba(59, 130, 246, 0.15);
  --accent-cyan-dim:  rgba(6, 182, 212, 0.12);
  --accent-purple-dim:rgba(139, 92, 246, 0.12);

  /* Gradient Presets */
  --gradient-primary: linear-gradient(135deg, #3B82F6 0%, #8B5CF6 100%);
  --gradient-cool:    linear-gradient(135deg, #06B6D4 0%, #3B82F6 100%);
  --gradient-brand:   linear-gradient(135deg, #3B82F6 0%, #06B6D4 50%, #8B5CF6 100%);
  --gradient-text:    linear-gradient(135deg, #60A5FA 0%, #A78BFA 50%, #22D3EE 100%);
  --gradient-card:    linear-gradient(145deg, rgba(255,255,255,0.04) 0%, rgba(255,255,255,0.01) 100%);

  /* Text Colors */
  --text-primary:     #F0F4FF;
  --text-secondary:   #94A3B8;
  --text-muted:       #475569;
  --text-accent:      #60A5FA;
  --text-white:       #FFFFFF;

  /* Border Colors */
  --border-subtle:    rgba(255, 255, 255, 0.06);
  --border-default:   rgba(255, 255, 255, 0.10);
  --border-emphasis:  rgba(59, 130, 246, 0.30);
  --border-glow:      rgba(59, 130, 246, 0.50);

  /* Typography */
  --font-display:     'Syne', sans-serif;
  --font-body:        'DM Sans', sans-serif;
  --font-mono:        'JetBrains Mono', monospace;

  /* Spacing Scale */
  --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;
  --space-16:  64px;

  /* Radius */
  --radius-sm:    6px;
  --radius-md:    10px;
  --radius-lg:    16px;
  --radius-xl:    24px;
  --radius-2xl:   32px;
  --radius-full:  9999px;

  /* Shadows */
  --shadow-sm:    0 1px 3px rgba(0,0,0,0.4);
  --shadow-md:    0 4px 16px rgba(0,0,0,0.5);
  --shadow-lg:    0 8px 40px rgba(0,0,0,0.6);
  --shadow-glow:  0 0 30px rgba(59, 130, 246, 0.25);
  --shadow-glow-strong: 0 0 60px rgba(59, 130, 246, 0.40);
  --shadow-purple-glow: 0 0 40px rgba(139, 92, 246, 0.30);

  /* Transitions */
  --transition-fast:   150ms ease;
  --transition-base:   250ms ease;
  --transition-slow:   450ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-spring: 500ms cubic-bezier(0.34, 1.56, 0.64, 1);

  /* Z-Index Stack */
  --z-base:       1;
  --z-float:      10;
  --z-overlay:    100;
  --z-toast:      200;
  --z-loading:    300;
}

/* ─── Reset & Base ──────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg-canvas);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: var(--font-body);
}

input {
  font-family: var(--font-body);
}

svg {
  display: block;
}

/* ─── Typography Utilities ──────────────────────────────── */
.text-gradient {
  background: var(--gradient-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: inline-block;
}

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

/* ─── Glassmorphism Utility ─────────────────────────────── */
.glass {
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-default);
}

.glass--strong {
  background: rgba(255, 255, 255, 0.07);
  backdrop-filter: blur(40px);
  -webkit-backdrop-filter: blur(40px);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

/* ─── Visibility Utilities ──────────────────────────────── */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
}

/* ─── Focus Styles ──────────────────────────────────────── */
:focus-visible {
  outline: 2px solid var(--accent-blue);
  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-default);
  border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--border-emphasis);
}

/* ─── Selection ─────────────────────────────────────────── */
::selection {
  background: rgba(59, 130, 246, 0.35);
  color: var(--text-white);
}
