/* The wordmark uses the original Lilita One Latin face even when external fonts are unavailable. */
@font-face {
  font-family: "Socionics Wordmark";
  src: url("/assets/fonts/lilita-one-latin.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: block;
}

html[lang="zh-Hans"] {
  --cjk-sans: Inter, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei",
    "Noto Sans CJK SC", "Noto Sans SC", system-ui, sans-serif;
}

html[lang="ja"] { --cjk-sans: Inter, "Hiragino Sans", "Yu Gothic", Meiryo, "Noto Sans JP", sans-serif; }
html[lang="ko"] { --cjk-sans: Inter, "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", sans-serif; word-break: keep-all; overflow-wrap: anywhere; }
html:is([lang="zh-Hans"],[lang="ja"],[lang="ko"]) body,
html:is([lang="zh-Hans"],[lang="ja"],[lang="ko"]) :is(.hero .lead, .operating-intro p, .operating-benefit p, .scan-layer p) {
  font-family: var(--cjk-sans);
  font-weight: 400;
  letter-spacing: 0;
}

html:is([lang="zh-Hans"],[lang="ja"],[lang="ko"]) :is(h1, h2, h3, .lilita) {
  font-family: var(--cjk-sans);
  font-weight: 700;
  letter-spacing: 0;
}

html:is([lang="zh-Hans"],[lang="ja"],[lang="ko"]) :is(h1, h2, h3) {
  line-height: 1.3;
}

html:is([lang="zh-Hans"],[lang="ja"],[lang="ko"]) :is(.btn, button, .tile, .reveal) {
  font-family: var(--cjk-sans) !important;
  letter-spacing: 0;
  word-spacing: normal;
}

/* The quiz and Vietnamese theme both set display typography directly on these spans. */
html[lang] .brand :is(b, .name, .lilita, .tag) {
  font-family: "Socionics Wordmark", "Lilita One", sans-serif !important;
  font-weight: 400 !important;
  text-transform: none !important;
}

html[lang] .brand :is(b, .name, .lilita:not(.tag)) {
  letter-spacing: .02em !important;
}

html[lang] .brand .tag {
  letter-spacing: .08em !important;
}

/* Keep pure-Latin 3-letter type codes in the brand display face across CJK locales. */
html:is([lang="zh-Hans"],[lang="ja"],[lang="ko"]) :is(
  h1.code,
  .type-identity .code,
  .poster-head .poster-code,
  .type-card .code,
  .rel > b,
  .trapCard > b
) {
  font-family: "Socionics Wordmark", "Lilita One", sans-serif !important;
  font-weight: 400 !important;
  letter-spacing: .02em;
}
