/* ==================== 设计变量 ==================== */
:root {
  /* 配色 */
  --color-dark: #140E25;
  --color-paper: #F5F0E5;
  --color-text: #191523;
  --color-brand: #5214EB;
  --color-accent: #C8ED6E;
  --color-white: #FFFFFF;
  
  /* 阴影与边界 */
  --shadow-color: rgba(25, 21, 35, 0.3);
  --card-border: 0;
  --card-shadow: 0 10px 28px -14px var(--shadow-color);
  --focus-ring: 0 0 0 3px rgba(82, 20, 235, 0.4);

  /* 圆角 */
  --radius-card: 8px;
  --radius-btn: 6px;
  --radius-badge: 4px;

  /* 节奏与密度 */
  --section-y: clamp(2.5rem, 5vw, 4rem);
  --gap: clamp(0.75rem, 1.5vw, 1.25rem);
  --content-max: 960px;
  --lh-body: 1.55;

  /* 字体栈 */
  --font-main: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
}

/* ==================== 基础重置与排版 ==================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font-main);
  color: var(--color-text);
  background: var(--color-paper);
  line-height: var(--lh-body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }

/* 容器 */
.container {
  max-width: var(--content-max);
  margin-inline: auto;
  padding-inline: var(--gap);
}

/* 面与主题变量覆盖 */
.dark-bg {
  background: var(--color-dark);
  color: var(--color-paper);
}
.dark-bg .hl { color: var(--color-accent); }
.dark-bg .overline { color: var(--color-accent); }
.dark-bg a:not(.btn) { color: var(--color-accent); }
.paper-card {
  background: var(--color-paper);
  color: var(--color-text);
  border-radius: var(--radius-card);
  padding: var(--gap);
}
.paper-card .hl { color: var(--color-brand); }
.paper-card .overline { color: var(--color-brand); }

/* 眉标 */
.overline {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 0.5em;
}

/* 标题系统 */
h1, h2, h3, h4 { font-weight: 700; line-height: 1.2; letter-spacing: 0.02em; }
h1 { font-size: clamp(2.2rem, 5vw, 3.8rem); margin-bottom: 0.8em; }
h2 { font-size: clamp(1.6rem, 3vw, 2.4rem); margin-top: 0.6em; margin-bottom: 0.8em; }
h3 { font-size: clamp(1.2rem, 2vw, 1.5rem); margin-top: 0.5em; margin-bottom: 0.6em; }
p { margin-bottom: 1em; max-width: 38em; }
strong { font-weight: 600; }

/* 高亮词 */
.hl { color: var(--color-brand); }
.dark-bg .hl { color: var(--color-accent); }

/* ==================== 导航与页脚 ==================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(245, 240, 229, 0.9);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(25, 21, 35, 0.08);
}
.dark-bg.site-header { background: rgba(20, 14, 37, 0.9); border-bottom-color: rgba(245, 240, 229, 0.1); }
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.brand { display: flex; align-items: center; gap: 0.6em; font-weight: 800; font-size: 1.1rem; }
.brand img { height: 32px; width: auto; }
nav ul { display: flex; gap: var(--gap); }
nav a {
  padding: 0.4em 0.8em;
  border-radius: var(--radius-btn);
  font-weight: 500;
  transition: background 0.2s, color 0.2s;
}
nav a:hover, nav a[aria-current="page"] { background: rgba(82, 20, 235, 0.08); color: var(--color-brand); }
.dark-bg nav a:hover, .dark-bg nav a[aria-current="page"] { background: rgba(200, 237, 110, 0.15); color: var(--color-accent); }

.site-footer {
  padding: var(--section-y) 0;
  border-top: 1px solid rgba(25, 21, 35, 0.1);
  margin-top: var(--section-y);
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--gap);
}
.footer-links { display: flex; gap: var(--gap); }
.footer-links a { opacity: 0.8; transition: opacity 0.2s; }
.footer-links a:hover { opacity: 1; }

/* ==================== 按钮 ==================== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  height: 52px;
  padding: 0 1.5em;
  font-size: 1rem;
  font-weight: 600;
  border-radius: var(--radius-btn);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s;
  border: none;
}
.btn:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.btn-primary {
  background: var(--color-accent);
  color: var(--color-dark);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(200, 237, 110, 0.4); }
.btn-secondary {
  background: transparent;
  border: 1px solid var(--color-text);
  color: var(--color-text);
}
.dark-bg .btn-secondary { border-color: var(--color-paper); color: var(--color-paper); }
.btn-secondary:hover { background: rgba(25, 21, 35, 0.05); }
.dark-bg .btn-secondary:hover { background: rgba(245, 240, 229, 0.08); }
.btn-icon { width: 20px; height: 20px; }

/* ==================== 卡片与网格 ==================== */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: var(--gap);
}
.card {
  background: var(--color-white);
  border: var(--card-border);
  box-shadow: var(--card-shadow);
  border-radius: var(--radius-card);
  padding: var(--gap);
  transition: box-shadow 0.2s;
}
.card:hover { box-shadow: 0 12px 32px -12px var(--shadow-color); }

/* ==================== 表格 ==================== */
.data-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1em 0;
}
.data-table th, .data-table td {
  padding: 0.8em 1em;
  text-align: left;
  border-bottom: 1px solid rgba(25, 21, 35, 0.1);
}
.data-table th { font-weight: 600; }
.data-table tr:last-child td { border-bottom: none; }

/* ==================== FAQ (Details) ==================== */
.faq-list { display: flex; flex-direction: column; gap: 0.8em; }
.faq-item {
  background: var(--color-white);
  border-radius: var(--radius-card);
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}
.faq-item summary {
  padding: 1em;
  cursor: pointer;
  font-weight: 600;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  font-size: 1.2em;
  transition: transform 0.2s;
}
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item p { padding: 0 1em 1em; margin: 0; font-size: 0.95em; opacity: 0.9; }

/* ==================== SVG 面板与动效 ==================== */
.svg-panel {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  background: var(--color-dark);
  border-radius: var(--radius-card);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.svg-panel svg {
  width: 100%;
  height: auto;
  max-width: 100%;
}
/* 动效类基础 */
.anim-draw { pathLength: 1; stroke-dasharray: 1; stroke-dashoffset: 0; animation: dashFlow 6s ease-in-out infinite; }
.anim-float { animation: floatBubble 5s ease-in-out infinite; }
.anim-pulse { animation: breathe 4s ease-in-out infinite; }
.anim-rotate-sync { animation: rotateAlign 8s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }

@keyframes dashFlow {
  0%, 100% { stroke-dashoffset: 1; }
  50% { stroke-dashoffset: 0; }
}
@keyframes floatBubble {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}
@keyframes breathe {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 1; }
}
@keyframes rotateAlign {
  0%, 100% { transform: rotate(-5deg) translateX(-4px); }
  50% { transform: rotate(5deg) translateX(4px); }
}

/* 减少动态效果 */
@media (prefers-reduced-motion: reduce) {
  .anim-draw, .anim-float, .anim-pulse, .anim-rotate-sync {
    animation: none !important;
    stroke-dashoffset: 0 !important;
    opacity: 1 !important;
    transform: none !important;
  }
}

/* ==================== 响应式 ==================== */
@media (max-width: 768px) {
  .header-inner { flex-direction: column; height: auto; padding: 1em 0; }
  nav ul { flex-wrap: wrap; justify-content: center; }
  .hero-layout { flex-direction: column; }
  .feature-row { flex-direction: column; }
  .flow-line { flex-direction: column; }
  .step-row { flex-direction: column; }
}
