/* =====================================================================
   KDSS website — design system (2026-11 redesign)
   Light enterprise style: white canvas, deep navy brand colour, generous
   whitespace, quiet grey surfaces. System fonts only (no external fonts).
   KDSS 官网设计规范（2026-11 改版）：浅色企业风，深蓝主色，大量留白，
   浅灰底面；只用系统字体，不加载外部资源。
   ===================================================================== */

/* ---------- Tokens / 设计变量 ---------- */
:root {
  --navy-900: #0a1f44;
  --navy-800: #0f2b5b;
  --navy-700: #163a78;
  --blue-600: #1d5fd1;
  --blue-500: #2f74e6;
  --blue-100: #e8f0fd;
  --blue-50:  #f3f7fe;
  --teal-600: #0f8a7e;
  --amber-600: #b7791f;

  --ink-900: #111827;
  --ink-700: #374151;
  --ink-500: #6b7280;
  --ink-400: #9ca3af;
  --line:    #e5e8ef;
  --line-strong: #d3d9e4;
  --surface: #f6f8fb;
  --surface-2: #eef2f7;
  --white:   #ffffff;

  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB",
               "Microsoft YaHei", "Noto Sans CJK SC", "Source Han Sans SC", "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;

  --radius-sm: 6px;
  --radius:    10px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 2px rgba(15, 43, 91, .06);
  --shadow:    0 6px 24px rgba(15, 43, 91, .08);
  --shadow-lg: 0 18px 48px rgba(15, 43, 91, .12);

  --container: 1200px;
  --nav-h: 68px;
}

/* ---------- Reset / 基础重置 ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 16px); }
body {
  font-family: var(--font-sans); font-size: 16px; line-height: 1.7; color: var(--ink-700);
  background: var(--white); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; height: auto; }
a { color: var(--blue-600); text-decoration: none; }
a:hover { color: var(--navy-700); }
ul, ol { list-style: none; }
table { border-collapse: collapse; width: 100%; }
button { font: inherit; border: 0; background: none; cursor: pointer; color: inherit; }
:focus-visible { outline: 2px solid var(--blue-500); outline-offset: 2px; border-radius: 4px; }

/* ---------- Typography / 字体排版 ---------- */
h1, h2, h3, h4 { color: var(--navy-900); line-height: 1.25; font-weight: 700; letter-spacing: -.01em; }
h1 { font-size: clamp(2.1rem, 4.2vw, 3.3rem); letter-spacing: -.02em; }
h2 { font-size: clamp(1.6rem, 2.8vw, 2.25rem); }
h3 { font-size: 1.2rem; }
h4, .h4 { font-size: 1.02rem; }
p  { color: var(--ink-700); }
.lead { font-size: clamp(1.05rem, 1.5vw, 1.2rem); color: var(--ink-500); line-height: 1.8; }
.eyebrow {
  display: inline-block; font-size: .8rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: var(--blue-600); margin-bottom: 14px;
}
.muted { color: var(--ink-500); }
.small { font-size: .875rem; }
code, pre, kbd { font-family: var(--font-mono); }
:not(pre) > code {
  font-size: .86em; background: var(--surface-2); color: var(--navy-800);
  padding: .12em .42em; border-radius: 4px;
}

/* ---------- Layout / 布局 ---------- */
.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 24px; }
.section { padding: 96px 0; }
.section-sm { padding: 64px 0; }
.section-sm + .section { padding-top: 48px; }
.section-alt { background: var(--surface); }
.section-navy { background: var(--navy-900); color: #c9d6ee; }
.section-navy h2, .section-navy h3 { color: var(--white); }
.section-navy p { color: #b9c7e2; }
.section-head { max-width: 760px; margin-bottom: 56px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head p { margin-top: 16px; }
.grid { display: grid; gap: 24px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.split { display: grid; grid-template-columns: 1.05fr 1fr; gap: 64px; align-items: center; }
.split.reverse > :first-child { order: 2; }
.stack > * + * { margin-top: 16px; }

/* ---------- Navigation / 页头导航 ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50; height: var(--nav-h);
  background: rgba(255, 255, 255, .94); backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header .container { height: 100%; display: flex; align-items: center; gap: 40px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--navy-900); font-weight: 800; font-size: 1.2rem; letter-spacing: .02em; }
.brand:hover { color: var(--navy-900); }
.brand img { width: 30px; height: 30px; }
.brand small { font-weight: 500; font-size: .78rem; color: var(--ink-500); letter-spacing: 0; border-left: 1px solid var(--line-strong); padding-left: 10px; }
.nav { display: flex; gap: 6px; flex: 1; }
.nav a { color: var(--ink-700); font-size: .95rem; font-weight: 500; padding: 8px 12px; border-radius: var(--radius-sm); }
.nav a:hover { color: var(--navy-900); background: var(--surface); }
.nav a[aria-current="page"] { color: var(--blue-600); }
.nav a.nav-contact { display: none; }
.skip-link { position: absolute; left: 16px; top: -48px; z-index: 100; background: var(--navy-800); color: var(--white); padding: 10px 16px; border-radius: var(--radius-sm); font-weight: 600; font-size: .9rem; }
.skip-link:focus { top: 12px; color: var(--white); }
main:focus { outline: none; }
.nav-actions { display: flex; align-items: center; gap: 12px; }
.lang { display: inline-flex; border: 1px solid var(--line-strong); border-radius: 999px; overflow: hidden; font-size: .8rem; }
.lang a, .lang span { padding: 4px 11px; color: var(--ink-500); }
.lang span { background: var(--navy-800); color: var(--white); font-weight: 600; }
.lang a:hover { background: var(--surface); color: var(--navy-900); }
.menu-btn { display: none; width: 40px; height: 40px; border-radius: var(--radius-sm); align-items: center; justify-content: center; }
.menu-btn span, .menu-btn span::before, .menu-btn span::after { display: block; width: 20px; height: 2px; background: var(--navy-900); position: relative; content: ""; transition: .2s; }
.menu-btn span::before { position: absolute; top: -6px; }
.menu-btn span::after { position: absolute; top: 6px; }
.site-header.open .menu-btn span { background: transparent; }
.site-header.open .menu-btn span::before { top: 0; transform: rotate(45deg); }
.site-header.open .menu-btn span::after { top: 0; transform: rotate(-45deg); }

/* ---------- Buttons / 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; white-space: nowrap;
  font-size: .95rem; font-weight: 600; line-height: 1; padding: 13px 22px; border-radius: var(--radius-sm);
  border: 1px solid transparent; transition: background .15s, color .15s, border-color .15s, box-shadow .15s;
}
.btn-primary { background: var(--navy-800); color: var(--white); }
.btn-primary:hover { background: var(--navy-700); color: var(--white); box-shadow: var(--shadow); }
.btn-outline { background: var(--white); color: var(--navy-800); border-color: var(--line-strong); }
.btn-outline:hover { border-color: var(--navy-700); color: var(--navy-900); }
.btn-ghost { color: var(--blue-600); padding-left: 4px; padding-right: 4px; }
.btn-ghost:hover { color: var(--navy-800); }
.btn-light { background: var(--white); color: var(--navy-900); }
.btn-light:hover { background: var(--blue-50); color: var(--navy-900); }
.btn-sm { padding: 9px 14px; font-size: .875rem; }
.btn svg { width: 16px; height: 16px; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- Hero / 首屏 ---------- */
.hero { position: relative; padding: 88px 0 72px; overflow: hidden; background:
  radial-gradient(1200px 520px at 85% -10%, var(--blue-50), transparent 60%),
  linear-gradient(180deg, #fff 0%, #fbfcfe 100%); }
.hero::before { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .55;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 48px 48px; mask-image: radial-gradient(ellipse 70% 60% at 75% 30%, #000 0%, transparent 70%); }
.hero .container { position: relative; }
.hero h1 { margin-bottom: 22px; }
.hero h1 em { font-style: normal; color: var(--blue-600); }
.hero .lead { max-width: 560px; margin-bottom: 34px; }
.hero-visual { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); padding: 22px; }
.hero-note { margin-top: 22px; font-size: .86rem; color: var(--ink-500); display: flex; flex-wrap: wrap; gap: 18px; }
.hero-note span::before { content: "✓"; color: var(--teal-600); font-weight: 700; margin-right: 6px; }
.page-hero { padding: 72px 0 56px; background: linear-gradient(180deg, var(--blue-50) 0%, #fff 100%); border-bottom: 1px solid var(--line); }
.page-hero h1 { font-size: clamp(1.9rem, 3.4vw, 2.7rem); margin-bottom: 16px; }
.page-hero .lead { max-width: 720px; }
.breadcrumb { font-size: .85rem; color: var(--ink-500); margin-bottom: 14px; }
.breadcrumb a { color: var(--ink-500); }

/* ---------- Metrics band / 指标条 ---------- */
.metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); box-shadow: var(--shadow-sm); }
.metric { padding: 28px 28px 26px; border-left: 1px solid var(--line); }
.metric:first-child { border-left: 0; }
.metric strong { display: block; font-size: clamp(1.7rem, 2.6vw, 2.25rem); line-height: 1.1; color: var(--navy-900); font-weight: 800; letter-spacing: -.02em; }
.metric strong small { font-size: .5em; font-weight: 700; margin-left: 2px; color: var(--navy-700); }
.metric span { display: block; margin-top: 8px; font-size: .9rem; color: var(--ink-500); }

/* ---------- Cards / 卡片 ---------- */
.card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; transition: border-color .2s, box-shadow .2s, transform .2s; }
.card:hover { border-color: var(--line-strong); box-shadow: var(--shadow); }
.card h3 { margin-bottom: 10px; }
.card h3.h4 { margin-bottom: 6px; }
.card p { font-size: .95rem; color: var(--ink-500); }
.card .icon { width: 44px; height: 44px; border-radius: 10px; background: var(--blue-50); color: var(--blue-600); display: grid; place-items: center; margin-bottom: 18px; }
.card .icon svg { width: 22px; height: 22px; }
.card-flat { background: var(--surface); border-color: transparent; }
.card-link { display: inline-flex; gap: 6px; margin-top: 16px; font-weight: 600; font-size: .92rem; }
.card ul.ticks { margin-top: 14px; }

ul.ticks li { position: relative; padding-left: 24px; margin-top: 8px; font-size: .95rem; color: var(--ink-700); }
ul.ticks li::before { content: ""; position: absolute; left: 2px; top: .62em; width: 12px; height: 7px; border-left: 2px solid var(--teal-600); border-bottom: 2px solid var(--teal-600); transform: rotate(-45deg) translateY(-50%); }

/* ---------- Feature rows / 能力详解行 ---------- */
.feature-row { display: grid; grid-template-columns: 1fr 1.1fr; gap: 64px; align-items: center; padding: 56px 0; border-top: 1px solid var(--line); }
.feature-row:first-of-type { border-top: 0; padding-top: 0; }
.feature-row.reverse > :first-child { order: 2; }
.feature-row h3 { font-size: 1.5rem; margin-bottom: 14px; }
.figure { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 28px; }
.figure figcaption { font-size: .82rem; color: var(--ink-500); margin-top: 14px; text-align: center; }
figure.figure { margin: 0; }
/* Wide figures keep their text legible on phones: the frame scrolls sideways, the page never does.
   宽图在手机上保持可读：图框内横向滚动，页面本身不横向滚动。 */
.figure .scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.figure .hint { display: none; font-size: .78rem; color: var(--ink-500); margin-top: 8px; text-align: center; }

/* ---------- Tables / 表格 ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); }
.table { font-size: .93rem; }
.table-wrap.wide .table { min-width: 640px; }
.table th, .table td { text-align: left; padding: 14px 18px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table th { background: var(--surface); color: var(--navy-900); font-weight: 600; font-size: .85rem; letter-spacing: .02em; }
.table tr:last-child td { border-bottom: 0; }
.table td.num, .table th.num { text-align: right; font-variant-numeric: tabular-nums; }
.table tr.highlight td { background: var(--blue-50); }
.tag { display: inline-block; font-size: .75rem; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: var(--blue-100); color: var(--navy-700); }
.tag.teal { background: #e3f4f2; color: #0b6b62; }
.tag.amber { background: #fbf1df; color: #8a5a12; }

/* ---------- Code / 代码块 ---------- */
pre {
  background: #0d1b36; color: #d7e2f6; font-size: .86rem; line-height: 1.7; padding: 20px 22px; border-radius: var(--radius);
  overflow-x: auto; border: 1px solid #1b2c52;
}
pre .c { color: #7f93b8; }
.code-title { font-size: .8rem; font-weight: 600; color: var(--ink-500); margin: 22px 0 8px; font-family: var(--font-mono); }

/* ---------- Docs layout / 文档布局 ---------- */
.docs { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 56px; align-items: start; }
.docs-nav { position: sticky; top: calc(var(--nav-h) + 24px); font-size: .9rem; border-left: 1px solid var(--line); }
.docs-nav a { display: block; padding: 6px 16px; color: var(--ink-500); border-left: 2px solid transparent; margin-left: -1px; }
.docs-nav a:hover { color: var(--navy-900); }
.docs-nav a.active { color: var(--blue-600); border-left-color: var(--blue-600); font-weight: 600; }
.docs-nav .group { padding: 16px 16px 6px; font-size: .74rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-500); }
.prose h2 { font-size: 1.6rem; margin: 56px 0 16px; padding-top: 8px; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { margin: 32px 0 10px; }
.prose p, .prose ul, .prose ol, .prose .table-wrap, .prose pre { margin-top: 14px; }
.prose ul { padding-left: 1.2em; list-style: disc; }
.prose ol { padding-left: 1.3em; list-style: decimal; }
.prose li { margin-top: 6px; }
.callout { margin-top: 18px; padding: 16px 18px; border-radius: var(--radius-sm); background: var(--blue-50); border-left: 3px solid var(--blue-600); font-size: .93rem; color: var(--ink-700); }
.callout.warn { background: #fdf6e8; border-left-color: var(--amber-600); }

/* ---------- Steps / 流程 ---------- */
.steps { counter-reset: step; display: grid; gap: 20px; }
.step { position: relative; padding-left: 56px; }
.step::before { counter-increment: step; content: counter(step); position: absolute; left: 0; top: 0; width: 36px; height: 36px; border-radius: 50%; background: var(--navy-800); color: #fff; font-weight: 700; display: grid; place-items: center; font-size: .9rem; }
.step h4, .step .h4 { margin-bottom: 4px; }
.step p { font-size: .95rem; color: var(--ink-500); }

/* ---------- Use cases / 场景 ---------- */
.case { display: grid; grid-template-columns: 300px 1fr; gap: 48px; padding: 48px 0; border-top: 1px solid var(--line); }
.case:first-child { border-top: 0; padding-top: 0; }
.case-label .tag { margin-bottom: 12px; }
.case-label h3 { font-size: 1.35rem; }
.case-body { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.case-body h4 { font-size: .8rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-500); margin-bottom: 8px; }
.case-body p, .case-body li { font-size: .95rem; }

/* ---------- Timeline / 版本演进 ---------- */
.timeline { border-left: 2px solid var(--line); margin-left: 8px; }
.timeline li { position: relative; padding: 0 0 32px 32px; }
.timeline li::before { content: ""; position: absolute; left: -7px; top: 6px; width: 12px; height: 12px; border-radius: 50%; background: var(--white); border: 2px solid var(--blue-600); }
.timeline time { font-size: .82rem; font-weight: 700; color: var(--blue-600); letter-spacing: .04em; }
.timeline h4, .timeline .h4 { margin: 4px 0; }
.timeline p { font-size: .95rem; color: var(--ink-500); }

/* ---------- CTA band / 行动区 ---------- */
.cta { background: var(--navy-900); border-radius: var(--radius-lg); padding: 56px; display: grid; grid-template-columns: 1.3fr auto; gap: 40px; align-items: center;
  background-image: radial-gradient(600px 300px at 100% 0%, rgba(47,116,230,.35), transparent 60%); }
.cta h2 { color: #fff; font-size: clamp(1.5rem, 2.4vw, 2rem); }
.cta p { color: #b9c7e2; margin-top: 12px; }
.contact-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.contact-card { padding: 32px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); }
.contact-card h3 { margin-bottom: 6px; }
.contact-card a.mail { font-size: 1.15rem; font-weight: 700; color: var(--navy-800); display: inline-block; margin-top: 14px; }

/* ---------- Footer / 页脚 ---------- */
.site-footer { background: var(--navy-900); color: #93a5c7; padding: 64px 0 32px; font-size: .9rem; }
.site-footer .cols { display: grid; grid-template-columns: 1.6fr repeat(3, 1fr); gap: 40px; }
.site-footer .footer-title { color: #fff; font-size: .82rem; letter-spacing: .1em; text-transform: uppercase; margin-bottom: 16px; }
.site-footer a { color: #b9c7e2; }
.site-footer a:hover { color: #fff; }
.site-footer li { margin-top: 10px; }
.site-footer .brand { color: #fff; margin-bottom: 14px; }
.site-footer .brand small { color: #93a5c7; border-color: #2a3e66; }
.site-footer p { color: #93a5c7; max-width: 340px; }
.site-footer .legal { margin-top: 48px; padding-top: 24px; border-top: 1px solid #1d3360; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: .82rem; }

/* ---------- Reveal animation (respects reduced motion) / 渐显动画 ---------- */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } html { scroll-behavior: auto; } }
.no-js .reveal { opacity: 1; transform: none; }

/* ---------- Responsive / 响应式 ---------- */
@media (max-width: 1080px) {
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .metric:nth-child(3) { border-left: 0; }
  .metric:nth-child(n+3) { border-top: 1px solid var(--line); }
  .split, .feature-row { gap: 40px; }
  .case { grid-template-columns: 1fr; gap: 20px; }
  .site-footer .cols { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 900px) {
  .nav, .nav-actions .btn { display: none; }
  .menu-btn { display: inline-flex; margin-left: auto; }
  .site-header .container { gap: 16px; }
  .site-header.open .nav { display: flex; flex-direction: column; position: absolute; top: var(--nav-h); left: 0; right: 0;
    background: #fff; border-bottom: 1px solid var(--line); padding: 12px 16px 20px; box-shadow: var(--shadow); }
  .site-header.open .nav a { padding: 12px; font-size: 1rem; }
  .site-header.open .nav a.nav-contact { display: flex; margin-top: 8px; padding: 13px 22px; color: var(--white); }
  /* Without JS the menu button does nothing, so show the nav as a wrapped row instead.
     无 JS 时菜单按钮无效，改为把导航换行直接显示。 */
  .no-js .menu-btn { display: none; }
  .no-js .site-header { height: auto; position: static; }
  .no-js .site-header .container { flex-wrap: wrap; padding-top: 12px; padding-bottom: 12px; }
  .no-js .nav { display: flex; flex-wrap: wrap; order: 3; flex-basis: 100%; gap: 2px; }
  .no-js .nav a { padding: 6px 10px; }
  .split, .feature-row, .split.reverse, .feature-row.reverse { grid-template-columns: 1fr; }
  .split.reverse > :first-child, .feature-row.reverse > :first-child { order: 0; }
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .docs { grid-template-columns: 1fr; }
  .docs-nav { position: static; display: none; }
  .cta { grid-template-columns: 1fr; padding: 40px 32px; }
  .case-body { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .container { padding: 0 16px; }
  .section { padding: 64px 0; }
  .section-sm { padding: 48px 0; }
  .hero { padding: 56px 0 48px; }
  .grid-2, .grid-3, .grid-4, .contact-cards { grid-template-columns: 1fr; }
  .metric { padding: 20px; }
  .brand small { display: none; }
  .site-footer .cols { grid-template-columns: 1fr; }
  .card, .contact-card { padding: 22px; }
  .actions .btn { flex: 1 1 auto; }
  .figure.scroll-sm { padding: 14px; }
  .figure.scroll-sm .scroll img { width: 560px; max-width: none; }
  .figure.scroll-sm .scroll.xl img { width: 900px; }
  .figure.scroll-sm .hint { display: block; }
}

/* ---------- Print (whitepaper-friendly) / 打印 ---------- */
@media print {
  .site-header, .site-footer, .menu-btn { display: none !important; }
  .reveal { opacity: 1 !important; transform: none !important; }
  body { font-size: 11pt; }
}

/* Grid/flex children must be allowed to shrink, otherwise a table or <pre> inside a split/feature row widens the page on phones.
   分栏与图文行的子项允许收缩，否则其中的表格或代码块会在手机上撑宽整页。 */
.feature-row > *, .split > *, .grid > *, .case > *, .case-body > * { min-width: 0; }
