/* 风格 B「三维 · 轨道」深空主题：精密、克制、可信。颜色、字体都在 :root 变量里；地球配色在 3d.js 的 P 里，改色时两边一起看 */
@font-face { font-family: "Space Grotesk"; src: url(../fonts/space-grotesk.woff2) format("woff2"); font-weight: 300 700; font-display: swap; }
/* 得意黑子集（OFL，按许可更名）：只用于展示标题。单字重，声明成 100–900 是为了让 600 字重直接用原字形、不被浏览器加粗；改了标题文字要重新裁剪，见 README */
@font-face { font-family: "DisplayCN"; src: url(../fonts/display-cn.woff2) format("woff2"); font-weight: 100 900; font-display: swap; }

:root {
  --bg: #050a12;
  --bg-image: radial-gradient(70% 80% at 76% 18%, #122740 0%, #08111f 48%, #050a12 100%);
  --accent: #57bdd0;                      /* 主色：定位点、激活态、主按钮 */
  --accent-hi: #7fd0de;                   /* 主色悬停、高亮 */
  --signal: #e49458;                      /* 暖色信号：认证、港口、站点 */
  --fire: #d9684a;                        /* 火点专用 */
  --on-accent: #06151c;                   /* 主色底上的文字 */
  --text: #eaf0f4;
  --text-2: #aab8c5;
  --text-3: #748698;
  --stroke: rgba(156, 181, 201, .15);
  --stroke-hi: rgba(169, 196, 214, .3);
  --tint: rgba(87, 189, 208, .1);         /* 主色浅底 */
  --soft: rgba(255, 255, 255, .03);       /* 悬停浅底 */
  --panel: rgba(9, 18, 32, .8);
  --panel-solid: rgba(11, 22, 36, .92);
  --header-bg: rgba(7, 17, 29, .92);
  --grad: linear-gradient(90deg, #7fd0de, #a6b4d4);
  --radius: 12px;
  --radius-sm: 6px;
  --header-h: 72px;
  --sans: "PingFang SC", "HarmonyOS Sans SC", "MiSans", "Microsoft YaHei UI", "Microsoft YaHei", "Noto Sans SC", system-ui, sans-serif;
  --title: "DisplayCN", var(--sans);
  --display: "Space Grotesk", var(--sans);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); }
body { margin: 0; overflow-x: hidden; background: var(--bg-image) fixed var(--bg); color: var(--text); font: 16px/1.8 var(--sans); letter-spacing: .015em; -webkit-font-smoothing: antialiased; }
h1, h2, h3, p, ul, dl, dd { margin: 0; }
ul { padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
svg { display: block; }
em { font-style: normal; color: var(--accent-hi); }
:focus-visible { outline: 2px solid var(--accent-hi); outline-offset: 3px; }

.container { width: min(1200px, 100% - 40px); margin-left: auto; margin-right: auto; }
.muted { color: var(--text-2); }
.icon { width: 1.25em; height: 1.25em; flex: none; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.grad { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

#scene { position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: 0; opacity: 0; transition: opacity 1.2s ease; }
#scene.ready { opacity: 1; } /* 首帧渲染后淡入，避免从 CSS 背景硬切 */
/* 不支持 WebGL2 或旧内核（three.js 需 Chromium 94+）：首屏用同一场景的静态渲染图兜底 */
.no-webgl .hero { background: url(../img/hero-globe.webp) 72% center / cover no-repeat; }
main, .footer { position: relative; z-index: 2; }

/* 面板：只有主叙事面板半透明，小卡片用实底 */
.glass {
  border: 1px solid var(--stroke); border-radius: var(--radius);
  background: var(--panel);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  box-shadow: 0 24px 48px rgba(0, 0, 0, .28);
}
.card.glass, .stats.glass, .cta.glass, .contacts .glass { -webkit-backdrop-filter: none; backdrop-filter: none; background: var(--panel-solid); box-shadow: none; }

/* 展示标题：得意黑；字体加载前或加载失败时回落为系统黑体半粗 */
h1, h2, .motto { font-family: var(--title); font-weight: 600; letter-spacing: .02em; }
h2 { margin: 18px 0 14px; font-size: clamp(32px, 3.4vw, 46px); line-height: 1.16; }
.num, .idx, .telemetry, .callout small, .pillars span, .partner-groups p { font-variant-numeric: tabular-nums; }

/* 按钮 */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 46px; padding: 0 22px; border: 1px solid transparent; border-radius: 10px; font-size: 15px; font-weight: 600; letter-spacing: .04em; transition: background .2s, border-color .2s, color .2s; }
.btn .icon { transition: transform .2s; }
.btn:hover .icon { transform: translateX(3px); }
.btn-primary { color: var(--on-accent); background: var(--accent); box-shadow: 0 8px 24px rgba(0, 0, 0, .16); }
.btn-primary:hover { background: var(--accent-hi); }
.btn-ghost { border-color: var(--stroke-hi); background: var(--soft); }
.btn-ghost:hover { border-color: var(--accent); }
.btn-sm { height: 36px; padding: 0 16px; border-radius: 8px; font-size: 14px; }

/* 顶栏 */
.header { position: fixed; top: 0; left: 0; right: 0; z-index: 10; border-bottom: 1px solid transparent; transition: background .3s, border-color .3s; }
.header.is-scrolled, .header.is-open { background: var(--header-bg); border-color: var(--stroke); }
.header-inner { display: flex; align-items: center; height: var(--header-h); }
.brand { display: inline-flex; flex-direction: column; line-height: 1.15; }
.brand img { display: block; height: 34px; width: auto; }
.nav { display: flex; align-items: center; gap: 30px; margin-left: auto; }
.nav a:not(.btn) { position: relative; font-size: 15px; color: var(--text-2); transition: color .2s; }
.nav a:not(.btn):hover, .nav a.is-active { color: var(--text); }
.nav a.is-active::after { content: ""; position: absolute; left: 50%; bottom: -9px; width: 20px; height: 2px; margin-left: -10px; background: var(--accent); }
.nav-toggle { display: none; margin-left: auto; width: 44px; height: 44px; place-items: center; border: 0; background: none; color: var(--text); font-size: 22px; cursor: pointer; }

/* 首屏 */
.hero { position: relative; display: flex; align-items: center; min-height: 100vh; min-height: 100svh; padding: calc(var(--header-h) + 24px) 0 140px; }
.hero-copy { max-width: 580px; animation: rise 1s ease both; }
@keyframes rise { from { opacity: 0; transform: translateY(16px); } }
.kicker { display: flex; align-items: center; gap: 12px; font: 500 12px/1.4 var(--display); letter-spacing: .16em; color: var(--text-2); }
.kicker::before { content: ""; width: 6px; height: 6px; background: var(--accent); }
.hero h1 { margin: 26px 0 24px; font-size: clamp(44px, 5.4vw, 78px); line-height: 1.1; }
.lead { max-width: 30em; font-size: 18px; line-height: 1.85; color: var(--text-2); word-break: keep-all; } /* 只在标点处换行，不把「时空大数据」拆开 */
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 40px; }
.telemetry { position: absolute; right: max(20px, (100% - 1200px) / 2); bottom: 168px; display: flex; gap: 28px; font: 500 11px/1 var(--display); letter-spacing: .16em; color: var(--text-3); }
.telemetry b { font-weight: 500; color: var(--text); }

/* 实力数据：实底横带，数字左对齐 */
.stats { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(5, 1fr); margin-top: -140px; } /* 整条叠在首屏底部（首屏底部留有 140px）；要压过无 WebGL 时首屏的兜底图 */
.stats div { display: flex; flex-direction: column-reverse; justify-content: flex-end; padding: 26px 28px 24px; }
.stats div + div { border-left: 1px solid var(--stroke); }
.stats dd { font: 300 clamp(34px, 3.4vw, 50px)/1 var(--display); letter-spacing: -.02em; }
.stats sup { margin-left: 3px; font-size: .45em; font-weight: 400; vertical-align: top; color: var(--accent); }
.stats dt { margin-top: 12px; font-size: 13px; color: var(--text-3); }
.honors { display: flex; flex-wrap: wrap; gap: 10px 28px; margin: 18px 0 0; padding: 0 4px; list-style: none; font-size: 14px; color: var(--text-2); }
.honors li { display: flex; align-items: center; gap: 8px; }
.honors .icon { width: 16px; height: 16px; color: var(--signal); }

/* 通用区块：每屏至少一屏高，给镜头留出运动的时间 */
.section { position: relative; display: flex; align-items: center; min-height: 100vh; padding: 120px 0; }
.section-head { max-width: 640px; margin-bottom: 44px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head.center .eyebrow { justify-content: center; }
.panel { max-width: 540px; padding: 44px 40px 40px; }
.eyebrow { display: flex; align-items: center; gap: 12px; font: 500 12px/1 var(--display); letter-spacing: .22em; text-transform: uppercase; color: var(--text-3); }
.eyebrow::before { content: ""; width: 24px; height: 1px; background: var(--accent); }

/* 核心技术 */
.tech-tabs { display: flex; flex-direction: column; margin: 26px 0 24px; border-top: 1px solid var(--stroke); }
.tech-tabs button { display: flex; align-items: center; gap: 16px; padding: 14px 16px; border: 0; border-bottom: 1px solid var(--stroke); background: none; color: var(--text-2); font: inherit; font-size: 17px; text-align: left; cursor: pointer; transition: background .2s, color .2s; }
.tech-tabs button:hover { color: var(--text); background: var(--soft); }
.tech-tabs .num { font: 500 12px/1 var(--display); letter-spacing: .06em; color: var(--text-3); }
.tech-tabs [aria-selected="true"] { color: var(--text); background: linear-gradient(90deg, var(--tint), transparent 80%); box-shadow: inset 2px 0 0 var(--accent); }
.tech-tabs [aria-selected="true"] .num { color: var(--accent-hi); }
.tech-detail:not([hidden]) { animation: rise .5s ease; }
.tech-detail .en { margin-bottom: 8px; font: 500 12px/1.5 var(--display); letter-spacing: .08em; color: var(--accent-hi); }
.tech-detail p { color: var(--text-2); }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.tags li { padding: 3px 10px; border: 1px solid var(--stroke); border-radius: 4px; font-size: 13px; color: var(--text-2); }
.note { margin-top: 20px; font-size: 12px; color: var(--text-3); }

/* 解决方案：前两项是核心业务，占半行；其余三列 */
.cards { display: grid; grid-template-columns: repeat(12, 1fr); gap: 16px; }
.card { position: relative; grid-column: span 4; min-height: 156px; padding: 28px 26px 26px; border-radius: 10px; transition: border-color .3s, background-color .3s; }
.card.glass { border-color: transparent; background: rgba(11, 22, 36, .72); }
.card.glass:nth-child(-n + 2) { grid-column: span 6; min-height: 204px; padding: 34px 32px 32px; border-color: var(--stroke); background: var(--panel-solid); }
.card:nth-child(-n + 2)::before { content: ""; position: absolute; top: -1px; left: 32px; width: 28px; height: 2px; background: var(--accent); }
.card.glass:hover { border-color: var(--stroke-hi); background-color: rgba(14, 28, 45, .95); }
.card .icon { width: 28px; height: 28px; stroke-width: 1.4; color: var(--accent-hi); }
.card .idx { position: absolute; top: 24px; right: 24px; font: 500 11px/1 var(--display); letter-spacing: .1em; color: var(--text-3); }
.card h3 { margin: 20px 0 8px; font-size: 17px; line-height: 1.45; }
.card:nth-child(-n + 2) h3 { margin-top: 24px; font-size: 22px; }
.card p { font-size: 14px; line-height: 1.75; color: var(--text-2); }
.card:nth-child(-n + 2) p { max-width: 30em; font-size: 15px; }
.cta { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-top: 16px; padding: 28px 36px; border-radius: 10px; }
.cta h3 { font-size: 22px; }

/* 关于我们 */
.about p + p { margin-top: 12px; }
.motto { margin: 4px 0 22px; font-size: clamp(22px, 2.2vw, 30px); line-height: 1.5; }
.pillars { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 26px; }
.pillars li { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border: 1px solid var(--stroke); border-radius: var(--radius-sm); font-size: 15px; }
.pillars span { font: 500 12px/1 var(--display); color: var(--accent-hi); }
.certs { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 20px; font-size: 14px; color: var(--text-2); }
.certs li { display: flex; align-items: center; gap: 6px; }
.certs .icon { color: var(--signal); }

/* 合作伙伴 */
.partners, .core { margin-left: auto; }
.core-list { margin: 26px 0 0; padding: 0; list-style: none; border-top: 1px solid var(--stroke); }
.core-list li { display: grid; grid-template-columns: auto 1fr; column-gap: 16px; padding: 20px 0; border-bottom: 1px solid var(--stroke); }
.core-list .num { grid-row: span 3; font: 500 12px/2 var(--display); letter-spacing: .06em; color: var(--accent-hi); }
.core-list h3 { font-size: 19px; line-height: 1.4; }
.core-list .en { margin: 2px 0 6px; font: 500 11px/1.6 var(--display); letter-spacing: .08em; color: var(--text-3); }
.core-list p:last-child { font-size: 14.5px; line-height: 1.75; color: var(--text-2); }
.partner-groups { display: grid; gap: 16px; margin-top: 28px; }
.partner-groups div { padding-top: 14px; border-top: 1px solid var(--stroke); }
.partner-groups p { margin-bottom: 8px; font-size: 12px; letter-spacing: .12em; color: var(--text-3); }
.partner-groups ul { display: flex; flex-wrap: wrap; gap: 4px 28px; }
.partner-groups li { font-size: 16px; }

/* 联系我们：地球落到画面底部，形成地平线 */
.contact { align-items: flex-start; padding-top: 18vh; }
.contacts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.contacts li { display: grid; grid-template-columns: auto 1fr; column-gap: 14px; align-items: center; padding: 20px 22px; border-radius: 10px; }
.contacts .icon { grid-row: span 2; width: 40px; height: 40px; padding: 10px; border-radius: 10px; background: var(--tint); color: var(--accent-hi); }
.contacts span { font-size: 13px; color: var(--text-3); }
.contacts b { font-weight: 600; }
.contacts a:hover { color: var(--accent-hi); }

/* 页脚压在地平线上：底部加深色遮罩保证可读 */
.footer { margin-top: -160px; padding: 180px 0 28px; font-size: 13px; color: var(--text-2); background: linear-gradient(rgba(5, 10, 18, 0), rgba(5, 10, 18, .94) 62%); }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; padding-top: 20px; border-top: 1px solid var(--stroke); }
.footer a:hover { color: var(--accent-hi); }

/* 贴在地球上的标注：--x/--y 由脚本写入锚点像素坐标；锚点颜色按业务区分 */
.callouts { position: fixed; top: 0; left: 0; z-index: 1; pointer-events: none; }
.callout {
  position: absolute; top: 0; left: 0; padding: 6px 10px 7px; white-space: nowrap;
  border: 1px solid var(--stroke-hi); border-radius: var(--radius-sm); background: rgba(7, 18, 30, .94);
  font-size: 13px; line-height: 1.35; color: var(--text); opacity: 0; transition: opacity .4s;
  transform: translate(calc(var(--x, -999) * 1px + 18px), calc(var(--y, -999) * 1px - 100% - 18px));
}
.callout small { display: block; margin-top: 2px; font: 500 11px/1.2 var(--display); letter-spacing: .04em; color: var(--text-3); }
.callout.left { transform: translate(calc(var(--x, -999) * 1px - 100% - 18px), calc(var(--y, -999) * 1px - 100% - 18px)); }
.callout.on { opacity: 1; }
.callout::before { content: ""; position: absolute; top: 100%; left: -18px; width: 18px; height: 18px; background: linear-gradient(to top right, transparent calc(50% - .6px), var(--stroke-hi) 50%, transparent calc(50% + .6px)); }
.callout::after { content: ""; position: absolute; top: calc(100% + 15px); left: -21px; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.callout.left::before { left: auto; right: -18px; background: linear-gradient(to top left, transparent calc(50% - .6px), var(--stroke-hi) 50%, transparent calc(50% + .6px)); }
.callout.left::after { left: auto; right: -21px; }
.callout[data-kind="fire"]::after { background: var(--fire); }
.callout[data-kind="flood"]::after { background: #3d8bff; }
.callout[data-kind="drought"]::after { background: #d9a441; }
.callout[data-kind="deform"]::after { background: #a77bff; }
.callout[data-kind="slide"]::after { background: #ff9f43; }
.callout[data-kind="change"]::after { background: #ff5c8a; }
.callout[data-kind="land"]::after { background: #e8a070; }
.callout[data-kind="port"]::after, .callout[data-kind="site"]::after { background: var(--signal); }

/* 风格切换（评审用） */
.style-switch { position: fixed; left: 16px; bottom: 16px; z-index: 20; display: flex; flex-wrap: wrap; gap: 2px; padding: 4px; border: 1px solid var(--stroke); border-radius: 8px; background: #07111d; font-size: 12px; }
.style-switch[hidden] { display: none; }
.style-switch a { padding: 5px 12px; border-radius: 5px; color: var(--text-2); }
.style-switch a[aria-current] { background: var(--accent); color: var(--on-accent); }

/* 404 */
.notfound main { display: grid; align-content: center; justify-items: start; gap: 20px; min-height: 100vh; }
.notfound h1 { font-size: clamp(32px, 5vw, 56px); }

/* 滚动显现 */
.js [data-reveal] { opacity: 0; transform: translateY(24px); transition: opacity .8s ease, transform .8s ease; }
.js [data-reveal].is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js [data-reveal] { opacity: 1; transform: none; }
}

@media (max-width: 1080px) {
  .card.glass, .card.glass:nth-child(-n + 2) { grid-column: span 6; }
  .card.glass:last-child:nth-child(odd) { grid-column: span 12; } /* 单数张时最后一张占满一行 */
  .contacts { grid-template-columns: 1fr; max-width: 520px; margin-left: auto; margin-right: auto; }
}

@media (max-width: 860px) {
  .nav-toggle { display: grid; }
  .nav { display: none; position: absolute; top: var(--header-h); left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0; padding: 8px 20px 24px; background: #07111d; border-bottom: 1px solid var(--stroke); }
  .header.is-open .nav { display: flex; }
  .nav a:not(.btn) { padding: 14px 0; border-bottom: 1px solid var(--stroke); }
  .nav a.is-active::after { display: none; }
  .nav .btn { margin-top: 20px; }
  .telemetry { display: none; }
}

@media (max-width: 760px) {
  .callouts { display: none; }
  .no-webgl .hero { background-size: auto 62%; background-position: 70% 14%; }
  .hero { align-items: flex-end; padding-bottom: 96px; }
  .hero h1 { font-size: 44px; line-height: 1.08; }
  .kicker { letter-spacing: .06em; }
  .lead { font-size: 17px; line-height: 1.75; }
  .stats { grid-template-columns: repeat(2, 1fr); margin-top: 0; }
  .stats div { padding: 22px 20px; }
  .stats div:nth-child(odd) { border-left: 0; }
  .stats div:last-child { grid-column: span 2; }
  .stats div:nth-child(n + 3) { border-top: 1px solid var(--stroke); }
  .section { min-height: auto; padding: 72px 0; }
  .panel { padding: 30px 22px 26px; }
  .glass { -webkit-backdrop-filter: none; backdrop-filter: none; background: rgba(9, 18, 32, .9); }
  .card.glass, .card.glass:nth-child(-n + 2) { grid-column: span 12; min-height: 0; padding: 26px 22px 24px; }
  .cta { flex-direction: column; align-items: flex-start; padding: 24px; }
  .contact { padding-top: 72px; min-height: 90vh; }
}
