/* Reset + design tokens + typography + a11y */

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

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

body,
h1, h2, h3, h4, h5, h6,
p, ul, ol, figure, blockquote {
  margin: 0;
  padding: 0;
}

ul, ol { list-style: none; }

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

a {
  color: inherit;
  text-decoration: none;
}

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

button { cursor: pointer; background: none; border: 0; }

:root {
  --color-primary: #1a2b4a;
  --color-primary-light: #2d4a7a;
  --color-primary-dark: #0f1b30;
  --color-accent: #e85d04;
  --color-accent-light: #f97316;
  --color-accent-dark: #c2410c;
  --color-bg: #ffffff;
  --color-bg-alt: #f8f9fb;
  --color-bg-dark: #1a2b4a;
  --color-text: #1a1d28;
  --color-text-muted: #5a5f70;
  --color-border: #e2e4e8;
  --color-success: #16a34a;
  --color-warning: #ca8a04;
  --color-error: #dc2626;
  --font-sans: 'Inter', -apple-system, 'Noto Sans SC', 'Noto Sans Arabic', sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 40px;
  --space-2xl: 64px;
  --space-3xl: 96px;
  --radius: 8px;
  --header-h: 72px;
}

@font-face {
  font-family: 'Inter';
  src: url('../fonts/Inter-Variable.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Noto Sans Arabic';
  src: url('../fonts/NotoSansArabic.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+08A0-08FF;
}

html[dir="rtl"] { direction: rtl; text-align: start; }
html[dir="ltr"] { direction: ltr; text-align: start; }

body {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.7;
  color: var(--color-text);
  background: var(--color-bg);
  padding-top: env(safe-area-inset-top);
  padding-bottom: env(safe-area-inset-bottom);
  padding-inline-start: env(safe-area-inset-left);
  padding-inline-end: env(safe-area-inset-right);
}

h1 { font-size: clamp(28px, 5vw, 48px); font-weight: 700; line-height: 1.2; letter-spacing: -0.5px; }
h2 { font-size: clamp(24px, 4vw, 36px); font-weight: 700; line-height: 1.3; }
h3 { font-size: clamp(20px, 3vw, 28px); font-weight: 600; line-height: 1.4; }
h4 { font-size: 18px; font-weight: 600; line-height: 1.5; }

.caption { font-size: 14px; color: var(--color-text-muted); line-height: 1.6; }
.label {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--color-text-muted);
}

*:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
  border-radius: 2px;
}

*:focus:not(:focus-visible) {
  outline: none;
}

@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;
  }
}

.skip-link {
  position: absolute;
  inset-inline-start: 12px;
  top: -48px;
  background: var(--color-accent);
  color: #fff;
  padding: 8px 16px;
  z-index: 10000;
  border-radius: 4px;
}
.skip-link:focus { top: 12px; }

.container { max-width: 1200px; margin-inline: auto; padding-inline: var(--space-lg); }
.container-wide { max-width: 1400px; margin-inline: auto; padding-inline: var(--space-lg); }

.section { padding-block: var(--space-2xl); padding-inline: 0; }
.section-tight { padding-block: var(--space-xl); padding-inline: 0; }
.section--alt { background: var(--color-bg-alt); }
.section--dark { background: var(--color-bg-dark); color: #fff; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0);
  white-space: nowrap; border: 0;
}
