/* =========================================
   SafeW 全站共享样式
   设计变量 · 基础排版 · 组件 · SVG 动效
   ========================================= */

/* --- 设计 Token --- */
:root {
  /* 色板 */
  --color-dark: #19102D;
  --color-paper: #F4F3F7;
  --color-body: #191523;
  --color-brand: #5214EB;
  --color-accent: #D66EED;
  
  /* 结构间距 */
  --section-y: clamp(5rem, 10vw, 9rem);
  --gap: clamp(1.5rem, 3vw, 2.5rem);
  --content-max: 960px;
  
  /* 几何与边界 */
  --radius-card: 0;
  --radius-btn: 0;
  --card-border: 0;
  --card-shadow: none;
  
  /* 字体比例 */
  --font-display: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-body: var(--font-display);
  --text-base: 16px;
  --line-height-body: 1.75;
}

/* --- 基础重置 --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: var(--line-height-body);
  color: var(--color-body);
  background-color: var(--color-paper);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button, input { font: inherit; color: inherit; }

/* --- 容器 --- */
.container {
  width: 100%;
  max-width: var(--content-max);
  margin-inline: auto;
  padding-inline: var(--gap);
}

/* --- 页头 --- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(244, 243, 247, 0.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(25, 21, 35, 0.08);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.brand img { width: 32px; height: 32px; object-fit: contain; }
.nav-list { display: flex; gap: 24px; }
.nav-link {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--color-body);
  transition: color 0.2s;
}
.nav-link:hover, .nav-link[aria-current="page"] { color: var(--color-brand); }
.mobile-toggle { display: none; background: none; border: none; cursor: pointer; }

/* --- 按钮 --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 48px;
  padding-inline: 24px;
  font-size: 0.95rem;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.2s, background-color 0.2s, border-color 0.2s;
}
.btn-primary {
  background-color: var(--color-accent);
  color: var(--color-dark);
}
.btn-primary:hover { background-color: #c45de0; transform: translateY(-1px); }
.btn-secondary {
  background: transparent;
  border-color: var(--color-body);
  color: var(--color-body);
}
.btn-secondary:hover { border-color: var(--color-brand); color: var(--color-brand); }
.btn:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; }

/* --- 眉标与标题 --- */
.section-label {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 12px;
}
.label-light { color: var(--color-brand); }
.label-dark { color: var(--color-accent); }

h1, h2, h3 { font-weight: 600; line-height: 1.25; letter-spacing: 0; color: var(--color-body); }
h1 { font-size: clamp(2rem, 4.6vw, 3.4rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); margin-bottom: calc(var(--gap) * 0.8); }
h3 { font-size: 1.25rem; margin-bottom: 12px; }
.text-accent { color: var(--color-accent); }
.text-brand { color: var(--color-brand); }

/* --- 区块布局 --- */
.section { padding-block: var(--section-y); }
.section-dark { background-color: var(--color-dark); color: var(--color-paper); }
.section-dark h2, .section-dark h3, .section-dark p { color: var(--color-paper); }
.section-dark .label-dark { color: var(--color-accent); }
.section-dark .btn-primary { color: var(--color-dark); }

.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: var(--gap); }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: var(--gap); }

/* --- 卡片（无阴影无描边，靠底色区分） --- */
.card {
  background: rgba(255, 255, 255, 0.6);
  padding: 24px;
  border: var(--card-border);
  box-shadow: var(--card-shadow);
}
.card-dark { background: rgba(255, 255, 255, 0.05); }
.card-title { font-weight: 600; margin-bottom: 8px; font-size: 1.1rem; }

/* --- 步骤条 --- */
.steps-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--gap); }
.step-item { position: relative; padding-top: 24px; border-top: 1px solid rgba(25, 21, 35, 0.15); }
.step-badge {
  position: absolute; top: -12px; left: 0;
  background: var(--color-accent); color: var(--color-dark);
  width: 24px; height: 24px; display: grid; place-items: center;
  font-size: 0.8rem; font-weight: 700;
}
.step-title { font-weight: 600; margin-bottom: 6px; }
.step-desc { font-size: 0.9rem; opacity: 0.85; }

/* --- 功能列表（两栏） --- */
.feature-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: 32px; }
.feature-item h3 { margin-bottom: 8px; }
.feature-path { font-size: 0.85rem; color: var(--color-brand); margin-bottom: 8px; font-weight: 500; }
.feature-note { font-size: 0.9rem; opacity: 0.8; }

/* --- 提示框 --- */
.callout {
  border-left: 3px solid var(--color-brand);
  padding: 16px 20px;
  margin-top: 16px;
  background: rgba(82, 20, 235, 0.04);
}
.callout-dark { border-color: var(--color-accent); background: rgba(214, 110, 237, 0.08); }

/* --- 表格 --- */
.data-table { width: 100%; border-collapse: collapse; margin-top: 16px; }
.data-table th, .data-table td { text-align: left; padding: 12px 16px; border-bottom: 1px solid rgba(25, 21, 35, 0.1); }
.data-table th { font-weight: 600; width: 40%; }
.table-dark th, .table-dark td { border-color: rgba(244, 243, 247, 0.1); }

/* --- FAQ --- */
.faq-item { border-bottom: 1px solid rgba(25, 21, 35, 0.1); }
.faq-item summary {
  padding: 16px 0;
  cursor: pointer;
  font-weight: 600;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; font-size: 1.2rem; transition: transform 0.2s; }
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item p { padding-bottom: 16px; font-size: 0.95rem; opacity: 0.9; }

/* --- 场景卡片 --- */
.scene-card { display: flex; flex-direction: column; gap: 16px; }
.scene-tag { font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; padding: 4px 8px; width: fit-content; }
.tag-problem { background: rgba(214, 110, 237, 0.15); color: var(--color-accent); }
.tag-action { background: rgba(82, 20, 235, 0.1); color: var(--color-brand); }
.tag-result { background: rgba(25, 21, 35, 0.08); color: var(--color-body); }

/* --- 新闻卡片 --- */
.news-card { display: flex; flex-direction: column; gap: 12px; }
.news-date { font-size: 0.8rem; font-weight: 500; opacity: 0.7; }
.news-excerpt { font-size: 0.95rem; line-height: 1.6; }

/* --- SVG 动效 --- */
.svg-panel { width: 100%; max-width: 600px; margin: 0 auto; }
.anim-drift { animation: drift 8s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.anim-pulse { animation: pulse-ring 4s ease-in-out infinite; }
.anim-glow { animation: glow 6s ease-in-out infinite alternate; }
@keyframes drift {
  0%, 100% { transform: translateX(0) rotate(0deg); }
  50% { transform: translateX(6px) rotate(1.5deg); }
}
@keyframes pulse-ring {
  0%, 100% { stroke-dashoffset: 1; }
  50% { stroke-dashoffset: 0.4; }
}
@keyframes glow {
  0% { opacity: 0.4; }
  100% { opacity: 0.8; }
}

/* --- 响应式 --- */
@media (max-width: 768px) {
  .nav-list { display: none; }
  .mobile-toggle { display: block; }
  .steps-grid { grid-template-columns: 1fr; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .header-inner { height: 56px; }
}
@media (prefers-reduced-motion: reduce) {
  .anim-drift, .anim-pulse, .anim-glow { animation: none; }
  html { scroll-behavior: auto; }
}
