/* ============================================================
   JIIL NetTech Studio — 工作室公用视觉库
   assets/css/jiil-ui.css
   ------------------------------------------------------------
   定位：全工作室官网通用的「视觉库」层。
   引入顺序：main.css（站点基础样式）→ jiil-ui.css → 页面私有样式
   原则：
   - 颜色只消费 main.css 的语义令牌（--ink/--accent/--surface…），
     本文件不定义新颜色，明暗主题自动跟随
   - 阴影一律中性（rgba(15,23,42,…)），卡片不使用彩色投影
   - 组件：按钮 / 徽标 / 卡片 / Toast / 数据条 / 页头 / 组织架构 / 仓库卡
   - 按压反馈借鉴 M3 手感（active 缩放），但不引入 M3 视觉
   ============================================================ */

/* ---------- 顶栏按钮：QQ 群保留文字；其余为同规格图标钮 ----------
   统一 36px 高、1px 细边、4px 圆角、透明底。
   QQ 群为显眼入口：图标 + 文字；语言 / 问候 / 主题 / 菜单仅图标。 */
.lang-toggle,
.greet-mode-toggle,
.theme-mode-toggle,
.hamburger {
    width: 36px;
    height: 36px;
    padding: 0;
    border: 1px solid var(--border);
    border-radius: 4px;
    background: transparent;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    color: var(--ink);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    line-height: 1;
    white-space: nowrap;
}
.qq-group-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: auto !important;
    height: 36px;
    padding: 0 12px !important;
    border: 1px solid var(--border);
    border-radius: 4px;
    background: transparent;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    color: var(--ink);
    font-size: 13px;
    line-height: 1;
    white-space: nowrap;
}
.qq-group-btn span { display: inline !important; }
.lang-toggle:hover,
.greet-mode-toggle:hover,
.theme-mode-toggle:hover,
.hamburger:hover,
.qq-group-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: transparent;
}
/* 内联 SVG 图标统一尺寸：所有工具钮共用一套，不再被浏览器默认拉伸 */
svg.icon,
.qq-group-btn svg,
.lang-toggle svg,
.greet-mode-toggle svg,
.theme-mode-toggle svg,
.scroll-mode-toggle svg,
.mobile-scroll-toggle svg,
.footer-bottom .socials svg {
    display: block;
    width: 16px;
    height: 16px;
    flex: none;
}
.lang-text { display: none; }
@media (max-width: 768px) {
    .qq-group-btn { padding: 0 10px !important; font-size: 12px; }
}
@media (max-width: 480px) {
    .qq-group-btn {
        width: 34px !important;
        padding: 0 !important;
        font-size: 0;
    }
    .qq-group-btn span { display: none !important; }
    .qq-group-btn svg { width: 15px; height: 15px; }
}

/* ---------- 卡片去彩色化：图标块统一为「墨色渐变」，阴影中性 ---------- */
.project-icon-tile {
    background: var(--gradient-primary);
    box-shadow: 0 10px 22px -12px rgba(15, 23, 42, 0.45);
}
.project-card.is-stopped .project-icon-tile {
    background: linear-gradient(135deg, #6b7280, #9ca3af);
    box-shadow: none;
}
/* 媒体区不再叠彩色径向光，回归干净的灰阶层级 */
.project-media {
    background: linear-gradient(180deg, var(--bg-alt) 0%, var(--surface) 100%);
}
/* 链接卡：图标块与左条统一为品牌主色，阴影中性 */
.link-tile {
    background: var(--ink);
    box-shadow: var(--shadow-1);
}
.link-card::before {
    background: var(--accent);
}
.link-tile--logo {
    background: #fff;
    box-shadow: 0 6px 14px -10px rgba(15, 23, 42, 0.25);
}

/* ---------- 按压反馈（触摸屏与鼠标通用） ---------- */
.hero-button:active,
.custom-mail:active,
.project-link:active,
.hero-stat:active {
    transform: scale(0.97);
}

/* ---------- Toast 轻提示（替代浏览器原生弹窗） ---------- */
/* button 版邮箱按钮：去掉原生按钮默认样式 */
button.custom-mail {
    border: none;
    cursor: pointer;
    font-family: inherit;
}
/* 子页导航当前页高亮 */
header nav a.current-page {
    color: var(--accent);
}
.jiil-toast {
    position: fixed;
    left: 50%;
    bottom: 36px;
    transform: translate(-50%, 16px);
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 11px 20px;
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 999px;
    box-shadow: var(--shadow-2);
    color: var(--ink);
    font-size: 13px;
    font-weight: 600;
    opacity: 0;
    pointer-events: none;
    z-index: 9999;
    transition: opacity 0.25s ease, transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
.jiil-toast.show {
    opacity: 1;
    transform: translate(-50%, 0);
}
.jiil-toast i {
    color: var(--accent);
}

/* ---------- 首屏数据条 ---------- */
.hero-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0;
    margin-top: 46px;
    max-width: 660px;
    border-top: 1px solid var(--border);
    padding-top: 26px;
    animation: fadeInUp 0.9s cubic-bezier(0.16, 1, 0.3, 1) 0.45s both;
}
.hero-stat {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 0 20px;
    border-left: 1px solid var(--border);
}
.hero-stat:first-child {
    border-left: none;
    padding-left: 0;
}
.hero-stat b {
    font-family: var(--font-display);
    font-size: clamp(20px, 2.4vw, 28px);
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.2;
    color: var(--ink);
}
.hero-stat span {
    font-size: 12px;
    color: var(--muted);
    letter-spacing: 0.02em;
    white-space: nowrap;
}

/* ---------- 关于我们：关键信息速览 ---------- */
.about-facts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(215px, 1fr));
    gap: 14px;
    margin-bottom: 36px;
}
.about-fact {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 18px 20px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-1);
}
.about-fact .fact-num {
    font-family: var(--font-display);
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: var(--accent);
}
.about-fact .fact-label {
    font-size: 13.5px;
    font-weight: 700;
    color: var(--ink);
}
.about-fact small {
    font-size: 12px;
    line-height: 1.5;
    color: var(--muted);
}

/* ---------- 定制服务：联系按钮横排 + 次级按钮 ---------- */
.custom-actions--row {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
}
.custom-mail--ghost {
    background: transparent;
    border: 1px solid var(--border-strong);
    color: var(--ink);
}
.custom-mail--ghost:hover {
    border-color: var(--accent);
    color: var(--accent);
    box-shadow: var(--shadow-1);
}

/* ---------- 开源仓库板块 ---------- */
.repo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 18px;
}
.repo-card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 26px 26px 24px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-1);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s ease, border-color 0.4s ease;
}
.repo-card:hover {
    transform: translateY(-4px);
    border-color: var(--border-strong);
    box-shadow: var(--shadow-2);
}
.repo-head {
    display: flex;
    align-items: center;
    gap: 12px;
}
.repo-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: var(--gradient-primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 19px;
    box-shadow: 0 10px 22px -12px rgba(15, 23, 42, 0.45);
}
.repo-head h3 {
    font-family: var(--font-display);
    font-size: 17px;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: var(--ink);
}
.repo-badge {
    display: inline-flex;
    align-items: center;
    margin-left: auto;
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
}
.repo-badge--primary {
    background: var(--accent-soft);
    color: var(--accent);
    border: 1px solid var(--accent-line);
}
.repo-badge--ghost {
    background: transparent;
    color: var(--muted);
    border: 1px solid var(--border-strong);
}
.repo-card p {
    font-size: 13.5px;
    line-height: 1.75;
    color: var(--muted);
}
.repo-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: auto;
}
.repo-link {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 16px;
    border-radius: var(--radius-sm);
    font-size: 12.5px;
    font-weight: 600;
    text-decoration: none;
    border: 1px solid var(--border-strong);
    color: var(--ink);
    background: transparent;
    transition: border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}
.repo-link:hover {
    border-color: var(--accent);
    color: var(--accent);
}
.repo-link:active { transform: scale(0.97); }
.repo-link--solid {
    background: var(--ink);
    border-color: var(--ink);
    color: var(--bg);
}
.repo-link--solid:hover {
    border-color: var(--ink);
    color: var(--bg);
    opacity: 0.9;
}

/* ---------- 子页页头（团队页等） ---------- */
.page-hero {
    position: relative;
    padding: clamp(120px, 16vh, 170px) 0 clamp(48px, 7vh, 72px);
    overflow: hidden;
}
.page-hero-bg {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 75% 60% at 20% 20%, var(--accent-soft) 0%, transparent 60%),
        radial-gradient(ellipse 50% 45% at 85% 10%, rgba(124, 108, 255, 0.05) 0%, transparent 55%);
    z-index: 0;
}
.page-hero .container {
    position: relative;
    z-index: 1;
    text-align: center;
}
.page-hero h1 {
    font-family: var(--font-display);
    font-size: clamp(34px, 5vw, 52px);
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.12;
    margin: 14px 0 18px;
    background: linear-gradient(135deg, var(--ink) 30%, var(--muted) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: fadeInUp 0.9s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.page-hero .page-lead {
    max-width: 620px;
    margin: 0 auto;
    font-size: clamp(15px, 1.6vw, 17px);
    line-height: 1.8;
    color: var(--muted);
    animation: fadeInUp 0.9s cubic-bezier(0.16, 1, 0.3, 1) 0.15s both;
}
.page-hero .hero-stats {
    margin-left: auto;
    margin-right: auto;
    animation-delay: 0.3s;
}

/* ---------- 组织架构 ---------- */
.org-stack {
    max-width: 760px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: stretch;
}
.org-tier {
    position: relative;
    padding: 24px 30px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-1);
    text-align: center;
}
.org-tier--board {
    background: var(--gradient-primary);
    border-color: transparent;
}
.org-tier--board h3,
.org-tier--board p {
    color: var(--bg);
}
.org-tier--board .org-tier-tag {
    color: rgba(255, 255, 255, 0.72);
}
.org-tier h3 {
    font-family: var(--font-display);
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: var(--ink);
}
.org-tier-tag {
    display: inline-block;
    margin-bottom: 8px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: var(--muted);
}
.org-tier p {
    margin-top: 6px;
    font-size: 13px;
    line-height: 1.7;
    color: var(--muted);
}
.org-tier-chips {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-top: 12px;
}
.org-chip {
    padding: 6px 14px;
    border-radius: 999px;
    border: 1px solid var(--border-strong);
    font-size: 12px;
    font-weight: 600;
    color: var(--ink);
    background: var(--bg-alt);
}
.org-connector {
    width: 2px;
    height: 30px;
    margin: 0 auto;
    background: var(--border-strong);
}

/* ---------- 事业部卡片 ---------- */
.divisions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 18px;
}
.division-card {
    padding: 26px 24px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-1);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s ease, border-color 0.4s ease;
}
.division-card:hover {
    transform: translateY(-4px);
    border-color: var(--border-strong);
    box-shadow: var(--shadow-2);
}
.division-name {
    font-family: var(--font-display);
    font-size: 16.5px;
    font-weight: 700;
    color: var(--ink);
}
.division-role {
    margin-top: 4px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.06em;
    color: var(--accent);
}
.division-card p {
    margin-top: 12px;
    font-size: 13.5px;
    line-height: 1.75;
    color: var(--muted);
}
.division-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 14px;
}
.division-tag {
    padding: 4px 11px;
    border-radius: 999px;
    background: var(--bg-alt);
    border: 1px solid var(--border);
    font-size: 11.5px;
    color: var(--muted);
}

/* ---------- 团队页行动区 ---------- */
.team-cta {
    max-width: 720px;
    margin: 0 auto;
    padding: 34px 34px;
    text-align: center;
    background: var(--gradient-primary);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-2);
}
.team-cta h3 {
    font-family: var(--font-display);
    font-size: clamp(20px, 2.6vw, 26px);
    color: var(--bg);
    letter-spacing: -0.01em;
}
.team-cta p {
    margin: 10px auto 22px;
    max-width: 460px;
    font-size: 13.5px;
    line-height: 1.75;
    color: rgba(255, 255, 255, 0.72);
}
.team-cta-actions {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
}
.team-cta .custom-mail {
    background: var(--bg);
    color: var(--ink);
    border: none;
    cursor: pointer;
}
.team-cta .custom-mail--ghost {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.32);
    color: #fff;
}
.team-cta .custom-mail--ghost:hover {
    border-color: #fff;
    color: #fff;
    box-shadow: none;
}

/* ---------- 移动端适配 ---------- */
@media (max-width: 768px) {
    .hero-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 18px 0;
        margin-top: 34px;
        padding-top: 20px;
    }
    .hero-stat:nth-child(3) {
        border-left: none;
        padding-left: 0;
    }
    .hero-stat span { white-space: normal; }
    .custom-actions--row { flex-direction: column; align-items: stretch; }
    .custom-mail--ghost { justify-content: center; }
    .org-tier { padding: 20px 18px; }
    .team-cta { margin: 0 16px; padding: 28px 20px; }
}

/* ============================================================
   去 AI 化层（参考站实测结论：单字体族、黑色短投影、
   全站 8 个渐变、描边分层、无漂浮光斑、无错落入场）
   ------------------------------------------------------------
   1. 字体收敛为一个系统族，数字/代号用等宽 —— 去掉
      Space Grotesk + Manrope 的「模板感」组合
   2. 标题取消渐变文字，回归实色
   3. 删除漂浮渐变光斑背景与装饰动画
   4. 卡片取消投影与上浮，hover 只加深描边（1px 分层）
   5. 入场动画统一为快速淡入，取消 0.1-0.4s 错落延迟
   ============================================================ */
:root {
    --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
                 "Hiragino Sans GB", "Microsoft YaHei UI", "Microsoft YaHei",
                 "Noto Sans SC", sans-serif;
    --font-display: var(--font-body);
    --font-mono: "Cascadia Code", Consolas, "SFMono-Regular", ui-monospace, monospace;
    --radius-lg: 14px;
    --radius-md: 10px;
    --radius-sm: 8px;
}

/* 标题实色化 */
.hero h1,
.hero h2,
.page-hero h1,
.team-cta h3 {
    background: none;
    -webkit-background-clip: initial;
    background-clip: initial;
    -webkit-text-fill-color: currentColor;
    color: var(--ink);
    letter-spacing: -0.01em;
}
.team-cta h3 { color: var(--bg); }

/* 背景装饰：漂浮光斑全部移除 */
.hero-bg,
.page-hero-bg,
.hero-bg::before {
    display: none;
}

/* 顶栏：毛玻璃 → 实底 + 发丝线 */
header {
    background: var(--bg);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    border-bottom: 1px solid var(--border);
}

/* 眉标：从品牌色标签改为中性小标 */
.section-title .eyebrow,
.custom-eyebrow,
.page-hero .eyebrow {
    color: var(--muted);
}

/* 入场：统一快速淡入，取消错落延迟 */
.animate-on-scroll {
    opacity: 0;
    transform: none;
    transition: opacity 0.35s ease;
}
.animate-on-scroll.visible {
    opacity: 1;
    transform: none;
}
.animate-on-scroll.delay-1,
.animate-on-scroll.delay-2,
.animate-on-scroll.delay-3,
.animate-on-scroll.delay-4,
.animate-on-scroll.delay-5 {
    transition-delay: 0s;
}
@keyframes jiilFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}
.hero h1,
.hero h2,
.hero p {
    animation: jiilFadeIn 0.4s ease both;
}
.hero-buttons,
.hero-stats,
.page-hero .hero-stats {
    animation: jiilFadeIn 0.4s ease 0.1s both;
}

/* 卡片：描边分层，无投影、无上浮 */
.project-card,
.link-card,
.repo-card,
.division-card,
.about-fact,
.wind-card {
    box-shadow: none;
}
.project-card:hover,
.link-card:hover,
.repo-card:hover,
.division-card:hover {
    transform: none;
    box-shadow: none;
    border-color: var(--border-strong);
}
.project-card:hover .project-icon-tile,
.link-card:hover .link-tile {
    transform: none;
}
.project-card:hover .project-media img {
    transform: none;
}
/* 图标块阴影同样收敛 */
.project-icon-tile {
    box-shadow: none;
}
.repo-icon {
    box-shadow: none;
}

/* 渐变按钮 → 实色按钮 */
.hero-button.secondary {
    background: var(--accent);
    box-shadow: none;
}
.cta-button {
    background: var(--ink);
}

/* 数字与代号用等宽字体：像真实运维面板，而不是模板站 */
.hero-stat b,
.about-fact .fact-num,
.milestone-year,
.date-day,
.date-year,
.repo-head h3 {
    font-family: var(--font-mono);
    letter-spacing: -0.02em;
}

/* ============================================================
   风格定调：工程蓝图 / 工作室档案（Engineering Dossier）
   ------------------------------------------------------------
   立住一个方向：高科技的克制骨架（网格底纹、等宽规格标签、
   自动区块编号、锐利小圆角、发丝线分层）+ 工作室的分量
   （真实数据、组织架构、沿革记录）。吉祥物是全站唯一的
   「软元素」，反差即特色。
   ============================================================ */
:root {
    --grid-line: rgba(12, 15, 20, 0.032);
}
.dark-mode {
    --grid-line: rgba(255, 255, 255, 0.038);
}

/* 蓝图网格底纹：全站铺底，卡片以实面色压在上面 */
body {
    background-color: var(--bg);
    background-image:
        linear-gradient(var(--grid-line) 1px, transparent 1px),
        linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
    background-size: 36px 36px;
}

/* 自动区块编号：编号出现在眉标行首（01 / 02 / ...） */
body { counter-reset: jiil-sec; }
.section-title { counter-increment: jiil-sec; }
.section-title .eyebrow {
    display: inline-flex;
    align-items: baseline;
    gap: 10px;
    font-family: var(--font-mono);
    font-weight: 500;
    letter-spacing: 0.16em;
    color: var(--muted);
}
.section-title .eyebrow::before {
    content: counter(jiil-sec, decimal-leading-zero);
    color: var(--accent);
    font-size: 13px;
    padding-right: 10px;
    border-right: 1px solid var(--accent-line);
}
.page-hero .eyebrow {
    font-family: var(--font-mono);
    letter-spacing: 0.16em;
}

/* 眉标一律等宽规格标签：像图纸上的字段名 */
.project-eyebrow,
.wind-badge,
.repo-badge,
.org-tier-tag,
.custom-eyebrow,
.hero-slide-badge,
.archive-summary-count {
    font-family: var(--font-mono);
    letter-spacing: 0.12em;
}

/* 标题加重：档案封面的分量 */
.hero h1,
.hero h2,
.section-title h2,
.page-hero h1 {
    font-weight: 800;
    letter-spacing: -0.02em;
}

/* 圆角全面锐化：胶囊只留给按钮 */
.project-icon-tile,
.link-tile,
.repo-icon {
    border-radius: 8px;
}
.custom-mail,
.hero-button,
.cta-button,
.repo-link,
.qq-group-btn,
.lang-toggle,
.greet-mode-toggle,
.theme-mode-toggle,
.hamburger {
    border-radius: 8px;
}
.about-fact,
.division-card,
.repo-card,
.project-card,
.link-card,
.wind-card,
.org-tier {
    border-radius: var(--radius-md);
}

/* 数据条：档案表格式 */
.hero-stat b {
    font-weight: 700;
}
.hero-stat span {
    font-family: var(--font-mono);
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

/* 卡片描边稍加重，网格底上的分层更清晰 */
.project-card,
.link-card,
.repo-card,
.division-card,
.wind-card,
.org-tier,
.about-fact {
    border-color: var(--border-strong);
}

/* ============================================================
   版式与动效：自己的语言（不参考任何站）
   ------------------------------------------------------------
   1. 杂志式左对齐区块标题 + 发丝线 —— 打破全居中模板感
   2. 克制动效：数字滚动、连接线生长、卡片微浮 2-3px
   3. 子页巨型描边水印 —— 不依赖照片的辨识度
   ============================================================ */

/* --- 杂志式左对齐标题 --- */
.section-title {
    text-align: left;
    margin-bottom: 48px;
}
.section-title p {
    margin: 0;
    max-width: 640px;
}
.section-title h2 {
    display: flex;
    align-items: baseline;
    gap: 14px;
}
/* 标题右侧延伸的发丝线，到容器边缘为止 */
.section-title h2::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
    transform: translateY(-6px);
}

/* --- 克制动效：入场小位移 + 微错落 --- */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(14px);
    transition: opacity 0.5s ease, transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}
.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}
.animate-on-scroll.delay-1 { transition-delay: 0.05s; }
.animate-on-scroll.delay-2 { transition-delay: 0.1s; }
.animate-on-scroll.delay-3 { transition-delay: 0.15s; }
.animate-on-scroll.delay-4 { transition-delay: 0.2s; }
.animate-on-scroll.delay-5 { transition-delay: 0.25s; }

/* --- 卡片微浮：2-3px + 一层浅影，点到为止 --- */
.project-card:hover,
.link-card:hover,
.repo-card:hover,
.division-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-1);
}
.project-card:hover .project-icon-tile {
    transform: translateY(-2px);
}

/* --- 组织架构：连接线随入场生长 --- */
.org-connector {
    transform: scaleY(0);
    transform-origin: center top;
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1) 0.15s;
}
#org.animate-on-scroll.visible .org-connector {
    transform: scaleY(1);
}

/* --- 子页巨型描边水印（无需照片的辨识度） --- */
.page-hero::before {
    content: 'TEAM';
    position: absolute;
    top: 4%;
    right: -1%;
    z-index: 0;
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: clamp(110px, 20vw, 240px);
    line-height: 1;
    letter-spacing: -0.05em;
    color: transparent;
    -webkit-text-stroke: 1px var(--border-strong);
    opacity: 0.4;
    pointer-events: none;
    user-select: none;
}
.page-hero .container { z-index: 1; }

/* --- 首屏数据条：数字滚动时的对齐稳定 --- */
.hero-stat b {
    font-variant-numeric: tabular-nums;
}




/* ============================================================
   团队成员网格（对标企业官网：肖像 + 人名 + 职务，极简层级）
   肖像未就位时用姓氏首字 initials 占位，替换真图只需把
   .member-portrait 内的 <span> 换成 <img> 即可，样式已兼容。
   ============================================================ */
.member-group-label {
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.08em;
    color: var(--text, var(--ink));
    margin: 40px 0 4px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}
.member-group-label--second { margin-top: 56px; }
.member-group-note {
    font-size: 13px;
    color: var(--muted);
    margin: 12px 0 0;
}
.member-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 28px 24px;
    margin-top: 28px;
}
.member-card {
    text-align: center;
}
.member-portrait {
    width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: 12px;
    background: var(--accent-soft, var(--bg-alt));
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.member-card:hover .member-portrait {
    transform: translateY(-4px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.1);
}
/* 真图替换后：铺满方形、等比裁切 */
.member-portrait img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
/* initials 占位字 */
.member-portrait > span {
    font-size: 44px;
    font-weight: 600;
    color: var(--accent);
    line-height: 1;
    letter-spacing: 0;
}
.member-name {
    font-size: 16px;
    font-weight: 600;
    color: var(--text, var(--ink));
    margin: 16px 0 6px;
}
.member-role {
    font-size: 13px;
    color: var(--muted);
    margin: 0;
    line-height: 1.5;
}
@media (max-width: 640px) {
    .member-grid { grid-template-columns: repeat(2, 1fr); gap: 20px 16px; }
    .member-portrait > span { font-size: 36px; }
}

/* ============================================================
   工作室室长卡（横向 spotlight：头像 + 名字 + 三头衔 + 化名标注）
   ============================================================ */
.studio-head {
    display: flex;
    align-items: center;
    gap: 32px;
    padding: 28px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
}
.studio-head-portrait {
    width: 150px;
    height: 150px;
    flex: 0 0 150px;
    object-fit: cover;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: var(--bg-alt);
}
.studio-head-eyebrow {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.12em;
    color: var(--accent);
}
.studio-head-name {
    font-family: var(--font-display);
    font-size: 30px;
    font-weight: 700;
    margin: 8px 0 14px;
    line-height: 1.1;
    color: var(--ink);
}
.studio-head-titles {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 0;
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    color: var(--ink);
}
.studio-head-titles span:not(:last-child)::after {
    content: ' /';
    color: var(--accent);
    margin: 0 12px;
    font-weight: 400;
}
.studio-head-alias {
    margin: 14px 0 0;
    font-size: 12px;
    color: var(--muted);
}
@media (max-width: 640px) {
    .studio-head { flex-direction: column; text-align: center; gap: 20px; padding: 22px; }
    .studio-head-portrait { width: 120px; height: 120px; flex-basis: 120px; }
    .studio-head-name { font-size: 26px; }
    .studio-head-titles { justify-content: center; }
}

/* ============================================================
   团队页：极简人物志 + 大留白 + 斜杠分隔
   ============================================================ */
.team-lead-section { padding: 120px 0 100px; }
.team-lead-text {
    max-width: 560px;
    margin: 0 auto;
    font-size: 16px;
    line-height: 2.1;
    color: var(--muted);
    text-align: center;
}

/* 人物：头像 + 名字 + 职务，条目之间大留白 */
.team-people { padding: 40px 0 20px; }
.person {
    display: flex;
    align-items: center;
    gap: 44px;
    max-width: 760px;
    margin: 0 auto 88px;
}
.person:last-child { margin-bottom: 0; }
.person-photo {
    position: relative;
    width: 168px;
    height: 168px;
    flex: 0 0 168px;
    border-radius: 10px;
    overflow: hidden;
    background: var(--bg-alt);
    /* 头像末端 20% 从完全显示(不透明)渐隐到完全隐藏(透明)，
       mask 加在容器上：连背景色一起渐隐到页面背景，才是真正的"消失" */
    -webkit-mask-image: linear-gradient(to right, #000 0%, #000 40%, transparent 100%);
    mask-image: linear-gradient(to right, #000 0%, #000 40%, transparent 100%);
}
.person-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.6s cubic-bezier(0.16,1,0.3,1);
}
.person:hover .person-photo img { transform: scale(1.04); }
/* 占位头像：姓氏首字，无假照片。给一个和背景有色差的底，
   这样右侧渐隐到页面背景时才看得见"消失" */
.person-photo--ph {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #c3d0e8;
}
.dark-mode .person-photo--ph { background: #2b3650; }
.person-photo--ph span {
    font-size: 46px;
    font-weight: 600;
    color: var(--accent);
}
.person-info { min-width: 0; }
.person-name {
    font-family: var(--font-display);
    font-size: 28px;
    font-weight: 700;
    color: var(--ink);
    margin: 0 0 12px;
    line-height: 1.2;
}
.person-title {
    font-size: 15px;
    color: var(--muted);
    margin: 0;
    line-height: 1.7;
}
.person-bio {
    font-size: 14px;
    color: var(--muted);
    line-height: 1.9;
    max-width: 600px;
    margin: 14px 0 0;
}
.person-note {
    font-size: 12px;
    color: var(--muted);
    margin: 10px 0 0;
}

/* 斜杠分隔：细体大斜杠，居中 */
.team-slash {
    text-align: center;
    font-size: 34px;
    font-weight: 300;
    color: var(--border-strong);
    line-height: 1;
    margin: 100px 0;
}

/* 组织 / 职责区块：大留白、细体说明 */
.team-section { padding: 0 0 120px; }
.team-h2 {
    font-family: var(--font-display);
    font-size: 24px;
    font-weight: 600;
    color: var(--ink);
    text-align: center;
    margin: 0 0 44px;
}
.org-list {
    list-style: none;
    padding: 0;
    margin: 0 auto 40px;
    max-width: 560px;
}
.org-list li {
    text-align: center;
    font-size: 18px;
    color: var(--ink);
    padding: 16px 0;
    border-bottom: 1px solid var(--border);
}
.org-list li:last-child { border-bottom: none; }
.team-subtext {
    max-width: 560px;
    margin: 0 auto 20px;
    font-size: 14px;
    line-height: 1.9;
    color: var(--muted);
    text-align: center;
    font-weight: 400;
}
.team-link {
    display: table;
    margin: 0 auto;
    font-size: 13px;
    color: var(--accent);
}
.division-lines { max-width: 620px; margin: 0 auto; }
.division-line { padding: 26px 0; border-bottom: 1px solid var(--border); }
.division-line:last-child { border-bottom: none; }
.division-line h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--ink);
    margin: 0 0 8px;
}
.division-line p {
    font-size: 14px;
    line-height: 1.8;
    color: var(--muted);
    margin: 0;
    font-weight: 400;
}

@media (max-width: 768px) {
    .team-lead-section { padding: 80px 0 64px; }
    .person { gap: 24px; margin-bottom: 60px; }
    .person-photo { width: 120px; height: 120px; flex-basis: 120px; }
    .person-photo--ph span { font-size: 34px; }
    .person-name { font-size: 23px; }
    .team-slash { margin: 72px 0; font-size: 28px; }
    .team-section { padding-bottom: 80px; }
}

/* ===== v2 留白与比例再拉大（覆盖上一段） ===== */
.team-lead-section { padding: 80px 0 140px; }
.team-lead-text { font-size: 18px; max-width: 620px; }
.team-lead-text + .team-lead-text { margin-top: 28px; }
.team-people { padding: 60px 0 40px; }
.person { gap: 56px; margin-bottom: 140px; max-width: 820px; }
.person-photo { width: 200px; height: 200px; flex-basis: 200px; }
.person-photo--ph span { font-size: 56px; }
.person-name { font-size: 40px; margin-bottom: 16px; }
.person-title { font-size: 17px; }
.team-slash { font-size: 40px; margin: 160px 0; }
.team-section { padding: 0 0 180px; }
.team-h2 { font-size: 30px; margin-bottom: 72px; }

/* 每组/每事业部：标题 + 细体职责，项间大间距 */
.team-item {
    max-width: 620px;
    margin: 0 auto 64px;
    padding-bottom: 40px;
    border-bottom: 1px solid var(--border);
    text-align: center;
}
.team-item:last-of-type { border-bottom: none; }
.team-item h3 {
    font-family: var(--font-display);
    font-size: 24px;
    font-weight: 600;
    color: var(--ink);
    margin: 0 0 16px;
}
.team-item p {
    font-size: 15px;
    line-height: 1.9;
    color: var(--muted);
    margin: 0;
    font-weight: 400;
}
.team-duties-label {
    margin-top: 22px !important;
    font-size: 12px !important;
    letter-spacing: .12em;
    text-transform: uppercase;
}
.team-duties {
    list-style: none;
    max-width: 520px;
    margin: 12px auto 0;
    padding: 0;
    text-align: left;
}
.team-duties li {
    position: relative;
    margin: 7px 0;
    padding-left: 18px;
    font-size: 14px;
    line-height: 1.8;
    color: var(--muted);
}
.team-duties li::before {
    content: "";
    position: absolute;
    left: 0;
    top: .82em;
    width: 8px;
    height: 1px;
    background: var(--muted);
}
.team-subtext { margin-top: 56px; }

@media (max-width: 768px) {
    .team-lead-section { padding: 110px 0 88px; }
    .team-lead-text { font-size: 16px; }
    .person { gap: 28px; margin-bottom: 96px; }
    .person-photo { width: 140px; height: 140px; flex-basis: 140px; }
    .person-photo--ph span { font-size: 40px; }
    .person-name { font-size: 28px; }
    .team-slash { margin: 110px 0; font-size: 32px; }
    .team-section { padding-bottom: 110px; }
    .team-h2 { font-size: 24px; margin-bottom: 52px; }
    .team-item { margin-bottom: 48px; }
    .team-item h3 { font-size: 20px; }
}

/* 赞助商：非工作室成员，用细线区分 */
.person--sponsor {
    border-top: 1px solid var(--border);
    padding-top: 72px;
    margin-top: -20px;
}
@media (max-width: 768px) {
    .person--sponsor { padding-top: 52px; }
}

/* ============================================================
   顶栏收尾修复（2026-11-21）
   本文件在 main.css 之后加载，以下规则专治被前面规则压掉的顶栏状态。
   ============================================================ */
/* 汉堡与 X 互斥：旧规则 .hamburger .icon{display:block} 权重压过
   .hamburger-close{display:none}，导致两个图标叠在一起变形。 */
.hamburger .icon.hamburger-open { display: block; }
.hamburger .icon.hamburger-close { display: none; }
nav.active .hamburger .icon.hamburger-open { display: none; }
nav.active .hamburger .icon.hamburger-close { display: block; }
/* 真按钮压在抽屉之上：抽屉 z-index:1001，旧的无层级按钮被盖住点不到 */
.hamburger { position: relative; z-index: 1004; }
nav.active .hamburger {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--accent-soft);
}
/* 抽屉右上角那个伪元素 X 收不到点击，且与真按钮重叠，彻底移除 */
nav ul::after { content: none !important; display: none !important; }

@media (max-width: 768px) {
    /* 恢复工作室名称：只收按钮，不删名字 */
    .logo-text { display: block !important; min-width: 0; }
    .logo-text .logo-name {
        display: block;
        font-size: clamp(11px, 2.9vw, 15px);
        white-space: nowrap;
    }
    /* 中英文工作室名都完整露出，分两行不挤宽度 */
    .logo-text span { display: block !important; font-size: 9.5px; line-height: 1.2; }
    .logo-img { height: 30px; width: 30px; flex: 0 0 auto; }
    .nav-right { gap: 6px; }
    .nav-tools { display: flex !important; align-items: center; gap: 2px; }
    .nav-tools > .greet-mode { display: none !important; }
    .nav-tools .lang-toggle,
    .nav-tools .theme-mode-toggle,
    .nav-tools .scroll-mode-toggle { width: 32px; height: 32px; }
    .nav-tools .scroll-mode-toggle { padding: 0; justify-content: center; }
    .hamburger { width: 32px; height: 32px; }
    /* QQ 群：实心主按钮 + 图标，不再只有一个空边框 */
    .qq-group-btn {
        width: auto !important;
        padding: 0 9px !important;
        background: var(--accent);
        border-color: var(--accent);
        color: #fff;
    }
    .qq-group-btn .icon { display: block !important; width: 15px; height: 15px; color: #fff; }
    .qq-group-btn span { display: inline !important; font-size: 12px; }
    .qq-group-btn:hover,
    .qq-group-btn:hover .icon { background: var(--accent); color: #fff; }
}
@media (max-width: 480px) {
    .logo { gap: 6px; margin-right: 4px; }
    .logo-img { height: 26px; width: 26px; border-radius: 7px; }
    .logo-text .logo-name { font-size: clamp(10.5px, 2.9vw, 12px); }
    .nav-right { gap: 4px; }
    .nav-tools { gap: 0; }
    .nav-tools .lang-toggle,
    .nav-tools .theme-mode-toggle,
    .nav-tools .scroll-mode-toggle,
    .hamburger { width: 29px; height: 29px; }
    .qq-group-btn { padding: 0 7px !important; }
    .qq-group-btn span { display: none !important; }
}
@media (max-width: 360px) {
    .container { padding: 0 12px; }
    .logo-text .logo-name { font-size: 10.5px; }
    .nav-right { gap: 3px; }
    .nav-tools .lang-toggle,
    .nav-tools .theme-mode-toggle,
    .nav-tools .scroll-mode-toggle,
    .hamburger { width: 27px; height: 27px; }
}
