/* =========================================
   SafeW 全站共享样式
   ========================================= */
:root {
  /* 色板 */
  --color-dark: #13102D;
  --color-paper: #F7F5F3;
  --color-body: #171523;
  --color-brand: #2714EB;
  --color-accent: #89ED6E;
  --color-white: #FFFFFF;

  /* 取色变量（默认纸面） */
  --text-primary: var(--color-body);
  --text-secondary: rgba(23, 21, 35, 0.75);
  --link-color: var(--color-brand);
  --icon-color: var(--color-brand);
  --highlight-color: var(--color-brand);

  /* 结构 Token */
  --radius-card: 24px;
  --radius-btn: 999px;
  --card-border: 0;
  --card-shadow: 0 10px 28px -14px rgba(23, 21, 35, 0.3);
  --section-y: clamp(3.5rem, 7vw, 6rem);
  --gap: clamp(1rem, 2vw, 1.75rem);
  --content-max: 1120px;
  --header-h: 64px;

  /* 字体 */
  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans SC", sans-serif;
}

/* 深色面取色覆盖 */
.dark-surface {
  background: var(--color-dark);
  color: var(--color-paper);
  --text-primary: var(--color-paper);
  --text-secondary: rgba(247, 245, 243, 0.8);
  --link-color: var(--color-accent);
  --icon-color: var(--color-accent);
  --highlight-color: var(--color-accent);
}

/* 纸面取色覆盖（用于深色区块内的浅色卡片） */
.paper-surface {
  background: var(--color-paper);
  color: var(--color-body);
  --text-primary: var(--color-body);
  --text-secondary: rgba(23, 21, 35, 0.75);
  --link-color: var(--color-brand);
  --icon-color: var(--color-brand);
  --highlight-color: var(--color-brand);
}

/* 基础重置与排版 */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font-sans);
  color: var(--text-primary);
  background: var(--color-paper);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; height: auto; }
a { color: var(--link-color); text-decoration: none; transition: opacity 0.2s; }
a:hover { opacity: 0.85; }
ul, ol { list-style: none; }

/* 容器 */
.container {
  width: 100%;
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 var(--gap);
}

/* 页头 */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  background: rgba(247, 245, 243, 0.85);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(23, 21, 35, 0.08);
  transition: background 0.3s;
}
.site-header.scrolled { background: rgba(247, 245, 243, 0.95); box-shadow: 0 2px 12px rgba(0,0,0,0.04); }
.header-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text-primary);
}
.brand img { width: 32px; height: 32px; object-fit: contain; }
.nav-links { display: flex; gap: 24px; align-items: center; }
.nav-links a {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-secondary);
  padding: 6px 0;
  position: relative;
}
.nav-links a[aria-current="page"], .nav-links a:hover { color: var(--text-primary); }
.nav-links a[aria-current="page"]::after {
  content: "";
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 2px;
  background: var(--highlight-color);
  border-radius: 2px;
}
.header-btn {
  background: var(--highlight-color);
  color: var(--color-dark);
  padding: 8px 18px;
  border-radius: var(--radius-btn);
  font-weight: 600;
  font-size: 0.9rem;
  border: none;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}
.header-btn:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(0,0,0,0.15); }

/* 区块通用 */
.section {
  padding-top: var(--section-y);
  padding-bottom: var(--section-y);
}
.section-header {
  margin-bottom: calc(var(--gap) * 2);
}
.breadcrumb {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--link-color);
  margin-bottom: 12px;
}
h1 {
  font-size: clamp(2.6rem, 6.4vw, 5rem);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 24px;
  text-wrap: balance;
}
h2 {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-weight: 500;
  line-height: 1.25;
  margin-bottom: 24px;
  text-wrap: balance;
}
h3 {
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.4;
  margin-bottom: 16px;
}
p { margin-bottom: 16px; max-width: 38em; }
.highlight { color: var(--highlight-color); font-weight: 600; }

/* 按钮 */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 52px;
  padding: 0 24px;
  border-radius: var(--radius-btn);
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  border: 2px solid transparent;
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
}
.btn:focus-visible { outline: 3px solid var(--highlight-color); outline-offset: 2px; }
.btn-primary {
  background: var(--highlight-color);
  color: var(--color-dark);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(0,0,0,0.15); }
.btn-secondary {
  background: transparent;
  color: var(--text-primary);
  border-color: currentColor;
}
.btn-secondary:hover { background: rgba(23, 21, 35, 0.05); }
.dark-surface .btn-secondary { color: var(--color-paper); }
.dark-surface .btn-secondary:hover { background: rgba(247, 245, 243, 0.1); }

/* 卡片与面板 */
.card {
  background: var(--color-paper);
  border-radius: var(--radius-card);
  box-shadow: var(--card-shadow);
  padding: 24px;
  border: var(--card-border);
  transition: transform 0.2s, box-shadow 0.2s;
}
.card:hover { transform: translateY(-4px); box-shadow: 0 14px 32px -12px rgba(23, 21, 35, 0.35); }
.panel {
  background: var(--color-dark);
  border-radius: var(--radius-card);
  padding: 24px;
  position: relative;
  overflow: hidden;
}

/* 图文交错布局 */
.split-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--gap) calc(var(--gap) * 2);
  align-items: center;
}
.split-row.reverse .split-content { order: 2; }
.split-row.reverse .split-visual { order: 1; }
@media (max-width: 860px) {
  .split-row, .split-row.reverse { grid-template-columns: 1fr; }
  .split-row.reverse .split-content { order: 1; }
  .split-row.reverse .split-visual { order: 2; }
}

/* 步骤条 */
.steps-bar {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding-bottom: 8px;
  scrollbar-width: thin;
}
.step-item {
  flex: 1 1 200px;
  min-width: 0;
  background: var(--color-paper);
  border-radius: var(--radius-card);
  padding: 20px;
  position: relative;
  border: 1px solid rgba(23, 21, 35, 0.06);
}
.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: var(--highlight-color);
  color: var(--color-dark);
  font-weight: 700;
  border-radius: 8px;
  margin-bottom: 12px;
  font-size: 0.9rem;
}
.step-title { font-weight: 600; margin-bottom: 8px; }
.step-desc { font-size: 0.9rem; color: var(--text-secondary); }

/* 表格 */
.spec-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 16px;
  font-size: 0.95rem;
}
.spec-table th, .spec-table td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid rgba(23, 21, 35, 0.08);
}
.spec-table th { font-weight: 600; width: 40%; color: var(--text-secondary); }
.spec-table td { color: var(--text-primary); }
.dark-surface .spec-table th, .dark-surface .spec-table td { border-color: rgba(247, 245, 243, 0.1); }

/* FAQ */
.faq-list { display: flex; flex-direction: column; gap: 12px; }
details {
  background: var(--color-paper);
  border-radius: 16px;
  padding: 16px 20px;
  border: 1px solid rgba(23, 21, 35, 0.06);
  transition: box-shadow 0.2s;
}
details:hover { box-shadow: 0 4px 12px rgba(0,0,0,0.05); }
summary {
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
summary::-webkit-details-marker { display: none; }
summary::after {
  content: "+";
  font-size: 1.2rem;
  font-weight: 400;
  transition: transform 0.2s;
}
details[open] summary::after { transform: rotate(45deg); }
details p { margin-top: 12px; color: var(--text-secondary); line-height: 1.6; }

/* 新闻卡片 */
.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: var(--gap);
}
.news-card {
  background: var(--color-paper);
  border-radius: var(--radius-card);
  padding: 24px;
  border: 1px solid rgba(23, 21, 35, 0.06);
  display: flex;
  flex-direction: column;
  height: 100%;
}
.news-date {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-bottom: 8px;
}
.news-title { font-weight: 600; margin-bottom: 8px; line-height: 1.4; }
.news-excerpt { font-size: 0.9rem; color: var(--text-secondary); flex-grow: 1; }

/* 场景标签 */
.scene-tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  padding: 4px 10px;
  border-radius: 6px;
  background: rgba(39, 20, 235, 0.1);
  color: var(--link-color);
  margin-bottom: 12px;
}
.dark-surface .scene-tag { background: rgba(137, 237, 110, 0.15); color: var(--color-accent); }

/* 页脚 */
.site-footer {
  background: var(--color-dark);
  color: var(--color-paper);
  padding: 64px 0 32px;
  margin-top: var(--section-y);
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}
.footer-col h4 { font-size: 0.9rem; font-weight: 600; margin-bottom: 16px; color: var(--color-accent); }
.footer-col ul li { margin-bottom: 10px; }
.footer-col a { color: rgba(247, 245, 243, 0.7); font-size: 0.9rem; }
.footer-col a:hover { color: var(--color-paper); }
.footer-bottom {
  border-top: 1px solid rgba(247, 245, 243, 0.1);
  padding-top: 24px;
  text-align: center;
  font-size: 0.85rem;
  color: rgba(247, 245, 243, 0.5);
}

/* SVG 动效基础 */
svg { width: 100%; height: auto; }
svg .draw { pathLength: 1; stroke-dasharray: 1; stroke-dashoffset: 0; }
svg .node { transform-box: fill-box; transform-origin: center; }
@keyframes drawLine {
  0% { stroke-dashoffset: 1; }
  100% { stroke-dashoffset: 0; }
}
@keyframes nodeGlow {
  0%, 100% { fill: rgba(137, 237, 110, 0.2); opacity: 0.4; }
  50% { fill: var(--color-accent); opacity: 1; }
}
@keyframes floatBubble {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}
@keyframes breatheDot {
  0%, 100% { opacity: 0.3; transform: scale(0.9); }
  50% { opacity: 1; transform: scale(1.1); }
}
@keyframes slideInCard {
  0% { transform: translateX(20px); opacity: 0; }
  100% { transform: translateX(0); opacity: 1; }
}
.anim-draw { animation: drawLine 4s ease-in-out infinite alternate; }
.anim-node { animation: nodeGlow 6s ease-in-out infinite; }
.anim-float { animation: floatBubble 5s ease-in-out infinite; }
.anim-breathe { animation: breatheDot 3s ease-in-out infinite; }
.anim-slide { animation: slideInCard 0.8s ease-out forwards; }

/* 响应式与无障碍 */
@media (max-width: 860px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .nav-links { gap: 16px; }
}
@media (max-width: 600px) {
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .header-btn span { display: none; }
}
@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-node, .anim-float, .anim-breathe, .anim-slide {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
}
