/* ==========================================================================
   Design Tokens
   Central brand values for the static site. Keep these restrained so page-level
   variation stays inside the Shamsa institutional palette.
   ========================================================================== */

:root {
  --red: #be1e2d;
  --red-dark: #8f1520;
  --blue: #0e4f78;
  --navy: #081c2e;
  --soft: #f8fafc;
  --gray: #eef2f7;
  --text: #16212b;
  --muted: #647184;
  --white: #ffffff;
  --line: rgba(22, 33, 43, 0.12);
  --line-strong: rgba(22, 33, 43, 0.18);
  --shadow: 0 24px 68px rgba(8, 28, 46, 0.13);
  --shadow-soft: 0 16px 42px rgba(8, 28, 46, 0.08);
  --radius: 16px;
  --container: 1320px;
  --section: 120px;
  --header-height: 84px;
}

/* ==========================================================================
   Global Reset
   Minimal normalization for predictable sizing, smooth anchor navigation, and
   RTL-first document flow across all Persian pages.
   ========================================================================== */

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  direction: rtl;
  font-family: "Vazirmatn", Arial, sans-serif;
  background: var(--white);
  color: var(--text);
  line-height: 1.85;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

body.menu-open {
  overflow: hidden;
}

/* ==========================================================================
   Base Elements
   Shared typography, media, link, and form inheritance. Component-specific
   styles live in components.css.
   ========================================================================== */

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

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

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

button {
  color: inherit;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2,
h3 {
  line-height: 1.35;
  letter-spacing: 0;
}

h1 {
  max-width: 820px;
  margin-bottom: 22px;
  font-size: clamp(2.7rem, 6vw, 5.9rem);
  font-weight: 900;
}

h2 {
  margin-bottom: 20px;
  font-size: clamp(1.8rem, 3.2vw, 3.2rem);
  font-weight: 850;
}

h3 {
  margin-bottom: 12px;
  font-size: 1.22rem;
  font-weight: 800;
}

p {
  color: var(--muted);
  font-size: 1.03rem;
}

::selection {
  background: rgba(190, 30, 45, 0.18);
}

:focus-visible {
  outline: 3px solid rgba(190, 30, 45, 0.44);
  outline-offset: 4px;
}

/* ==========================================================================
   Motion Preferences
   Respect reduced-motion settings without removing essential state changes.
   ========================================================================== */

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