/* =========================================
   SafeW 全局样式与 Token 定义
   ========================================= */
:root {
  /* 色板 */
  --bg-dark: #240F29;
  --bg-paper: #F6F3F7;
  --text-body: #201523;
  --brand-color: #A711CF;
  --accent-color: #ED6E73;
  --text-on-dark: #F6F3F7;

  /* 设计 Token */
  --radius-card: 0;
  --radius-btn: 0;
  --section-y: clamp(2.5rem, 5vw, 4rem);
  --gap: clamp(0.75rem, 1.5vw, 1.25rem);
  --content-max: 960px;
  
  /* 辅助变量 */
  --border-subtle: rgba(32, 21, 35, 0.12);
  --shadow-card: none;
  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

/* =========================================
   基础排版与重置
   ========================================= */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-paper);
  color: var(--text-body);
  line-height: 1.55;
  font-size: 16px;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, svg {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

ul, ol {
  list-style: none;
}

/* =========================================
   布局容器
   ========================================= */
.container {
  width: 100%;
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 var(--gap);
  overflow-x: hidden;
}

/* =========================================
   页头与页脚
   ========================================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: rgba(246, 243, 247, 0.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border-subtle);
  height: 64px;
  display: flex;
  align-items: center;
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: -0.01em;
}

.brand img {
  height: 32px;
  width: auto;
}

.nav-links {
  display: flex;
  gap: 24px;
  align-items: center;
}

.nav-links a {
  font-size: 0.95rem;
  font-weight: 500;
  transition: color 0.2s ease;
}

.nav-links a:hover,
.nav-links a[aria-current="page"] {
  color: var(--brand-color);
}

.nav-links a[aria-current="page"] {
  font-weight: 700;
}

.btn-nav {
  padding: 8px 16px;
  font-size: 0.9rem;
  font-weight: 600;
  border: 1px solid var(--text-body);
  background: transparent;
  color: var(--text-body);
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-nav:hover {
  background: var(--text-body);
  color: var(--bg-paper);
}

.site-footer {
  background-color: var(--bg-dark);
  color: var(--text-on-dark);
  padding: 48px 0;
  margin-top: var(--section-y);
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 32px;
}

.footer-col h4 {
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--accent-color);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.footer-col ul li {
  margin-bottom: 8px;
}

.footer-col a {
  font-size: 0.9rem;
  opacity: 0.8;
  transition: opacity 0.2s ease;
}

.footer-col a:hover {
  opacity: 1;
  color: var(--accent-color);
}

.footer-bottom {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid rgba(246, 243, 247, 0.1);
  text-align: center;
  font-size: 0.85rem;
  opacity: 0.6;
}

/* =========================================
   通用组件
   ========================================= */
.section-block {
  padding: var(--section-y) 0;
}

.section-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brand-color);
  margin-bottom: 12px;
}

.section-label::before {
  content: "";
  display: block;
  width: 16px;
  height: 2px;
  background-color: var(--brand-color);
}

.section-title {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: 0;
  margin-bottom: 24px;
  color: var(--text-body);
}

.section-title .hl {
  color: var(--brand-color);
}

.text-body {
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text-body);
  max-width: 38em;
}

.text-body p {
  margin-bottom: 16px;
}

.text-body strong {
  font-weight: 700;
  color: var(--text-body);
}

/* 按钮 */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background-color: var(--accent-color);
  color: var(--bg-dark);
  font-weight: 700;
  font-size: 1rem;
  padding: 14px 28px;
  border: none;
  cursor: pointer;
  transition: transform 0.2s ease, filter 0.2s ease;
}

.btn-primary:hover {
  transform: translateY(-2px);
  filter: brightness(1.05);
}

.btn-primary:focus-visible {
  outline: 2px solid var(--text-body);
  outline-offset: 4px;
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: transparent;
  color: var(--text-body);
  border: 1px solid var(--text-body);
  font-weight: 600;
  font-size: 1rem;
  padding: 14px 28px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-secondary:hover {
  background: var(--text-body);
  color: var(--bg-paper);
}

/* 图标 */
.icon-svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
  flex-shrink: 0;
}

/* 表格 */
.data-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 24px;
  font-size: 0.95rem;
}

.data-table th,
.data-table td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border-subtle);
}

.data-table th {
  font-weight: 700;
  background-color: rgba(167, 17, 207, 0.05);
  color: var(--text-body);
}

.data-table tr:last-child td {
  border-bottom: none;
}

/* FAQ */
.faq-item {
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 8px;
}

.faq-item summary {
  padding: 16px 0;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: color 0.2s ease;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "+";
  font-size: 1.2rem;
  font-weight: 400;
  color: var(--brand-color);
}

.faq-item[open] summary::after {
  content: "-";
}

.faq-item summary:hover {
  color: var(--brand-color);
}

.faq-item .faq-answer {
  padding-bottom: 16px;
  color: var(--text-body);
  line-height: 1.6;
}

/* 卡片网格 */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
  margin-top: 24px;
}

.card {
  background: var(--bg-paper);
  border: 1px solid var(--border-subtle);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-body);
}

.card p {
  font-size: 0.9rem;
  color: var(--text-body);
  line-height: 1.5;
}

.card time {
  font-size: 0.8rem;
  color: var(--brand-color);
  font-weight: 600;
}

/* =========================================
   SVG 动效
   ========================================= */
.svg-panel {
  width: 100%;
  height: auto;
  max-width: 100%;
}

svg .draw-line {
  pathLength: 1;
  stroke-dasharray: 1;
  stroke-dashoffset: 0;
}

@keyframes draw-loop {
  0%, 100% { stroke-dashoffset: 1; }
  40%, 60% { stroke-dashoffset: 0; }
}

@keyframes breathe {
  0%, 100% { opacity: 0.8; }
  50% { opacity: 1; }
}

.animate-draw {
  animation: draw-loop 8s ease-in-out infinite;
}

.animate-breathe {
  animation: breathe 4s ease-in-out 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;
  }
  .animate-draw, .animate-breathe {
    animation: none;
    opacity: 1;
  }
}

/* =========================================
   响应式适配
   ========================================= */
@media (max-width: 768px) {
  .nav-links {
    display: none;
  }
  
  .grid-2-col {
    grid-template-columns: 1fr !important;
  }
  
  .step-list {
    flex-direction: column;
  }
}
