/* ==========================================================================
   HIJRA LAW FIRM — GLOBAL DESIGN SYSTEM & STYLESHEET
   Brand Colors: Deep Navy (#0A2342), Royal Corporate Blue (#0A2E73),
   Premium Silver (#C0C0C0), Dark Charcoal (#1F2937), Gold Accent (#C6A15B)
   ========================================================================== */

/* 1. Google Fonts Imports */
@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@500;600;700;800&family=Plus+Jakarta+Sans:wght@300;400;500;600;700&display=swap');

/* 2. Custom Properties / CSS Tokens */
:root {
  /* Brand Palette */
  --color-navy: #0A2342;
  --color-navy-dark: #061528;
  --color-royal-blue: #0A2E73;
  --color-royal-blue-light: #164092;
  --color-silver: #C0C0C0;
  --color-silver-light: #E5E7EB;
  --color-silver-subtle: #F1F5F9;
  --color-charcoal: #1F2937;
  --color-charcoal-muted: #4B5563;
  --color-charcoal-light: #6B7280;
  --color-white: #FFFFFF;
  --color-gold: #C6A15B;
  --color-gold-hover: #D4AF37;
  --color-gold-muted: rgba(198, 161, 91, 0.15);
  
  /* Status & Accents */
  --color-success: #059669;
  --color-warning: #D97706;
  --color-error: #DC2626;

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

  /* Spacing System */
  --space-xs: 0.25rem;  /* 4px */
  --space-sm: 0.5rem;   /* 8px */
  --space-md: 1rem;     /* 16px */
  --space-lg: 1.5rem;   /* 24px */
  --space-xl: 2.5rem;   /* 40px */
  --space-2xl: 4rem;    /* 64px */
  --space-3xl: 6rem;    /* 96px */

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(10, 35, 66, 0.05);
  --shadow-md: 0 4px 12px rgba(10, 35, 66, 0.08);
  --shadow-lg: 0 10px 30px rgba(10, 35, 66, 0.12);
  --shadow-xl: 0 20px 40px rgba(10, 35, 66, 0.18);
  --shadow-gold: 0 4px 15px rgba(198, 161, 91, 0.25);

  /* Layout */
  --container-max: 1280px;
  --header-height: 80px;
  --topbar-height: 40px;

  /* Transitions */
  --transition-fast: 0.15s ease;
  --transition-normal: 0.3s ease;
  --transition-slow: 0.5s ease;

  /* Borders */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 16px;
  --radius-full: 9999px;
  --border-subtle: 1px solid var(--color-silver-light);
  --border-navy: 1px solid rgba(10, 35, 66, 0.15);
  --border-gold: 1px solid var(--color-gold);
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden !important;
}

body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--color-charcoal);
  background-color: var(--color-white);
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden !important;
  position: relative;
  -webkit-font-smoothing: antialiased;
}

body.menu-open {
  overflow: hidden !important;
  touch-action: none;
}


/* 4. Typography Base */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--color-navy);
  line-height: 1.25;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: var(--space-md);
}

h1 {
  font-size: clamp(2.2rem, 4vw + 1rem, 3.5rem);
}

h2 {
  font-size: clamp(1.75rem, 2.5vw + 1rem, 2.5rem);
}

h3 {
  font-size: clamp(1.25rem, 1.5vw + 0.8rem, 1.75rem);
}

h4 {
  font-size: 1.25rem;
}

p {
  margin-bottom: var(--space-md);
  color: var(--color-charcoal-muted);
}

a {
  color: var(--color-royal-blue);
  text-decoration: none;
  transition: color var(--transition-fast);
}

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

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

ul, ol {
  list-style-position: inside;
  margin-bottom: var(--space-md);
}

/* 5. Accessibility Focus & Skip Link */
:focus-visible {
  outline: 3px solid var(--color-gold);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  top: -100px;
  left: 1rem;
  background: var(--color-navy);
  color: var(--color-white);
  padding: 0.75rem 1.5rem;
  z-index: 10000;
  font-weight: 600;
  border-radius: var(--radius-sm);
  border: 2px solid var(--color-gold);
  transition: top var(--transition-fast);
}

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

/* 6. Layout Containers */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--space-md);
}

@media (min-width: 768px) {
  .container {
    padding: 0 var(--space-lg);
  }
}

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

@media (min-width: 992px) {
  .section {
    padding: var(--space-3xl) 0;
  }
}

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

.section-navy h1, .section-navy h2, .section-navy h3, .section-navy h4 {
  color: var(--color-white);
}

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

.section-light {
  background-color: var(--color-silver-subtle);
}

/* 7. Section Header Utilities */
.section-header {
  text-align: center;
  max-width: 750px;
  margin: 0 auto var(--space-2xl) auto;
}

.section-header .tagline {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--color-gold);
  margin-bottom: var(--space-sm);
}

.section-header p {
  font-size: 1.1rem;
}

/* 8. Responsive Grid System */
.grid {
  display: grid;
  gap: var(--space-lg);
}

.grid-2 {
  grid-template-columns: 1fr;
}

.grid-3 {
  grid-template-columns: 1fr;
}

.grid-4 {
  grid-template-columns: 1fr;
}

@media (min-width: 768px) {
  .grid-2 {
    grid-template-columns: repeat(2, 1fr);
  }
  .grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }
  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 992px) {
  .grid-3 {
    grid-template-columns: repeat(3, 1fr);
  }
  .grid-4 {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* 9. Keyframe Animations */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(15px); }
  to { opacity: 1; transform: translateY(0); }
}

.animate-fade-in {
  animation: fadeIn 0.6s ease forwards;
}

/* 10. Prefers 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;
  }
}
