/* ============================================
   SafeW — 全站共享样式
   设计变量 · 排版 · 组件 · SVG 动效
   ============================================ */

/* ── 设计变量 ── */
:root {
  /* 色板 */
  --color-dark: #17203F;
  --color-paper: #FCFCFD;
  --color-text: #151823;
  --color-brand: #1441EB;
  --color-accent: #6EEDBD;

  /* 圆角 */
  --radius-card: 8px;
  --radius-btn: 6px;

  /* 卡片边界 */
  --card-border: 1px solid rgba(21, 24, 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: 1280px;

  /* 标题处理 */
  --title-weight: 500;
  --title-line-height: 1.15;
}

/* ── 重置与基础 ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Noto Sans CJK SC", "Source Han Sans SC", "Microsoft YaHei", sans-serif;
  font-size: 16px;
  line-height: var(--line-height);
  color: var(--color-text);
  background-color: var(--color-paper);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; height: auto; }

a {
  color: var(--color-brand);
  text-decoration: none;
  transition: opacity 0.2s ease;
}
a:hover { opacity: 0.8; }
a:focus-visible {
  outline: 2px solid var(--color-brand);
  outline-offset: 2px;
  border-radius: 2px;
}

/* ── 容器 ── */
.container {
  max-width: var(--content-max);
  margin-inline: auto;
  padding-inline: var(--gap);
}

/* ── 眉标 ── */
.section-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-brand);
  margin-bottom: 0.75rem;
}
.section-label::before {
  content: "";
  display: inline-block;
  width: 16px;
  height: 2px;
  background-color: var(--color-brand);
  border-radius: 1px;
}

/* 深色面上的眉标 */
.dark-section .section-label {
  color: var(--color-accent);
}
.dark-section .section-label::before {
  background-color: var(--color-accent);
}

/* ── 标题 ── */
h1, h2, h3, h4 {
  font-weight: var(--title-weight);
  line-height: var(--title-line-height);
  color: var(--color-text);
}

.hero-dark h1,
.hero-dark h2,
.hero-dark h3,
.dark-section h1,
.dark-section h2,
.dark-section h3 {
  color: var(--color-paper);
}

h1 {
  font-size: clamp(2.6rem, 6.4vw, 5rem);
  letter-spacing: -0.02em;
}

h2 {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
}

h3 {
  font-size: clamp(1.2rem, 2vw, 1.5rem);
}

p {
  max-width: 38em;
}

/* ── 高亮词 ── */
.hl {
  color: var(--color-brand);
}
.hero-dark .hl,
.dark-section .hl {
  color: var(--color-accent);
}

/* ── 按钮 ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 52px;
  padding: 0 24px;
  font-size: 1rem;
  font-weight: 600;
  border-radius: var(--radius-btn);
  border: none;
  cursor: pointer;
  text-align: center;
  white-space: nowrap;
  transition: transform 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}
.btn:focus-visible {
  outline: 3px solid var(--color-accent);
  outline-offset: 2px;
}

/* 主按钮（强调色底，深色字） */
.btn-primary {
  background-color: var(--color-accent);
  color: var(--color-dark);
}
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(110, 237, 189, 0.3);
}

/* 次按钮（描边） */
.btn-outline {
  background: transparent;
  border: 1.5px solid var(--color-text);
  color: var(--color-text);
}
.btn-outline:hover {
  transform: translateY(-1px);
  background-color: rgba(21, 24, 35, 0.04);
}
.dark-section .btn-outline {
  border-color: var(--color-paper);
  color: var(--color-paper);
}
.dark-section .btn-outline:hover {
  background-color: rgba(252, 252, 253, 0.08);
}

/* ── 图标 SVG ── */
.icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}
.icon-lg {
  width: 28px;
  height: 28px;
}

/* ── 卡片 ── */
.card {
  background: var(--color-paper);
  border: var(--card-border);
  border-radius: var(--radius-card);
  box-shadow: var(--card-shadow);
  padding: 24px;
}

/* ── 表格 ── */
.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}
th, td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid rgba(21, 24, 35, 0.08);
}
th {
  font-weight: 600;
  color: var(--color-text);
}
td {
  color: var(--color-text);
}
tr:last-child th, tr:last-child td {
  border-bottom: none;
}

/* ── FAQ (details/summary) ── */
.faq-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--gap);
}
.faq-list details {
  border: var(--card-border);
  border-radius: var(--radius-card);
  background: var(--color-paper);
  overflow: hidden;
}
.faq-list summary {
  padding: 16px 20px;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  transition: background-color 0.2s ease;
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after {
  content: "+";
  font-size: 1.2rem;
  font-weight: 400;
  color: var(--color-brand);
  flex-shrink: 0;
  transition: transform 0.2s ease;
}
.faq-list details[open] summary::after {
  transform: rotate(45deg);
}
.faq-list summary:hover {
  background-color: rgba(21, 24, 35, 0.02);
}
.faq-list details > p {
  padding: 0 20px 16px;
  color: var(--color-text);
  line-height: var(--line-height);
}

/* ── 提示框 ── */
.callout {
  border-left: 3px solid var(--color-brand);
  background: rgba(20, 65, 235, 0.04);
  border-radius: 0 var(--radius-card) var(--radius-card) 0;
  padding: 16px 20px;
  margin: 1.5rem 0;
  font-size: 0.95rem;
}
.dark-section .callout {
  border-left-color: var(--color-accent);
  background: rgba(110, 237, 189, 0.06);
}

/* ── 编号徽标 ── */
.step-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  min-width: 36px;
  background-color: var(--color-accent);
  color: var(--color-dark);
  font-size: 0.9rem;
  font-weight: 700;
  border-radius: 6px;
}

/* ── 特性胶囊 ── */
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 1.5rem;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 500;
  background: rgba(20, 65, 235, 0.06);
  color: var(--color-text);
  border: 1px solid rgba(20, 65, 235, 0.12);
}
.dark-section .chip {
  background: rgba(110, 237, 189, 0.08);
  color: var(--color-paper);
  border-color: rgba(110, 237, 189, 0.15);
}

/* ── 流程条 ── */
.flow-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0;
  margin: 1.5rem 0;
}
.flow-node {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  background: rgba(20, 65, 235, 0.04);
  border-radius: var(--radius-btn);
  font-size: 0.9rem;
  font-weight: 500;
}
.flow-arrow {
  display: flex;
  align-items: center;
  padding: 0 4px;
  color: var(--color-brand);
}
.dark-section .flow-node {
  background: rgba(110, 237, 189, 0.06);
}
.dark-section .flow-arrow {
  color: var(--color-accent);
}

/* ── 新闻卡片网格 ── */
.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--gap);
}
.news-card {
  border: var(--card-border);
  border-radius: var(--radius-card);
  padding: 24px;
  background: var(--color-paper);
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: transform 0.2s ease;
}
.news-card:hover {
  transform: translateY(-2px);
}
.news-card time {
  font-size: 0.8rem;
  color: var(--color-brand);
  font-weight: 600;
}
.news-card h4 {
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.4;
}
.news-card p {
  font-size: 0.9rem;
  line-height: var(--line-height);
  color: var(--color-text);
}

/* ── 页头 ── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(252, 252, 253, 0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(21, 24, 35, 0.06);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--color-text);
}
.brand img {
  height: 32px;
  width: auto;
}
.nav {
  display: flex;
  align-items: center;
  gap: 24px;
  list-style: none;
}
.nav a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--color-text);
  padding: 4px 0;
  position: relative;
}
.nav a:hover { opacity: 0.7; }
.nav a[aria-current="page"] {
  color: var(--color-brand);
}
.nav a[aria-current="page"]::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--color-brand);
  border-radius: 1px;
}
.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}
.header-btn {
  height: 40px;
  padding: 0 16px;
  font-size: 0.85rem;
}

/* ── 页脚 ── */
.site-footer {
  background: var(--color-dark);
  color: var(--color-paper);
  padding: 48px 0 32px;
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 32px;
  justify-content: space-between;
}
.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--color-paper);
  margin-bottom: 8px;
}
.footer-brand img {
  height: 28px;
  width: auto;
}
.footer-links {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}
.footer-links a {
  color: rgba(252, 252, 253, 0.7);
  font-size: 0.9rem;
}
.footer-links a:hover {
  color: var(--color-accent);
  opacity: 1;
}
.footer-copy {
  width: 100%;
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid rgba(252, 252, 253, 0.08);
  font-size: 0.8rem;
  color: rgba(252, 252, 253, 0.4);
  text-align: center;
}

/* ── 图文交错行 ── */
.split-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--gap);
  align-items: start;
}
.split-row.reverse { direction: rtl; }
.split-row.reverse > * { direction: ltr; }
.visual-panel {
  border-radius: var(--radius-card);
  padding: 32px;
  aspect-ratio: 4 / 3;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.panel-dark {
  background: var(--color-dark);
}
.panel-brand {
  background: var(--color-brand);
}
.text-col {
  display: flex;
  flex-direction: column;
  gap: var(--gap);
}

/* ── 步骤时间线 ── */
.timeline {
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.timeline-step {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}
.timeline-step p {
  margin-top: 4px;
}

/* ── 功能折叠面板 ── */
.feature-tabs {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.feature-tabs details {
  border: var(--card-border);
  border-radius: var(--radius-card);
  background: var(--color-paper);
  overflow: hidden;
}
.feature-tabs summary {
  padding: 16px 20px;
  font-weight: 600;
  font-size: 1.05rem;
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.feature-tabs summary::-webkit-details-marker { display: none; }
.feature-tabs summary::after {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--color-brand);
  border-bottom: 2px solid var(--color-brand);
  transform: rotate(45deg);
  transition: transform 0.2s ease;
  flex-shrink: 0;
}
.feature-tabs details[open] summary::after {
  transform: rotate(-45deg);
}
.feature-tabs summary:hover {
  background-color: rgba(21, 24, 35, 0.02);
}
.feature-tabs .feature-body {
  padding: 0 20px 20px;
  color: var(--color-text);
  line-height: var(--line-height);
}
.feature-tabs .feature-body ul {
  padding-left: 20px;
  margin-top: 8px;
}
.feature-tabs .feature-body li {
  margin-bottom: 6px;
}

/* ── 双列对照 ── */
.compare-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--gap);
}
.compare-item {
  padding: 20px;
  border-radius: var(--radius-card);
  border: var(--card-border);
}
.compare-item h4 {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 8px;
}

/* ── 响应式 ── */
@media (max-width: 900px) {
  .split-row,
  .split-row.reverse {
    grid-template-columns: 1fr;
    direction: ltr;
  }
  .compare-grid {
    grid-template-columns: 1fr;
  }
  .header-inner .nav { display: none; }
  .header-inner .header-actions .btn-outline { display: none; }
  .visual-panel { aspect-ratio: auto; min-height: 240px; }
}

@media (max-width: 600px) {
  .footer-inner { flex-direction: column; }
  .news-grid { grid-template-columns: 1fr; }
  .flow-bar { flex-direction: column; align-items: stretch; }
  .flow-arrow { justify-content: center; padding: 4px 0; }
}

/* ── SVG 动效 ── */
.svg-visual {
  width: 100%;
  height: auto;
}

/* 卡片层叠漂浮 */
@keyframes floatA {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-8px); }
}
@keyframes floatB {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-5px); }
}
@keyframes floatC {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-12px); }
}
@keyframes floatD {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-3px); }
}

.anim-float-a { animation: floatA 6s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.anim-float-b { animation: floatB 8s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.anim-float-c { animation: floatC 7s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.anim-float-d { animation: floatD 5s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }

/* 描边流动 */
@keyframes dashFlow {
  0% { stroke-dashoffset: 1; }
  100% { stroke-dashoffset: 0; }
}
.anim-draw {
  pathLength: 1;
  stroke-dasharray: 1;
  stroke-dashoffset: 0;
  animation: dashFlow 4s ease-in-out infinite alternate;
}

/* 呼吸效果 */
@keyframes breathe {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 1; }
}
.anim-breathe {
  animation: breathe 3s ease-in-out infinite;
}

/* 通知滑入 */
@keyframes slideIn {
  0%, 100% { transform: translateX(0px); opacity: 1; }
  15% { transform: translateX(-6px); opacity: 0.6; }
  30% { transform: translateX(0px); opacity: 1; }
}
.anim-slide-in {
  animation: slideIn 8s ease-in-out infinite;
  transform-box: fill-box;
  transform-origin: center;
}

/* 气泡弹跳 */
@keyframes bubblePop {
  0%, 100% { transform: translateY(0px) scale(1); }
  20% { transform: translateY(-4px) scale(1.03); }
  40% { transform: translateY(0px) scale(1); }
}
.anim-bubble-pop {
  animation: bubblePop 5s ease-in-out infinite;
  transform-box: fill-box;
  transform-origin: center;
}

/* 连接线脉冲 */
@keyframes pulseLine {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 0.8; }
}
.anim-pulse {
  animation: pulseLine 4s ease-in-out infinite;
}

/* 减少动画偏好 */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .anim-float-a,
  .anim-float-b,
  .anim-float-c,
  .anim-float-d,
  .anim-draw,
  .anim-breathe,
  .anim-slide-in,
  .anim-bubble-pop,
  .anim-pulse {
    animation: none !important;
  }
}
