/* 设计变量与基础重置 */
:root {
  --color-dark: #231334;
  --color-paper: #F5F3F7;
  --color-paper-light: #EDEAF0;
  --color-text: #1C1523;
  --color-brand: #7D14EB;
  --color-accent: #EDD26E;
  --radius-card: 20px;
  --radius-btn: 12px;
  --card-border: 2px solid var(--color-text);
  --card-shadow: 4px 4px 0 var(--color-text);
  --section-y: clamp(2.5rem, 5vw, 4rem);
  --gap: clamp(0.75rem, 1.5vw, 1.25rem);
  --content-max: 1280px;
  --font-body: system-ui, -apple-system, "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; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-body);
  background: var(--color-paper);
  color: var(--color-text);
  line-height: 1.55;
  font-size: 16px;
  overflow-x: hidden;
}
img, svg { 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);
}
.section {
  padding-block: var(--section-y);
  position: relative;
}
.section--dark { background: var(--color-dark); color: var(--color-paper); }
.section--paper { background: var(--color-paper); color: var(--color-text); }
.section--paper-light { background: var(--color-paper-light); color: var(--color-text); }

h1, h2, h3, h4 { font-weight: 500; line-height: 1.15; letter-spacing: -0.02em; }
h1 { font-size: clamp(2.6rem, 6.4vw, 5rem); margin-bottom: var(--gap); }
h2 { font-size: clamp(1.6rem, 3vw, 2.4rem); margin-bottom: calc(var(--gap) * 1.5); }
h3 { font-size: clamp(1.2rem, 2vw, 1.5rem); margin-bottom: var(--gap); }
p { margin-bottom: var(--gap); max-width: 38em; }
mark { background: transparent; color: inherit; font-weight: 700; }
.hl { color: var(--color-brand); }
.section--dark .hl { color: var(--color-accent); }

/* 眉标 */
.eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: calc(var(--gap) * 0.5);
  color: var(--color-brand);
}
.section--dark .eyebrow { color: var(--color-accent); }

/* 布局网格与交错排版 */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
  gap: var(--gap);
}
.stagger-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: calc(var(--gap) * 2);
  align-items: center;
}
.stagger-row:nth-child(even) .stagger-text { order: 2; }
.stagger-row:nth-child(even) .stagger-visual { order: 1; }

/* 按钮组件 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 52px;
  padding: 0 28px;
  border-radius: var(--radius-btn);
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  transition: transform 0.2s ease, filter 0.2s ease;
  border: none;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); filter: brightness(0.95); }
.btn:focus-visible { outline: 3px solid var(--color-brand); outline-offset: 3px; }
.btn--primary {
  background: var(--color-accent);
  color: var(--color-dark);
}
.btn--secondary {
  background: transparent;
  color: var(--color-text);
  border: 2px solid var(--color-text);
}
.section--dark .btn--secondary {
  color: var(--color-paper);
  border-color: var(--color-paper);
}

/* 卡片与面板 */
.card {
  background: var(--color-paper);
  border: var(--card-border);
  box-shadow: var(--card-shadow);
  border-radius: var(--radius-card);
  padding: var(--gap);
  position: relative;
}
.panel {
  background: var(--color-dark);
  border-radius: var(--radius-card);
  padding: calc(var(--gap) * 1.5);
  overflow: hidden;
  position: relative;
}
.section--paper .panel { background: var(--color-dark); }
.section--dark .panel { background: var(--color-paper); }

/* 表格 */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}
.data-table th, .data-table td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid currentColor;
}
.data-table th { font-weight: 700; opacity: 0.8; }
.data-table tr:last-child td { border-bottom: none; }

/* FAQ */
.faq-item {
  border: var(--card-border);
  border-radius: var(--radius-card);
  margin-bottom: var(--gap);
  background: var(--color-paper);
  overflow: hidden;
}
.faq-item summary {
  padding: 16px 20px;
  cursor: pointer;
  font-weight: 600;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 12px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::marker { content: ""; }
.faq-item summary::before {
  content: "";
  width: 1em;
  height: 1em;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s;
  color: var(--color-brand);
}
.faq-item summary::before svg {
  width: 100%;
  height: 100%;
  stroke-width: 2;
}
.faq-item[open] summary::before { transform: rotate(90deg); }
.faq-item p { padding: 0 20px 16px 52px; margin-bottom: 0; opacity: 0.9; }

/* 页头页脚 */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(245, 243, 247, 0.85);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(0,0,0,0.08);
}
.section--dark ~ .site-header { background: rgba(35, 19, 52, 0.9); border-color: rgba(255,255,255,0.1); }
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.2rem; }
.logo img { width: 32px; height: 32px; object-fit: contain; }
.nav { display: flex; gap: 24px; align-items: center; }
.nav a { font-weight: 500; opacity: 0.85; transition: opacity 0.2s; }
.nav a:hover, .nav a[aria-current="page"] { opacity: 1; color: var(--color-brand); }
.section--dark .nav a { color: var(--color-paper); }
.section--dark .nav a:hover { color: var(--color-accent); }

.site-footer {
  background: var(--color-dark);
  color: var(--color-paper);
  padding: 48px 0 32px;
  font-size: 0.9rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--gap);
  margin-bottom: var(--gap);
}
.footer-col h4 { margin-bottom: 12px; color: var(--color-accent); }
.footer-col a { display: block; margin-bottom: 8px; opacity: 0.8; }
.footer-col a:hover { opacity: 1; text-decoration: underline; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.15); padding-top: 24px; text-align: center; opacity: 0.7; }

/* SVG 容器与缩放 */
.svg-container { width: 100%; height: auto; }
.svg-container svg { width: 100%; height: auto; }

/* SVG 动效关键帧 */
@keyframes draw-line {
  0% { stroke-dashoffset: 1; }
  100% { stroke-dashoffset: 0; }
}
@keyframes float-subtle {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}
@keyframes breathe-opacity {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.65; }
}
@keyframes slide-in-right {
  0% { transform: translateX(20px); opacity: 0.8; }
  100% { transform: translateX(0); opacity: 1; }
}
@keyframes flow-path {
  0% { stroke-dashoffset: 1; }
  100% { stroke-dashoffset: 0; }
}

/* 动效类 */
.anim-draw {
  stroke-dasharray: 1;
  stroke-dashoffset: 0;
  animation: draw-line 2.5s ease-in-out infinite alternate;
}
.anim-float {
  animation: float-subtle 4s ease-in-out infinite;
  transform-box: fill-box;
  transform-origin: center;
}
.anim-breathe {
  animation: breathe-opacity 3.5s ease-in-out infinite;
}
.anim-slide {
  animation: slide-in-right 1.2s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
.anim-flow {
  stroke-dasharray: 1;
  stroke-dashoffset: 0;
  animation: flow-path 2s linear infinite;
}

/* 减少动态效果 */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .anim-draw, .anim-float, .anim-breathe, .anim-slide, .anim-flow {
    animation: none !important;
  }
}

/* 响应式适配 */
@media (max-width: 768px) {
  .stagger-row { grid-template-columns: 1fr; }
  .stagger-row:nth-child(even) .stagger-text,
  .stagger-row:nth-child(even) .stagger-visual { order: unset; }
  .nav { display: none; }
  h1 { font-size: clamp(2rem, 8vw, 3.2rem); }
}
