/* ==========================================================================
   昆仑数智 · 站点样式
   设计令牌 → 基础版式 → 布局 → 组件 → 响应式
   颜色只在此处定义，页面内不写死色值。
   ========================================================================== */

:root {
  /* --- 色彩：档案纸 + 双通道 --- */
  --ink:        #131a21;   /* 正文墨色 */
  --ink-70:     #46525d;   /* 次级正文 */
  --ink-45:     #78848d;   /* 说明、脚注 */
  --paper:      #e7eaec;   /* 页面底色 */
  --paper-deep: #dde1e4;   /* 分区底色 */
  --surface:    #fbfcfc;   /* 卡片 */
  --rule:       #c5ccd0;   /* 细线 */
  --rule-soft:  #d8dee1;

  --indigo:     #1b4a72;   /* 通道一：高等教育 */
  --indigo-dim: #1b4a7215;
  --cinnabar:   #a8281e;   /* 通道二：安全法治 */
  --cinnabar-dim: #a8281e15;

  --channel:     var(--ink);
  --channel-dim: #131a2112;

  /* --- 字体：宋体标题 / 黑体正文 / 等宽编号 --- */
  --font-display: "Source Han Serif SC", "Noto Serif SC", "Songti SC", "STSong",
                  "SimSun", Georgia, serif;
  --font-body:    "Source Han Sans SC", "Noto Sans SC", "PingFang SC",
                  "Microsoft YaHei", "Hiragino Sans GB", system-ui, sans-serif;
  --font-mono:    "JetBrains Mono", "IBM Plex Mono", ui-monospace,
                  SFMono-Regular, Consolas, "Liberation Mono", monospace;

  /* --- 尺度 --- */
  --wrap: 1180px;
  --gap: 24px;
  --band-y: 104px;
  --radius: 3px;
}

/* --------------------------------------------------------------- 基础 --- */

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.75;
  color: var(--ink);
  background-color: var(--paper);
  /* 蓝图格纸：极淡的双层网格 */
  background-image:
    linear-gradient(to right, #131a2108 1px, transparent 1px),
    linear-gradient(to bottom, #131a2108 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.28;
  letter-spacing: 0.01em;
  margin: 0;
}

p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

a { color: inherit; text-decoration: none; }

img, svg { max-width: 100%; }

::selection { background: var(--channel); color: #fff; }

:focus-visible {
  outline: 2px solid var(--channel);
  outline-offset: 3px;
}

/* --------------------------------------------------------------- 布局 --- */

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 32px;
}

.band { padding: var(--band-y) 0; }
.band-tight { padding: 68px 0; }
.band-deep { background: var(--paper-deep); }
.band-ink  { background: var(--ink); color: var(--paper); }
.band-line { border-top: 1px solid var(--rule); }

/* --------------------------------------------------- 通用排版工具类 --- */

.eyebrow {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--channel);
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 18px;
}
.eyebrow::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--rule);
}

.h-display {
  font-size: clamp(38px, 6.2vw, 74px);
  line-height: 1.12;
  letter-spacing: -0.01em;
}
.h-section { font-size: clamp(26px, 3.4vw, 38px); }
.h-card    { font-size: 20px; letter-spacing: 0; }

.lede {
  font-size: 17.5px;
  line-height: 1.85;
  color: var(--ink-70);
  max-width: 46em;
}

.note {
  font-size: 13.5px;
  line-height: 1.7;
  color: var(--ink-45);
}

.mono {
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.04em;
}

.mark { color: var(--channel); }

/* --------------------------------------------------------------- 导航 --- */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: #e7eaecec;
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--rule);
}

.nav-inner {
  display: flex;
  align-items: center;
  gap: 28px;
  height: 66px;
}

.brand {
  display: flex;
  align-items: baseline;
  gap: 9px;
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 600;
  letter-spacing: 0.06em;
  white-space: nowrap;
}
.brand em {
  font-family: var(--font-mono);
  font-style: normal;
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--ink-45);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 26px;
  margin-left: auto;
  font-size: 14.5px;
}
.nav-links a {
  position: relative;
  padding: 6px 0;
  color: var(--ink-70);
  transition: color .18s ease;
}
.nav-links a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 1.5px;
  background: var(--channel);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .22s ease;
}
.nav-links a:hover { color: var(--ink); }
.nav-links a:hover::after,
.nav-links a[aria-current="page"]::after { transform: scaleX(1); }
.nav-links a[aria-current="page"] { color: var(--ink); }

.nav-toggle {
  display: none;
  margin-left: auto;
  width: 40px; height: 40px;
  border: 1px solid var(--rule);
  background: transparent;
  border-radius: var(--radius);
  cursor: pointer;
  align-items: center;
  justify-content: center;
}
.nav-toggle span {
  display: block;
  width: 17px; height: 9px;
  border-top: 1.5px solid var(--ink);
  border-bottom: 1.5px solid var(--ink);
}

/* --------------------------------------------------------------- 按钮 --- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 24px;
  border: 1px solid var(--channel);
  border-radius: var(--radius);
  font-size: 14.5px;
  font-weight: 500;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: background .18s ease, color .18s ease, transform .18s ease;
}
.btn-solid { background: var(--channel); color: #fff; }
.btn-solid:hover { transform: translateY(-1px); filter: brightness(1.12); }
.btn-ghost { background: transparent; color: var(--channel); }
.btn-ghost:hover { background: var(--channel); color: #fff; }
.btn .arrow { transition: transform .18s ease; }
.btn:hover .arrow { transform: translateX(3px); }

.btn-row { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 34px; }

/* ------------------------------------------------------------- 首屏 --- */

.hero { padding: 76px 0 0; }

.hero-title { max-width: 15em; }
.hero-title .line { display: block; }

.hero-lede { margin-top: 26px; }

.reveal-line {
  opacity: 0;
  transform: translateY(14px);
  animation: rise .8s cubic-bezier(.2,.7,.3,1) forwards;
}
.reveal-line.d1 { animation-delay: .06s; }
.reveal-line.d2 { animation-delay: .16s; }
.reveal-line.d3 { animation-delay: .28s; }
.reveal-line.d4 { animation-delay: .4s; }

@keyframes rise {
  to { opacity: 1; transform: none; }
}

/* ------------------------------------------- 签名元素：级联链路图 --- */

.chain {
  margin-top: 58px;
  border-top: 1px solid var(--rule);
  padding-top: 26px;
}

.chain-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  margin-bottom: 22px;
}

.chain-tabs { display: flex; gap: 8px; }

.chain-tab {
  font-family: var(--font-body);
  font-size: 13.5px;
  padding: 8px 16px;
  border: 1px solid var(--rule);
  background: transparent;
  border-radius: var(--radius);
  color: var(--ink-70);
  cursor: pointer;
  transition: all .18s ease;
}
.chain-tab[aria-selected="true"] {
  border-color: var(--channel);
  color: var(--channel);
  background: var(--channel-dim);
}

.chain-hint {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.08em;
  color: var(--ink-45);
}

.chain-track {
  display: grid;
  grid-template-columns: repeat(9, minmax(0, 1fr));
  gap: 6px;
}

.node {
  position: relative;
  display: block;
  width: 100%;
  text-align: left;
  padding: 14px 10px 16px;
  background: var(--surface);
  border: 1px solid var(--rule-soft);
  border-top: 2px solid var(--rule);
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 13.5px;
  line-height: 1.45;
  color: var(--ink-70);
  cursor: pointer;
  transition: border-color .2s ease, color .2s ease,
              background .2s ease, transform .2s ease;
}
.node .idx {
  display: block;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  color: var(--ink-45);
  margin-bottom: 7px;
}
.node .qty {
  display: block;
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--ink-45);
  margin-top: 8px;
  opacity: 0;
  transition: opacity .2s ease;
}
.node:hover { transform: translateY(-2px); }

/* 被选中的源节点 */
.node.is-source {
  border-color: var(--channel);
  border-top-color: var(--channel);
  color: var(--ink);
  background: var(--surface);
}
.node.is-source .idx { color: var(--channel); }
.node.is-source .qty { opacity: 1; color: var(--channel); }

/* 下游受影响节点：逐级点亮 */
.node.is-downstream {
  border-top-color: var(--channel);
  background: var(--channel-dim);
  color: var(--ink);
  animation: pulse .5s ease both;
}
.node.is-downstream .qty { opacity: 1; }

@keyframes pulse {
  from { transform: translateY(4px); opacity: .4; }
  to   { transform: none; opacity: 1; }
}

.chain-readout {
  margin-top: 20px;
  padding: 16px 20px;
  border-left: 3px solid var(--channel);
  background: var(--surface);
  font-size: 14.5px;
  color: var(--ink-70);
  min-height: 58px;
}
.chain-readout b {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 15px;
  color: var(--channel);
  padding: 0 2px;
}

/* --------------------------------------------------------- 产品分区 --- */

.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  gap: 64px;
  align-items: start;
}

.stack > * + * { margin-top: 18px; }

.feature-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--rule);
}
.feature-list li {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr);
  gap: 20px;
  padding: 20px 0;
  border-bottom: 1px solid var(--rule);
}
.feature-list .tag {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--channel);
  padding-top: 5px;
}
.feature-list h3 { font-size: 17px; margin-bottom: 5px; }
.feature-list p  { font-size: 14.5px; color: var(--ink-70); line-height: 1.7; }

/* ----------------------------------------------------------- 卡片组 --- */

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--gap);
}
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--gap);
}

.card {
  background: var(--surface);
  border: 1px solid var(--rule-soft);
  border-radius: var(--radius);
  padding: 30px 28px 32px;
  transition: border-color .2s ease, transform .2s ease;
}
.card:hover { border-color: var(--channel); transform: translateY(-3px); }
.card h3 { margin-bottom: 10px; }
.card p  { font-size: 14.5px; color: var(--ink-70); }

.card-link {
  display: block;
  border-left: 2px solid var(--channel);
}

/* 产品入口大卡 */
.product-card {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 38px 36px 34px;
  background: var(--surface);
  border: 1px solid var(--rule-soft);
  border-top: 3px solid var(--channel);
  border-radius: var(--radius);
  transition: transform .22s ease, border-color .22s ease;
}
.product-card:hover { transform: translateY(-4px); }
.product-card .code {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--channel);
}
.product-card h3 { font-size: 23px; line-height: 1.35; }
.product-card p  { font-size: 14.5px; color: var(--ink-70); }
.product-card .go {
  margin-top: auto;
  padding-top: 6px;
  font-size: 14px;
  color: var(--channel);
  display: inline-flex;
  gap: 8px;
}
.product-card:hover .go .arrow { transform: translateX(4px); }
.product-card .go .arrow { transition: transform .2s ease; }

/* ------------------------------------------------------------- 数据 --- */

.stat-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--gap);
  border-top: 1px solid var(--rule);
}
.stat {
  padding: 26px 0 4px;
  border-right: 1px solid var(--rule-soft);
  padding-right: 20px;
}
.stat:last-child { border-right: 0; }
.stat b {
  display: block;
  font-family: var(--font-display);
  font-size: 40px;
  font-weight: 600;
  line-height: 1.1;
  color: var(--channel);
}
.stat span { font-size: 13.5px; color: var(--ink-45); }

/* --------------------------------------------------------- 技术底座 --- */

.tech-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14.5px;
}
.tech-table th,
.tech-table td {
  text-align: left;
  padding: 15px 16px 15px 0;
  border-bottom: 1px solid #ffffff1f;
  vertical-align: top;
}
.tech-table th {
  width: 168px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.12em;
  font-weight: 400;
  color: #ffffff85;
  text-transform: uppercase;
  padding-top: 18px;
}
.tech-table td { color: #ffffffdd; }

.band-ink .eyebrow { color: #ffffff9c; }
.band-ink .eyebrow::after { background: #ffffff2e; }
.band-ink .lede { color: #ffffffb5; }
.band-ink h2 { color: var(--paper); }

/* ------------------------------------------------------------- 表单 --- */

.field { display: block; margin-bottom: 18px; }
.field span {
  display: block;
  font-size: 13.5px;
  color: var(--ink-70);
  margin-bottom: 7px;
}
.field input,
.field textarea,
.field select {
  width: 100%;
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 11px 13px;
  transition: border-color .18s ease;
}
.field textarea { min-height: 128px; resize: vertical; }
.field input:focus,
.field textarea:focus,
.field select:focus { border-color: var(--channel); outline: none; }

/* ------------------------------------------------------------- 页脚 --- */

.footer {
  border-top: 1px solid var(--rule);
  padding: 58px 0 40px;
  font-size: 14px;
  color: var(--ink-70);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 40px;
}
.footer h4 {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  font-weight: 400;
  color: var(--ink-45);
  text-transform: uppercase;
  margin-bottom: 14px;
}
.footer ul { list-style: none; margin: 0; padding: 0; }
.footer li { margin-bottom: 9px; }
.footer a:hover { color: var(--channel); }
.footer-base {
  margin-top: 48px;
  padding-top: 22px;
  border-top: 1px solid var(--rule-soft);
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: space-between;
  font-size: 12.5px;
  color: var(--ink-45);
}

/* --------------------------------------------------------- 滚动显影 --- */

.rv { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s cubic-bezier(.2,.7,.3,1); }
.rv.in { opacity: 1; transform: none; }

/* ----------------------------------------------------------- 响应式 --- */

@media (max-width: 1040px) {
  :root { --band-y: 78px; }
  .split { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .chain-track { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
}

@media (max-width: 760px) {
  .wrap { padding: 0 20px; }
  .nav-toggle { display: inline-flex; }
  .nav-links {
    display: none;
    position: absolute;
    top: 66px; left: 0; right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 8px 20px 18px;
    background: var(--paper);
    border-bottom: 1px solid var(--rule);
  }
  .nav-links.open { display: flex; }
  .nav-links a { width: 100%; padding: 12px 0; border-bottom: 1px solid var(--rule-soft); }
  .nav-links .btn { margin-top: 12px; border-bottom: 1px solid var(--channel); }

  .hero { padding-top: 48px; }
  .chain-track { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .chain-hint { display: none; }
  .grid-3, .grid-2 { grid-template-columns: minmax(0, 1fr); }
  .stat-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat { border-right: 0; }
  .feature-list li { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .tech-table th { width: auto; display: block; padding-bottom: 4px; }
  .tech-table td { display: block; padding-top: 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-delay: 0ms !important;
    transition-duration: .001ms !important;
  }
  .rv { opacity: 1; transform: none; }
  .reveal-line { opacity: 1; transform: none; }
}

@media print {
  .nav, .chain-tabs, .btn-row { display: none; }
  body { background: #fff; }
}

/* ------------------------------------------------------- 本体建模 --- */

.onto-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--gap);
}

.onto-col {
  background: var(--surface);
  border: 1px solid var(--rule-soft);
  border-top: 3px solid var(--channel);
  border-radius: var(--radius);
  padding: 32px 30px 34px;
}
.onto-col > h3 {
  font-size: 20px;
  margin-bottom: 6px;
}
.onto-col > .note { margin-bottom: 24px; }

.onto-row {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr);
  gap: 18px;
  padding: 16px 0;
  border-top: 1px solid var(--rule-soft);
}
.onto-row dt {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  color: var(--channel);
  padding-top: 4px;
  text-transform: uppercase;
}
.onto-row dd {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.7;
  color: var(--ink-70);
}
.onto-row dd b {
  font-weight: 500;
  color: var(--ink);
}

.onto-note {
  margin-top: 30px;
  padding: 18px 22px;
  border-left: 3px solid var(--channel);
  background: var(--surface);
  font-size: 14.5px;
  line-height: 1.8;
  color: var(--ink-70);
}

/* 业务矩阵 */
.matrix {
  width: 100%;
  border-collapse: collapse;
  font-size: 14.5px;
}
.matrix th,
.matrix td {
  text-align: left;
  vertical-align: top;
  padding: 22px 20px 22px 0;
  border-bottom: 1px solid var(--rule);
}
.matrix thead th {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  font-weight: 400;
  text-transform: uppercase;
  color: var(--ink-45);
  padding-bottom: 12px;
  padding-top: 0;
}
.matrix tbody th {
  width: 190px;
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 600;
  color: var(--ink);
}
.matrix td { color: var(--ink-70); }
.matrix td b { font-weight: 500; color: var(--ink); display: block; margin-bottom: 3px; }

@media (max-width: 760px) {
  .onto-grid { grid-template-columns: minmax(0, 1fr); }
  .onto-row { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .matrix, .matrix tbody, .matrix tr, .matrix th, .matrix td { display: block; width: auto; }
  .matrix thead { display: none; }
  .matrix tbody th { padding: 22px 0 8px; border-bottom: 0; }
  .matrix td { padding: 0 0 14px; border-bottom: 0; }
  .matrix tr { border-bottom: 1px solid var(--rule); }
}
