/* ==========================================================================
   PLAYFUL PRECISION — Design System Tokens (Light + Dark Theme Support)
   Taraznama editorial neutral palette + TopFast Reports Cobalt Blue (#165EF6)
   ========================================================================== */

@font-face {
  font-family: "IRANYekanX";
  src: url("/assets/fonts/iranyekanx/IRANYekanXFaNum-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "IRANYekanX";
  src: url("/assets/fonts/iranyekanx/IRANYekanXFaNum-Medium.ttf") format("truetype");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "IRANYekanX";
  src: url("/assets/fonts/iranyekanx/IRANYekanXFaNum-DemiBold.ttf") format("truetype");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "IRANYekanX";
  src: url("/assets/fonts/iranyekanx/IRANYekanXFaNum-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "IRANYekanX";
  src: url("/assets/fonts/iranyekanx/IRANYekanXFaNum-ExtraBold.ttf") format("truetype");
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}

:root,
[data-theme="light"] {
  color-scheme: light;

  /* Surfaces & Canvas (Editorial Light + Subtle Tonal Bands) */
  --canvas: #f7f7f5;
  --surface: #ffffff;
  --surface-subtle: #f0f0ec;
  --surface-band: #eeefe9;
  --surface-hover: #e8e8e3;
  --surface-elevated: rgba(255, 255, 255, 0.88);

  /* Ink & Typography */
  --ink: #161614;
  --ink-secondary: #3f3f3b;
  --ink-muted: #67665f;
  --ink-subtle: #86857f;

  /* Borders & Hairlines */
  --border: #e7e6e2;
  --border-strong: #d8d6d0;

  /* Primary Brand Blue (TopFast Reports #165EF6) */
  --primary: #165ef6;
  --primary-hover: #2b6ff8;
  --primary-deep: #1048c4;
  --primary-soft: rgba(22, 94, 246, 0.085);
  --primary-soft-strong: rgba(22, 94, 246, 0.14);
  --primary-border: rgba(22, 94, 246, 0.28);
  --primary-text-on-soft: #1048c4;
  --primary-glow: rgba(22, 94, 246, 0.16);

  /* Supporting Accents */
  --accent-sky: #57c1ff;
  --accent-sky-soft: rgba(87, 193, 255, 0.14);
  --accent-lavender: #b9c8ff;
  --accent-lavender-soft: rgba(185, 200, 255, 0.24);

  /* Pattern & Atmosphere */
  --pattern-dot: rgba(24, 25, 23, 0.065);
  --pattern-line: rgba(24, 25, 23, 0.045);
  --hero-aura-1: rgba(22, 94, 246, 0.09);
  --hero-aura-2: rgba(87, 193, 255, 0.11);
  --hero-aura-3: rgba(185, 200, 255, 0.16);

  /* Semantic Status */
  --success: #167a45;
  --success-bg: #e9f6ef;
  --danger: #c62839;
  --danger-bg: #fdedef;

  /* Shadows */
  --shadow-xs: 0 1px 2px rgba(20, 20, 18, 0.04);
  --shadow-sm: 0 4px 18px rgba(20, 20, 18, 0.055);
  --shadow-md: 0 14px 40px rgba(20, 20, 18, 0.085);
  --shadow-primary: 0 10px 26px rgba(22, 94, 246, 0.24);

  /* Typography */
  --font-en: "Geist", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-fa: "IRANYekanX", "Vazirmatn", Tahoma, sans-serif;
  --font-sans: var(--font-en);

  /* Type Scale (Tighter, Compact Editorial Hierarchy) */
  --text-hero: clamp(1.95rem, 3.35vw, 3.25rem);
  --text-h2: clamp(1.55rem, 2.4vw, 2.3rem);
  --text-h3: clamp(1.15rem, 1.55vw, 1.38rem);
  --text-lead: clamp(0.975rem, 1.15vw, 1.08rem);
  --text-body: 0.96875rem;
  --text-sm: 0.9rem;
  --text-caption: 0.785rem;

  /* Spacing & Layout */
  --container-max: 1240px;
  --container-narrow: 920px;
  --gutter: clamp(20px, 4vw, 48px);
  --section-py: clamp(72px, 9vw, 128px);

  /* Radii */
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 22px;
  --radius-xl: 28px;
  --radius-pill: 999px;

  /* Motion Tokens */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
  --dur-nav-reveal: 700ms;
  --dur-nav-collapse: 350ms;
  --dur-card: 250ms;
  --dur-btn: 180ms;
  --dur-reveal: 480ms;
  --dur-audience: 300ms;
}

/* --- Dark Mode (Cohesive Deep Obsidian + Cobalt Blue Undertone) --- */
[data-theme="dark"] {
  color-scheme: dark;

  --canvas: #0a0b0f;
  --surface: #12141b;
  --surface-subtle: #171a24;
  --surface-band: #0f1118;
  --surface-hover: #1d212e;
  --surface-elevated: rgba(18, 20, 27, 0.88);

  --ink: #f0f2f7;
  --ink-secondary: #cfd3df;
  --ink-muted: #989eae;
  --ink-subtle: #787e8f;

  --border: #222532;
  --border-strong: #313647;

  --primary: #165ef6;
  --primary-hover: #2b6ff8;
  --primary-deep: #57c1ff;
  --primary-soft: rgba(22, 94, 246, 0.16);
  --primary-soft-strong: rgba(22, 94, 246, 0.26);
  --primary-border: rgba(87, 193, 255, 0.34);
  --primary-text-on-soft: #dbe8ff;
  --primary-glow: rgba(22, 94, 246, 0.28);

  --accent-sky: #57c1ff;
  --accent-sky-soft: rgba(87, 193, 255, 0.12);
  --accent-lavender: #b9c8ff;
  --accent-lavender-soft: rgba(185, 200, 255, 0.14);

  --pattern-dot: rgba(255, 255, 255, 0.065);
  --pattern-line: rgba(255, 255, 255, 0.045);
  --hero-aura-1: rgba(22, 94, 246, 0.22);
  --hero-aura-2: rgba(87, 193, 255, 0.14);
  --hero-aura-3: rgba(185, 200, 255, 0.10);

  --success: #3ccb7f;
  --success-bg: #12291c;
  --danger: #f1707e;
  --danger-bg: #2e1519;

  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.35);
  --shadow-sm: 0 6px 22px rgba(0, 0, 0, 0.42);
  --shadow-md: 0 18px 48px rgba(0, 0, 0, 0.56);
  --shadow-primary: 0 10px 28px rgba(22, 94, 246, 0.38);
}

html[dir="rtl"] {
  --font-sans: var(--font-fa);
}
