/* ===================================================
   Reset & Base Typography & Utilities
   =================================================== */

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

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

body {
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: hsl(var(--bg));
  color: hsl(var(--fg));
  line-height: 1.6;
  overflow-x: hidden;
  transition: background-color 0.3s ease, color 0.3s ease;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { cursor: pointer; border: none; background: none; font: inherit; color: inherit; }

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Skip to content (a11y) */
.skip-to-content {
  position: absolute;
  top: -100%;
  left: 1rem;
  z-index: 200;
  padding: 0.75rem 1.5rem;
  background: hsl(var(--primary));
  color: hsl(var(--primary-fg));
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.875rem;
  transition: top 0.2s;
}

.skip-to-content:focus {
  top: 0.75rem;
}

/* Section base */
.section {
  padding: 6rem 0;
  transition: background-color 0.3s ease;
}

.section-alt {
  background: var(--section-alt);
}

.section-header {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 4rem;
}

.section-label {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: hsl(var(--primary));
  margin-bottom: 0.75rem;
}

.section-title {
  font-size: clamp(1.875rem, 4vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin-bottom: 1rem;
}

.section-desc {
  font-size: 1.0625rem;
  color: hsl(var(--muted-fg));
  line-height: 1.7;
}

/* Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: hsl(var(--muted-fg) / 0.2); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: hsl(var(--muted-fg) / 0.35); }

/* RTL Support */
html[dir="rtl"] body {
  font-family: 'Noto Sans Arabic', 'Inter', system-ui, -apple-system, sans-serif;
}

/* Focus visible for keyboard nav */
:focus-visible {
  outline: 2px solid hsl(var(--primary));
  outline-offset: 2px;
}

/* Page header (reusable for inner pages) */
.page-header {
  padding: 8rem 0 4rem;
  text-align: center;
  position: relative;
  overflow: hidden;
  background: var(--hero-bg);
  transition: background 0.3s ease;
}

.page-header h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin-bottom: 1rem;
}

.page-header p {
  font-size: 1.125rem;
  color: hsl(var(--muted-fg));
  max-width: 560px;
  margin: 0 auto;
  line-height: 1.7;
}
