/* ===== 设计变量（暗色为默认） ===== */
:root {
  --bg: #0a0a0c;
  --bg-soft: #101014;
  --bg-card: #141418;
  --text: #f2f2f5;
  --text-dim: #9a9aa2;
  --line: #23232a;
  --accent: #c9a86a;          /* 暖金点缀 */
  --radius: 16px;
  --radius-sm: 12px;
  --maxw: 1180px;
  --nav-h: 66px;
  --glass: rgba(20, 20, 24, .55);
  --glass-border: rgba(255, 255, 255, .07);
  --nav-bg: rgba(10, 10, 12, .82);
  --footer-bg: #070708;
  --grid-line: rgba(255, 255, 255, .04);
  --orb-hero: rgba(86, 156, 214, .16);
  --orb-about: rgba(201, 168, 106, .16);
  --hero-bg:
    linear-gradient(180deg, transparent 0%, transparent 72%, var(--bg) 96%, var(--bg) 100%),
    linear-gradient(180deg, #0d0d12, #0a0a0c);
  --code-comment: #6a9955;
  --code-key: #569cd6;
  --code-fn: #dcdcaa;
}

/* ===== 亮色（白天）主题覆盖 ===== */
[data-theme="light"] {
  --bg: #f5f6fa;
  --bg-soft: #eceef3;
  --bg-card: #ffffff;
  --text: #14161c;
  --text-dim: #5a5f6b;
  --line: #e2e4ea;
  --accent: #a8843f;
  --glass: rgba(255, 255, 255, .62);
  --glass-border: rgba(0, 0, 0, .08);
  --nav-bg: rgba(255, 255, 255, .82);
  --footer-bg: #e9eaef;
  --grid-line: rgba(0, 0, 0, .05);
  --orb-hero: rgba(86, 156, 214, .14);
  --orb-about: rgba(201, 168, 106, .22);
  --hero-bg:
    linear-gradient(180deg, transparent 0%, transparent 72%, var(--bg) 96%, var(--bg) 100%),
    linear-gradient(180deg, #f8f9fd, #f5f6fa);
  --code-comment: #2e7d32;
  --code-key: #0b66c3;
  --code-fn: #8a6d00;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

/* ===== 整屏滚动：阻尼感由 JS 缓动补间接管 ===== */
html { scroll-behavior: auto; }

body {
  font-family: "PingFang SC", "Microsoft YaHei", "Segoe UI", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
  transition: background-color .35s ease, color .35s ease;
}
a { color: inherit; text-decoration: none; }
.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 40px; }

/* 每个区块占满一屏 */
.panel {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 96px 0;
}

/* ===== 导航栏 ===== */
.navbar {
  position: sticky; top: 0; z-index: 50;
  background: var(--nav-bg);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
  transition: background-color .35s ease, border-color .35s ease;
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: var(--nav-h); }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 600; }
.brand-mark {
  width: 32px; height: 32px; display: grid; place-items: center;
  border: 1px solid var(--glass-border); border-radius: var(--radius-sm);
  color: var(--text); font-size: 16px;
  background: var(--glass); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.brand-name { font-size: 17px; letter-spacing: 2px; }
.nav-links { display: flex; gap: 40px; }
.nav-links a { color: var(--text-dim); font-size: 14px; letter-spacing: 1px; transition: color .2s; }
.nav-links a:hover { color: var(--text); }

/* 右上角：导航 + 昼夜切换 */
.nav-right { display: flex; align-items: center; gap: 28px; }

/* 昼夜切换按钮 */
.theme-toggle {
  width: 40px; height: 40px; flex: 0 0 auto;
  display: grid; place-items: center;
  border: 1px solid var(--glass-border); border-radius: 50%;
  background: var(--glass); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  color: var(--text); cursor: pointer; font-size: 18px; line-height: 1;
  transition: border-color .25s ease, transform .25s ease, background-color .35s ease;
}
.theme-toggle:hover { border-color: var(--accent); transform: rotate(-12deg); }

/* ===== Hero ===== */
.hero { position: relative; overflow: hidden; }
.hero-bg {
  position: absolute; inset: 0;
  background: var(--hero-bg);
  transition: background-color .35s ease;
}
.hero-bg::after {
  content: ""; position: absolute; inset: 0;
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(circle at 50% 40%, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(circle at 50% 40%, #000 30%, transparent 75%);
}
.hero-inner { position: relative; text-align: center; }
.hero-tag {
  display: inline-block; color: var(--accent);
  font-size: 12px; letter-spacing: 6px; margin-bottom: 30px;
  transition: color .35s ease;
}
.hero-title {
  display: inline-block;            /* 块整体居中，内部右对齐使末字母对齐 */
  position: relative;
  text-align: right;
  font-family: ui-monospace, "JetBrains Mono", "Fira Code", SFMono-Regular, Menlo, Consolas, monospace;
  font-size: clamp(52px, 9.5vw, 120px);
  font-weight: 700; letter-spacing: -2px;
  line-height: 1.0; text-transform: uppercase;
  margin-bottom: 32px;
  text-shadow: 0 0 40px rgba(242, 242, 245, .08);
}
.hero-title .hl {
  color: var(--code-key);
  text-shadow: 0 0 40px rgba(86, 156, 214, .35);
}
/* 每行行首注释绿 // ，让每行都居中且对称 */
.hero-title .cm { color: var(--code-comment); font-weight: 400; opacity: .9; }
/* 末行闪烁光标 ▍：相对末行定位，置于末行文本右侧并垂直居中 */
.hero-title .last { position: relative; display: inline-block; }
.hero-title .cur {
  position: absolute; left: 100%; top: 50%; transform: translateY(-50%);
  margin-left: 0.08em;
  color: var(--accent);
  animation: code-blink 1s step-end infinite;
}
.hero-sub { color: var(--text-dim); font-size: 18px; letter-spacing: 1.5px; transition: color .35s ease; }
.hero-scroll {
  text-align: center; color: var(--text-dim);
  font-size: 12px; letter-spacing: 3px; margin-top: 56px; transition: color .35s ease;
}
.hero-scroll::after {
  content: ""; display: block; width: 1px; height: 40px;
  background: linear-gradient(var(--line), transparent);
  margin: 16px auto 0; transition: background-color .35s ease;
}

/* ===== 通用区块标题（代码风艺术字） ===== */
.section-title {
  font-family: ui-monospace, "JetBrains Mono", "Fira Code", SFMono-Regular, Menlo, Consolas, monospace;
  font-size: clamp(24px, 3.6vw, 36px); font-weight: 500;
  text-align: center; letter-spacing: 2px; margin-bottom: 16px;
}
.section-title::before {
  content: "// ";
  color: var(--code-comment);
  font-weight: 400;
}
.section-title::after {
  content: "▍";
  color: var(--accent);
  margin-left: .25em;
  animation: code-blink 1s step-end infinite;
}
@keyframes code-blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }
.section-eyebrow {
  text-align: center; color: var(--accent);
  font-size: 12px; letter-spacing: 6px; margin-bottom: 14px;
  transition: color .35s ease;
}
.section-desc {
  text-align: center; color: var(--text-dim);
  max-width: 640px; margin: 0 auto 64px; font-size: 15px; letter-spacing: .5px;
  transition: color .35s ease;
}

/* ===== 业务版图：开放 2×2 网格 ===== */
.biz-grid2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 32px; }
.biz-card2 {
  position: relative; overflow: hidden;
  background: var(--glass); border: 1px solid var(--glass-border);
  border-radius: var(--radius); padding: 44px 40px;
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  transition: border-color .25s ease, transform .3s ease, box-shadow .3s ease, background-color .35s ease;
}
/* 真实照片背景：放在 ::before 图片层，hover 时平滑放大 */
.biz-game::before { background-image: url('../images/biz-game.png'); }
.biz-edu::before  { background-image: url('../images/biz-edu.png'); }
.biz-twin::before { background-image: url('../images/biz-twin.png'); }
.biz-vr::before   { background-image: url('../images/biz-vr.png'); }
.biz-card2::before {
  content: ""; position: absolute; inset: 0;
  background-size: cover; background-position: center;
  z-index: 0; pointer-events: none;
  transition: transform .7s cubic-bezier(.2,.7,.25,1);
}
/* 深色遮罩：::after，保证照片上的文字在深浅主题下都清晰可读 */
.biz-card2::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(8,9,12,.42) 0%, rgba(8,9,12,.74) 100%);
  z-index: 0; pointer-events: none;
}
.biz-card2:hover { border-color: var(--accent); transform: translateY(-4px); box-shadow: 0 20px 44px rgba(0,0,0,.30); }
.biz-card2:hover::before { transform: scale(1.08); }
.biz-card2 > * { position: relative; z-index: 1; }
.biz-card2 .biz-icon,
.biz-card2 h3 { color: #ffffff; }
.biz-card2 p { color: rgba(255,255,255,.82); }
.biz-card2 .biz-link { color: #ffffff; border-bottom-color: rgba(255,255,255,.45); }
.biz-card2 .biz-icon { font-size: 42px; margin-bottom: 18px; transition: transform .35s ease; }
.biz-card2:hover .biz-icon { transform: translateY(-6px) scale(1.08); }
.biz-card2 h3 { font-size: 23px; font-weight: 400; letter-spacing: 3px; margin-bottom: 14px; transition: letter-spacing .3s ease; }
.biz-card2:hover h3 { letter-spacing: 5px; }
.biz-card2 p { color: rgba(255,255,255,.82); font-size: 15px; margin-bottom: 22px; transition: color .35s ease; }
.biz-link {
  display: inline-block; font-size: 14px; letter-spacing: 1px;
  color: var(--text); border-bottom: 1px solid var(--line); padding-bottom: 4px;
  transition: border-color .2s, color .2s, letter-spacing .25s ease;
}
.biz-link:hover { color: var(--accent); border-color: var(--accent); letter-spacing: 3px; }

/* 业务版图面板：在整屏内自适应填满，保证任意高度都完整显示 */
.panel#business {
  /* 顶部留出吸顶导航栏高度 + 安全间距，避免标题被遮挡 */
  padding: calc(var(--nav-h) + 24px) 0 clamp(28px, 3.6vh, 48px);
  overflow: hidden;
}
.panel#business > .container {
  flex: 1 1 auto; min-height: 0;
  display: flex; flex-direction: column;
}
.panel#business .section-title { margin-bottom: clamp(6px, 1vh, 12px); }
.panel#business .section-desc { margin-bottom: clamp(12px, 2vh, 24px); }
.panel#business .biz-grid2 {
  flex: 1 1 auto; min-height: 0; align-items: stretch;
  gap: clamp(12px, 1.8vh, 22px);
}
.panel#business .biz-card2 {
  display: flex; flex-direction: column; justify-content: center;
  min-height: 0;
  padding: clamp(16px, 2vh, 32px) clamp(18px, 2.4vw, 30px);
}
.panel#business .biz-icon { font-size: clamp(22px, 2.6vh, 32px); margin-bottom: clamp(6px, 1.2vh, 13px); }
.panel#business .biz-card2 h3 { font-size: clamp(16px, 1.9vh, 20px); margin-bottom: clamp(6px, 1.1vh, 11px); }
.panel#business .biz-card2 p {
  font-size: clamp(12px, 1.5vh, 14px); line-height: 1.5;
  margin-bottom: clamp(8px, 1.4vh, 14px);
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}

/* ===== 关于团队 ===== */
.section-about { background: transparent; position: relative; overflow: hidden; transition: background-color .35s ease; }
.section-about::after {
  content: ""; position: absolute; inset: 0;
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(circle at 50% 35%, #000 22%, transparent 68%);
  -webkit-mask-image: radial-gradient(circle at 50% 35%, #000 22%, transparent 68%);
  pointer-events: none;
  z-index: -1;
}
.about-inner { text-align: center; max-width: 840px; margin: 0 auto; }
.about-eyebrow { color: var(--accent); font-size: 12px; letter-spacing: 6px; margin-bottom: 24px; transition: color .35s ease; }
.about-vision {
  font-family: ui-monospace, "JetBrains Mono", "Fira Code", SFMono-Regular, Menlo, Consolas, monospace;
  font-size: clamp(26px, 4vw, 42px); font-weight: 400;
  line-height: 1.45; letter-spacing: 1px; margin-bottom: 30px;
}
.about-vision::before { content: "// "; color: var(--code-comment); font-weight: 400; }
.about-vision::after { content: "▍"; color: var(--accent); margin-left: .2em; animation: code-blink 1s step-end infinite; }
.about-desc { color: var(--text-dim); font-size: 16px; margin-bottom: 60px; transition: color .35s ease; }
.about-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; text-align: left; }
.about-card {
  position: relative; overflow: hidden;
  background: var(--glass); border: 1px solid var(--glass-border);
  border-radius: var(--radius); padding: 38px 32px;
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  transition: transform .45s cubic-bezier(.2,.7,.25,1), box-shadow .45s ease, border-color .35s ease, background-color .35s ease;
  will-change: transform;
}
/* 顶部暖金高亮条：悬停时从左滑入 */
.about-card::before {
  content: ""; position: absolute; left: 0; top: 0; height: 3px; width: 100%;
  background: linear-gradient(90deg, var(--accent), color-mix(in srgb, var(--accent) 18%, transparent));
  transform: scaleX(0); transform-origin: left;
  transition: transform .5s cubic-bezier(.2,.7,.25,1);
}
/* 悬停暖金光晕（置于文字之下） */
.about-card::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(130% 90% at 50% -10%, color-mix(in srgb, var(--accent) 16%, transparent), transparent 70%);
  opacity: 0; transition: opacity .4s ease;
}
.about-card > * { position: relative; z-index: 1; }
.about-card .ac-index {
  display: block; font-family: ui-monospace, "JetBrains Mono", "Fira Code", SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 30px; font-weight: 600; line-height: 1; letter-spacing: 1px;
  color: var(--accent); opacity: .32; margin-bottom: 14px;
  transition: opacity .35s ease, transform .4s cubic-bezier(.2,.7,.25,1), letter-spacing .35s ease;
}
.about-card h3 { font-size: 18px; font-weight: 500; letter-spacing: 1px; margin-bottom: 14px; transition: color .35s ease, letter-spacing .35s ease, transform .35s ease; }
.about-card p { color: var(--text-dim); font-size: 14px; transition: color .35s ease, transform .35s ease; }

/* ===== 页脚 ===== */
.footer { background: var(--bg); border-top: 1px solid var(--line); padding: 44px 0; transition: background-color .35s ease, border-color .35s ease; }
.footer-inner { display: flex; flex-direction: column; align-items: center; gap: 16px; text-align: center; }
.footer-brand { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: center; }
.footer-copy { width: 100%; color: var(--text-dim); font-size: 12px; margin-top: 6px; letter-spacing: .5px; transition: color .35s ease; }
.footer-beian { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; justify-content: center; }
.footer-beian a { color: var(--text-dim); font-size: 12px; transition: color .2s; }
.footer-beian a:hover { color: var(--accent); text-decoration: underline; }
.beian-sep { color: var(--line); }

/* ===== 响应式 ===== */
@media (max-width: 900px) {
  .nav-links { gap: 22px; }
  .biz-grid2 { grid-template-columns: 1fr; gap: 22px; }
  .about-grid { grid-template-columns: 1fr; }
  .panel { min-height: auto; scroll-snap-align: none; padding: 110px 0; }
  .panel#business { padding: 90px 0; overflow: visible; }
  .panel#business > .container { flex: none; }
  .panel#business .biz-card2 { display: block; }
  .panel#business .biz-card2 p { -webkit-line-clamp: unset; }
}
@media (max-width: 560px) {
  .nav-links { display: none; }
  .container { padding: 0 22px; }
}

/* ===== 滚动入场动画系统 =====
   由 JS 给 <body> 添加 .has-reveal 后生效；无 JS 或用户偏好减少动效时元素照常显示。 */
.has-reveal [data-reveal] {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity .7s cubic-bezier(.2,.7,.25,1), transform .7s cubic-bezier(.2,.7,.25,1);
  transition-delay: var(--d, 0s);
  will-change: opacity, transform;
}
.has-reveal [data-reveal="left"]  { transform: translateX(-52px); }
.has-reveal [data-reveal="right"] { transform: translateX(52px); }
.has-reveal [data-reveal="zoom"]  { transform: scale(.9); }
.has-reveal [data-reveal].is-visible { opacity: 1; transform: none; }

/* ===== Hover 微交互 ===== */
/* 导航链接：下划线从左滑入 */
.nav-links a { position: relative; }
.nav-links a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 1px;
  background: var(--accent); transform: scaleX(0); transform-origin: left;
  transition: transform .3s ease;
}
.nav-links a:hover::after { transform: scaleX(1); }

/* 品牌：悬停轻微位移，标记旋转微缩放 */
.brand { transition: transform .25s ease; }
.brand:hover { transform: translateX(2px); }
.brand-mark { transition: transform .35s ease, border-color .25s ease; }
.brand:hover .brand-mark { transform: rotate(-8deg) scale(1.06); border-color: var(--accent); }

/* 团队卡片：悬停浮起 + 放大 + 暖金描边光晕 + 顶部高亮条滑入 + 序号/标题/正文联动位移 */
.about-card:hover {
  border-color: var(--accent);
  transform: translateY(-12px) scale(1.025);
  box-shadow: 0 28px 60px rgba(0,0,0,.34), 0 0 0 1px color-mix(in srgb, var(--accent) 45%, transparent);
}
.about-card:hover::before { transform: scaleX(1); }
.about-card:hover::after { opacity: 1; }
.about-card:hover .ac-index { opacity: 1; transform: translateX(5px) scale(1.08); letter-spacing: 3px; }
.about-card:hover h3 { color: var(--accent); letter-spacing: 2px; transform: translateX(5px); }
.about-card:hover p { color: var(--text); transform: translateX(5px); }

/* 区块标题 / 愿景：悬停暖金高亮 + 字距微展 */
.section-title, .about-vision { transition: color .3s ease, letter-spacing .3s ease; }
.section-title:hover, .about-vision:hover { color: var(--accent); letter-spacing: 3px; }
