/* ===== 设计变量（暗色为默认） ===== */
: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:
    radial-gradient(1000px 520px at 78% 8%, rgba(201, 168, 106, .12), transparent 60%),
    radial-gradient(820px 460px at 12% 96%, rgba(80, 120, 180, .12), transparent 60%),
    linear-gradient(180deg, #0a0a0c, #0c0c10);
  --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:
    radial-gradient(1000px 520px at 78% 8%, rgba(201, 168, 106, .20), transparent 60%),
    radial-gradient(820px 460px at 12% 96%, rgba(80, 120, 180, .16), transparent 60%),
    linear-gradient(180deg, #f7f8fc, #eef0f5);
  --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::before {
  content: ""; position: absolute; left: 50%; top: 42%;
  width: 620px; height: 620px; transform: translate(-50%, -50%);
  background: radial-gradient(circle, var(--orb-hero), transparent 70%);
  border-radius: 50%; filter: blur(90px);
}
.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 {
  font-size: clamp(54px, 11vw, 110px);
  font-weight: 300; letter-spacing: 14px;
  margin-bottom: 28px; padding-left: 14px;
}
.hero-title::before {
  content: "<"; color: var(--accent); font-weight: 400; opacity: .6; margin-right: .12em;
}
.hero-title::after {
  content: "/>"; color: var(--accent); font-weight: 400; opacity: .6; margin-left: .05em;
}
.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-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 {
  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 .25s ease, background-color .35s ease;
}
.biz-card2:hover { border-color: var(--accent); transform: translateY(-4px); }
.biz-card2 .biz-icon { font-size: 42px; margin-bottom: 18px; }
.biz-card2 h3 { font-size: 23px; font-weight: 400; letter-spacing: 3px; margin-bottom: 14px; }
.biz-card2 p { color: var(--text-dim); 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, border-color .35s ease;
}
.biz-link:hover { color: var(--accent); border-color: var(--accent); }

/* 业务版图面板：在整屏内自适应填满，保证任意高度都完整显示 */
.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: var(--bg-soft); position: relative; overflow: hidden; transition: background-color .35s ease; }
.section-about::before {
  content: ""; position: absolute; right: -120px; top: 8%;
  width: 520px; height: 520px; border-radius: 50%;
  background: radial-gradient(circle, var(--orb-about), transparent 70%);
  filter: blur(80px); pointer-events: none;
}
.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 {
  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: border-color .25s ease, background-color .35s ease;
}
.about-card:hover { border-color: var(--accent); }
.about-card h3 { font-size: 18px; font-weight: 500; letter-spacing: 1px; margin-bottom: 14px; }
.about-card p { color: var(--text-dim); font-size: 14px; transition: color .35s ease; }

/* ===== 页脚 ===== */
.footer { background: var(--footer-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; }
}
