/* MUTA v247 CONSOLIDATED 04 TYPOGRAPHY - PREMIUM IRANIAN + FOREIGN - SOURCES IN ABOUT > منابع - 0 !important */
/* Inspired by best Iranian (موتا مارکت IRANYekan bento, هوشمند IRANSans super-app, هوشمندbank Estedad fintech) + Foreign (هوشمند Inter Display, هوشمند Söhne/Geist Mono tables, هوشمند Geist monochrome, Apple SF Pro -0.011em) */

/* ===== FONT STACKS - SIMPLIFIED SELF-HOSTED ONLY ===== */
:root {
  /* Persian - Body: Vazirmatn (IranSans free, هوشمند/CafeBazaar/Divar style) - clean neutral pixel-friendly */
  --font-fa-body: 'Vazirmatn', system-ui, -apple-system, Tahoma, sans-serif;
  /* Persian - Heading: Estedad (هوشمندbank fintech geometric premium) + Vazirmatn fallback */
  --font-fa-heading: 'Estedad', 'Vazirmatn', system-ui, Tahoma, sans-serif;
  /* Persian - Display: Estedad Black for hero */
  --font-fa-display: 'Estedad', 'Vazirmatn', sans-serif;
  /* Persian - Mono/Numbers: Vazirmatn tabular FD */
  --font-fa-mono: 'Vazirmatn', 'Estedad', ui-monospace, monospace;
  
  /* English - Body: Inter (هوشمند/Notion/GitHub, most-installed variable, safest SaaS) */
  --font-en-body: 'Inter', 'Geist', system-ui, -apple-system, sans-serif;
  /* English - Heading: Geist (هوشمند, 9 weights, monochrome restraint, AI startups) */
  --font-en-heading: 'Geist', 'Inter', system-ui, sans-serif;
  /* English - Display: Geist + Inter tight */
  --font-en-display: 'Geist', 'Inter', sans-serif;
  /* English - Mono: Geist Mono (هوشمند tables, هوشمند) + JetBrains Mono fallback */
  --font-en-mono: 'Geist Mono', 'JetBrains Mono', ui-monospace, monospace;
  --font-en-financial: 'Geist Mono', 'JetBrains Mono', monospace;

  /* Weights - Apple style: 400 body, 500 medium, 700 bold, 800-900 display */
  --fw-regular: 400;
  --fw-medium: 500;
  --fw-semibold: 600;
  --fw-bold: 700;
  --fw-extrabold: 800;
  --fw-black: 900;
}

/* ===== BASE - موتا مارکت 1.8-1.9 line-height + Apple antialiased ===== */
html {
  font-family: var(--font-fa-body);
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-synthesis: none;
  font-synthesis-weight: none;
  font-synthesis-style: none;
  font-kerning: normal;
  font-variant-ligatures: common-ligatures;
  font-optical-sizing: auto;
  font-size-adjust: 0.52;
}

body {
  font-family: var(--font-fa-body);
  font-weight: 400;
  line-height: 1.85;
  letter-spacing: -0.008em;
  word-spacing: -0.02em;
  font-feature-settings: "ss01" 1;
  font-variant-ligatures: common-ligatures;
}

/* ===== HEADINGS - Estedad premium like هوشمندbank/هوشمند, tight like موتا مارکت ===== */
h1, h2, h3, h4, .section-title, .brand-name, .home-markets-title, .fm-card-title, .about-pillar-title, .mota-card-title, .about-hero h3 {
  font-family: var(--font-fa-heading);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.28;
  font-feature-settings: "ss01" 1;
  font-optical-sizing: auto;
}

h1, .section-title {
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 1.2;
}

/* Hero - موتا مارکت 2.2rem tight + هوشمند kinetic */
#view-home .section-title, .section-head h1 {
  font-family: var(--font-fa-display);
  font-size: clamp(1.75rem, 3.2vw, 2.4rem);
  font-weight: 900;
  letter-spacing: -0.045em;
  line-height: 1.15;
}

h2 {
  font-size: clamp(1.35rem, 2.2vw, 1.85rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.25;
}

h3 {
  font-size: clamp(1.1rem, 1.6vw, 1.35rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.35;
}

/* ===== BODY TEXT - Vazirmatn like IranSans ===== */
p, .section-desc, .summary-text, .about-founder-bio, .fm-card, .news-card, .calendar-card, .about-hero p, .about-closing, .advisor-conv, .fm-insight {
  font-family: var(--font-fa-body);
  font-weight: 400;
  line-height: 1.9;
  letter-spacing: -0.008em;
  word-spacing: -0.01em;
}

.section-desc {
  font-size: 0.92rem;
  line-height: 1.85;
  color: var(--text-dim);
  max-width: 640px;
  font-weight: 400;
  letter-spacing: -0.01em;
}

/* ===== SMALL/META - موتا مارکت 12px 500 + هوشمند clean ===== */
.mono, .tape-track, .home-markets-note, .status-pill, .impact-tag, .meta, .fm-kpi-label, .fm-badge, .eyebrow, .home-eyebrow {
  font-family: var(--font-fa-body);
  font-weight: 500;
  letter-spacing: -0.006em;
}

.eyebrow, .home-eyebrow, .fm-kpi-label {
  font-weight: 700;
  letter-spacing: 0.04em;
  font-size: 0.68rem;
  text-transform: uppercase;
  font-feature-settings: "ss01" 1;
}

/* ===== FINANCIAL NUMBERS - موتا مارکت 21px 800 -0.04em tabular FD + هوشمند tabular + هوشمندbank Estedad ===== */
.fm-kpi-value, .market-card-price, .home-price, .clock-card .time, .amount, .fm-tx-row .amount, .price, .value, .irt {
  font-family: var(--font-fa-heading);
  font-variant-numeric: tabular-nums slashed-zero;
  font-feature-settings: "tnum" 1, "ss01" 1, "zero" 1;
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 1.12;
  font-optical-sizing: auto;
}

/* موتا مارکت price - large bold tight */
.home-price, .market-card-price {
  font-family: var(--font-fa-display);
  font-weight: 900;
  font-size: 1.55rem;
  letter-spacing: -0.045em;
  line-height: 1.12;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1, "ss01" 1;
}

/* IRT label - موتا مارکت تومان 12px 400 dim */
.home-price .irt, .market-card-price .irt, .irt, span.irt {
  font-family: var(--font-fa-body);
  font-weight: 500;
  font-size: 0.72rem;
  letter-spacing: -0.01em;
  opacity: 0.65;
  margin-right: 4px;
  vertical-align: middle;
}

/* Clock - هوشمند + هوشمندbank tabular slashed-zero */
.clock-card .time, .clock-card .clock-time, #clocksGrid .time {
  font-family: var(--font-fa-heading);
  font-weight: 800;
  font-size: 1.4rem;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums slashed-zero;
  font-feature-settings: "tnum" 1, "ss01" 1, "zero" 1;
  direction: ltr;
  text-align: left;
  line-height: 1.1;
}

/* KPI - هوشمندbank Estedad geometric 1.9rem 900 */
.fm-kpi-value {
  font-family: var(--font-fa-display);
  font-weight: 900;
  font-size: 1.85rem;
  letter-spacing: -0.05em;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1, "ss01" 1;
}

/* Summary - موتا مارکت bold */
.summary-card .summary-value, .summary-card .summary-status {
  font-family: var(--font-fa-heading);
  font-weight: 800;
  letter-spacing: -0.025em;
  font-variant-numeric: tabular-nums;
}

/* Change badge - موتا مارکت discount badge */
.home-change, .market-card-change {
  font-family: var(--font-fa-body);
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1, "ss01" 1;
  padding: 4px 10px;
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  line-height: 1.2;
}

/* Ticker - هوشمند clean Inter 500 */
.tape-track {
  font-family: var(--font-fa-body);
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1, "ss01" 1;
  font-weight: 600;
  letter-spacing: -0.008em;
  font-size: 0.82rem;
}

/* Buttons - هوشمند 44px touch, Medium 600 */
.btn, .fm-tab, .main-nav a, .advisor-sample, .fm-input, .fm-select, .fm-field label {
  font-family: var(--font-fa-body);
  font-weight: 600;
  letter-spacing: -0.01em;
}

.btn-gold {
  font-weight: 700;
  letter-spacing: -0.012em;
}

/* Brand - Black 900 like موتا مارکت */
.brand-name {
  font-family: var(--font-fa-display);
  font-weight: 900;
  letter-spacing: -0.03em;
  font-size: 1.02rem;
}

/* About - premium */
.about-founder-name {
  font-family: var(--font-fa-heading);
  font-weight: 800;
  letter-spacing: -0.02em;
}

.about-closing {
  font-family: var(--font-fa-heading);
  font-style: normal;
  font-weight: 500;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
  line-height: 1.9;
}

/* ===== ENGLISH FRAGMENTS INSIDE PERSIAN - Premium English fonts ===== */
/* Even in Persian RTL, English fragments use Inter/Geist like هوشمند/هوشمند */
.home-live-badge, .status-pill.live, #marketStatusPill, #iranStatusPill, .home-group-badge, .tape-track .en, [data-en] {
  font-family: var(--font-en-heading);
  font-weight: 700;
  letter-spacing: 0.02em;
  font-feature-settings: "ss01" 1, "ss02" 1;
}

/* English badge - Geist bold tight */
.home-live-badge, .status-pill.live {
  font-family: var(--font-en-heading);
  font-weight: 700;
  letter-spacing: 0.03em;
  font-size: 0.68rem;
}

/* Prices LTR - Geist Mono tabular like هوشمند primary interface */
.home-price.ltr, .market-card-price.ltr, .fm-kpi-value.ltr, .mono, .price.ltr {
  font-family: var(--font-en-financial);
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
  font-weight: 700;
  letter-spacing: -0.02em;
}

/* LTR fragments */
[dir="ltr"], .ltr {
  direction: ltr;
  unicode-bidi: embed;
  font-family: var(--font-en-financial);
}

/* Brand English - Geist Black like هوشمند */
.brand-name + span, [style*="MUTA MARKET"] {
  font-family: var(--font-en-heading);
  font-weight: 800;
  letter-spacing: 0.08em;
}

/* ===== FINANCE TRANSACTION - Torob + Divar 16px 700 ===== */
.fm-tx-row .amount, #fmTxList .amount, .fm-list .amount {
  font-family: var(--font-fa-heading);
  font-weight: 800;
  font-size: 0.95rem;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1, "ss01" 1;
}

/* ===== INPUT NUMBERS - هوشمندbank ===== */
.fm-input[type="number"], input[type="number"] {
  font-family: var(--font-fa-body);
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1, "ss01" 1;
  letter-spacing: -0.02em;
  font-weight: 600;
}

/* ===== PERFORMANCE - No FOIT, swap ===== */
body {
  font-size: 15px;
}
@media (min-width: 768px) {
  body { font-size: 16px; }
}

/* ===== RESPONSIVE - Mobile larger like موتا مارکت app ===== */
@media (max-width: 720px) {
  .home-price, .market-card-price { font-size: 1.4rem; letter-spacing: -0.04em; }
  .fm-kpi-value { font-size: 1.65rem; }
  .clock-card .time, .clock-card .clock-time { font-size: 1.25rem; }
  #view-home .section-title { font-size: clamp(1.6rem, 6vw, 2rem); }
}

/* ===== SELECTION - Gold like موتا مارکت ===== */
::selection {
  background: rgba(212,175,55,.22);
  color: #FFF8E6;
}

/* ===== ENGLISH MODE (future) - Inter 400/500 + Geist 750 ===== */
html[lang="en"], [data-lang="en"] {
  font-family: var(--font-en-body);
}

html[lang="en"] body {
  font-family: var(--font-en-body);
  font-weight: 400;
  letter-spacing: -0.011em;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "ss01" 1, "ss02" 1, "cv01" 1;
}

html[lang="en"] h1, html[lang="en"] h2, html[lang="en"] .section-title {
  font-family: var(--font-en-heading);
  font-weight: 750;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

/* ===== LIGHT THEME - هوشمند warm near-whites ===== */
[data-theme="light"] .section-desc { color: #6e6a66; }

/* ===== FONT LOADING - Swap already in @font-face, no external @import ===== */


/* ===== v256 REAL HOST FIX - UNIFY ALL NUMBERS FONT - طلا و بقیه یکسان ===== */
/* مشکل: فونت اعداد طلا با بقیه فرق داشت - چون یکی Estedad و یکی Geist Mono بود */
/* حل: همه اعداد مالی با یک فونت یکسان - Estedad 800 tabular برای فارسی، Geist Mono 700 tabular برای انگلیسی LTR */
/* اما وزن و سایز و tracking یکسان */

.home-price,
.market-card-price,
.fm-kpi-value,
.clock-card .time,
.amount,
.price,
.value,
.market-card-price .price,
.home-price .price,
#marketGrid .market-card-price,
#forexGrid .market-card-price,
#iranAssetsGrid .market-card-price,
#iranStocksGrid .market-card-price,
.home-markets-grid-wrapper .home-price {
  font-family: 'Estedad', 'Vazirmatn', system-ui, Tahoma, sans-serif !important;
  font-weight: 800 !important;
  font-variant-numeric: tabular-nums !important;
  font-feature-settings: "tnum" 1, "ss01" 1 !important;
  letter-spacing: -0.03em !important;
  line-height: 1.15 !important;
}

/* LTR prices (USD, crypto) - Geist Mono but same weight and tracking as Persian */
.home-price.ltr,
.market-card-price.ltr,
.fm-kpi-value.ltr,
.price.ltr,
.mono.ltr,
[data-price-ltr] {
  font-family: 'Geist Mono', 'Estedad', 'Vazirmatn', ui-monospace, monospace !important;
  font-weight: 800 !important;
  font-variant-numeric: tabular-nums !important;
  letter-spacing: -0.02em !important;
}

/* Ensure IRT label doesn't affect number font */
.home-price .irt,
.market-card-price .irt,
.irt {
  font-family: 'Vazirmatn', system-ui, Tahoma, sans-serif !important;
  font-weight: 500 !important;
  font-size: 0.72rem !important;
  letter-spacing: -0.01em !important;
}

/* All market cards - same number style */
.market-card .market-card-price,
.home-market-card .home-price {
  font-family: 'Estedad', 'Vazirmatn', sans-serif !important;
  font-weight: 800 !important;
}

/* Fix: ensure gold and silver and USD all same */
#iranAssetsGrid .market-card-price,
#iranStocksGrid .market-card-price {
  font-family: 'Estedad', 'Vazirmatn', sans-serif !important;
  font-weight: 800 !important;
}
