/* ==========================================================================
   SEER Foundation - Core Design System & Variables
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Noto+Nastaliq+Urdu:wght@400;700&family=Poppins:wght@500;600;700;800&family=Open+Dyslexic&display=swap');

:root {
  /* Color Palette */
  --color-primary: #2B2B2B;        /* Dark Grey */
  --color-secondary: #3A3A3A;      /* Deep Charcoal */
  --color-accent: #F4B400;         /* Sunset Gold */
  --color-accent-hover: #E6A700;   /* Warm Gold */
  --color-bg: #FFFFFF;             /* White */
  --color-bg-neutral: #F8F8F8;     /* Soft Grey */
  --color-text: #1A1A1A;           /* Near Black */
  --color-text-light: #555555;     /* Lighter text for secondary info */
  --color-focus: #2196F3;          /* High contrast focus ring color */

  /* High Contrast Mode Variables (Updated via JS) */
  --hc-bg: #000000;
  --hc-text: #FFFFFF;
  --hc-accent: #FFFF00;
  --hc-link: #54A0FF;

  /* Typography */
  --font-heading: 'Poppins', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-urdu: 'Noto Nastaliq Urdu', serif;
  
  /* Font Size Multiplier (for accessibility toolbar) */
  --text-multiplier: 1;

  /* Spacing */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 2rem;
  --space-lg: 4rem;
  --space-xl: 6rem;

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

  /* Transitions */
  --transition-speed: 0.3s;
}

/* ==========================================================================
   Reset & Base Styles
   ========================================================================== */

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

html {
  font-size: calc(16px * var(--text-multiplier));
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  color: var(--color-text);
  background-color: var(--color-bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Reduced Motion Preference */
@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;
  }
}

body.reduced-motion *, body.reduced-motion *::before, body.reduced-motion *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
}

/* Typography Elements */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--color-primary);
  line-height: 1.2;
  margin-bottom: var(--space-sm);
}

h1 { font-size: clamp(2.5rem, 5vw, 4rem); font-weight: 800; }
h2 { font-size: clamp(2rem, 4vw, 3rem); font-weight: 700; }
h3 { font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 600; }

p {
  margin-bottom: var(--space-sm);
}

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color var(--transition-speed);
}

a:hover {
  color: var(--color-accent);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ==========================================================================
   Accessibility Fundamentals
   ========================================================================== */

/* Visible Focus Indicator */
:focus-visible {
  outline: 3px solid var(--color-focus);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

/* Skip to Content Link */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--color-primary);
  color: white;
  padding: 8px;
  z-index: 10000;
  transition: top 0.2s;
}

.skip-link:focus {
  top: 0;
}

/* 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: 0;
}

/* ==========================================================================
   Accessibility Theme Overrides (Toggled via JS)
   ========================================================================== */

/* High Contrast Mode */
body.high-contrast {
  background-color: var(--hc-bg);
  color: var(--hc-text);
}

body.high-contrast h1, 
body.high-contrast h2, 
body.high-contrast h3, 
body.high-contrast h4, 
body.high-contrast h5, 
body.high-contrast h6 {
  color: var(--hc-accent);
}

body.high-contrast a {
  color: var(--hc-link);
  text-decoration: underline;
}

body.high-contrast .btn-primary {
  background-color: var(--hc-accent);
  color: var(--hc-bg);
  border: 2px solid var(--hc-accent);
}

/* Dyslexia Friendly Font */
body.dyslexia-font {
  --font-body: 'Open Dyslexic', sans-serif;
  --font-heading: 'Open Dyslexic', sans-serif;
}

/* Urdu Language Container */
[lang="ur"] {
  font-family: var(--font-urdu);
  direction: rtl;
}

/* ==========================================================================
   Layout & Components
   ========================================================================== */

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-sm);
}

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

.section-bg-neutral {
  background-color: var(--color-bg-neutral);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-full);
  font-family: var(--font-heading);
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: all var(--transition-speed);
  border: none;
  font-size: 1rem;
}

.btn-primary {
  background-color: var(--color-accent);
  color: var(--color-primary);
}

.btn-primary:hover, .btn-primary:focus {
  background-color: var(--color-accent-hover);
  color: var(--color-primary);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(244, 180, 0, 0.3);
}

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

.btn-secondary:hover, .btn-secondary:focus {
  background-color: var(--color-secondary);
  color: var(--color-bg);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(43, 43, 43, 0.2);
}

/* Accessibility Toolbar (Fixed Bottom/Top) */
.accessibility-toolbar {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 9999;
  background: var(--color-bg);
  border-radius: var(--radius-lg);
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
  padding: 0.5rem;
  display: flex;
  gap: 0.5rem;
  flex-direction: column;
}

.accessibility-toolbar button {
  background: none;
  border: 1px solid #ddd;
  padding: 0.5rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-family: var(--font-body);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.accessibility-toolbar button:hover {
  background: var(--color-bg-neutral);
}

/* Header & Nav */
.site-header {
  background: var(--color-bg);
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
  position: sticky;
  top: 0;
  z-index: 1000;
  padding: 1rem 0;
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--color-primary);
  text-decoration: none;
}

.logo span {
  color: var(--color-accent);
}

.main-nav ul {
  display: flex;
  list-style: none;
  gap: 2rem;
}

.main-nav a {
  font-weight: 500;
  color: var(--color-text);
}

.main-nav a:hover,
.main-nav a[aria-current="page"] {
  color: var(--color-accent);
}

/* Hero Section */
.hero {
  position: relative;
  background-color: var(--color-primary);
  color: white;
  padding: var(--space-xl) 0;
  overflow: hidden;
}

.hero::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(135deg, rgba(43,43,43,0.9) 0%, rgba(58,58,58,0.7) 100%);
  z-index: 1;
}

.hero-bg {
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  object-fit: cover;
  z-index: 0;
}

.hero .container {
  position: relative;
  z-index: 2;
  max-width: 800px;
  margin: 0;
}

.hero h1 {
  color: white;
  margin-bottom: var(--space-md);
}

.hero-actions {
  display: flex;
  gap: 1rem;
  margin-top: var(--space-md);
}

/* Footer */
.site-footer {
  background-color: var(--color-primary);
  color: white;
  padding: var(--space-xl) 0 var(--space-md);
}

.site-footer h3 {
  color: var(--color-accent);
}

.site-footer a {
  color: #ccc;
}

.site-footer a:hover {
  color: white;
}

/* ==========================================================================
   Mobile Responsiveness
   ========================================================================== */

@media (max-width: 768px) {
  .nav-container {
    flex-direction: column;
    gap: 1rem;
  }
  
  .main-nav ul {
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
  }
  
  .hero h1 {
    font-size: 2.5rem;
  }
  
  .hero-actions {
    flex-direction: column;
  }
  
  .accessibility-toolbar {
    flex-direction: row;
    bottom: 0;
    right: 0;
    width: 100%;
    border-radius: 0;
    justify-content: center;
    padding: 0.5rem;
  }
}

