/*! ASTRONSTAR 运行时镜像 — 请勿直接修改本文件 | 源文件: src/styles/components/fonts.css | 重新生成: npm run prepare:runtime | 源码归属与修改边界见 docs/architecture.md */
/* 阿里巴巴普惠体 2.0 — 115 Black */
@font-face {
  font-family: "Alibaba PuHuiTi 2";
  src: url("/assets/font/alibaba-puhuiti-2-115-black.woff2") format("woff2");
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}

/* 荆南缘默体 */
@font-face {
  font-family: "Kingnam Yuanmo SC";
  src: url("/assets/font/kingnam-yuanmo-sc.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/*
 * 旧页面仍使用这两个字体族名。保留别名以维持原有 CSS 结构，
 * 实际加载的字体已统一替换为荆南缘默体。
 */
@font-face {
  font-family: "astronstarfont";
  src: url("/assets/font/kingnam-yuanmo-sc.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  size-adjust: 70%;
  font-display: swap;
}

@font-face {
  font-family: "astronstar-display";
  src: url("/assets/font/kingnam-yuanmo-sc.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  size-adjust: 70%;
  font-display: swap;
}

.font-alibaba-puhuiti-black {
  font-family: "Alibaba PuHuiTi 2", sans-serif;
  font-weight: 900;
}

.font-kingnam-yuanmo {
  font-family: "Kingnam Yuanmo SC", sans-serif;
  font-weight: 400;
}

/*
 * 全站中英文混排字体：
 * - 拉丁字母、数字和常用英文符号：荆南缘默体
 * - 中文汉字、中文标点和全角符号：阿里巴巴普惠体 2.0 115 Black
 */
@font-face {
  font-family: "Astronstar Bilingual";
  src: url("/assets/font/kingnam-yuanmo-sc.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-024F, U+1E00-1EFF;
}

@font-face {
  font-family: "Astronstar Bilingual";
  src: url("/assets/font/alibaba-puhuiti-2-115-black.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  unicode-range:
    U+2E80-2FDF, U+3000-303F, U+31C0-31EF, U+3400-4DBF, U+4E00-9FFF,
    U+F900-FAFF, U+FE30-FE4F, U+FF00-FFEF;
}

/* 默认不启用；仅在 <html> 加上 as-use-brand-fonts 时应用全站混排字体。 */
html.as-use-brand-fonts:lang(zh) body,
html.as-use-brand-fonts:lang(zh) body * {
  font-family: "Astronstar Bilingual", sans-serif !important;
}

/* 文字打散动画使用现有品牌字体；过渡符号由项目自己的火箭图片绘制。 */
html.as-use-brand-fonts:lang(zh) body .u-emoji,
html.as-use-brand-fonts:lang(zh) body .u-emoji * {
  font-family: "Astronstar Bilingual", sans-serif !important;
}

/* 首页底部「加入我们」主文案使用各语言的常规阅读字体，保留原有文字动画。 */
html:lang(zh) body .p-home-careers__title .u-emoji,
html:lang(zh) body .p-home-careers__title .u-emoji * {
  font-family: "PingFang SC", "Microsoft YaHei", sans-serif !important;
}

html:lang(en) body .p-home-careers__title .u-emoji,
html:lang(en) body .p-home-careers__title .u-emoji * {
  font-family: Inter, Arial, sans-serif !important;
}

html:lang(ja) body .p-home-careers__title .u-emoji,
html:lang(ja) body .p-home-careers__title .u-emoji * {
  font-family:
    "Zen Kaku Gothic New", "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif !important;
}

/* 全屏菜单三种语言均使用常规阅读字体，悬停标识使用 ASTRONSTAR Logo。 */
html:lang(zh) body .l-hambergerMenu__item a,
html:lang(zh) body .l-hambergerMenu__item a * {
  font-family: "PingFang SC", "Microsoft YaHei", sans-serif !important;
}

html:lang(en) body .l-hambergerMenu__item a,
html:lang(en) body .l-hambergerMenu__item a * {
  font-family: Inter, Arial, sans-serif !important;
}

html:lang(ja) body .l-hambergerMenu__item a,
html:lang(ja) body .l-hambergerMenu__item a * {
  font-family:
    "Zen Kaku Gothic New", "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif !important;
}

.l-hambergerMenu__item a::before {
  background-image: url("/assets/img/astronstar/official-logo.png") !important;
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
  aspect-ratio: 3 / 1;
}

/* 英文模式全站统一使用荆南缘默体。 */
html.as-use-brand-fonts:lang(en) body,
html.as-use-brand-fonts:lang(en) body * {
  font-family: "Kingnam Yuanmo SC", sans-serif !important;
}

html.as-use-brand-fonts:lang(en) body .u-emoji,
html.as-use-brand-fonts:lang(en) body .u-emoji * {
  font-family: "Kingnam Yuanmo SC", sans-serif !important;
}

/*
 * 「使命 / 使命宣言」三种语言共用同一套常规字体规则。
 * 同时覆盖文字打散动画生成的子节点，避免局部回退到品牌展示字体。
 */
html:lang(zh)
  body
  :is(.p-home-mission, .p-home-missionStatement)
  :is(.p-page__title, .p-home-mission__lead, .p-home-missionStatement__copy),
html:lang(zh)
  body
  :is(.p-home-mission, .p-home-missionStatement)
  :is(.p-page__title, .p-home-mission__lead, .p-home-missionStatement__copy)
  * {
  font-family: "PingFang SC", "Microsoft YaHei", sans-serif !important;
}

html:lang(en)
  body
  :is(.p-home-mission, .p-home-missionStatement)
  :is(.p-page__title, .p-home-mission__lead, .p-home-missionStatement__copy),
html:lang(en)
  body
  :is(.p-home-mission, .p-home-missionStatement)
  :is(.p-page__title, .p-home-mission__lead, .p-home-missionStatement__copy)
  * {
  font-family: Inter, Arial, sans-serif !important;
}

html:lang(ja)
  body
  :is(.p-home-mission, .p-home-missionStatement)
  :is(.p-page__title, .p-home-mission__lead, .p-home-missionStatement__copy),
html:lang(ja)
  body
  :is(.p-home-mission, .p-home-missionStatement)
  :is(.p-page__title, .p-home-mission__lead, .p-home-missionStatement__copy)
  * {
  font-family:
    "Zen Kaku Gothic New", "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif !important;
}
