/**
 * Locale font stacks.
 * `--lz-font-display` / `--lz-font-body` are the single tokens consumed by feature CSS;
 * setting both per locale here lets call sites use `font-family: var(--lz-font-display)`
 * instead of forking on `html.ladyzone-locale-*` selectors.
 * Per-locale type scaling lives on `--lz-type-scale` and is consumed by `--text-*` tokens
 * in `base.css`. Layout sizes (rem, em, vw) stay English so cards / padding match.
 */

html.ladyzone-locale-en {
  --lz-font-display: "Gilroy", system-ui, sans-serif;
  --lz-font-body: "Gilroy", system-ui, sans-serif;
}

html[lang="fa"] {
  --lz-font-display: "Vazirmatn", Tahoma, "Segoe UI", sans-serif;
  --lz-font-body: "Vazirmatn", Tahoma, "Segoe UI", sans-serif;
}

html[lang="hy"] {
  --lz-font-display: "Noto Sans Armenian", Mshtakan, Sylfaen, Georgia, serif;
  --lz-font-body: "Noto Sans Armenian", Mshtakan, system-ui, sans-serif;
}

/*
 * Armenian: `text-transform` (uppercase/lowercase) uses Unicode case rules that corrupt glyphs
 * (e.g. ech-yiwn և). Turn it off site-wide; casing comes from `tr()` / authored markup.
 */
html[lang="hy"] *,
html[lang="hy"] *::before,
html[lang="hy"] *::after {
  text-transform: none !important;
}

html[lang="ru"] {
  --lz-font-display: "Oswald", Impact, "Arial Narrow", sans-serif;
  --lz-font-body: "Oswald", Impact, "Arial Narrow", sans-serif;
  --lz-type-scale: 0.75;
}

/*
 * Locale copy scale — typography only via `--lz-type-scale` on `--text-*` tokens.
 * `html` stays at 100% so rem padding, card min-heights, form panels, and em layout match English.
 * - fa: 0.75 | hy: 0.65 | ru: 0.75
 */
html[lang="fa"] {
  --lz-type-scale: 0.75;
}

html[lang="hy"] {
  --lz-type-scale: 0.65;
}

/*
 * Locale text scaling for the core tokens consumed by `base.css` (body, h1-h3, .lz-field-error).
 * Mirrors the EN defaults from `base.css` but multiplied by `--lz-type-scale`.
 */
html[lang="fa"],
html[lang="hy"],
html[lang="ru"] {
  --text-body: calc(14px * var(--lz-type-scale));
  --text-xs: calc(12px * var(--lz-type-scale));
  --text-2xl: calc(18px * var(--lz-type-scale));
  --text-3xl: calc(20px * var(--lz-type-scale));
  --text-5xl: calc(28px * var(--lz-type-scale));
}

html[lang="fa"] body,
html[lang="hy"] body,
html[lang="ru"] body {
  font-family: var(--lz-font-body);
}

html[lang="fa"] body {
  font-feature-settings: "kern" 1;
  -webkit-font-smoothing: antialiased;
}

html[lang="hy"] body,
html[lang="ru"] body {
  -webkit-font-smoothing: antialiased;
}

html[lang="fa"] .heading,
html[lang="fa"] h1,
html[lang="fa"] h2,
html[lang="fa"] h3,
html[lang="hy"] .heading,
html[lang="hy"] h1,
html[lang="hy"] h2,
html[lang="hy"] h3,
html[lang="ru"] .heading,
html[lang="ru"] h1,
html[lang="ru"] h2,
html[lang="ru"] h3 {
  font-family: var(--lz-font-display);
  font-weight: 600;
  letter-spacing: -0.01em;
}

/*
 * slide menu: each `<a lang="…">` keeps its destination-language face on every site locale.
 * Beats `.page-home *` + header bar font rules via specificity (`body.ladyzone-route-home …`).
 */
body.ladyzone-route-home .lz-header__langs .nav-sub__link:lang(en) {
  font-family: Inter, system-ui, sans-serif;
}

body.ladyzone-route-home .lz-header__langs .nav-sub__link:lang(hy) {
  font-family: "Noto Sans Armenian", Mshtakan, Sylfaen, Georgia, serif;
  text-transform: none;
}

body.ladyzone-route-home .lz-header__langs .nav-sub__link:lang(ru) {
  font-family: Oswald, Impact, "Arial Narrow", sans-serif;
}

body.ladyzone-route-home .lz-header__langs .nav-sub__link:lang(fa) {
  font-family: Vazirmatn, Tahoma, "Segoe UI", sans-serif;
  direction: rtl;
  unicode-bidi: isolate;
}

/*
 * Footer body copy keeps the locale body face. The footer is exempt from `--lz-type-scale`
 * (see `footer.css`), so only font-family — not size — changes per locale.
 * `.txt-16` / `.sec-footer` are rendered by `app/Views/partials/footer.php`.
 */
html[lang="fa"] .ladyzone-site-footer .txt-16,
html[lang="hy"] .ladyzone-site-footer .txt-16,
html[lang="ru"] .ladyzone-site-footer .txt-16 {
  font-family: var(--lz-font-body);
}

html[lang="fa"] .page-home,
html[lang="hy"] .page-home,
html[lang="ru"] .page-home {
  font-family: var(--lz-font-body);
}

html[lang="fa"] .page-home *:not(.nav-sub__link),
html[lang="hy"] .page-home *:not(.nav-sub__link),
html[lang="ru"] .page-home *:not(.nav-sub__link) {
  font-family: var(--lz-font-body);
}

html[lang="ru"] .page-home .heading,
html[lang="ru"] .page-home h1,
html[lang="ru"] .page-home h2,
html[lang="ru"] .page-home h3 {
  font-family: var(--lz-font-display);
}
