/* ═══════════════════════════════════════════════════════════
   نفیریتی — Core CSS (متغیرها + Reset + تایپوگرافی)
   نسخه 3.0 — 2026
   ═══════════════════════════════════════════════════════════ */

:root {
  /* رنگ اصلی — آبی نفیریتی */
  --primary: #2C5282;
  --primary-light: #4299E1;
  --primary-dark: #1A365D;
  --primary-soft: #EBF4FF;
  
  /* خنثی */
  --bg: #FFFFFF;
  --bg-alt: #F7FAFC;
  --text: #1A202C;
  --text-soft: #4A5568;
  --text-muted: #718096;
  --border: #E2E8F0;
  
  /* وضعیت */
  --success: #38A169;
  --warning: #D69E2E;
  --danger: #E53E3E;
  
  /* فاصله */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 40px;
  --space-2xl: 80px;
  
  /* شعاع */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-full: 9999px;
  
  /* سایه */
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
  --shadow-lg: 0 12px 32px rgba(0,0,0,0.12);
  
  /* تایپوگرافی */
  --font-fa: 'Vazirmatn', system-ui, sans-serif;
  --font-en: 'Inter', system-ui, sans-serif;
  
  /* انیمیشن */
  --transition: 200ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* Dark mode */
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0F1419;
    --bg-alt: #1A1F2E;
    --text: #F7FAFC;
    --text-soft: #CBD5E0;
    --text-muted: #A0AEC0;
    --border: #2D3748;
    --primary-soft: #1A202C;
  }
}

[data-theme="dark"] {
  --bg: #0F1419;
  --bg-alt: #1A1F2E;
  --text: #F7FAFC;
  --text-soft: #CBD5E0;
  --text-muted: #A0AEC0;
  --border: #2D3748;
  --primary-soft: #1A202C;
}

[data-theme="light"] {
  --bg: #FFFFFF;
  --bg-alt: #F7FAFC;
  --text: #1A202C;
  --text-soft: #4A5568;
  --text-muted: #718096;
  --border: #E2E8F0;
  --primary-soft: #EBF4FF;
}


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

html {
  direction: rtl;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  font-family: var(--font-fa);
  line-height: 1.7;
  font-size: 16px;
}

body {
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  transition: background var(--transition), color var(--transition);
}

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

a {
  color: var(--primary);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover { color: var(--primary-light); }

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

/* تایپوگرافی */
h1, h2, h3, h4 {
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: -0.02em;
}

h1 { font-size: clamp(2rem, 5vw, 4rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.5rem); }
h3 { font-size: clamp(1.25rem, 2vw, 1.75rem); }
h4 { font-size: 1.125rem; }

p { color: var(--text-soft); }

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

/* Utilities */
.text-center { text-align: center; }
.mt-md { margin-top: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }
.mt-xl { margin-top: var(--space-xl); }
.mb-md { margin-bottom: var(--space-md); }
.mb-lg { margin-bottom: var(--space-lg); }

/* Fade-in animation */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.fade-in {
  animation: fadeInUp 600ms cubic-bezier(0.4, 0, 0.2, 1) both;
}

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


/* ═══════════════════════════════════════════════ */
/* Utility Classes — جایگزین style="" inline */
/* ═══════════════════════════════════════════════ */

.flex-row { display: flex; gap: var(--space-md); align-items: center; }
.flex-col { display: flex; flex-direction: column; gap: var(--space-md); }
.flex-center { display: flex; align-items: center; justify-content: center; gap: var(--space-md); }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.flex-wrap { flex-wrap: wrap; }

.text-muted { color: var(--text-muted); }
.text-primary { color: var(--primary); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }

.font-bold { font-weight: 700; }
.font-black { font-weight: 800; }
.text-sm { font-size: 0.875rem; }
.text-base { font-size: 1rem; }
.text-lg { font-size: 1.125rem; }
.text-xl { font-size: 1.25rem; }

.no-decoration { text-decoration: none; color: inherit; }

/* Icon sizing */
.icon-sm { width: 16px; height: 16px; display: inline-block; vertical-align: middle; }
.icon-md { width: 24px; height: 24px; display: inline-block; vertical-align: middle; }
.icon-lg { width: 40px; height: 40px; display: inline-block; }
.icon-xl { width: 56px; height: 56px; display: inline-block; }

/* SVG icon default (replace emoji) */
.svg-icon { width: 1em; height: 1em; fill: currentColor; display: inline-block; vertical-align: middle; }

/* Hero without gradient */
h1.hero-title {
  color: var(--primary-dark);
  background: none;
  -webkit-text-fill-color: currentColor;
}

@media (prefers-color-scheme: dark) {
  h1.hero-title { color: var(--primary-light); }
}
