/* =========================================================
   رازان | پایه: فونت، توکن‌های طراحی، ریست، تایپوگرافی
   ========================================================= */

/* ---------- فونت ---------- */
@font-face {
  font-family: 'Vazirmatn';
  src: url('../fonts/Vazirmatn-Light.woff2') format('woff2');
  font-weight: 300;
  font-display: swap;
}
@font-face {
  font-family: 'Vazirmatn';
  src: url('../fonts/Vazirmatn-Regular.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'Vazirmatn';
  src: url('../fonts/Vazirmatn-Medium.woff2') format('woff2');
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: 'Vazirmatn';
  src: url('../fonts/Vazirmatn-SemiBold.woff2') format('woff2');
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: 'Vazirmatn';
  src: url('../fonts/Vazirmatn-Bold.woff2') format('woff2');
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: 'Vazirmatn';
  src: url('../fonts/Vazirmatn-ExtraBold.woff2') format('woff2');
  font-weight: 800;
  font-display: swap;
}

/* ---------- توکن‌های طراحی ---------- */
:root {
  /* رنگ برند: سرمه‌ای رازان */
  --navy-950: #04101f;
  --navy-900: #071c33;
  --navy-800: #0a2647;
  --navy-700: #002e5a;
  --navy-600: #0b4a86;
  --navy-500: #1867ad;
  --navy-100: #e4eef8;
  --navy-50: #f2f7fc;

  /* رنگ مکمل: برنجی/طلایی — برگرفته از جنس سازها */
  --brass-600: #a9772c;
  --brass-500: #c8913c;
  --brass-400: #e0a75e;
  --brass-300: #eec38f;
  --brass-100: #faeedb;

  /* خنثی */
  /* سبز وضعیت «آنلاین / در حال پاسخ‌گویی» */
  --live: #2fd47e;
  --live-glow: rgba(47, 212, 126, 0.55);

  --white: #ffffff;
  --gray-25: #fafbfc;
  --gray-50: #f4f6f9;
  --gray-100: #e9edf2;
  --gray-200: #d8dee7;
  --gray-300: #bcc5d1;
  --gray-400: #8e9aaa;
  --gray-500: #667487;
  --gray-600: #4a5768;
  --gray-700: #333f4f;
  --gray-900: #151e29;

  /* نقش‌ها */
  --bg: var(--white);
  --bg-soft: var(--gray-50);
  --bg-dark: var(--navy-900);
  --text: var(--gray-900);
  --text-muted: var(--gray-500);
  --text-invert: var(--white);
  --border: var(--gray-100);
  --accent: var(--brass-400);
  --primary: var(--navy-700);

  /* تایپوگرافی */
  --font: 'Vazirmatn', system-ui, 'Segoe UI', Tahoma, sans-serif;
  --fs-xs: 0.75rem;
  --fs-sm: 0.8125rem;
  --fs-base: 0.9375rem;
  --fs-md: 1.0625rem;
  --fs-lg: clamp(1.125rem, 0.5vw + 1rem, 1.25rem);
  --fs-xl: clamp(1.25rem, 1vw + 1rem, 1.5rem);
  --fs-h3: clamp(1.375rem, 1.2vw + 1rem, 1.75rem);
  --fs-h2: clamp(1.5rem, 1.6vw + 1rem, 2.25rem);
  --fs-h1: clamp(1.875rem, 2.2vw + 1rem, 3.125rem);
  --lh-tight: 1.3;
  --lh-normal: 1.75;
  --lh-loose: 2;

  /* فاصله‌گذاری */
  --sp-1: 0.25rem;
  --sp-2: 0.5rem;
  --sp-3: 0.75rem;
  --sp-4: 1rem;
  --sp-5: 1.5rem;
  --sp-6: 2rem;
  --sp-7: 2.5rem;
  --sp-8: 3rem;
  --sp-9: 4rem;
  --sp-10: 5rem;
  --section-y: clamp(3.5rem, 6vw, 6.5rem);

  /* گردی گوشه */
  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 20px;
  --r-xl: 28px;
  --r-2xl: 36px;
  --r-full: 999px;

  /* سایه */
  --sh-xs: 0 1px 2px rgba(7, 28, 51, 0.06);
  --sh-sm: 0 2px 8px rgba(7, 28, 51, 0.06), 0 1px 2px rgba(7, 28, 51, 0.04);
  --sh-md: 0 8px 24px -6px rgba(7, 28, 51, 0.12), 0 2px 6px rgba(7, 28, 51, 0.05);
  --sh-lg: 0 20px 48px -12px rgba(7, 28, 51, 0.18), 0 4px 12px rgba(7, 28, 51, 0.06);
  --sh-xl: 0 32px 72px -16px rgba(7, 28, 51, 0.24);
  --sh-brass: 0 10px 30px -8px rgba(200, 145, 60, 0.45);

  /* چیدمان */
  --container: 1240px;
  --container-narrow: 880px;
  --header-h: 76px;
  --topbar-h: 40px;

  /* حرکت */
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --t-fast: 0.18s;
  --t: 0.3s;
  --t-slow: 0.6s;
}

/* ---------- ریست ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

* {
  margin: 0;
  padding: 0;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + var(--sp-5));
  overflow-x: hidden;
  max-width: 100%;
}

body {
  font-family: var(--font);
  font-size: var(--fs-base);
  font-weight: 400;
  line-height: var(--lh-normal);
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  max-width: 100%;
}

body.is-locked {
  overflow: hidden;
}

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

/* آیکون‌ها از اسپرایت SVG می‌آیند؛ اندازه‌ی پیش‌فرض با em مقیاس می‌گیرد
   و هر کامپوننت در صورت نیاز آن را بازنویسی می‌کند. */
.icon {
  display: inline-block;
  width: 1.25em;
  height: 1.25em;
  flex: none;
  vertical-align: middle;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--t-fast) var(--ease);
}

ul,
ol {
  list-style: none;
}

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

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

table {
  border-collapse: collapse;
}

:focus-visible {
  outline: 2px solid var(--brass-500);
  outline-offset: 3px;
  border-radius: var(--r-sm);
}

::selection {
  background: var(--navy-700);
  color: var(--white);
}

/* ---------- تایپوگرافی ---------- */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: 700;
  line-height: var(--lh-tight);
  letter-spacing: -0.01em;
  color: var(--text);
}

h1 {
  font-size: var(--fs-h1);
  font-weight: 800;
}
h2 {
  font-size: var(--fs-h2);
  font-weight: 800;
}
h3 {
  font-size: var(--fs-h3);
}
h4 {
  font-size: var(--fs-xl);
}
h5 {
  font-size: var(--fs-lg);
}
h6 {
  font-size: var(--fs-md);
}

p {
  line-height: var(--lh-normal);
}

strong,
b {
  font-weight: 700;
}

/* اعداد فارسی با فاصله‌گذاری یکنواخت */
.num {
  font-variant-numeric: tabular-nums;
  font-feature-settings: 'ss01';
}

/* ---------- ابزارهای چیدمان ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--sp-5);
}

.container--narrow {
  max-width: var(--container-narrow);
}

.section {
  padding-block: var(--section-y);
  position: relative;
}

.section--soft {
  background: var(--bg-soft);
}

.section--dark {
  background: var(--bg-dark);
  color: var(--text-invert);
}

.section--dark h1,
.section--dark h2,
.section--dark h3,
.section--dark h4,
.section--dark h5,
.section--dark h6 {
  color: var(--text-invert);
}

.section--tight {
  padding-block: clamp(2rem, 4vw, 3.5rem);
}

.grid {
  display: grid;
  gap: var(--sp-5);
}

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

.skip-link {
  position: absolute;
  inset-inline-start: var(--sp-4);
  top: -100px;
  z-index: 200;
  padding: var(--sp-3) var(--sp-5);
  background: var(--navy-700);
  color: var(--white);
  border-radius: var(--r-md);
  transition: top var(--t) var(--ease);
}

.skip-link:focus {
  top: var(--sp-4);
}

/* ---------- سرتیتر بخش‌ها ---------- */
.section-head {
  max-width: 660px;
  margin-bottom: var(--sp-8);
}

.section-head--center {
  margin-inline: auto;
  text-align: center;
}

/* در بخش «درباره» سرتیتر به متن زیرش نزدیک‌تر است */
.section-head--tight {
  margin-bottom: var(--sp-5);
}

/* در بخش «مشاوره» سرتیتر مستقیماً به فهرست مزایا می‌چسبد */
.section-head--flush {
  margin-bottom: 0;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: var(--fs-sm);
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--brass-600);
  margin-bottom: var(--sp-3);
}

.eyebrow::before {
  content: '';
  width: 22px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  opacity: 0.8;
}

.section-head--center .eyebrow::before {
  display: none;
}

.section--dark .eyebrow {
  color: var(--brass-400);
}

.section-head p {
  margin-top: var(--sp-4);
  font-size: var(--fs-md);
  color: var(--text-muted);
}

.section--dark .section-head p {
  color: rgba(255, 255, 255, 0.68);
}

/* ---------- انیمیشن ورود با اسکرول ---------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(22px);
  transition:
    opacity var(--t-slow) var(--ease-out),
    transform var(--t-slow) var(--ease-out);
  transition-delay: var(--reveal-delay, 0ms);
}

[data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

/* هم‌ترازی دوطرفه در ستون‌های باریک فاصله‌های زشت ایجاد می‌کند،
   بنابراین روی موبایل همه‌ی متن‌های justify به راست‌چین تغییر می‌کنند. */
@media (max-width: 700px) {
  .hero__lead,
  .about__text p,
  .accordion__panel p,
  .faq__aside p {
    text-align: start;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  [data-reveal] {
    opacity: 1;
    transform: none;
  }
}
