/* ==================== 设计变量与基础重置 ==================== */
:root {
  /* 配色 */
  --color-dark: #240F29;
  --color-paper: #F6F3F7;
  --color-text: #201523;
  --color-brand: #A711CF;
  --color-accent: #ED6E73;

  /* 结构 Token */
  --radius-card: 0;
  --radius-btn: 0;
  --card-border: 0;
  --card-shadow: none;
  --section-y: clamp(2.5rem, 5vw, 4rem);
  --gap: clamp(0.75rem, 1.5vw, 1.25rem);
  --content-max: 1280px;

  /* 排版 */
  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans SC", sans-serif;
  --lh-body: 1.55;
  --lh-heading: 1.1;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: var(--lh-body);
  color: var(--color-text);
  background-color: var(--color-paper);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

img, svg {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

ul, ol {
  list-style: none;
}

/* ==================== 布局工具 ==================== */
.container {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 var(--gap);
}

.grid-layout {
  display: grid;
  gap: var(--gap);
}

@media (min-width: 900px) {
  .grid-layout.two-col {
    grid-template-columns: 1fr 1fr;
    align-items: center;
  }
}

/* ==================== 排版系统 ==================== */
.label {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-brand);
  margin-bottom: 0.5rem;
}

.dark-section .label {
  color: var(--color-accent);
}

h1, h2, h3 {
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: var(--lh-heading);
  color: var(--color-text);
}

.dark-section h1,
.dark-section h2,
.dark-section h3 {
  color: var(--color-paper);
}

h1 {
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  text-wrap: balance;
}

h2 {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  margin-top: calc(var(--section-y) * 0.5);
  margin-bottom: var(--gap);
}

h3 {
  font-size: 1.25rem;
  margin-top: var(--gap);
  margin-bottom: 0.5rem;
}

p {
  margin-bottom: 1rem;
  max-width: 38em;
}

.hl {
  color: var(--color-brand);
  font-weight: 700;
}

.dark-section .hl {
  color: var(--color-accent);
}

/* ==================== 组件：按钮 ==================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  height: 52px;
  padding: 0 24px;
  font-size: 1rem;
  font-weight: 600;
  border: 2px solid transparent;
  border-radius: var(--radius-btn);
  cursor: pointer;
  transition: transform 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
  text-decoration: none;
}

.btn:focus-visible {
  outline: 3px solid var(--color-accent);
  outline-offset: 2px;
}

.btn-primary {
  background-color: var(--color-accent);
  color: var(--color-dark);
  border-color: var(--color-accent);
}

.btn-primary:hover {
  background-color: #d95b60;
  border-color: #d95b60;
  transform: translateY(-1px);
}

.btn-secondary {
  background-color: transparent;
  color: var(--color-text);
  border-color: var(--color-text);
}

.dark-section .btn-secondary {
  color: var(--color-paper);
  border-color: var(--color-paper);
}

.btn-secondary:hover {
  background-color: rgba(0,0,0,0.05);
  transform: translateY(-1px);
}

.dark-section .btn-secondary:hover {
  background-color: rgba(255,255,255,0.1);
}

/* ==================== 组件：卡片/面板 ==================== */
.card {
  background-color: #ffffff;
  border: var(--card-border);
  box-shadow: var(--card-shadow);
  border-radius: var(--radius-card);
  padding: var(--gap);
  position: relative;
}

.panel {
  background-color: var(--color-dark);
  border-radius: var(--radius-card);
  padding: var(--gap);
  position: relative;
  overflow: hidden;
}

/* ==================== 组件：表格 ==================== */
.table-wrapper {
  overflow-x: auto;
  margin-top: 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 rgba(0,0,0,0.1);
}

.dark-section .data-table th,
.dark-section .data-table td {
  border-bottom-color: rgba(255,255,255,0.15);
}

.data-table th {
  font-weight: 700;
  color: var(--color-text);
}

.dark-section .data-table th {
  color: var(--color-paper);
}

/* ==================== 组件：FAQ (Details/Summary) ==================== */
.faq-item {
  border-bottom: 1px solid rgba(0,0,0,0.1);
  padding: 16px 0;
}

.dark-section .faq-item {
  border-bottom-color: rgba(255,255,255,0.15);
}

details summary {
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px 0;
}

details summary::-webkit-details-marker {
  display: none;
}

details summary::after {
  content: "+";
  font-size: 1.25rem;
  font-weight: 400;
  transition: transform 0.2s ease;
}

details[open] summary::after {
  transform: rotate(45deg);
}

details p {
  margin-top: 12px;
  color: var(--color-text);
}

.dark-section details p {
  color: var(--color-paper);
}

/* ==================== 组件：步骤条 ==================== */
.steps-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--gap);
  counter-reset: step;
}

.step-card {
  flex: 1 1 200px;
  background: #fff;
  padding: var(--gap);
  border-radius: var(--radius-card);
  position: relative;
  counter-increment: step;
}

.step-card::before {
  content: counter(step, decimal-leading-zero);
  display: inline-block;
  background: var(--color-accent);
  color: var(--color-dark);
  font-weight: 800;
  padding: 4px 8px;
  font-size: 0.85rem;
  margin-bottom: 12px;
}

/* ==================== 组件：场景标签 ==================== */
.tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 8px;
  background: rgba(167, 17, 207, 0.1);
  color: var(--color-brand);
  margin-bottom: 8px;
}

.dark-section .tag {
  background: rgba(237, 110, 115, 0.15);
  color: var(--color-accent);
}

.scenario-block {
  margin-bottom: var(--gap);
}

/* ==================== 组件：新闻卡片 ==================== */
.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--gap);
}

.news-card {
  background: #fff;
  padding: var(--gap);
  border-radius: var(--radius-card);
  display: flex;
  flex-direction: column;
  height: 100%;
}

.news-card time {
  font-size: 0.8rem;
  color: #666;
  margin-bottom: 8px;
}

.news-card h4 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--color-text);
}

.news-card p {
  font-size: 0.95rem;
  color: #444;
  flex-grow: 1;
}

/* ==================== SVG 动效系统 ==================== */
.svg-container {
  width: 100%;
  height: auto;
  max-width: 100%;
}

svg {
  width: 100%;
  height: auto;
  display: block;
}

/* 网格节点依次点亮 */
@keyframes grid-pulse {
  0%, 100% {
    stroke-dashoffset: 1;
    opacity: 0.25;
  }
  50% {
    stroke-dashoffset: 0;
    opacity: 1;
  }
}

.grid-node {
  pathLength: 1;
  stroke-dasharray: 1;
  stroke-dashoffset: 0;
  animation: grid-pulse 6s ease-in-out infinite;
}

.grid-node.delay-1 { animation-delay: 0.0s; }
.grid-node.delay-2 { animation-delay: 0.4s; }
.grid-node.delay-3 { animation-delay: 0.8s; }
.grid-node.delay-4 { animation-delay: 1.2s; }
.grid-node.delay-5 { animation-delay: 1.6s; }
.grid-node.delay-6 { animation-delay: 2.0s; }
.grid-node.delay-7 { animation-delay: 2.4s; }
.grid-node.delay-8 { animation-delay: 2.8s; }

/* 气泡浮现与漂浮 */
@keyframes float-bubble {
  0%, 100% { transform: translateY(0); opacity: 0.8; }
  50% { transform: translateY(-6px); opacity: 1; }
}

.bubble-anim {
  animation: float-bubble 5s ease-in-out infinite;
}

/* 呼吸输入点 */
@keyframes breathe-dot {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 1; }
}

.dot-breathe {
  animation: breathe-dot 2.5s ease-in-out infinite;
}

/* 通知滑入 */
@keyframes slide-in-card {
  0%, 100% { transform: translateX(0); opacity: 1; }
  10% { transform: translateX(-10px); opacity: 0; }
  20% { transform: translateX(0); opacity: 1; }
}

.notify-slide {
  animation: slide-in-card 8s ease-in-out infinite;
}

/* 连接线流动 */
@keyframes flow-line {
  to { stroke-dashoffset: -20; }
}

.flow-path {
  stroke-dasharray: 8 12;
  animation: flow-line 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;
    scroll-behavior: auto !important;
  }
  .grid-node, .bubble-anim, .dot-breathe, .notify-slide, .flow-path {
    animation: none !important;
    opacity: 1 !important;
    stroke-dashoffset: 0 !important;
    transform: none !important;
  }
}

/* ==================== 页头与页脚 ==================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(246, 243, 247, 0.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(0,0,0,0.08);
  padding: 12px 0;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-links {
  display: flex;
  gap: 24px;
  align-items: center;
}

.nav-links a {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--color-text);
  padding: 8px 0;
  position: relative;
}

.nav-links a:hover,
.nav-links a[aria-current="page"] {
  color: var(--color-brand);
}

.nav-links a[aria-current="page"]::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--color-brand);
}

.site-footer {
  background: var(--color-dark);
  color: var(--color-paper);
  padding: 48px 0 32px;
  margin-top: auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 32px;
}

.footer-col h5 {
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  margin-bottom: 16px;
  color: var(--color-accent);
}

.footer-col ul li {
  margin-bottom: 10px;
}

.footer-col a {
  font-size: 0.9rem;
  color: rgba(246, 243, 247, 0.8);
  transition: color 0.2s;
}

.footer-col a:hover {
  color: var(--color-paper);
}

.copyright {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,0.1);
  font-size: 0.85rem;
  color: rgba(246, 243, 247, 0.6);
  text-align: center;
}

/* ==================== 响应式微调 ==================== */
@media (max-width: 768px) {
  .nav-links { display: none; }
  .steps-row { flex-direction: column; }
  h1 { line-height: 1.15; }
}
