/*
 * Chinese-only layer. Loaded from inc/i18n.php on every /zh/ page.
 *
 * Two independent parts:
 *   1. @font-face for the self-hosted Noto Sans SC. Until the files are
 *      dropped into assets/fonts/, these rules resolve to nothing and the
 *      system CJK stack below takes over.
 *   2. Typographic corrections that apply regardless of the font.
 *
 * Google Fonts is unreachable from mainland China — do not swap the
 * @font-face rules for a CDN link.
 */

@font-face {
	font-family: "Noto Sans SC";
	src: url("../fonts/NotoSansSC-Regular.woff2") format("woff2");
	font-display: swap;
	font-style: normal;
	font-weight: 400;
}

@font-face {
	font-family: "Noto Sans SC";
	src: url("../fonts/NotoSansSC-SemiBold.woff2") format("woff2");
	font-display: swap;
	font-style: normal;
	font-weight: 600;
}

/*
 * Cormorant Garamond carries no CJK glyphs, so every serif heading would be
 * silently replaced by an arbitrary system face. Point both custom properties
 * at an explicit stack instead: Noto Sans SC first, then the standard system
 * faces on macOS, iOS, Windows and Android.
 */
body.lang-zh {
	--sans: "Noto Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Source Han Sans SC", "Manrope", Arial, sans-serif;
	--serif: "Noto Serif SC", "Songti SC", "SimSun", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", Georgia, serif;
}

/* Chinese has no word spaces: never break inside a run of glyphs. */
body.lang-zh {
	line-break: strict;
	word-break: normal;
	overflow-wrap: normal;
}

/*
 * Uppercase and wide tracking are Latin devices. On glyphs, text-transform
 * does nothing while letter-spacing pulls a word apart into loose characters.
 * These are every tracked or capitalised element in the theme.
 */
body.lang-zh .brand__name,
body.lang-zh .site-nav a,
body.lang-zh .button,
body.lang-zh .header-telegram,
body.lang-zh .eyebrow,
body.lang-zh .micro-label,
body.lang-zh .footer-label,
body.lang-zh .competency,
body.lang-zh .switcher-tab,
body.lang-zh .service-tab,
body.lang-zh .service-tab > strong,
body.lang-zh .services__strap span,
body.lang-zh .synergy__caption,
body.lang-zh .team__footer,
body.lang-zh .contact-form label > span,
body.lang-zh .contact-form > label:not(.consent),
body.lang-zh .contact-form__security,
body.lang-zh .contact-card__hint,
body.lang-zh .contact__links span,
body.lang-zh .hero__actions,
body.lang-zh .hero__actions > span,
body.lang-zh .hero__stats span,
body.lang-zh .hero__portrait figcaption strong,
body.lang-zh .hero-profile-card__tab span,
body.lang-zh .diagnostics__outro strong,
body.lang-zh .site-footer__bottom,
body.lang-zh .site-footer__statement p,
body.lang-zh .error-page h1 {
	letter-spacing: 0.02em;
	text-transform: none;
}

/* The active language stays Latin and keeps its original treatment. */
body.lang-zh .lang-switch__item {
	letter-spacing: 0.08em;
}

/*
 * The biography is clipped to a fixed card height and its size was tuned so
 * the Russian text just fits. Chinese runs far shorter, so the same box can
 * carry a larger, more readable size. Check on staging after the final
 * translation is in.
 */
body.lang-zh .hero-profile-card__bio {
	column-width: 240px;
	font-size: clamp(12px, 0.86vw, 14px);
	line-height: 1.75;
}

body.lang-zh .hero-profile-card__bio p {
	max-width: 40ch;
}
