/* ===========================
   设计变量与基础重置
   =========================== */
:root {
  --color-bg: #f6f3fb;
  --color-surface: rgba(255, 255, 255, 0.78);
  --color-glass: rgba(255, 255, 255, 0.45);
  --color-primary-start: #7c3aed;
  --color-primary-end: #db2777;
  --color-accent: #a78bfa;
  --color-text-main: #1e1b24;
  --color-text-sub: #4b5563;
  --color-border: rgba(124, 58, 237, 0.15);
  --radius-base: 0.875rem;
  --radius-lg: 1.25rem;
  --shadow-card: 0 10px 30px rgba(124, 58, 237, 0.08);
  --shadow-hover: 0 14px 36px rgba(124, 58, 237, 0.14);
  --font-sans: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  --spacing-xs: 0.5rem;
  --spacing-sm: 1rem;
  --spacing-md: 1.5rem;
  --spacing-lg: 2.5rem;
  --spacing-xl: 4rem;
  --max-width: 1200px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  margin: 0;
  font-family: var(--font-sans);
  background: linear-gradient(160deg, #f6f3fb 0%, #faf5ff 100%);
  color: var(--color-text-main);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; transition: color 0.2s ease; }
ul, ol { margin: 0; padding: 0; list-style: none; }

/* ===========================
   布局与排版
   =========================== */
.container { width: 100%; max-width: var(--max-width); margin: 0 auto; padding: 0 var(--spacing-md); }

.clamp-title { font-size: clamp(1.75rem, 4vw, 2.75rem); line-height: 1.25; letter-spacing: -0.02em; margin-bottom: var(--spacing-sm); }
.clamp-subtitle { font-size: clamp(1rem, 2vw, 1.25rem); line-height: 1.6; color: var(--color-text-sub); margin-bottom: var(--spacing-lg); }
.section-title { font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 600; margin-bottom: var(--spacing-md); }
.section-desc { color: var(--color-text-sub); margin-bottom: var(--spacing-lg); max-width: 72ch; }

section { padding: var(--spacing-xl) 0; }

/* ===========================
   页头与导航
   =========================== */
.site-header {
  position: sticky; top: 0; z-index: 100;
  backdrop-filter: blur(14px) saturate(1.4);
  background: rgba(246, 243, 251, 0.82);
  border-bottom: 1px solid var(--color-border);
}
.nav-wrapper { display: flex; justify-content: space-between; align-items: center; padding: var(--spacing-sm) 0; }
.brand { display: flex; align-items: center; gap: var(--spacing-sm); }
.brand img { width: 36px; height: 36px; object-fit: contain; }
.brand-name { font-weight: 600; font-size: 1.1rem; }

.main-nav ul { display: flex; gap: var(--spacing-md); }
.main-nav a { font-weight: 500; padding: 0.5rem 0; border-bottom: 2px solid transparent; }
.main-nav a:hover, .main-nav a[aria-current="page"] { color: var(--color-primary-start); border-color: var(--color-primary-start); }

/* ===========================
   组件：按钮 / 卡片 / 表格
   =========================== */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0.85rem 1.6rem; border-radius: 999px; font-weight: 600; cursor: pointer;
  border: none; transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s;
  background: linear-gradient(135deg, var(--color-primary-start), var(--color-primary-end));
  color: #fff; text-align: center;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(219, 39, 119, 0.25); }
.btn:focus-visible { outline: 3px solid var(--color-accent); outline-offset: 2px; }

.card {
  background: var(--color-surface); backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.6); border-radius: var(--radius-lg);
  padding: var(--spacing-md); box-shadow: var(--shadow-card); transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); }

table { width: 100%; border-collapse: collapse; margin: var(--spacing-md) 0; background: var(--color-surface); border-radius: var(--radius-base); overflow: hidden; }
th, td { padding: 0.85rem 1rem; text-align: left; border-bottom: 1px solid var(--color-border); }
th { background: rgba(124, 58, 237, 0.06); font-weight: 600; }
tr:last-child td { border-bottom: none; }

/* ===========================
   FAQ 样式
   =========================== */
details { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-base); margin-bottom: var(--spacing-sm); }
summary { padding: 1rem; cursor: pointer; font-weight: 500; list-style: none; position: relative; padding-left: 2.5rem; }
summary::-webkit-details-marker { display: none; }
summary::before { content: "+"; position: absolute; left: 1rem; top: 1.1rem; font-weight: 700; color: var(--color-primary-start); }
details[open] summary::before { content: "-"; }
details p { padding: 0 1rem 1rem 1rem; color: var(--color-text-sub); margin: 0; }
details[open] summary { border-bottom: 1px solid var(--color-border); }

/* ===========================
   SVG 动效体系
   =========================== */
.svg-icon { width: 24px; height: 24px; stroke: currentColor; stroke-width: 1.8; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.progress-ring { transform-origin: center; transform-box: fill-box; }
@keyframes arc-draw {
  0% { stroke-dashoffset: 1; }
  50% { stroke-dashoffset: 0.25; }
  100% { stroke-dashoffset: 1; }
}
.draw-arc {
  pathLength: 1;
  stroke-dasharray: 1;
  stroke-dashoffset: 0;
  animation: arc-draw 5s cubic-bezier(0.4, 0, 0.2, 1) infinite alternate;
}
.data-sync-path {
  pathLength: 1;
  stroke-dasharray: 1;
  stroke-dashoffset: 0;
  animation: arc-draw 7s cubic-bezier(0.34, 1.56, 0.64, 1) infinite alternate;
}

@media (prefers-reduced-motion: reduce) {
  .draw-arc, .data-sync-path { animation: none; }
}

/* ===========================
   响应式调整
   =========================== */
@media (max-width: 768px) {
  .nav-wrapper { flex-direction: column; gap: 1rem; }
  .main-nav ul { flex-wrap: wrap; justify-content: center; gap: 0.75rem; }
  section { padding: var(--spacing-lg) 0; }
  table, thead, tbody, th, td, tr { display: block; }
  thead { position: absolute; width: 1px; height: 1px; overflow: hidden; }
  tr { margin-bottom: 1rem; border: 1px solid var(--color-border); border-radius: var(--radius-base); padding: 0.5rem; }
  td { display: flex; justify-content: space-between; padding: 0.6rem 0.8rem; border-bottom: 1px dashed var(--color-border); }
  td:last-child { border-bottom: none; }
}
