/* ==========================================================================
   ERASHAD JULEKHA FOUNDATION (EJ FOUNDATION)
   Design System & Global Base Styles
   Theme: Smart Botanical Emerald & Warm Champagne (High-End Premium NGO)
   Registered NZ Charity: CC63864
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Google Fonts Import & CSS Custom Properties (Design Tokens)
   -------------------------------------------------------------------------- */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;1,400&family=Inter:wght@300;400;500;600;700&family=Playfair+Display:ital,wght@0,600;0,700;1,400;1,600&display=swap');

:root {
  /* Smart Botanical Green Palette */
  --color-primary: #0d382c;        /* Deep British Forest Emerald */
  --color-primary-dark: #08241c;   /* Midnight Evergreen */
  --color-primary-light: #165342;  /* Rich Sage Emerald */
  --color-primary-soft: #eaf3ef;   /* Frosted Mint White */
  --color-primary-muted: #23745d;  /* Mid Sage */

  /* Warm Champagne / Sand Luxury Accents */
  --color-accent: #c8965e;         /* Warm Sand Gold / Champagne */
  --color-accent-hover: #b38048;   /* Deep Bronze Gold */
  --color-accent-light: #fbf5ee;   /* Soft Linen Tint */
  --color-accent-glow: rgba(200, 150, 94, 0.22);

  /* Modern Supporting Tones */
  --color-secondary: #2a9d8f;      /* Soft Persian Teal */
  --color-secondary-light: #e6f6f4;/* Crisp Pale Aqua */

  /* Neutral Surface & Typography Palette */
  --color-bg: #fbfbfa;             /* Ultra-clean warm off-white */
  --color-surface: #ffffff;        /* Pure White Card */
  --color-surface-alt: #f4f6f4;    /* Light Sage Surface */
  --color-surface-subtle: #f8faf8; /* Soft Whisper Tint */
  
  --color-text-main: #192b23;      /* Deep Forest Slate - High Contrast */
  --color-text-muted: #536b61;     /* Botanical Slate - Secondary */
  --color-text-light: #899e95;     /* Subtle Slate */
  --color-text-inverse: #ffffff;   /* Pure White Text */

  --color-border: #e3ebe6;         /* Refined Pale Emerald Border */
  --color-border-hover: #c5d8cf;   /* Subtle Hover Border */
  --color-border-subtle: rgba(13, 56, 44, 0.06);

  /* Status Colors */
  --color-success: #16a34a;
  --color-warning: #d97706;
  --color-danger: #dc2626;
  --color-info: #0284c7;

  /* Typography */
  --font-heading: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-serif: 'Playfair Display', Georgia, serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  /* Responsive Spacing Scale */
  --space-2xs: 0.25rem;  /* 4px */
  --space-xs: 0.5rem;    /* 8px */
  --space-sm: 0.75rem;   /* 12px */
  --space-md: 1.25rem;   /* 20px */
  --space-lg: 2rem;      /* 32px */
  --space-xl: 3rem;      /* 48px */
  --space-2xl: 4.5rem;   /* 72px */
  --space-3xl: 6.5rem;   /* 104px */

  /* Radii */
  --radius-xs: 4px;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 2px 4px rgba(13, 56, 44, 0.03);
  --shadow-md: 0 6px 16px -2px rgba(13, 56, 44, 0.05), 0 2px 6px -1px rgba(13, 56, 44, 0.03);
  --shadow-lg: 0 16px 32px -4px rgba(13, 56, 44, 0.07), 0 4px 12px -2px rgba(13, 56, 44, 0.03);
  --shadow-xl: 0 24px 48px -8px rgba(13, 56, 44, 0.12);
  --shadow-gold: 0 8px 24px rgba(200, 150, 94, 0.28);

  /* Transitions */
  --transition-fast: 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-normal: 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-slow: 0.5s cubic-bezier(0.16, 1, 0.3, 1);

  /* Layout */
  --container-width: 1200px;
  --container-narrow: 840px;
  --container-hero: 980px;
  --header-height: 80px;
}

/* --------------------------------------------------------------------------
   2. Modern Reset & Box Sizing
   -------------------------------------------------------------------------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--color-text-main);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  width: 100%;
}

/* Accessibility Skip Link */
.skip-link {
  position: absolute;
  top: -100px;
  left: 1rem;
  background: var(--color-primary);
  color: #ffffff;
  padding: 0.6rem 1.2rem;
  border-radius: var(--radius-sm);
  z-index: 9999;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.9rem;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  transition: top var(--transition-fast);
}

.skip-link:focus {
  top: 1rem;
}

img, picture, video, canvas, svg {
  display: block;
  max-width: 100%;
  height: auto;
}

input, button, textarea, select {
  font: inherit;
  color: inherit;
}

a {
  color: inherit;
  text-decoration: none;
  transition: all var(--transition-fast);
}

ul, ol {
  list-style: none;
}

/* --------------------------------------------------------------------------
   3. Base Typography
   -------------------------------------------------------------------------- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--color-primary);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.025em;
}

h1 {
  font-size: clamp(2rem, 3.8vw + 0.6rem, 3.6rem);
  font-weight: 800;
  line-height: 1.15;
}

h2 {
  font-size: clamp(1.6rem, 2.5vw + 0.4rem, 2.4rem);
  margin-bottom: var(--space-md);
}

h3 {
  font-size: clamp(1.2rem, 1.5vw + 0.2rem, 1.5rem);
  margin-bottom: var(--space-xs);
}

h4 {
  font-size: 1.12rem;
  margin-bottom: var(--space-xs);
}

p {
  margin-bottom: var(--space-md);
  color: var(--color-text-main);
}

p:last-child {
  margin-bottom: 0;
}

p.lead {
  font-size: clamp(1.05rem, 1.2vw + 0.4rem, 1.2rem);
  line-height: 1.7;
  color: var(--color-text-muted);
}

p.lead-subtle {
  font-size: 1.05rem;
  color: var(--color-text-muted);
  line-height: 1.6;
}

strong, b {
  font-weight: 700;
}

/* --------------------------------------------------------------------------
   4. Layout Containers & Structural Sections
   -------------------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--container-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--space-lg);
  padding-right: var(--space-lg);
}

.container-narrow {
  max-width: var(--container-narrow);
}

.container-hero {
  max-width: var(--container-hero);
}

.section {
  padding-top: var(--space-3xl);
  padding-bottom: var(--space-3xl);
  position: relative;
}

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

.section-bg-slate {
  background-color: var(--color-surface-alt);
}

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

.section-bg-navy {
  background: linear-gradient(145deg, var(--color-primary-dark) 0%, var(--color-primary) 100%);
  color: var(--color-text-inverse);
}

.section-bg-navy h2,
.section-bg-navy h3,
.section-bg-navy h4 {
  color: var(--color-text-inverse);
}

.section-bg-navy p {
  color: rgba(255, 255, 255, 0.85);
}

/* Text Alignment Utilities */
.text-center {
  text-align: center !important;
}

.text-left {
  text-align: left !important;
}

.text-right {
  text-align: right !important;
}

.section-header {
  margin-bottom: var(--space-2xl);
}

.section-header.text-center {
  text-align: center;
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.section-header.text-center .section-tag {
  margin-left: auto;
  margin-right: auto;
}

.section-header.text-center .lead-subtle {
  margin-left: auto;
  margin-right: auto;
}

/* Section Tag / Eyebrow */
.section-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0.35rem 0.9rem;
  background-color: var(--color-primary-soft);
  color: var(--color-primary);
  font-family: var(--font-heading);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border-radius: var(--radius-full);
  margin-bottom: var(--space-sm);
  border: 1px solid rgba(13, 56, 44, 0.08);
}

.section-tag.gold {
  background-color: var(--color-accent-light);
  color: var(--color-accent-hover);
  border-color: rgba(200, 150, 94, 0.25);
}

.section-tag.emerald {
  background-color: var(--color-primary-soft);
  color: var(--color-primary-light);
  border-color: rgba(22, 83, 66, 0.15);
}

/* Grid Systems */
.grid {
  display: grid;
  gap: var(--space-xl);
}

.grid-2 {
  grid-template-columns: repeat(2, 1fr);
}

.grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

.grid-4 {
  grid-template-columns: repeat(4, 1fr);
}

/* --------------------------------------------------------------------------
   5. Global Responsive Media Queries
   -------------------------------------------------------------------------- */
@media (max-width: 1024px) {
  :root {
    --space-2xl: 3.5rem;
    --space-3xl: 4.5rem;
    --header-height: 72px;
  }
  .grid {
    gap: var(--space-lg);
  }
  .grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }
  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
  .section {
    padding-top: var(--space-2xl);
    padding-bottom: var(--space-2xl);
  }
}

@media (max-width: 768px) {
  :root {
    --space-lg: 1.5rem;
    --space-xl: 2.25rem;
    --space-2xl: 3rem;
    --space-3xl: 3.75rem;
  }
  .container {
    padding-left: var(--space-md);
    padding-right: var(--space-md);
  }
  .grid-2, .grid-3, .grid-4 {
    grid-template-columns: 1fr;
  }
  .section-header {
    margin-bottom: var(--space-xl);
  }
}

@media (max-width: 480px) {
  :root {
    --space-md: 1rem;
    --space-lg: 1.25rem;
    --space-xl: 1.75rem;
    --space-2xl: 2.5rem;
    --space-3xl: 3rem;
  }
  .container {
    padding-left: 1rem;
    padding-right: 1rem;
  }
}
