/* Owner-supplied ZKTKuangSKSJW.TTF; retain the full character set for editor changes. */
@font-face {
    font-family: "YOOAN Kuangshan Kai";
    src: url("../../themes/yooan/assets/fonts/zikutang-kuangshan-kai.woff2") format("woff2");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

.ysn-language {
    display: inline-flex;
    align-items: center;
    gap: .22rem;
    margin-inline-end: .3rem;
    padding: .28rem;
    border: 1px solid color-mix(in srgb, currentColor 24%, transparent);
    border-radius: 999px;
    font-size: .72rem;
    line-height: 1;
}

.ysn-language a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2rem;
    min-height: 1.75rem;
    padding: 0 .42rem;
    border-radius: 999px;
    color: inherit;
    text-decoration: none;
}

.ysn-language a[aria-current="true"] {
    background: #17243b;
    color: #fff;
}

@media (max-width: 720px) {
    .ysn-language {
        margin-inline-end: .05rem;
        font-size: .66rem;
    }

    .ysn-language a {
        min-width: 2.25rem;
        min-height: 1.6rem;
        padding-inline: .32rem;
    }
}

/* Chinese typography needs a calmer scale than the Latin display face. */
html[lang="zh-CN"] body {
    font-family: "PingFang SC", "Noto Sans CJK SC", "Microsoft YaHei", sans-serif;
}

html[lang="zh-CN"] :is(h1, h2, h3, .yh-cinema__statement) {
    font-family: "PingFang SC", "Noto Sans CJK SC", "Microsoft YaHei", sans-serif;
    /* 2026-10-19：原来是 keep-all——中文没有空格，整句被当成一个“单词”不许换行，
       在窄屏上把标题撑出屏幕（Products 首屏标题被截断就是这个原因）。改为正常断行，
       用 balance 让多行长度均衡，避免最后一行只剩一个字（如「系 / 统」）。 */
    word-break: normal;
    overflow-wrap: anywhere;
    line-break: strict;
    text-wrap: balance;
}

/* Homepage opening: two equally sized, vertically stacked Chinese lines. */
html[lang="zh-CN"] .yh-cinema .yh-cinema__intro-title {
    font-size: clamp(2.9rem, 4.75vw, 5.7rem) !important;
    line-height: 1.02 !important;
    letter-spacing: -.045em !important;
}

html[lang="zh-CN"] body #yooan-projects-title:not(#y-k),
html[lang="zh-CN"] main #yooan-home-hero-title:not(#y-k) {
    font-size: clamp(2.9rem, 4.75vw, 5.7rem) !important;
    line-height: 1.02 !important;
}

html[lang="zh-CN"] .yh-cinema .yh-cinema__intro-title > span {
    display: block !important;
    font-size: 1em !important;
    line-height: inherit !important;
    white-space: nowrap;
}

html[lang="zh-CN"] main #yooan-home-hero-title > span:not(#y-k) {
    display: block !important;
    font-size: 1em !important;
    line-height: inherit !important;
}

html[lang="zh-CN"] .yh-cinema .yh-cinema__intro-title > span:last-child {
    font-weight: 400;
}

/* Keep the text link and pill CTA on one baseline and one type scale. */
html[lang="zh-CN"] .yh-cinema .yh-cinema__intro-actions {
    align-items: center;
    gap: 1rem 1.25rem;
}

html[lang="zh-CN"] .yh-cinema .yh-cinema__intro-actions > a {
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    min-height: 48px;
    font-size: .82rem !important;
    line-height: 1 !important;
    letter-spacing: .035em;
}

html[lang="zh-CN"] body main .yh-cinema .yh-cinema__intro-actions > a:not(#y-k) {
    min-height: 48px !important;
    font-size: .82rem !important;
}

html[lang="zh-CN"] .yh-cinema .yh-cinema__intro-actions > a:not(.yh-cinema__quote-link) {
    padding-top: .72rem;
    padding-bottom: .72rem;
}

html[lang="zh-CN"] .yh-cinema .yh-cinema__intro-actions > a span {
    font-size: 1em;
}

/* Factory film headline: two steps smaller, with no oversized Chinese punctuation. */
html[lang="zh-CN"] .yh-cinema .yh-cinema__statement {
    width: min(78vw, 1020px);
    font-size: clamp(3rem, 5.2vw, 6.15rem) !important;
    line-height: .98 !important;
    letter-spacing: -.045em;
}

html[lang="zh-CN"] #factory-film .yh-film__title:not(#y-k) {
    max-width: 16ch;
    font-size: clamp(2.5rem, 4.2vw, 4rem) !important;
    line-height: 1.06 !important;
    letter-spacing: -.04em;
}

html[lang="zh-CN"] #factory-film .yh-film__title > span {
    font-size: 1em !important;
    line-height: inherit !important;
}

/* Product and project detail H1s: preserve hierarchy without billboard-sized Han glyphs. */
html[lang="zh-CN"] .yps-info h1 {
    max-width: 15ch;
    font-size: clamp(2.15rem, 3.35vw, 3.55rem) !important;
    line-height: 1.08 !important;
    letter-spacing: -.035em;
}

html[lang="zh-CN"] .yooan-project-detail__title {
    max-width: 22ch;
    font-size: clamp(2.2rem, 3.7vw, 3.8rem) !important;
    line-height: 1.06 !important;
    letter-spacing: -.035em;
    text-transform: none;
}

html[lang="zh-CN"] .yooan-project-detail__title-sub {
    max-width: 38ch;
    font-size: clamp(.98rem, 1.25vw, 1.2rem) !important;
    line-height: 1.5 !important;
    letter-spacing: 0;
}

/* Product overview and About use oversized Latin display treatments in English. */
html[lang="zh-CN"] #yp-overview-title:not(#y-k) {
    max-width: 16ch;
    font-size: clamp(2.75rem, 4.2vw, 4rem) !important;
    line-height: 1.08 !important;
    letter-spacing: -.04em !important;
}

/* Product overview H1 and its primary section headings share one Chinese scale. */
html[lang="zh-CN"] .yp-overview .yp-section__head > h2:not(#y-k) {
    font-size: clamp(2.75rem, 4.2vw, 4rem) !important;
    line-height: 1.08 !important;
    letter-spacing: -.04em !important;
}

html[lang="zh-CN"] #ya-title .yab-script:not(#y-k) {
    font-family: "YOOAN Kuangshan Kai", "PingFang SC", "Microsoft YaHei", sans-serif !important;
    font-size: clamp(4.5rem, 8vw, 7.2rem) !important;
    font-weight: 400;
    line-height: .98 !important;
    letter-spacing: -.06em;
}

@media (max-width: 767px) {
    html[lang="zh-CN"] #ya-title .yab-script:not(#y-k) {
        font-size: inherit !important;
        line-height: inherit !important;
        letter-spacing: -.025em;
    }
}

@media (max-width: 900px) {
    html[lang="zh-CN"] .yh-cinema .yh-cinema__intro-title {
        font-size: clamp(2.65rem, 7.6vw, 4.7rem) !important;
    }

    html[lang="zh-CN"] body #yooan-projects-title:not(#y-k),
    html[lang="zh-CN"] main #yooan-home-hero-title:not(#y-k) {
        font-size: clamp(2.65rem, 7.6vw, 4.7rem) !important;
    }

    html[lang="zh-CN"] .yh-cinema .yh-cinema__intro-title > span {
        white-space: normal;
    }

    html[lang="zh-CN"] .yh-cinema .yh-cinema__statement {
        font-size: clamp(2.75rem, 7.8vw, 5.2rem) !important;
    }
}

@media (max-width: 600px) {
    html[lang="zh-CN"] .yh-cinema .yh-cinema__intro-title {
        font-size: clamp(2.25rem, 10.2vw, 3.35rem) !important;
        line-height: 1.08 !important;
    }

    html[lang="zh-CN"] body #yooan-projects-title:not(#y-k),
    html[lang="zh-CN"] main #yooan-home-hero-title:not(#y-k) {
        font-size: clamp(2.25rem, 10.2vw, 3.35rem) !important;
        line-height: 1.08 !important;
    }

    html[lang="zh-CN"] main #yooan-home-hero-title > span:not(#y-k) {
        display: block !important;
    }

    html[lang="zh-CN"] .yh-cinema .yh-cinema__intro-actions > a {
        min-height: 44px;
        font-size: 13px !important;
    }

    html[lang="zh-CN"] body main .yh-cinema .yh-cinema__intro-actions > a:not(#y-k) {
        min-height: 44px !important;
        font-size: 13px !important; /* 2026-10-19：原 .72rem≈11.5px，手机上按钮字太小 */
    }

    html[lang="zh-CN"] .yh-cinema .yh-cinema__statement {
        width: calc(100% - 44px);
        font-size: clamp(2.35rem, 11vw, 3.5rem) !important;
        line-height: 1.02 !important;
    }

    html[lang="zh-CN"] #factory-film .yh-film__title:not(#y-k) {
        font-size: clamp(1.9rem, 8vw, 2.15rem) !important;
        line-height: 1.12 !important;
    }

    html[lang="zh-CN"] .yps-info h1,
    html[lang="zh-CN"] .yooan-project-detail__title {
        max-width: none;
        font-size: clamp(1.9rem, 8vw, 2.5rem) !important;
        line-height: 1.12 !important;
    }

    html[lang="zh-CN"] #yp-overview-title:not(#y-k) {
        max-width: none;
        font-size: clamp(2rem, 8vw, 2.6rem) !important;
        line-height: 1.12 !important;
    }

    html[lang="zh-CN"] .yp-overview .yp-section__head > h2:not(#y-k) {
        font-size: clamp(2rem, 8vw, 2.6rem) !important;
        line-height: 1.12 !important;
    }

    html[lang="zh-CN"] #ya-title .yab-script:not(#y-k) {
        font-size: inherit !important;
        line-height: inherit !important;
    }
}


/* 2026-10-19 首页「图纸与资料」板块（中文版）
   1) 背景大字「资料」：汉字比拉丁大写字母"重"得多，沿用英文 11vw 会显得过大；
      英文行高 .86 还会把汉字上沿裁掉，所以字号降到约 60%，行高放开。 */
html[lang="zh-CN"] .dd-bigword {
    font-family: "PingFang SC", "Noto Sans CJK SC", "Microsoft YaHei", sans-serif;
    font-size: clamp(56px, 6.4vw, 116px);
    font-weight: 300;
    line-height: 1.22;
    letter-spacing: .06em;
    text-transform: none;
    padding-bottom: .08em;
}

/* 2) 橙色批注「与产品及 / 检测配置相匹配」：原来贴在图纸卡片左侧，
      中文比英文手写体宽，会压在旁边的证书图片上。改为放在图纸卡片图片正上方，
      该卡片本身靠下，上方有足够空位，不再与任何图片重叠。 */
html[lang="zh-CN"] .dd-card__note {
    right: auto;
    left: 0;
    top: auto;
    bottom: calc(100% + 8px);
    margin: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
}

html[lang="zh-CN"] .dd-note__text {
    font-family: "YOOAN Kuangshan Kai", "PingFang SC", "Microsoft YaHei", sans-serif !important;
    font-size: clamp(15px, 1.2vw, 18px);
    font-weight: 400;
    line-height: 1.45;
    letter-spacing: .06em;
    white-space: nowrap;
}

html[lang="zh-CN"] .dd-card__note .dd-arrow {
    width: clamp(56px, 5vw, 84px);
    margin: 2px 0 0 4px;
}

@media (max-width: 960px) {
    html[lang="zh-CN"] .dd-bigword {
        font-size: clamp(44px, 12vw, 84px);
    }
}

/* 2026-10-19：About 首屏「关于 / 我们」（手机）——英文版靠负外边距 + 浮动占位让正文绕开短短的 "Us"，
   中文「我们」两个字更宽，正文压到了字上。中文版取消这个绕排，正文另起一行。 */
@media (max-width: 767px) {
    html[lang="zh-CN"] .yab-intro__text--left:not(#y-k):not(#y-k2) { margin-top: 6px; }
    html[lang="zh-CN"] .yab-intro__text--left::before { display: none; }
}
