/* Vazirmatn — arabic */
@font-face {
  font-family: 'Vazirmatn';
  font-style: normal;
  font-weight: 300 800;
  font-display: swap;
  src: url('../fonts/vazirmatn-arabic.woff2') format('woff2');
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC;
}
/* Vazirmatn — latin-ext */
@font-face {
  font-family: 'Vazirmatn';
  font-style: normal;
  font-weight: 300 800;
  font-display: swap;
  src: url('../fonts/vazirmatn-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* Vazirmatn — latin */
@font-face {
  font-family: 'Vazirmatn';
  font-style: normal;
  font-weight: 300 800;
  font-display: swap;
  src: url('../fonts/vazirmatn-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

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

:root {
  color-scheme: dark;
  --bg-0: #060810;
  --bg-1: #0c0f18;
  --bg-2: #131825;
  --bg-3: #1a2033;
  --bg-4: #222840;
  --bg-5: #2c3450;

  --border:       #1e2638;
  --border-mid:   #2a3550;
  --border-light: #3a4a68;

  --text-1: #e2e8f5;
  --text-2: #8896b3;
  --text-3: #7a8fa8;

  --gold:       #f0a500;
  --gold-light: #ffc840;
  --gold-dim:   #a07000;
  --gold-glow:  rgba(240,165,0,.12);
  --gold-glass: rgba(240,165,0,.06);

  --teal:      #00b4d8;
  --teal-dim:  #007a94;
  --teal-glow: rgba(0,180,216,.10);

  --green:     #10b981;
  --green-dim: #065f46;
  --red:       #ef4444;
  --red-dim:   #7f1d1d;
  --amber:     #f59e0b;
  --purple:    #8b5cf6;

  --sidebar-w: 260px;
  --header-h:  60px;

  --r-xs:  4px;
  --r-sm:  7px;
  --r-md:  11px;
  --r-lg:  16px;
  --r-xl:  22px;

  --shadow-sm:  0 1px 3px rgba(0,0,0,.4);
  --shadow-md:  0 4px 16px rgba(0,0,0,.5);
  --shadow-lg:  0 8px 32px rgba(0,0,0,.6);
  --shadow-gold: 0 0 20px var(--gold-glow);

  --t-fast: 120ms ease;
  --t-base: 220ms ease;
  --t-slow: 380ms ease;

  font-family: 'Vazirmatn', sans-serif;
}

[data-theme="light"] {
  color-scheme: light;
  --bg-0: #FAF8F5;
  --bg-1: #FFFFFF;
  --bg-2: #FFFFFF;
  --bg-3: #F4F1EC;
  --bg-4: #ECE7DF;
  --bg-5: #E0D9CC;

  --border:       #E8E2D8;
  --border-mid:   #D6CFC2;
  --border-light: #B8AE9C;

  --text-1: #0A0A0A;
  --text-2: #5C5852;
  --text-3: #807870;

  /* brand → orange (primary) */
  --gold:       #EA580C;
  --gold-light: #F97316;
  --gold-dim:   #9A3412;
  --gold-glow:  rgba(234,88,12,.14);
  --gold-glass: rgba(234,88,12,.07);

  /* secondary → red (accent) */
  --teal:      #DC2626;
  --teal-dim:  #991B1B;
  --teal-glow: rgba(220,38,38,.12);

  --shadow-sm: 0 1px 3px rgba(0,0,0,.06);
  --shadow-md: 0 2px 12px rgba(0,0,0,.08);
  --shadow-lg: 0 8px 32px rgba(0,0,0,.12);
}

html { direction: rtl; font-size: 14px; scroll-behavior: smooth; }

body {
  background: var(--bg-0);
  color: var(--text-1);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  transition: background var(--t-base), color var(--t-base);
  background-image:
    radial-gradient(ellipse 80% 50% at 20% 0%, rgba(240,165,0,.04) 0%, transparent 60%),
    radial-gradient(ellipse 60% 40% at 80% 100%, rgba(0,180,216,.03) 0%, transparent 60%);
}

[data-theme="light"] body {
  background-color: #FAF8F5;
  background-image:
    radial-gradient(ellipse 70% 60% at 10% 0%,   rgba(234,88,12,.06)   0%, transparent 55%),
    radial-gradient(ellipse 55% 50% at 90% 10%,  rgba(220,38,38,.05)   0%, transparent 50%);
}

/* ── scrollbar ── */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: var(--bg-1); }
::-webkit-scrollbar-thumb { background: var(--border-mid); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: var(--border-light); }

/* ── typography ── */
h1 { font-size: 1.6rem; font-weight: 700; }
h2 { font-size: 1.3rem; font-weight: 700; }
h3 { font-size: 1.1rem; font-weight: 600; }
h4 { font-size: 1rem;   font-weight: 600; }
p  { line-height: 1.7; color: var(--text-2); }
a  { color: var(--teal); text-decoration: none; }
a:hover { color: #00d4f8; }
[data-theme="light"] a:hover { color: var(--gold-dim); }

small { font-size: .8rem; color: var(--text-3); }

/* ── utilities ── */
.flex       { display: flex; }
.flex-col   { display: flex; flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-end  { justify-content: flex-end; }
.gap-1  { gap: .25rem; }
.gap-2  { gap: .5rem; }
.gap-3  { gap: .75rem; }
.gap-4  { gap: 1rem; }
.gap-6  { gap: 1.5rem; }
.gap-8  { gap: 2rem; }

.w-full { width: 100%; }
.h-full { height: 100%; }
.text-center { text-align: center; }
.text-left   { text-align: left; }
.text-right  { text-align: right; }

.text-gold   { color: var(--gold); }
.text-teal   { color: var(--teal); }
.text-green  { color: var(--green); }
.text-red    { color: var(--red); }
.text-amber  { color: var(--amber); }
.text-purple { color: var(--purple); }
.text-muted  { color: var(--text-2); }
.text-dim    { color: var(--text-3); }
.text-sm     { font-size: .85rem; }
.text-xs     { font-size: .75rem; }
.text-lg     { font-size: 1.1rem; }
.text-xl     { font-size: 1.3rem; }
.font-bold   { font-weight: 700; }
.font-medium { font-weight: 500; }

.mt-1 { margin-top: .25rem; }
.mt-2 { margin-top: .5rem; }
.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }
.mb-2 { margin-bottom: .5rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.p-4  { padding: 1rem; }
.p-6  { padding: 1.5rem; }

.hidden  { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }

/* number style — monospace feel */
.num {
  font-variant-numeric: tabular-nums;
  letter-spacing: .02em;
}

/* gold divider line */
.divider {
  height: 1px;
  background: linear-gradient(90deg, var(--gold-dim) 0%, transparent 100%);
  opacity: .35;
  margin: 1.5rem 0;
}

/* ── animations ── */
@keyframes fadeUp  { from { opacity:0; transform:translateY(12px) } to { opacity:1; transform:translateY(0) } }
@keyframes fadeIn  { from { opacity:0 } to { opacity:1 } }
@keyframes scaleIn { from { opacity:0; transform:scale(.94) } to { opacity:1; transform:scale(1) } }
@keyframes shimmer { 0%,100% { opacity:.4 } 50% { opacity:.85 } }

.anim-up { animation: fadeUp .4s ease both; }
.anim-in { animation: fadeIn .35s ease both; }
.delay-1 { animation-delay:.06s }
.delay-2 { animation-delay:.12s }
.delay-3 { animation-delay:.18s }
.delay-4 { animation-delay:.24s }
.delay-5 { animation-delay:.30s }
.delay-6 { animation-delay:.36s }

/* gradient text */
.text-gradient-teal {
  background: linear-gradient(135deg, var(--teal) 0%, #7ee8fa 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── theme toggle button ── */
.theme-btn {
  width: 34px;
  height: 34px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--r-md);
  flex-shrink: 0;
}

/* flex wrap helper */
.flex-wrap { flex-wrap: wrap; }
