/* =========================================================
   NARVEX — Base styles
   Resets, font faces, base typography.
   ========================================================= */

@import url("https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@500;600;700&family=IBM+Plex+Sans:wght@400;500;600&family=IBM+Plex+Sans+Arabic:wght@400;500;600;700&display=swap");

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

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  margin: 0;
  background: var(--bg-page);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  transition: background-color var(--dur-med) var(--ease), color var(--dur-med) var(--ease);
}

/* Default document direction is Arabic / RTL. js/language.js flips
   dir + lang when the visitor switches to English. All spacing in
   this project uses logical properties (margin-inline-start, etc.)
   so the layout mirrors automatically. */
html[dir="rtl"] body { direction: rtl; }
html[dir="ltr"] body { direction: ltr; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--text-primary);
  margin: 0 0 var(--sp-4);
  line-height: 1.15;
  font-weight: 700;
}

h1 { font-size: var(--fs-h1); letter-spacing: -0.01em; }
h2 { font-size: var(--fs-h2); letter-spacing: -0.005em; }
h3 { font-size: var(--fs-h3); }

p {
  margin: 0 0 var(--sp-4);
  color: var(--text-secondary);
  max-width: 62ch;
}

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

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

ul, ol {
  padding-inline-start: 1.1em;
  color: var(--text-secondary);
}

button {
  font: inherit;
  cursor: pointer;
}

:focus-visible {
  outline: 2px solid var(--c-signal);
  outline-offset: 3px;
  border-radius: 4px;
}

::selection {
  background: var(--c-signal);
  color: #06110F;
}
