/* === 设计变量 === */
:root {
  --color-dark: #231334;
  --color-paper: #E9E8EA;
  --color-body: #1C1523;
  --color-brand: #7D14EB;
  --color-accent: #EDD26E;
  --color-white: #FFFFFF;

  --radius-card: 20px;
  --radius-btn: 12px;

  --card-border: 2px solid var(--color-body);
  --card-shadow: 4px 4px 0 var(--color-body);

  --section-y: clamp(5rem, 10vw, 9rem);
  --gap: clamp(1.5rem, 3vw, 2.5rem);
  --content-max: 1120px;

  --font-main: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  --line-height-body: 1.75;
}

/* === 重置与基础 === */
*, *::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-body);
  background: var(--color-paper);
  line-height: var(--line-height-body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }

/* === 容器 === */
.container {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 var(--gap);
  overflow-x: hidden;
}

/* === 页头 === */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(233, 232, 234, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(28, 21, 35, 0.08);
  transition: border-color 0.3s;
}
.site-header.scrolled { border-bottom-color: rgba(28, 21, 35, 0.15); }
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 var(--gap);
}
.header-logo img {
  height: 32px;
  width: auto;
  display: block;
}
.header-nav { display: flex; gap: 24px; align-items: center; }
.header-nav a {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--color-body);
  transition: color 0.2s;
  position: relative;
}
.header-nav a:hover,
.header-nav a[aria-current="page"] { color: var(--color-brand); }
.header-nav a[aria-current="page"]::after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--color-brand);
  border-radius: 1px;
}
.header-actions { display: flex; gap: 12px; align-items: center; }
.btn-download-header {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: var(--radius-btn);
  background: var(--color-accent);
  color: var(--color-dark);
  border: none;
  cursor: pointer;
  transition: transform 0.2s, background 0.2s;
}
.btn-download-header:hover { transform: translateY(-1px); background: #e5c85f; }
.btn-download-header:focus-visible { outline: 2px solid var(--color-brand); outline-offset: 2px; }

/* === 按钮通用 === */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 28px;
  font-size: 1rem;
  font-weight: 600;
  border-radius: var(--radius-btn);
  background: var(--color-accent);
  color: var(--color-dark);
  border: none;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease;
}
.btn-primary:hover { transform: translateY(-2px); background: #e5c85f; }
.btn-primary:focus-visible { outline: 3px solid var(--color-brand); outline-offset: 3px; }
.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 28px;
  font-size: 1rem;
  font-weight: 600;
  border-radius: var(--radius-btn);
  border: 2px solid var(--color-body);
  background: transparent;
  color: var(--color-body);
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}
.btn-secondary:hover { transform: translateY(-2px); border-color: var(--color-brand); color: var(--color-brand); }
.btn-secondary:focus-visible { outline: 3px solid var(--color-brand); outline-offset: 3px; }
.btn-dark {
  background: var(--color-accent);
  color: var(--color-dark);
}
.btn-dark:hover { background: #e5c85f; }

/* === 眉标 === */
.section-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-brand);
  margin-bottom: 16px;
}
.section-label::before {
  content: "";
  display: block;
  width: 20px;
  height: 2px;
  background: var(--color-brand);
  border-radius: 1px;
}
.dark-surface .section-label { color: var(--color-accent); }
.dark-surface .section-label::before { background: var(--color-accent); }

/* === 标题 === */
h1, h2, h3 { font-weight: 500; line-height: 1.15; color: var(--color-body); }
.dark-surface h1,
.dark-surface h2,
.dark-surface h3 { color: var(--color-paper); }
h1 { font-size: clamp(2.6rem, 6.4vw, 5rem); letter-spacing: -0.02em; text-wrap: balance; }
h2 { font-size: clamp(1.6rem, 3vw, 2.4rem); text-wrap: balance; }
h3 { font-size: clamp(1.25rem, 2vw, 1.5rem); }
.hl { color: var(--color-brand); }
.dark-surface .hl { color: var(--color-accent); }

/* === 卡片 === */
.card {
  background: var(--color-paper);
  border: var(--card-border);
  box-shadow: var(--card-shadow);
  border-radius: var(--radius-card);
  padding: var(--gap);
}
.dark-surface .card {
  background: var(--color-paper);
  color: var(--color-body);
}

/* === 表格 === */
.styled-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
}
.styled-table th,
.styled-table td {
  padding: 14px 18px;
  text-align: left;
  border-bottom: 1px solid rgba(28, 21, 35, 0.12);
}
.styled-table th { font-weight: 700; background: rgba(125, 20, 235, 0.06); }
.styled-table td:first-child { font-weight: 600; white-space: nowrap; }

/* === FAQ === */
.faq-item {
  border: var(--card-border);
  border-radius: var(--radius-card);
  background: var(--color-paper);
  margin-bottom: 12px;
  overflow: hidden;
}
.faq-item summary {
  padding: 18px 24px;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: color 0.2s;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  font-size: 1.25rem;
  font-weight: 400;
  transition: transform 0.2s;
}
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item summary:hover { color: var(--color-brand); }
.faq-item summary:focus-visible { outline: 2px solid var(--color-brand); outline-offset: -2px; border-radius: var(--radius-card); }
.faq-item .faq-answer {
  padding: 0 24px 18px;
  color: var(--color-body);
  line-height: var(--line-height-body);
}

/* === SVG 动效：网格节点依次点亮 === */
@keyframes grid-pulse {
  0%   { opacity: 0.15; transform: scale(0.7); }
  15%  { opacity: 1; transform: scale(1.15); }
  30%  { opacity: 0.8; transform: scale(1); }
  100% { opacity: 0.15; transform: scale(0.7); }
}
.grid-node {
  opacity: 0.15;
  transform: scale(0.7);
}
.grid-node.animate {
  animation: grid-pulse 6s ease-in-out infinite;
}
.grid-node:nth-child(1)  { animation-delay: 0.0s; }
.grid-node:nth-child(2)  { animation-delay: 0.4s; }
.grid-node:nth-child(3)  { animation-delay: 0.8s; }
.grid-node:nth-child(4)  { animation-delay: 1.2s; }
.grid-node:nth-child(5)  { animation-delay: 1.6s; }
.grid-node:nth-child(6)  { animation-delay: 2.0s; }
.grid-node:nth-child(7)  { animation-delay: 2.4s; }
.grid-node:nth-child(8)  { animation-delay: 2.8s; }
.grid-node:nth-child(9)  { animation-delay: 3.2s; }
.grid-node:nth-child(10) { animation-delay: 3.6s; }
.grid-node:nth-child(11) { animation-delay: 4.0s; }
.grid-node:nth-child(12) { animation-delay: 4.4s; }

/* 气泡浮现 */
@keyframes bubble-float {
  0%   { opacity: 0; transform: translateY(12px); }
  12%  { opacity: 1; transform: translateY(0); }
  85%  { opacity: 1; transform: translateY(0); }
  100% { opacity: 0; transform: translateY(-8px); }
}
.bubble-float {
  opacity: 1;
  transform: translateY(0);
}
.bubble-float.animate {
  animation: bubble-float 8s ease-in-out infinite;
}

/* 输入点呼吸 */
@keyframes dot-breathe {
  0%, 100% { opacity: 0.3; transform: scale(0.85); }
  50%      { opacity: 1; transform: scale(1.1); }
}
.dot-breathe {
  opacity: 0.3;
  transform: scale(0.85);
}
.dot-breathe.animate {
  animation: dot-breathe 2.4s ease-in-out infinite;
}

/* 通知滑入 */
@keyframes notify-slide {
  0%   { opacity: 0; transform: translateX(24px); }
  10%  { opacity: 1; transform: translateX(0); }
  88%  { opacity: 1; transform: translateX(0); }
  100% { opacity: 0; transform: translateX(-12px); }
}
.notify-slide {
  opacity: 1;
  transform: translateX(0);
}
.notify-slide.animate {
  animation: notify-slide 10s ease-in-out infinite;
}

/* 描边流动 */
@keyframes dash-flow {
  0%   { stroke-dashoffset: 1; }
  50%  { stroke-dashoffset: 0; }
  100% { stroke-dashoffset: 1; }
}
.dash-flow {
  stroke-dasharray: 1;
  stroke-dashoffset: 0;
}
.dash-flow.animate {
  animation: dash-flow 4s ease-in-out infinite;
}

/* === 减少动画 === */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .grid-node, .bubble-float, .dot-breathe, .notify-slide, .dash-flow {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
}

/* === SVG 尺寸 === */
.svg-visual {
  width: 100%;
  height: auto;
  max-width: 100%;
}

/* === 响应式辅助 === */
@media (max-width: 768px) {
  .header-nav { display: none; }
}

/* === 特性胶囊 === */
.feature-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid rgba(28, 21, 35, 0.12);
  background: rgba(255, 255, 255, 0.6);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-body);
}

/* === 提示框 === */
.callout {
  border-left: 4px solid var(--color-brand);
  background: rgba(125, 20, 235, 0.04);
  border-radius: 0 var(--radius-card) var(--radius-card) 0;
  padding: 16px 20px;
  margin: 16px 0;
  font-size: 0.9375rem;
}
.dark-surface .callout {
  border-left-color: var(--color-accent);
  background: rgba(237, 210, 110, 0.06);
}

/* === 新闻卡片 === */
.news-card {
  border: var(--card-border);
  border-radius: var(--radius-card);
  background: var(--color-paper);
  padding: 24px;
  transition: transform 0.2s;
}
.news-card:hover { transform: translateY(-2px); }
.news-card time {
  font-size: 0.8125rem;
  color: rgba(28, 21, 35, 0.5);
  font-weight: 500;
}
.news-card h4 {
  font-size: 1.0625rem;
  font-weight: 600;
  margin: 8px 0;
  color: var(--color-body);
}
.news-card p {
  font-size: 0.9375rem;
  color: var(--color-body);
  line-height: 1.7;
}

/* === 步骤条 === */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--gap);
}
.step-item {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--color-accent);
  color: var(--color-dark);
  font-weight: 700;
  font-size: 1rem;
  flex-shrink: 0;
}
.step-item h4 { font-size: 1rem; font-weight: 600; }
.step-item p { font-size: 0.9375rem; color: var(--color-body); }

/* === 场景标签 === */
.scene-tag {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  margin-bottom: 8px;
}
.scene-tag.problem { background: rgba(125, 20, 235, 0.1); color: var(--color-brand); }
.scene-tag.action { background: rgba(237, 210, 110, 0.25); color: var(--color-dark); }
.scene-tag.result { background: rgba(28, 21, 35, 0.08); color: var(--color-body); }

/* === 页脚 === */
.site-footer {
  background: var(--color-dark);
  color: var(--color-paper);
  padding: 48px 0 32px;
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 32px;
  justify-content: space-between;
  align-items: flex-start;
}
.footer-brand img { height: 28px; width: auto; margin-bottom: 12px; }
.footer-links { display: flex; gap: 24px; flex-wrap: wrap; }
.footer-links a {
  font-size: 0.875rem;
  color: rgba(233, 232, 234, 0.7);
  transition: color 0.2s;
}
.footer-links a:hover,
.footer-links a[aria-current="page"] { color: var(--color-accent); }
.footer-copy {
  width: 100%;
  text-align: center;
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid rgba(233, 232, 234, 0.1);
  font-size: 0.8125rem;
  color: rgba(233, 232, 234, 0.4);
}
