/* ===================================================================
   GRS PARBHANI - MAIN STYLES
   WCAG 2.1 AA Compliant | Root-relative assets | Parbhani (Deep Ocean Blue)
   =================================================================== */

/* ============================================
   CSS RESET & BASE
   ============================================ */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  font-family: 'Inter', 'Noto Sans Devanagari', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  line-height: 1.6;
  color: #1a1a1a;
  background-color: #ffffff;
  overflow-x: hidden;
  min-height: 100vh;
}

/* ============================================
   CSS VARIABLES - WCAG AA COMPLIANT COLORS
   ============================================ */
:root {
  /* Primary Colors - Parbhani (Deep Ocean Blue) */
  --primary: #1E3A8A;
  --primary-hover: #1E40AF;
  --primary-light: #3B82F6;
  --primary-dark: #1E293B;
  
  /* Accent Colors */
  --accent: #FCD34D;
  --accent-hover: #FBBF24;
  --accent-dark: #F59E0B;
  
  /* Text Colors - WCAG AA compliant */
  --text-primary: #1a1a1a;        /* 16:1 on white */
  --text-secondary: #4a4a4a;      /* 9:1 on white */
  --text-muted: #6b7280;          /* 4.6:1 on white - AA compliant */
  --text-on-primary: #f8fafc;     /* 13.1:1 on primary */
  --text-on-accent: #1a1a1a;      /* 16:1 on accent */
  
  /* Background Colors */
  --bg-primary: #ffffff;
  --bg-secondary: #f9fafb;
  --bg-tertiary: #f3f4f6;
  --bg-dark: #1f2937;
  
  /* Border Colors */
  --border: #e5e7eb;              /* 3.4:1 on white - AA for UI */
  --border-hover: #d1d5db;
  --border-focus: #2563eb;        /* 5.1:1 on white */
  
  /* Status Colors - WCAG AA compliant */
  --success: #10b981;             /* 3.2:1 on white for large text */
  --success-dark: #065f46;        /* 7.8:1 on white */
  --error: #ef4444;               /* 3.9:1 on white for large text */
  --error-dark: #991b1b;          /* 7.5:1 on white */
  --warning: #f97316;             /* 3.4:1 on white for large text */
  --warning-dark: #92400e;        /* 8.9:1 on white */
  --info: #3b82f6;                /* 3.1:1 on white for large text */
  --info-dark: #1e40af;           /* 8.6:1 on white */
  
  /* Grayscale */
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;
  
  /* Spacing */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;
  
  /* Typography */
  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 1.875rem;
  --text-4xl: 2.25rem;
  --text-5xl: 3rem;
  --text-6xl: 3.75rem;
  
  /* Line Heights */
  --leading-tight: 1.25;
  --leading-snug: 1.375;
  --leading-normal: 1.5;
  --leading-relaxed: 1.625;
  --leading-loose: 2;
  
  /* Font Weights */
  --font-normal: 400;
  --font-medium: 500;
  --font-semibold: 600;
  --font-bold: 700;
  
  /* Border Radius */
  --radius-sm: 0.25rem;
  --radius: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-full: 9999px;
  
  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1), 0 2px 4px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1), 0 4px 6px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.1), 0 10px 10px rgba(0, 0, 0, 0.04);
  
  /* Transitions */
  --transition-fast: 150ms ease;
  --transition: 200ms ease;
  --transition-slow: 300ms ease;
  
  /* Z-index */
  --z-dropdown: 1000;
  --z-sticky: 1020;
  --z-fixed: 1030;
  --z-modal-backdrop: 1040;
  --z-modal: 1050;
  --z-tooltip: 1070;
}

/* ============================================
   TYPOGRAPHY
   ============================================ */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Poppins', 'Noto Sans Devanagari', sans-serif;
  font-weight: var(--font-bold);
  line-height: var(--leading-tight);
  color: var(--text-primary);
  margin-bottom: var(--space-4);
}

h1 { font-size: var(--text-5xl); }
h2 { font-size: var(--text-4xl); }
h3 { font-size: var(--text-3xl); }
h4 { font-size: var(--text-2xl); }
h5 { font-size: var(--text-xl); }
h6 { font-size: var(--text-lg); }

p {
  margin-bottom: var(--space-4);
  line-height: var(--leading-relaxed);
  color: var(--text-secondary);
}

strong, b {
  font-weight: var(--font-bold);
  color: var(--text-primary);
}

em, i {
  font-style: italic;
}

/* ============================================
   LINKS - WCAG AA COMPLIANT
   ============================================ */
a {
  color: var(--primary);
  text-decoration: none;
  transition: var(--transition);
  cursor: pointer;
}

a:hover {
  color: var(--primary-hover);
  text-decoration: underline; /* WCAG: Not color alone */
}

a:focus {
  outline: 3px solid var(--border-focus);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

a:visited {
  color: #6b21a8; /* WCAG AA: 8.2:1 on white */
}

/* ============================================
   FOCUS STYLES - WCAG 2.1 AA
   ============================================ */
*:focus-visible {
  outline: 3px solid var(--border-focus);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

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

/* ============================================
   SKIP LINK - ACCESSIBILITY
   ============================================ */
.skip-link {
  position: absolute;
  top: -100px;
  left: 0;
  background: var(--primary);
  color: var(--text-on-primary);
  padding: var(--space-3) var(--space-6);
  z-index: var(--z-tooltip);
  font-weight: var(--font-bold);
  border-radius: 0 0 var(--radius) 0;
  transition: var(--transition);
}

.skip-link:focus {
  top: 0;
  outline-offset: 3px;
}

/* ============================================
   LAYOUT
   ============================================ */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-6);
}

.container-wide {
  max-width: 1400px;
}

.container-narrow {
  max-width: 900px;
}

section {
  padding: var(--space-16) 0;
}

main {
  min-height: 60vh;
}

#main-content {
  scroll-margin-top: 100px;
}

/* ============================================
   UTILITY CLASSES
   ============================================ */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

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

.bg-primary { background-color: var(--bg-primary); }
.bg-secondary { background-color: var(--bg-secondary); }
.bg-tertiary { background-color: var(--bg-tertiary); }
.bg-dark { background-color: var(--bg-dark); }

.mt-0 { margin-top: 0; }
.mt-4 { margin-top: var(--space-4); }
.mt-8 { margin-top: var(--space-8); }
.mb-0 { margin-bottom: 0; }
.mb-4 { margin-bottom: var(--space-4); }
.mb-8 { margin-bottom: var(--space-8); }

.pt-0 { padding-top: 0; }
.pt-8 { padding-top: var(--space-8); }
.pb-0 { padding-bottom: 0; }
.pb-8 { padding-bottom: var(--space-8); }

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

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

/* ============================================
   PRINT STYLES
   ============================================ */
@media print {
  *,
  *::before,
  *::after {
    background: transparent !important;
    color: #000 !important;
    box-shadow: none !important;
    text-shadow: none !important;
  }
  
  a,
  a:visited {
    text-decoration: underline;
  }
  
  a[href]::after {
    content: " (" attr(href) ")";
  }
  
  abbr[title]::after {
    content: " (" attr(title) ")";
  }
  
  img {
    max-width: 100% !important;
  }
  
  p,
  h2,
  h3 {
    orphans: 3;
    widows: 3;
  }
  
  h2,
  h3 {
    page-break-after: avoid;
  }
  
  header,
  footer,
  .no-print {
    display: none;
  }
}
