/* ==========================================================================
   GIGW Accessibility Stylesheet (Guidelines for Indian Govt Websites)
   High Contrast Mode, Font Scaling (A-, A, A+), Focus Outlines, Screen-Reader
   ========================================================================== */

/* Font Size Modifiers */
html.font-sm {
  font-size: 14px;
}

html.font-md {
  font-size: 16px; /* Standard */
}

html.font-lg {
  font-size: 18px;
}

html.font-xl {
  font-size: 20px;
}

/* Screen Reader Only Utility */
.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;
}

/* Enhanced Focus States for Keyboard Navigation (GIGW Criterion 2.4.7) */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid #ff671f !important;
  outline-offset: 2px !important;
}

/* ==========================================================================
   High Contrast Mode (Dark & High Saturation)
   ========================================================================== */
body.theme-high-contrast {
  --bg-body: #000000;
  --bg-card: #121212;
  --bg-subtle: #1e1e1e;
  --border-color: #444444;
  --border-focus: #ffff00;
  --text-main: #ffffff;
  --text-muted: #d1d5db;
  --text-light: #9ca3af;
  --primary: #60a5fa;
  --accent: #fbbf24;
}

body.theme-high-contrast .site-header {
  background: #000000;
  border-bottom: 2px solid #ffff00;
}

body.theme-high-contrast .brand-text h1 {
  color: #ffffff;
}

body.theme-high-contrast .nav-link {
  color: #e5e7eb;
}

body.theme-high-contrast .nav-link:hover,
body.theme-high-contrast .nav-link.active {
  color: #fbbf24;
}

body.theme-high-contrast .service-card,
body.theme-high-contrast .article-card,
body.theme-high-contrast .census-phases-section,
body.theme-high-contrast .faq-item,
body.theme-high-contrast .article-main-container,
body.theme-high-contrast .sidebar-widget,
body.theme-high-contrast .search-modal-card {
  background: #181818;
  border-color: #3f3f46;
  color: #ffffff;
}

body.theme-high-contrast .article-card-title a,
body.theme-high-contrast .faq-question,
body.theme-high-contrast .article-headline,
body.theme-high-contrast .article-prose h2,
body.theme-high-contrast .article-prose h3 {
  color: #ffffff;
}

body.theme-high-contrast .article-prose {
  color: #e4e4e7;
}

body.theme-high-contrast .article-prose blockquote,
body.theme-high-contrast .article-prose .step-box,
body.theme-high-contrast .faq-answer {
  background: #27272a;
  color: #ffffff;
}

body.theme-high-contrast a:focus-visible,
body.theme-high-contrast button:focus-visible {
  outline: 3px solid #ffff00 !important;
}

/* ==========================================================================
   Sepia / Warm Reading Theme
   ========================================================================== */
body.theme-sepia {
  --bg-body: #fbf0d9;
  --bg-card: #f4ecd8;
  --bg-subtle: #ede1c7;
  --border-color: #d8caa9;
  --text-main: #382c1e;
  --text-muted: #5e4e3b;
  --primary: #4a3420;
  --accent: #b45309;
}

body.theme-sepia .site-header {
  background: #f4ecd8;
}
