/* === 设计变量 === */
:root {
  /* 颜色 */
  --color-dark: #10112D;
  --color-paper: #F5F0E5;
  --color-text: #151523;
  --color-brand: #1416EB;
  --color-accent: #89ED6E;

  /* 圆角 */
  --radius-card: 24px;
  --radius-btn: 999px;

  /* 卡片边界与阴影 */
  --card-border: 1px solid rgba(21, 21, 35, 0.16);
  --card-shadow: none;

  /* 节奏与密度 */
  --section-y: clamp(3.5rem, 7vw, 6rem);
  --gap: clamp(1rem, 2vw, 1.75rem);
  --line-height: 1.65;

  /* 内容最大宽度 */
  --content-max: 960px;

  /* 标题处理 */
  --heading-weight: 600;
  --heading-line-height: 1.25;
  --h1-size: clamp(2rem, 4.6vw, 3.4rem);

  /* 字体 */
  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* === 基础重置与排版 === */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: var(--line-height);
  color: var(--color-text);
  background-color: var(--color-paper);
  -webkit-font-smoothing: antialiased;
}

img, svg { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
ul, ol { padding: 0; margin: 0; list-style: none; }

/* 容器 */
.container {
  width: min(100% - 2rem, var(--content-max));
  margin-inline: auto;
}

/* 眉标 */
.breadcrumb {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  margin-bottom: var(--gap);
  color: var(--color-brand);
}
.section-dark .breadcrumb { color: var(--color-paper); }
.dark-section .breadcrumb { color: var(--color-accent); }

/* 标题 */
h1, h2, h3, h4 {
  font-weight: var(--heading-weight);
  line-height: var(--heading-line-height);
  letter-spacing: 0;
  margin-top: 0;
}
h1 { font-size: var(--h1-size); }
h2 { font-size: clamp(1.6rem, 3vw, 2.4rem); margin-bottom: var(--gap); }
h3 { font-size: 1.25rem; margin-bottom: 0.5rem; }

/* 链接与强调 */
a.link { color: var(--color-brand); text-decoration-thickness: 1px; text-underline-offset: 3px; }
.dark-section a.link { color: var(--color-accent); }
span.hl { color: var(--color-brand); }
.dark-section span.hl { color: var(--color-accent); }

/* 按钮 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  height: 48px;
  padding: 0 24px;
  border-radius: var(--radius-btn);
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: transform 0.2s ease, background-color 0.2s ease, color 0.2s ease;
  border: none;
}
.btn:focus-visible { outline: 2px solid var(--color-brand); outline-offset: 2px; }
.dark-section .btn:focus-visible { outline-color: var(--color-accent); }

.btn-primary {
  background-color: var(--color-accent);
  color: var(--color-dark);
}
.btn-primary:hover { transform: translateY(-1px); filter: brightness(0.95); }

.btn-secondary {
  background: transparent;
  border: 1px solid var(--color-text);
  color: var(--color-text);
}
.dark-section .btn-secondary { border-color: var(--color-paper); color: var(--color-paper); }
.btn-secondary:hover { background-color: rgba(21, 21, 35, 0.05); }
.dark-section .btn-secondary:hover { background-color: rgba(245, 240, 229, 0.1); }

/* 卡片 */
.card {
  background: var(--color-paper);
  border: var(--card-border);
  border-radius: var(--radius-card);
  box-shadow: var(--card-shadow);
  padding: var(--gap);
}
.dark-section .card {
  background: var(--color-dark);
  border-color: rgba(245, 240, 229, 0.16);
  color: var(--color-paper);
}

/* 页头 */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: rgba(245, 240, 229, 0.9);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(21, 21, 35, 0.08);
}
.dark-section .site-header { background-color: rgba(16, 17, 45, 0.9); border-color: rgba(245, 240, 229, 0.1); }
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.logo-img { height: 32px; width: auto; }
.nav-list { display: flex; gap: 1.5rem; align-items: center; }
.nav-link { font-weight: 500; font-size: 0.95rem; position: relative; }
.nav-link[aria-current="page"] { color: var(--color-brand); font-weight: 700; }
.dark-section .nav-link[aria-current="page"] { color: var(--color-accent); }
@media (max-width: 768px) { .nav-list { display: none; } }

/* 区块通用 */
.section { padding-block: var(--section-y); }
.section-dark { background-color: var(--color-dark); color: var(--color-paper); }

/* 核心功能 Tab 模拟 (纯 CSS) */
.tabs-nav { display: flex; gap: 0.5rem; overflow-x: auto; padding-bottom: 0.5rem; margin-bottom: var(--gap); scrollbar-width: none; }
.tabs-nav::-webkit-scrollbar { display: none; }
.tab-radio { display: none; }
.tab-label {
  padding: 0.5rem 1rem;
  border-radius: 99px;
  background: rgba(21, 21, 35, 0.05);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s;
}
.tab-panel { display: none; animation: fadeIn 0.3s ease; }
.tab-radio:checked + .tab-label { background: var(--color-brand); color: #fff; }
.tab-radio:checked ~ .tab-panel { display: block; }
/* 无 JS 回退：默认全部显示 */
@media (hover: none) and (pointer: coarse) {
  .tab-panel { display: block !important; margin-bottom: var(--gap); }
  .tabs-nav { display: none; }
}

/* 使用场景 */
.scene-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: var(--gap); }
.step-list { counter-reset: step; }
.step-item { position: relative; padding-left: 3rem; margin-bottom: 1.5rem; }
.step-item::before {
  counter-increment: step;
  content: counter(step);
  position: absolute; left: 0; top: 0;
  width: 2rem; height: 2rem;
  background: var(--color-accent); color: var(--color-dark);
  border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 0.9rem;
}

/* 表格 */
.spec-table { width: 100%; border-collapse: collapse; margin-top: var(--gap); }
.spec-table th, .spec-table td { text-align: left; padding: 0.75rem 0; border-bottom: 1px solid rgba(21, 21, 35, 0.1); }
.spec-table th { font-weight: 600; width: 40%; }
.dark-section .spec-table th, .dark-section .spec-table td { border-color: rgba(245, 240, 229, 0.1); }

/* FAQ */
.faq details { border-bottom: 1px solid rgba(21, 21, 35, 0.1); padding: 1rem 0; }
.dark-section .faq details { border-color: rgba(245, 240, 229, 0.1); }
.faq summary { font-weight: 600; cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.2rem; font-weight: 400; }
.faq details[open] summary::after { content: "-"; }
.faq p { margin-top: 0.75rem; color: rgba(21, 21, 35, 0.8); }
.dark-section .faq p { color: rgba(245, 240, 229, 0.8); }

/* 页脚 */
.site-footer { border-top: 1px solid rgba(21, 21, 35, 0.1); padding: 3rem 0; margin-top: var(--section-y); }
.dark-section .site-footer { border-color: rgba(245, 240, 229, 0.1); }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 2rem; }
.footer-col h4 { font-size: 0.9rem; font-weight: 700; margin-bottom: 1rem; opacity: 0.7; }
.footer-col a { display: block; margin-bottom: 0.5rem; font-size: 0.9rem; opacity: 0.8; }
.footer-col a:hover { opacity: 1; }

/* SVG 动效 */
.svg-anim { width: 100%; height: auto; }
.draw-path { pathLength: 1; stroke-dasharray: 1; stroke-dashoffset: 0; }
.anim-draw { animation: drawLine 6s ease-in-out infinite alternate; }
.anim-bubble { animation: floatBubble 4s ease-in-out infinite alternate; }
.anim-fade { animation: fadeCycle 5s ease-in-out infinite alternate; }
.anim-pulse { animation: pulseBreath 3s ease-in-out infinite alternate; }
.anim-flow { animation: flowDash 2s linear infinite; stroke-dasharray: 0.2 0.8; }

@keyframes drawLine { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes floatBubble { from { transform: translateY(0); } to { transform: translateY(-4px); } }
@keyframes fadeCycle { from { opacity: 0.4; } to { opacity: 1; } }
@keyframes pulseBreath { from { transform: scale(1); } to { transform: scale(1.03); } }
@keyframes flowDash { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes fadeIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }

/* 减少动态效果 */
@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;
  }
  .draw-path { stroke-dashoffset: 0; }
  .anim-draw, .anim-bubble, .anim-fade, .anim-pulse, .anim-flow { animation: none; }
}

/* 响应式微调 */
@media (max-width: 640px) {
  .grid-2 { grid-template-columns: 1fr; }
  .hero-layout { flex-direction: column; }
  .hero-visual { width: 100%; margin-top: 2rem; }
}
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--gap); }
.hero-layout { display: flex; align-items: center; gap: 2rem; }
.hero-content { flex: 1; }
.hero-visual { flex: 1; }
svg { transform-box: fill-box; transform-origin: center; }
