/* 中文首屏防闪：<head> 里的内联脚本在首帧前给 <html> 加 lz-zh-pending，
   在 lang-i18n 完成翻译前先把内容藏起来，避免看到一屏英文再变中文；
   js/lang-i18n.js 翻译完（或 2.5s 兜底超时）会移除这个类。英文模式不受影响。

   为什么除了 visibility 还要 opacity:0 —— visibility 可以被后代「顶回来」：
   后代自己声明 visibility:visible 时（例如 css/style.css 里
   .hero-content > .hero-copy.is-active），即使祖先 visibility:hidden 它照样会被
   绘制，首页首屏的英文大标题因此能从 lz-zh-pending 里漏出来。opacity 作用于整个
   子树，后代的 visibility:visible 无法把祖先的 opacity:0 顶掉，所以它是唯一能兜住
   所有 visibility 逃逸的写法；visibility 保留是为了双保险与语义清晰。 */
html.lz-zh-pending body { visibility: hidden; opacity: 0; }

:root {
    --primary: #49aa3d;
    --primary-dark: #2e8f3f;
    --primary-light: #eaf6ec;
    --dark: #1a1a1a;
    --text: #333;
    --text-light: #666;
    --text2: #999;
    --gray: #f5f7f6;
    --white: #fff;
    --transition: 0.3s ease;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

/* overflow-x: hidden 兜底：首页 .reveal-blur 入场态的 scale(1.12) 会让整宽区块
   左右各溢出约 1px，body 上的 overflow-x:hidden 管不住 html 的滚动宽度
   （实测 390 视口 html.scrollWidth = 391）。根因已在 style.css 的 ≤992 媒体块里
   对溢出区块单独裁剪，这里再给 html 补一条兜底，彻底消掉横向滚动。
   页面里没有 position:sticky 元素（已实测确认），不会踩 sticky 失效的坑。 */
html { scroll-behavior: smooth; scroll-padding-top: 100px; overflow-x: hidden; }

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
    color: var(--text);
    line-height: 1.6;
    background: var(--white);
    font-size: 18px;
    overflow-x: hidden;
}

a { text-decoration: none; color: var(--dark); }


.container {
    width: 1200px;
    margin: 0 auto;
}


/* Single-line text ellipsis */
.line-clamp-1 {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Multi-line text ellipsis */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-4 {
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-5 {
    display: -webkit-box;
    -webkit-line-clamp: 5;
    -webkit-box-orient: vertical;
    overflow: hidden;
}



/* Responsive container: common.css is loaded a second time inside the body by header.htm
   (later than the page's own CSS) - override the fixed .container width here, or the whole page overflows to 1200px on mobile. */
@media (max-width: 1230px) {
    .container { width: auto; padding: 0 20px; }
}

/* 移动端字号体系：全站只允许 4 个字号档位 —— 14（小字/徽章）/ 16（正文·副标题·按钮）/ 20（标题）/ 28（大标题）。
   body 作为默认档（正文 16px），任何未显式设置字号的移动端文字都落到这一档，
   避免继承 PC 的 18px 基准破坏四档约束。各页面显式规则见各自 CSS 的 ≤992 媒体块。 */
@media (max-width: 992px) {
    body { font-size: 16px; }
}

