/* === 设计变量与基础重置 === */
:root {
  --c-dark: #231334;
  --c-paper: #E9E8EA;
  --c-text: #1C1523;
  --c-brand: #7D14EB;
  --c-accent: #EDD26E;
  --c-divider: rgba(28, 21, 35, 0.12);
  --radius-card: 20px;
  --radius-btn: 12px;
  --card-border: 0;
  --card-shadow: none;
  --section-y: clamp(3.5rem, 7vw, 6rem);
  --gap: clamp(1rem, 2vw, 1.75rem);
  --content-max: 1280px;
  --lh-body: 1.65;
  --lh-title: 1.25;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: "PingFang SC", "Noto Sans SC", system-ui, -apple-system, sans-serif;
  line-height: var(--lh-body);
  color: var(--c-text);
  background: var(--c-paper);
  overflow-x: hidden;
}

img, svg {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

ul, ol {
  list-style: none;
}

/* === 上下文色彩覆盖 === */
.dark-area {
  --bg-surface: var(--c-dark);
  --fg-primary: var(--c-paper);
  --fg-highlight: var(--c-accent);
  --fg-link: var(--c-accent);
  --div-color: rgba(233, 232, 234, 0.15);
  background: var(--bg-surface);
  color: var(--fg-primary);
}

.paper-area {
  --bg-surface: var(--c-paper);
  --fg-primary: var(--c-text);
  --fg-highlight: var(--c-brand);
  --fg-link: var(--c-brand);
  --div-color: var(--c-divider);
  background: var(--bg-surface);
  color: var(--fg-primary);
}

.card-light {
  --bg-surface: #F4F3F5;
  --fg-primary: var(--c-text);
  --fg-highlight: var(--c-brand);
  background: var(--bg-surface);
  color: var(--fg-primary);
}

/* === 布局容器 === */
.container {
  max-width: var(--content-max);
  margin-inline: auto;
  padding-inline: var(--gap);
}

.section-block {
  padding-block: var(--section-y);
  position: relative;
}

.divider {
  border: none;
  border-top: 1px solid var(--div-color);
  margin-block: var(--section-y);
}

/* === 排版系统 === */
.label-tag {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--fg-highlight);
  margin-bottom: 0.6rem;
  display: inline-block;
}

h1 {
  font-size: clamp(2.2rem, 5vw, 4rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 1.2rem;
  text-wrap: balance;
}

h2 {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-weight: 600;
  line-height: var(--lh-title);
  margin-bottom: 1.5rem;
  text-wrap: balance;
}

h3 {
  font-size: 1.25rem;
  font-weight: 600;
  line-height: var(--lh-title);
  margin-bottom: 0.8rem;
}

p {
  margin-bottom: 1rem;
  max-width: 38em;
}

.hl {
  color: var(--fg-highlight);
}

/* === 页头与页脚 === */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(233, 232, 234, 0.85);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--div-color);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.1rem;
}

.brand img {
  width: 32px;
  height: 32px;
  object-fit: contain;
}

.nav-links {
  display: flex;
  gap: 24px;
  align-items: center;
}

.nav-links a {
  font-weight: 500;
  font-size: 0.95rem;
  padding: 6px 0;
  position: relative;
}

.nav-links a:hover,
.nav-links a[aria-current="page"] {
  color: var(--fg-highlight);
}

.nav-links a[aria-current="page"]::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--fg-highlight);
  border-radius: 2px;
}

/* === 按钮系统 === */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 52px;
  padding: 0 24px;
  border-radius: var(--radius-btn);
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: transform 0.2s ease, filter 0.2s ease, background 0.2s ease;
  text-decoration: none;
  white-space: nowrap;
}

.btn:focus-visible {
  outline: 2px solid var(--fg-highlight);
  outline-offset: 3px;
}

.btn:hover {
  transform: translateY(-2px);
  filter: brightness(1.05);
}

.btn-primary {
  background: var(--c-accent);
  color: var(--c-dark);
}

.btn-secondary {
  background: transparent;
  border: 1px solid currentColor;
  color: var(--fg-primary);
}

.btn-secondary:hover {
  background: rgba(128, 128, 128, 0.1);
}

.btn-icon {
  width: 20px;
  height: 20px;
  stroke-width: 2;
}

/* === 卡片与面板 === */
.panel {
  background: var(--bg-surface);
  border: var(--card-border) solid transparent;
  box-shadow: var(--card-shadow);
  border-radius: var(--radius-card);
  padding: var(--gap);
  overflow: hidden;
}

.feature-strip {
  display: flex;
  gap: var(--gap);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 8px;
  -webkit-overflow-scrolling: touch;
}

.feature-strip::-webkit-scrollbar {
  display: none;
}

.feature-strip > * {
  flex: 0 0 min(320px, 100%);
  scroll-snap-align: start;
}

@media (max-width: 768px) {
  .feature-strip {
    flex-wrap: wrap;
    overflow-x: visible;
  }
  .feature-strip > * {
    flex: 1 1 calc(50% - var(--gap));
  }
}

/* === 表格与列表 === */
.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 var(--div-color);
}

.data-table th {
  font-weight: 600;
  width: 40%;
}

.check-list li {
  position: relative;
  padding-left: 28px;
  margin-bottom: 12px;
}

.check-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 6px;
  width: 18px;
  height: 18px;
  border-radius: 4px;
  background: var(--fg-highlight);
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2'%3E%3Cpath d='M20 6L9 17l-5-5'/%3E%3C/svg%3E") center/contain no-repeat;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2'%3E%3Cpath d='M20 6L9 17l-5-5'/%3E%3C/svg%3E") center/contain no-repeat;
}

/* === 步骤条 === */
.steps-bar {
  display: flex;
  gap: var(--gap);
  overflow-x: auto;
  padding-bottom: 8px;
}

.step-item {
  flex: 1 1 200px;
  min-width: 0;
}

.step-badge {
  width: 36px;
  height: 36px;
  background: var(--c-accent);
  color: var(--c-dark);
  font-weight: 700;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
}

@media (max-width: 640px) {
  .steps-bar {
    flex-direction: column;
  }
}

/* === FAQ === */
.faq-item {
  border-bottom: 1px solid var(--div-color);
}

.faq-item summary {
  padding: 16px 0;
  cursor: pointer;
  font-weight: 600;
  list-style: none;
  position: relative;
  padding-right: 32px;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "+";
  position: absolute;
  right: 0;
  top: 16px;
  font-weight: 400;
  color: var(--fg-highlight);
  transition: transform 0.2s;
}

.faq-item[open] summary::after {
  transform: rotate(45deg);
}

.faq-answer {
  padding-bottom: 20px;
  color: var(--fg-primary);
  opacity: 0.9;
}

/* === SVG 基础与尺寸控制 === */
.svg-mockup {
  width: 100%;
  height: auto;
  max-width: 100%;
}

.svg-mockup path,
.svg-mockup circle,
.svg-mockup rect,
.svg-mockup line {
  transition: all 0.3s ease;
}

/* === SVG 动效关键帧 === */
@keyframes float-panel {
  0%, 100% { transform: translateY(0); opacity: 1; }
  50% { transform: translateY(-8px); opacity: 0.9; }
}

@keyframes breathe-dots {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 1; }
}

@keyframes slide-notification {
  0%, 100% { transform: translateX(0); opacity: 1; }
  15% { transform: translateX(12px); opacity: 0; }
  30% { transform: translateX(0); opacity: 1; }
}

@keyframes flow-line {
  0%, 100% { stroke-dashoffset: 0; }
  50% { stroke-dashoffset: 1; }
}

@keyframes orbit-pulse {
  0%, 100% { transform: scale(0.95); opacity: 0.6; }
  50% { transform: scale(1.05); opacity: 1; }
}

@keyframes draw-stroke {
  0%, 100% { stroke-dashoffset: 0; }
  50% { stroke-dashoffset: 1; }
}

.anim-float { animation: float-panel 5s ease-in-out infinite; }
.anim-breathe { animation: breathe-dots 2.4s ease-in-out infinite; }
.anim-slide-notif { animation: slide-notification 6s ease-in-out infinite; }
.anim-flow { animation: flow-line 4s linear infinite; }
.anim-orbit { animation: orbit-pulse 4.5s ease-in-out infinite; }
.anim-draw { animation: draw-stroke 5s ease-in-out infinite; }

/* 旋转/缩放子元素中心修正 */
.anim-float, .anim-slide-notif, .anim-orbit, .anim-draw {
  transform-box: fill-box;
  transform-origin: center;
}

/* 延迟控制 */
.delay-1 { animation-delay: 0.2s; }
.delay-2 { animation-delay: 0.8s; }
.delay-3 { animation-delay: 1.4s; }

/* === 响应式与无障碍 === */
@media (max-width: 768px) {
  .nav-links { gap: 16px; }
  .header-inner { padding-inline: var(--gap); }
  h1 { font-size: clamp(1.8rem, 6vw, 2.8rem); }
  .container { padding-inline: 1.25rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    animation-delay: 0ms !important;
  }
}
