/* ==================== 设计变量与基础重置 ==================== */
:root {
  --color-bg: #F8F6F1;
  --color-surface: #FFFFFF;
  --color-ink: #111111;
  --color-ink-secondary: #3A3A3A;
  --color-text: #2B2B2B;
  --color-text-muted: #5C5C5C;
  --color-border: #E6E3DC;
  --color-accent: #0A8F4C;
  --color-accent-hover: #077A3F;
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.06);
  --shadow-hover: 0 8px 32px rgba(0, 0, 0, 0.10);
  --font-base: 1rem;
  --line-height: 1.7;
  --container-max: 1160px;
  --header-height: 72px;
}

*, *::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", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background-color: var(--color-bg);
  color: var(--color-text);
  line-height: var(--line-height);
  font-size: var(--font-base);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, svg {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
}

ul, ol {
  list-style: none;
}

/* ==================== 排版系统 ==================== */
h1, h2, h3, h4 {
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: var(--color-ink);
}

h1 {
  font-size: clamp(2.4rem, 4.5vw, 4rem);
  text-wrap: balance;
}

h2 {
  font-size: clamp(1.6rem, 2.5vw, 2.2rem);
  margin-bottom: 1.5rem;
}

h3 {
  font-size: clamp(1.1rem, 1.5vw, 1.35rem);
  margin-bottom: 0.75rem;
}

p {
  margin-bottom: 1rem;
  color: var(--color-ink-secondary);
}

.text-muted {
  color: var(--color-text-muted);
}

.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 1.5rem;
}

section {
  padding: 4.5rem 0;
}

.section-header {
  margin-bottom: 3rem;
  max-width: 720px;
}

.section-header p {
  font-size: 1.1rem;
}

/* ==================== 通用组件 ==================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.9rem 2rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  transition: all 0.2s ease;
  cursor: pointer;
  border: 2px solid transparent;
  font-size: 1rem;
}

.btn-primary {
  background-color: var(--color-ink);
  color: #FFFFFF;
}

.btn-primary:hover, .btn-primary:focus-visible {
  background-color: #2A2A2A;
  transform: translateY(-1px);
}

.btn-outline {
  background-color: transparent;
  border-color: var(--color-ink);
  color: var(--color-ink);
}

.btn-outline:hover, .btn-outline:focus-visible {
  background-color: var(--color-ink);
  color: #FFFFFF;
}

.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 1.8rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-card);
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
}

/* ==================== 头部与页脚 ==================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(248, 246, 241, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--color-border);
  height: var(--header-height);
  display: flex;
  align-items: center;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--color-ink);
}

.brand img {
  width: 32px;
  height: 32px;
  object-fit: contain;
}

.main-nav ul {
  display: flex;
  gap: 1.5rem;
  align-items: center;
}

.main-nav a {
  font-size: 0.95rem;
  font-weight: 500;
  padding: 0.5rem 0;
  position: relative;
}

.main-nav a:hover, .main-nav a[aria-current="page"] {
  color: var(--color-accent);
}

.main-nav a[aria-current="page"]::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--color-accent);
  border-radius: 2px;
}

.site-footer {
  background: var(--color-ink);
  color: #CCCCCC;
  padding: 3rem 0;
  margin-top: 4rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2.5rem;
}

.footer-col h4 {
  color: #FFFFFF;
  margin-bottom: 1rem;
  font-size: 1rem;
}

.footer-col a {
  display: block;
  margin-bottom: 0.6rem;
  font-size: 0.9rem;
  color: #AAAAAA;
}

.footer-col a:hover {
  color: #FFFFFF;
}

.footer-bottom {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid #333333;
  text-align: center;
  font-size: 0.85rem;
  color: #888888;
}

/* ==================== 表格样式 ==================== */
.data-table-wrapper {
  overflow-x: auto;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.95rem;
}

.data-table th, .data-table td {
  padding: 1rem 1.2rem;
  border-bottom: 1px solid var(--color-border);
}

.data-table th {
  background: #F2F0EB;
  font-weight: 600;
  color: var(--color-ink);
}

.data-table tr:last-child td {
  border-bottom: none;
}

.data-table td {
  vertical-align: middle;
}

/* ==================== FAQ 组件 ==================== */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.faq-item {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.faq-item summary {
  padding: 1.2rem 1.5rem;
  cursor: pointer;
  font-weight: 600;
  color: var(--color-ink);
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "+";
  font-size: 1.2rem;
  font-weight: 400;
  transition: transform 0.2s ease;
}

.faq-item[open] summary::after {
  transform: rotate(45deg);
}

.faq-content {
  padding: 0 1.5rem 1.2rem 1.5rem;
  color: var(--color-ink-secondary);
  font-size: 0.95rem;
}

/* ==================== 动态链接列表 ==================== */
.link-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.link-item {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding: 1.2rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-surface);
  transition: border-color 0.2s ease;
}

.link-item:hover {
  border-color: var(--color-accent);
}

.link-title {
  font-weight: 600;
  color: var(--color-ink);
}

.link-desc {
  font-size: 0.9rem;
  color: var(--color-text-muted);
}

/* ==================== SVG 动效系统 ==================== */
.svg-icon {
  width: 28px;
  height: 28px;
  stroke: currentColor;
  stroke-width: 1.8;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.svg-hero-canvas {
  width: 100%;
  max-width: 600px;
  margin: 0 auto;
  display: block;
}

.draw {
  pathLength: 1;
  stroke-dasharray: 1;
  stroke-dashoffset: 0;
  animation: drawStroke 7s ease-in-out infinite alternate;
}

.highlight-sweep {
  animation: sweepLight 10s linear infinite;
  mix-blend-mode: screen;
}

@keyframes drawStroke {
  from { stroke-dashoffset: 1; }
  to { stroke-dashoffset: 0; }
}

@keyframes sweepLight {
  0% { transform: translateX(-100%); opacity: 0; }
  10% { opacity: 0.6; }
  90% { opacity: 0.6; }
  100% { transform: translateX(200%); opacity: 0; }
}

.node-pulse circle {
  animation: pulseNode 3s ease-in-out infinite alternate;
  transform-box: fill-box;
  transform-origin: center;
}

@keyframes pulseNode {
  from { r: 3; opacity: 0.8; }
  to { r: 5; opacity: 1; }
}

/* ==================== 响应式适配 ==================== */
@media (max-width: 768px) {
  section { padding: 3rem 0; }
  .header-inner { flex-direction: column; height: auto; padding: 1rem 0; }
  .main-nav ul { gap: 1rem; flex-wrap: wrap; justify-content: center; margin-top: 1rem; }
  h1 { font-size: 2.2rem; }
  h2 { font-size: 1.6rem; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
