/* VTS Design System — Typography
   FS PF BeauSans Pro type scale. Base 14px matches PrimeOne (--app-font-size).
   Sizes mirror the Aura scale (12.25 / 14 / 15.75 / 17.5 / 21 / 24.5 / 28 / 35).
   Prefixed --p-* for consistency with the runtime theme.

   Family tiers (VTS Font Guideline):
     brand    → FS Magistral — display only: hero/cover/campaign headings, ≥18px,
                never body, tables, forms, tooltips, or dense dashboards.
     ui       → FS PF BeauSans Pro — the default for every component.
     fallback → Roboto-led stack for degraded mode / unlicensed tenants.
     numeric  → UI family + tabular lining figures (KPI, numeric table cells).
     mono     → JetBrains Mono — code, logs, JSON/SQL, trace IDs. */

:root {
  /* ---- Families ---- */
  --p-font-family: 'FS PF BeauSans Pro', Roboto, Arial, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --p-font-family-brand: 'FS Magistral', 'FS PF BeauSans Pro', Arial, sans-serif;
  --p-font-family-fallback: Roboto, Arial, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --p-font-family-numeric: var(--p-font-family);
  --p-font-family-mono: 'JetBrains Mono', Menlo, Consolas, monospace;

  /* ---- Numeric features (KPI, numeric table cells) ---- */
  --p-font-feature-numeric: 'tnum' 1, 'lnum' 1;

  /* ---- Weights ---- */
  --p-font-weight-light: 300;
  --p-font-weight-regular: 400;
  --p-font-weight-medium: 500;
  --p-font-weight-semibold: 600;
  --p-font-weight-bold: 700;
  --p-font-weight-black: 900;

  /* ---- Size scale ---- */
  --p-font-size-xs: 12.25px;
  --p-font-size-sm: 12.25px;
  --p-font-size-base: 14px;
  --p-font-size-lg: 15.75px;
  --p-font-size-xl: 17.5px;
  --p-font-size-2xl: 21px;
  --p-font-size-3xl: 24.5px;
  --p-font-size-4xl: 28px;
  --p-font-size-5xl: 35px;

  /* ---- App text roles ---- */
  --p-app-font-size: 14px;
  --p-app-sm-font-size: 12.25px;
  --p-app-sm-line-height: 17.5px;
  --p-app-lg-font-size: 15.75px;
  --p-app-lg-line-height: 24.5px;

  /* ---- Line heights ---- */
  --p-line-height-none: 1;
  --p-line-height-tight: 1.25;
  --p-line-height-snug: 1.4;
  --p-line-height-normal: 1.5;
  --p-line-height-relaxed: 1.65;

  /* ---- Letter spacing ---- */
  --p-letter-spacing-tight: -0.01em;
  --p-letter-spacing-normal: 0;
  --p-letter-spacing-wide: 0.02em;

  /* ---- Semantic text styles ---- */
  --p-text-display-size: 35px;
  --p-text-display-weight: 700;
  --p-text-display-line-height: 1.2;
  --p-text-h1-size: 28px;
  --p-text-h1-weight: 700;
  --p-text-h2-size: 24.5px;
  --p-text-h2-weight: 600;
  --p-text-h3-size: 21px;
  --p-text-h3-weight: 600;
  --p-text-h4-size: 17.5px;
  --p-text-h4-weight: 600;
  --p-text-body-size: 14px;
  --p-text-body-weight: 400;
  --p-text-body-line-height: 1.5;
  --p-text-caption-size: 12.25px;
  --p-text-caption-weight: 400;
  --p-text-label-size: 14px;
  --p-text-label-weight: 500;
}

/* ---- Guideline compatibility aliases (--vts-*) ----
   The VTS Font Guideline names these tokens with a --vts- prefix;
   they resolve to the same --p-* values. */
:root {
  --vts-font-family-brand: var(--p-font-family-brand);
  --vts-font-family-ui: var(--p-font-family);
  --vts-font-family-fallback: var(--p-font-family-fallback);
  --vts-font-family-numeric: var(--p-font-family-numeric);
  --vts-font-family-mono: var(--p-font-family-mono);
  --vts-font-feature-numeric: var(--p-font-feature-numeric);
}

/* ---- Typography utilities (guideline §2.4 / §2.1) ---- */
.vts-brand-display {
  font-family: var(--p-font-family-brand);
}

.vts-tabular-nums,
.vts-kpi-number,
.vts-table-cell--number {
  font-family: var(--p-font-family-numeric);
  font-variant-numeric: tabular-nums;
  font-feature-settings: var(--p-font-feature-numeric);
}
