/* ================= 基础变量与重置 ================= */
:root {
  --col-dark: #17203F;
  --col-paper: #FCFCFD;
  --col-text: #151823;
  --col-brand: #1441EB;
  --col-accent: #6EEDBD;
  --r-card: 8px;
  --r-btn: 6px;
  --shadow-card: 0 10px 28px -14px rgba(21, 24, 35, 0.3);
  --sec-y: clamp(5rem, 10vw, 9rem);
  --gap: clamp(1.5rem, 3vw, 2.5rem);
  --max-w: 1280px;
  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans SC", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.75;
  color: var(--text);
  background-color: var(--bg);
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; height: auto; }
ul, ol { list-style: none; }
a { color: var(--link); text-decoration: none; transition: opacity 0.2s; }
a:hover { opacity: 0.85; }
a:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 2px; }

/* ================= 上下文颜色覆盖 ================= */
body {
  --bg: var(--col-paper);
  --text: var(--col-text);
  --brand: var(--col-brand);
  --accent: var(--col-brand);
  --link: var(--col-brand);
  --border: rgba(21, 24, 35, 0.1);
}
.bg-dark {
  --bg: var(--col-dark);
  --text: var(--col-paper);
  --brand: var(--col-accent);
  --accent: var(--col-accent);
  --link: var(--col-accent);
  --border: rgba(252, 252, 253, 0.15);
}
.bg-paper {
  --bg: var(--col-paper);
  --text: var(--col-text);
  --brand: var(--col-brand);
  --accent: var(--col-brand);
  --link: var(--col-brand);
  --border: rgba(21, 24, 35, 0.1);
}

/* ================= 布局与排版 ================= */
.container { max-width: var(--max-w); margin: 0 auto; padding: 0 var(--gap); }
.section { padding: var(--sec-y) 0; }
.grid { display: grid; gap: var(--gap); }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); }
.flex { display: flex; flex-wrap: wrap; gap: var(--gap); align-items: center; }
.flex-col { flex-direction: column; align-items: flex-start; }
.text-center { text-align: center; }

/* 防止内部元素溢出导致横向滚动 */
.container > * { max-width: 100%; overflow-wrap: break-word; word-break: break-word; }

h1, h2, h3, h4 { font-weight: 800; letter-spacing: -0.02em; line-height: 1.15; }
h1 { font-size: clamp(2.4rem, 6vw, 4.5rem); margin-bottom: 0.5em; }
h2 { font-size: clamp(1.8rem, 3.5vw, 2.8rem); margin-bottom: 0.6em; }
h3 { font-size: clamp(1.4rem, 2.5vw, 1.8rem); margin-bottom: 0.5em; }
p { margin-bottom: 1em; max-width: 38em; }
.eyebrow {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  margin-bottom: 0.8em;
  color: var(--brand);
}
.hl { color: var(--brand); }
.highlight-dark .hl { color: var(--accent); }

/* ================= 头部与页脚 ================= */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(8px);
}
.header-inner {
  height: 64px;
  display: flex; align-items: center; justify-content: space-between;
}
.logo { display: flex; align-items: center; gap: 8px; font-weight: 800; color: var(--text); font-size: 1.1rem; }
.logo img { height: 28px; width: auto; }
nav ul { display: flex; gap: 24px; }
nav a { font-weight: 600; font-size: 0.95rem; color: var(--text); }
nav a[aria-current="page"] { color: var(--brand); }
.nav-actions { display: flex; gap: 12px; }

.site-footer {
  border-top: 1px solid var(--border);
  padding: 48px 0 32px;
  font-size: 0.9rem;
}
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 32px; margin-bottom: 32px; }
.footer-col h4 { font-size: 1rem; margin-bottom: 12px; }
.footer-col ul li { margin-bottom: 8px; }
.footer-copy { text-align: center; opacity: 0.7; }

/* ================= 按钮与交互 ================= */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: 48px; padding: 0 24px;
  font-weight: 700; font-size: 1rem;
  border-radius: var(--r-btn);
  cursor: pointer; transition: transform 0.2s, background 0.2s, box-shadow 0.2s;
}
.btn-primary {
  background: var(--accent); color: var(--col-dark);
}
.btn-secondary {
  background: transparent; border: 1px solid var(--text); color: var(--text);
}
.bg-dark .btn-secondary { border-color: var(--col-paper); color: var(--col-paper); }

/* Contrast fixes */
.btn-primary.contrast-fix {
  color: #ffffff !important;
}
.btn:hover { transform: translateY(-2px); }
.btn:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; }
.btn-icon { width: 20px; height: 20px; }

/* ================= 卡片与面板 ================= */
.card {
  background: var(--bg);
  border: var(--card-border) solid var(--border);
  border-radius: var(--r-card);
  box-shadow: var(--shadow-card);
  padding: 24px;
  transition: box-shadow 0.3s;
}
.card:hover { box-shadow: 0 14px 32px -12px rgba(21, 24, 35, 0.4); }
.panel {
  background: var(--bg);
  border-radius: 12px;
  padding: 24px;
  border: 1px solid var(--border);
}
.capsule {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px; border-radius: 20px;
  background: var(--border); font-size: 0.9rem; font-weight: 500;
}

/* ================= 表格与列表 ================= */
table { width: 100%; border-collapse: collapse; margin: 16px 0; }
th, td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--border); }
th { font-weight: 700; }
ul.list-disc li { position: relative; padding-left: 20px; margin-bottom: 8px; }
ul.list-disc li::before {
  content: ""; position: absolute; left: 0; top: 8px;
  width: 6px; height: 6px; border-radius: 50%; background: var(--brand);
}

/* ================= FAQ ================= */
details { margin-bottom: 16px; border: 1px solid var(--border); border-radius: var(--r-card); overflow: hidden; }
summary {
  padding: 16px 20px; font-weight: 600; cursor: pointer;
  background: var(--bg); list-style: none;
}
summary::-webkit-details-marker { display: none; }
summary::marker { display: none; }
summary::after { content: "+"; float: right; font-weight: 700; }
details[open] summary::after { content: "−"; }
details > div { padding: 0 20px 16px; line-height: 1.7; }

/* ================= SVG 动效 ================= */
.svg-panel { width: 100%; height: auto; max-width: 600px; margin: 0 auto; }
.anim-draw {
  pathLength: 1;
  stroke-dasharray: 1;
  stroke-dashoffset: 0;
  animation: drawLoop 4s ease-in-out infinite alternate;
}
.anim-grid-node {
  animation: nodePulse 3s ease-in-out infinite alternate;
}
.anim-float {
  animation: floatMove 6s ease-in-out infinite alternate;
}
.anim-slide-in {
  animation: slideIn 4s ease-in-out infinite alternate;
}

@keyframes drawLoop {
  0%, 100% { stroke-dashoffset: 0; }
  50% { stroke-dashoffset: 1; }
}
@keyframes nodePulse {
  0%, 100% { opacity: 0.25; transform: scale(0.8); }
  50% { opacity: 1; transform: scale(1.15); }
}
@keyframes floatMove {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}
@keyframes slideIn {
  0%, 100% { transform: translateX(0); opacity: 0.8; }
  50% { transform: translateX(6px); opacity: 1; }
}

/* 减少动态效果 */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ================= 响应式 ================= */
@media (max-width: 768px) {
  .header-inner { flex-wrap: wrap; height: auto; padding: 12px 0; }
  nav ul { order: 3; width: 100%; justify-content: center; margin-top: 12px; }
  .hero-layout { flex-direction: column-reverse; }
  .feature-grid { grid-template-columns: 1fr; }
  .flow-steps { flex-direction: column; }
  .flow-arrow { transform: rotate(90deg); margin: 8px 0; }
}
/* factory-contrast-width */
@media (min-width: 1440px) {
  [data-fc-1440="paper"] {
    color: #fcfcfd !important;
    -webkit-text-fill-color: #fcfcfd !important;
  }
}
@media (min-width: 1440px) {
  [data-fc-1440="paper"] {
    color: #fcfcfd !important;
    -webkit-text-fill-color: #fcfcfd !important;
  }
}
@media (min-width: 1440px) {
  [data-fc-1440="paper"] {
    color: #fcfcfd !important;
    -webkit-text-fill-color: #fcfcfd !important;
  }
}
