/* ================================================================
   ITUM ERP — TYPOGRAPHY
   Premium enterprise typography system
   ================================================================ */

/* Google Fonts נטענים דרך <link> ב-index.html (טעינה מקבילה, לא חוסמת render) */

/* ── Base ────────────────────────────────────────────────────── */
body {
  font-family: var(--font-family-primary);
  font-size: var(--text-base);
  font-weight: 400;
  line-height: var(--leading-normal);
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-feature-settings: 'kern' 1;
}

/* ── Headings ────────────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-family-display);
  font-weight: 700;
  line-height: var(--leading-tight);
  color: var(--text-primary);
  letter-spacing: var(--tracking-tight);
}

h1 { font-size: var(--text-4xl); font-weight: 800; }
h2 { font-size: var(--text-3xl); }
h3 { font-size: var(--text-2xl); }
h4 { font-size: var(--text-xl); font-weight: 600; }
h5 { font-size: var(--text-lg); font-weight: 600; }
h6 { font-size: var(--text-base); font-weight: 600; }

/* ── Paragraph ───────────────────────────────────────────────── */
p {
  line-height: var(--leading-relaxed);
  color: var(--text-secondary);
}

/* ── Links ───────────────────────────────────────────────────── */
a {
  color: var(--text-link);
  text-decoration: none;
  transition: var(--transition-colors);
}
a:hover {
  color: var(--text-link-hover);
}

/* ── Font Weight Utilities ───────────────────────────────────── */
.font-light     { font-weight: 300; }
.font-normal    { font-weight: 400; }
.font-medium    { font-weight: 500; }
.font-semibold  { font-weight: 600; }
.font-bold      { font-weight: 700; }
.font-extrabold { font-weight: 800; }

/* ── Font Size Utilities ─────────────────────────────────────── */
.text-2xs  { font-size: var(--text-2xs); }
.text-xs   { font-size: var(--text-xs); }
.text-sm   { font-size: var(--text-sm); }
.text-base { font-size: var(--text-base); }
.text-md   { font-size: var(--text-md); }
.text-lg   { font-size: var(--text-lg); }
.text-xl   { font-size: var(--text-xl); }
.text-2xl  { font-size: var(--text-2xl); }
.text-3xl  { font-size: var(--text-3xl); }
.text-4xl  { font-size: var(--text-4xl); }

/* ── Text Color Utilities ────────────────────────────────────── */
.text-primary   { color: var(--text-primary); }
.text-secondary { color: var(--text-secondary); }
.text-muted     { color: var(--text-muted); }
.text-accent    { color: var(--text-accent); }
.text-success   { color: var(--color-success-light); }
.text-error     { color: var(--color-error-light); }
.text-warning   { color: var(--color-warning-light); }

/* ── Text Alignment ──────────────────────────────────────────── */
.text-start   { text-align: start; }
.text-center  { text-align: center; }
.text-end     { text-align: end; }

/* ── Font Family Utilities ───────────────────────────────────── */
.font-en {
  font-family: var(--font-family-en);
  direction: ltr;
  unicode-bidi: isolate;
}
.font-mono {
  font-family: var(--font-family-mono);
  direction: ltr;
  unicode-bidi: isolate;
  font-size: 0.9em;
}

/* ── Text Utilities ──────────────────────────────────────────── */
.truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.whitespace-pre { white-space: pre-wrap; }
.uppercase      { text-transform: uppercase; letter-spacing: var(--tracking-caps); }
.capitalize     { text-transform: capitalize; }
.no-wrap        { white-space: nowrap; }

/* ── Gradient Text ───────────────────────────────────────────── */
.text-gradient {
  background: var(--gradient-accent);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.text-gradient-gold {
  background: var(--gradient-gold);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Selection ───────────────────────────────────────────────── */
::selection {
  background: rgba(99, 102, 241, 0.35);
  color: var(--color-white);
}
