/* ============================================================
   Partner in Growth LLC — i18n.css
   语言切换控件样式 + 中文排版微调 + 标题字体 fallback 修复。

   为什么单开一个文件而不是并进 main.css：
   main.css 是模板经 HTTrack 抓取的产物（12500+ 行）、从 init 至今一行未改，
   往里塞自写规则会让以后「模板 vs 我们的改动」的 diff 永久混浊。
   独立文件也便于 version-stamp.js 单独打版本号。
   ============================================================ */

/* ---------- 标题字体 fallback（顺带修的既存缺陷） ----------
   main.css:68-69 定义 --font-heading: 'HelveticaNeue'，没有任何 fallback；
   而 custom-fonts.css 的 @font-face 指向 assets/fonts/HelveticaNeue*.html
   —— 那些是 0 字节的 HTTrack 残片，字体从未加载成功。body class 是
   business-consulting（不是 .start_Up_consulting），所以 :root 那条全站
   生效 → 目前所有标题实际渲染为浏览器默认衬线字体。

   中文接入后标题会落到宋体，与站点现代无衬线风格冲突，故在此补全字体栈。
   照仓库既有惯例不引入 CJK webfont（Noto Sans SC 在 Google Fonts 上是
   100+ unicode-range 分片，代价太大），改用系统中文字体。
   （--font-body 原本就是 "Inter", sans-serif，有兜底，无需处理。） */
:root {
    --font-heading: "Inter", "Helvetica Neue", Arial,
                    "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", sans-serif;
}

/* ---------- EN / 中 切换药丸 ---------- */
/* 实色浅底隔开页面紫色背景；桌面与移动菜单共用深紫选中态。 */
.lang-switch {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    padding: 2px;
    margin: 0 10px;
    border: 1px solid #D8CFEA;
    border-radius: 20px;
    background: #F5F3FA;
    vertical-align: middle;
    flex-shrink: 0;
}

.lang-switch button {
    border: 0;
    background: transparent;
    color: #292333;
    font-size: 13px;
    line-height: 1;
    font-weight: 600;
    padding: 5px 10px;
    border-radius: 16px;
    cursor: pointer;
    transition: .25s;
}

.lang-switch button:hover {
    background: #E8DFF7;
    color: #292333;
}

.lang-switch button:focus-visible {
    outline: 2px solid #292333;
    outline-offset: 1px;
}

.lang-switch button.is-active,
.lang-switch button.is-active:hover {
    background: #6630C7;
    color: #fff;
}

/* 移动 offcanvas 抽屉里的那一组：抽屉同为浅色底，只需调整排布 */
.lang-switch--mobile {
    display: inline-flex;
    margin: 18px 0 6px;
}

/* ---------- 中文排版微调 ---------- */
/* 开关是 i18n.js 里 apply() 的 document.documentElement.lang = 'zh-Hans'。

   main.css:1564-1568 给所有标题设了 line-height: 1.2 与
   letter-spacing: -0.02em —— 两条都是为拉丁字收紧的：1.2 对汉字偏挤
   （汉字字身框几乎占满 em box），负字距会让汉字显得粘连。 */
html[lang^="zh"] h1,
html[lang^="zh"] h2,
html[lang^="zh"] h3,
html[lang^="zh"] h4,
html[lang^="zh"] h5,
html[lang^="zh"] h6 {
    line-height: 1.4;
    letter-spacing: normal;
}

/* 正文与按钮同样带负字距 */
html[lang^="zh"] body,
html[lang^="zh"] .btn_label,
html[lang^="zh"] .xb-item--title,
html[lang^="zh"] .sidebar-heading,
html[lang^="zh"] .xb-widget-title {
    letter-spacing: normal;
}

/* 语言切换按钮内是 EN / 中 两个短标签，不参与上面的字距调整 */
html[lang^="zh"] .lang-switch button {
    letter-spacing: normal;
}

/* 装饰性大字水印 GROWTH 保持英文，不受中文字体栈影响 */
html[lang^="zh"] .xb_hero_big_text .text {
    font-family: "Inter", "Helvetica Neue", Arial, sans-serif;
}

/* ---------- 侧栏与页脚联系入口 ---------- */
.contact-link {
    max-width: 100%;
    padding: 0 24px;
}

.contact-link:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 4px;
}

.sidebar-info-list li,
.sidebar-info-list li a,
.xb-contact-content a[href^="mailto:"] {
    min-width: 0;
    overflow-wrap: anywhere;
}

.sidebar-info-list li > span,
.xb-footer_widget .xb-list li .xb-icon {
    flex-shrink: 0;
}

/* ---------- 页脚列宽与响应式排版 ---------- */
.xb-footer-wrap {
    display: grid;
    grid-template-columns: minmax(0, 2fr) 180px minmax(0, 3fr);
    column-gap: 32px;
    align-items: stretch;
}

.xb-footer-wrap > .xb-footer_widget {
    min-width: 0;
    min-height: 0;
    margin: 0;
    padding: 48px 0;
    border: 0;
}

.xb-footer-wrap > .xb-footer_widget + .xb-footer_widget {
    padding-left: 32px;
    border-left: 1px solid rgba(255, 255, 255, .1);
}

.xb-footer-wrap .xb-list li,
.xb-footer-wrap .xb-list li a {
    min-width: 0;
}

.xb-footer-services .xb-list li a {
    overflow-wrap: normal;
    word-break: normal;
}

.xb-footer-links .xb-widget-title,
.xb-footer-links .xb-list li a,
.xb-footer-contact-cta .contact-link {
    white-space: nowrap;
}

.xb-footer-wrap .xb-footer-contact_info .xb-list li a {
    overflow-wrap: anywhere;
}

.xb-footer-contact-cta {
    margin-top: 32px;
}

@media (min-width: 768px) and (max-width: 1199px) {
    .xb-footer-wrap {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    }

    .xb-footer-wrap > .xb-footer-contact_info {
        grid-column: 1 / -1;
        padding-left: 0;
        border-left: 0;
        border-top: 1px solid rgba(255, 255, 255, .1);
    }
}

@media (max-width: 767px) {
    .xb-footer-wrap {
        grid-template-columns: minmax(0, 1fr);
        gap: 0;
        padding: 0 24px;
    }

    .xb-footer-wrap > .xb-footer_widget {
        padding: 30px 0;
    }

    .xb-footer-wrap > .xb-footer_widget + .xb-footer_widget {
        padding-left: 0;
        border-left: 0;
        border-top: 1px solid rgba(255, 255, 255, .1);
    }
}

/* Keep section links visible below the sticky navigation. */
#analytics, #data-review, #risk-monitoring, #reporting, #platform, #engagement, #platform-monitoring { scroll-margin-top: 120px; }
