/* =========================================
   SafeW 全站共享样式 (style.css)
   设计系统：蓝紫深底 + 翠绿强调 · 纯白纸面
   ========================================= */

:root {
  /* 色板 */
  --color-dark: #140E25;
  --color-paper: #FCFCFD;
  --color-text: #191523;
  --color-brand: #5214EB;
  --color-accent: #6EEDD2;
  
  /* 结构 Token */
  --radius-card: 8px;
  --radius-btn: 6px;
  --card-border: 0;
  --card-shadow: none;
  --section-y: clamp(3.5rem, 7vw, 6rem);
  --gap: clamp(1rem, 2vw, 1.75rem);
  --content-max: 1120px;
  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans SC", sans-serif;
  --line-height-body: 1.65;
}

/* 基础重置与排版 */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  background-color: var(--color-paper);
  color: var(--color-text);
  line-height: var(--line-height-body);
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
ul, ol { padding-left: 0; list-style: none; }

/* 容器 */
.container {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 var(--gap);
}

/* 页面区块通用 */
.section {
  padding-top: var(--section-y);
  padding-bottom: var(--section-y);
}
.section--dark {
  background-color: var(--color-dark);
  color: var(--color-paper);
}
.section__eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}
.section--light .section__eyebrow { color: var(--color-brand); }
.section--dark .section__eyebrow { color: var(--color-accent); }

.section__title {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-weight: 500;
  line-height: 1.15;
  margin: 0 0 1.5rem 0;
  text-wrap: balance;
}
.section--light .section__title { color: var(--color-text); }
.section--dark .section__title { color: var(--color-paper); }
.section__title .hl {
  color: var(--color-brand);
}
.section--dark .section__title .hl {
  color: var(--color-accent);
}

.section__lead {
  font-size: clamp(1rem, 1.2vw, 1.125rem);
  max-width: 65ch;
  margin-bottom: 2rem;
  opacity: 0.9;
}
.section--dark .section__lead { color: rgba(252, 252, 253, 0.85); }

/* 按钮 */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0 1.25rem;
  height: 52px;
  font-size: 1rem;
  font-weight: 600;
  border-radius: var(--radius-btn);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}
.btn:hover { transform: translateY(-2px); }
.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 { background-color: #5bdcc0; }
.btn--secondary {
  background: transparent;
  border: 1px solid var(--color-text);
  color: var(--color-text);
}
.section--dark .btn--secondary {
  border-color: var(--color-paper);
  color: var(--color-paper);
}

/* 卡片 */
.card {
  background-color: #F5F5F7;
  border-radius: var(--radius-card);
  padding: var(--gap);
  border: var(--card-border);
  box-shadow: var(--card-shadow);
}
.section--dark .card {
  background-color: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* 表格 */
.table-wrapper { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table-compare {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}
.table-compare th, .table-compare td {
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 1px solid rgba(0,0,0,0.08);
}
.table-compare th { font-weight: 600; }
.section--dark .table-compare th,
.section--dark .table-compare td {
  border-bottom-color: rgba(255,255,255,0.12);
}

/* FAQ */
.faq-list { display: flex; flex-direction: column; gap: 1rem; }
.faq-item summary {
  cursor: pointer;
  font-weight: 600;
  padding: 1rem 1.25rem;
  border-radius: var(--radius-card);
  background-color: #F5F5F7;
  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.25rem;
  font-weight: 400;
  transition: transform 0.2s;
}
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item p {
  margin: 1rem 1.25rem 1.25rem 1.25rem;
  line-height: 1.7;
  opacity: 0.9;
}
.section--dark .faq-item summary { background-color: rgba(255,255,255,0.08); color: var(--color-paper); }

/* 页头页脚 */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: rgba(252, 252, 253, 0.9);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(0,0,0,0.06);
  padding: 1rem 0;
}
.section--dark ~ .site-header { background-color: rgba(20, 14, 37, 0.9); border-bottom-color: rgba(255,255,255,0.08); }
.header-inner { display: flex; justify-content: space-between; align-items: center; }
.brand img { height: 32px; width: auto; object-fit: contain; }
.nav-list { display: flex; gap: 1.5rem; align-items: center; }
.nav-link { font-size: 0.95rem; font-weight: 500; opacity: 0.8; transition: opacity 0.2s; }
.nav-link:hover, .nav-link[aria-current="page"] { opacity: 1; color: var(--color-brand); }
.section--dark .nav-link { color: var(--color-paper); }
.section--dark .nav-link:hover { color: var(--color-accent); }

.site-footer {
  padding: 3rem 0;
  border-top: 1px solid rgba(0,0,0,0.08);
  font-size: 0.85rem;
  opacity: 0.8;
}
.section--dark .site-footer { border-top-color: rgba(255,255,255,0.08); }
.footer-inner { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 1.5rem; }
.footer-links { display: flex; gap: 1rem; }

/* SVG 动效 Keyframes */
@keyframes float-slow {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}
@keyframes float-medium {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}
@keyframes draw-line {
  to { stroke-dashoffset: 0; }
}
@keyframes fade-in-up {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

.svg-float { animation: float-slow 6s ease-in-out infinite; }
.svg-float-alt { animation: float-medium 5s ease-in-out infinite; animation-delay: 1s; }
.svg-draw { pathLength: 1; stroke-dasharray: 1; stroke-dashoffset: 0; animation: draw-line 2.5s ease forwards; }
.svg-fade-in { opacity: 0; animation: fade-in-up 1.2s ease forwards; animation-delay: 0.4s; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    animation: none !important;
  }
  .svg-draw { stroke-dashoffset: 0; }
}

/* 响应式调整 */
@media (max-width: 768px) {
  .header-inner { flex-direction: column; gap: 1rem; }
  .nav-list { flex-wrap: wrap; justify-content: center; }
  .two-col { flex-direction: column; }
}
