/* ==================== 设计 Token 与基础变量 ==================== */
:root {
  /* 色板 */
  --color-dark: #10112D;
  --color-paper: #F5F0E5;
  --color-body: #151523;
  --color-brand: #1416EB;
  --color-accent: #89ED6E;

  /* 结构尺寸 */
  --radius-card: 24px;
  --radius-btn: 999px;
  --card-border: 0;
  --card-shadow: 0 10px 28px -14px rgba(21, 21, 35, 0.3);
  --section-y: clamp(5rem, 10vw, 9rem);
  --gap: clamp(1.5rem, 3vw, 2.5rem);
  --content-max: 1120px;

  /* 排版 */
  --font-title-weight: 600;
  --font-title-lh: 1.25;
  --font-body-size: 16px;
  --font-body-lh: 1.75;

  /* 分割线 */
  --divider-color: rgba(21, 21, 35, 0.12);
  --thick-divider-h: 4px;

  /* 焦点环 */
  --focus-ring: 0 0 0 3px rgba(20, 22, 235, 0.35);
}

/* ==================== 重置与全局 ==================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: system-ui, -apple-system, "PingFang SC", "Noto Sans SC", "Microsoft YaHei", sans-serif;
  font-size: var(--font-body-size);
  line-height: var(--font-body-lh);
  color: var(--color-body);
  background: var(--color-paper);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }

/* ==================== 容器与网格 ==================== */
.container {
  width: 100%;
  max-width: var(--content-max);
  margin-inline: auto;
  padding-inline: var(--gap);
}
.grid-auto {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
  gap: var(--gap);
}
.flex-center { display: flex; align-items: center; justify-content: center; }
.text-left { text-align: left; }

/* ==================== 排版层级 ==================== */
.eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  margin-bottom: 0.75rem;
  text-transform: uppercase;
}
.section-divider {
  height: var(--thick-divider-h);
  width: 48px;
  border-radius: 999px;
  margin: 0 auto 2rem;
}
h1, h2, h3 {
  font-weight: var(--font-title-weight);
  line-height: var(--font-title-lh);
  letter-spacing: -0.01em;
}
h1 {
  font-size: clamp(2.2rem, 5vw, 4rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
h2 { font-size: clamp(1.6rem, 3vw, 2.4rem); }
h3 { font-size: 1.25rem; margin-bottom: 0.75rem; }
p { margin-bottom: 1rem; max-width: 38em; }
.hl { font-weight: 700; }

/* ==================== 按钮 ==================== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  height: 52px;
  padding: 0 1.5rem;
  border-radius: var(--radius-btn);
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: transform 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
  border: none;
}
.btn-primary {
  background-color: var(--color-accent);
  color: var(--color-dark);
}
.btn-primary:hover { transform: translateY(-2px); filter: brightness(1.05); }
.btn-secondary {
  background: transparent;
  border: 2px solid var(--color-body);
  color: var(--color-body);
}
.btn-secondary:hover { background: rgba(21, 21, 35, 0.06); }
.btn:focus-visible { outline: none; box-shadow: var(--focus-ring); }

/* ==================== 卡片与面板 ==================== */
.card {
  background: var(--surface-bg, var(--color-paper));
  border: var(--card-border);
  border-radius: var(--radius-card);
  box-shadow: var(--card-shadow);
  padding: var(--gap);
  transition: box-shadow 0.3s ease;
}
.card:hover { box-shadow: 0 14px 32px -12px rgba(21, 21, 35, 0.35); }
.panel {
  background: var(--panel-bg, var(--color-dark));
  border-radius: var(--radius-card);
  padding: var(--gap);
  position: relative;
  overflow: hidden;
}

/* ==================== 表格 ==================== */
.table-wrapper { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}
th, td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--divider-color);
  text-align: left;
}
th { font-weight: 600; color: var(--surface-text, var(--color-body)); }
td { color: var(--surface-text, var(--color-body)); }
tr:last-child td { border-bottom: none; }

/* ==================== FAQ ==================== */
details {
  background: var(--surface-bg, var(--color-paper));
  border: 1px solid var(--divider-color);
  border-radius: var(--radius-card);
  margin-bottom: 0.75rem;
  padding: 1rem 1.25rem;
  transition: background 0.2s;
}
summary {
  cursor: pointer;
  font-weight: 600;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
summary::-webkit-details-marker { display: none; }
summary::before {
  content: "";
  display: inline-block;
  width: 10px;
  height: 10px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(-45deg) translateY(-2px);
  flex-shrink: 0;
}
details[open] summary::before { transform: rotate(45deg) translateY(2px); }
details p { margin-top: 0.75rem; font-size: 0.95rem; }
details:focus-within { box-shadow: var(--focus-ring); }

/* ==================== 提示框 ==================== */
.callout {
  border-left: 4px solid var(--surface-highlight, var(--color-brand));
  background: rgba(20, 22, 235, 0.06);
  padding: 1rem 1.25rem;
  border-radius: 0 var(--radius-card) var(--radius-card) 0;
  margin: 1.5rem 0;
  font-size: 0.95rem;
}
.dark-zone .callout { background: rgba(137, 237, 110, 0.1); border-color: var(--color-accent); }

/* ==================== 导航与小目录 ==================== */
.sec-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--divider-color);
}
.sec-nav a {
  padding: 0.4rem 0.8rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--surface-text, var(--color-body));
  opacity: 0.7;
  transition: opacity 0.2s;
}
.sec-nav a:hover, .sec-nav a:focus-visible { opacity: 1; background: rgba(0,0,0,0.04); }
.dark-zone .sec-nav a { color: var(--color-paper); }
.dark-zone .sec-nav a:hover { background: rgba(255,255,255,0.08); }

/* ==================== 头部与页脚 ==================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(245, 240, 229, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--divider-color);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.logo img { height: 32px; width: auto; }
.main-nav { display: flex; gap: 1.5rem; align-items: center; }
.main-nav a { font-weight: 500; font-size: 0.95rem; }
.main-nav a:hover { color: var(--color-brand); }
.main-nav a[aria-current="page"] { color: var(--color-brand); font-weight: 600; }
.site-footer {
  background: var(--color-dark);
  color: var(--color-paper);
  padding: 3rem 0;
  margin-top: var(--section-y);
}
.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--gap);
}
.footer-col h4 { margin-bottom: 1rem; font-weight: 600; }
.footer-col a { display: block; margin-bottom: 0.5rem; opacity: 0.8; font-size: 0.9rem; }
.footer-col a:hover { opacity: 1; text-decoration: underline; }
.copyright { text-align: center; margin-top: 2rem; font-size: 0.85rem; opacity: 0.6; }

/* ==================== SVG 动效关键帧 ==================== */
@keyframes floatY {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}
@keyframes breatheScale {
  0%, 100% { transform: scale(1); opacity: 0.6; }
  50% { transform: scale(1.15); opacity: 1; }
}
@keyframes drawPath {
  0%, 100% { stroke-dashoffset: 1; }
  20%, 80% { stroke-dashoffset: 0; }
}
@keyframes rotateMerge {
  0%, 100% { transform: rotate(0deg); }
  50% { transform: rotate(180deg); }
}
@keyframes slideInCard {
  0%, 100% { transform: translateX(0); opacity: 1; }
  50% { transform: translateX(4px); opacity: 0.9; }
}

.anim-float { animation: floatY 4s ease-in-out infinite; }
.anim-breathe { animation: breatheScale 3.5s ease-in-out infinite; }
.anim-draw { animation: drawPath 6s ease-in-out infinite; }
.anim-rotate { animation: rotateMerge 12s linear infinite; transform-box: fill-box; transform-origin: center; }
.anim-slide { animation: slideInCard 5s ease-in-out infinite; }

/* 减少动态效果 */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    animation: none !important;
  }
}

/* ==================== 响应式适配 ==================== */
@media (max-width: 768px) {
  .header-inner { flex-wrap: wrap; height: auto; padding: 0.75rem 0; }
  .main-nav { order: 3; width: 100%; justify-content: space-between; margin-top: 0.5rem; }
  .hero-layout { grid-template-columns: 1fr !important; }
  .hero-visual { order: 2; margin-top: 2rem; }
  .scenario-row { grid-template-columns: 1fr !important; }
  .features-grid { grid-template-columns: 1fr !important; }
  .news-grid { grid-template-columns: 1fr !important; }
}
@media (min-width: 769px) {
  .hero-layout { display: grid; grid-template-columns: 1.2fr 1fr; gap: var(--gap); align-items: center; }
  .scenario-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gap); align-items: center; }
  .features-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--gap); }
  .news-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--gap); }
}
