/* === 设计变量 === */
:root {
  --bg-dark: #141838;
  --bg-paper: #F7F5F3;
  --text-body: #151723;
  --brand: #142CEB;
  --accent: #6EAFED;
  --radius-card: 8px;
  --radius-btn: 6px;
  --card-border: 0;
  --card-shadow: none;
  --section-y: clamp(2.5rem, 5vw, 4rem);
  --gap: clamp(0.75rem, 1.5vw, 1.25rem);
  --content-max: 1120px;
}

/* === 基础排版 === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background-color: var(--bg-paper);
  color: var(--text-body);
  line-height: 1.55;
  -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; }

/* === 布局容器 === */
.container {
  width: 100%;
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 var(--gap);
}

/* === 页头 === */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: rgba(247, 245, 243, 0.9);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(21, 23, 35, 0.08);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: -0.01em;
}
.brand img { width: 28px; height: 28px; }
.nav-links { display: flex; gap: 24px; align-items: center; }
.nav-link {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-body);
  transition: color 0.2s;
}
.nav-link:hover, .nav-link[aria-current="page"] { color: var(--brand); }
@media (max-width: 768px) {
  .nav-links { display: none; }
}

/* === 按钮 === */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 48px;
  padding: 0 20px;
  border-radius: var(--radius-btn);
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: transform 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}
.btn-primary {
  background-color: var(--accent);
  color: var(--bg-dark);
}
.btn-primary:hover { transform: translateY(-1px); background-color: #5a9ad4; }
.btn-secondary {
  background-color: transparent;
  border: 1px solid var(--text-body);
  color: var(--text-body);
}
.btn-secondary:hover { transform: translateY(-1px); }
.btn:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

/* === 眉标 === */
.eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 12px;
}
.bg-paper .eyebrow { color: var(--brand); }
.bg-dark .eyebrow { color: var(--accent); }

/* === 标题 === */
h1, h2, h3, h4 { font-weight: 500; line-height: 1.15; letter-spacing: -0.02em; }
h1 { font-size: clamp(2.6rem, 6.4vw, 5rem); margin-bottom: 24px; }
h2 { font-size: clamp(1.6rem, 3vw, 2.4rem); margin-bottom: 32px; }
h3 { font-size: 1.25rem; margin-bottom: 16px; }
p { margin-bottom: 16px; max-width: 38em; }
.text-accent { color: var(--accent); }
.text-brand { color: var(--brand); }

/* === 区块 === */
.section { padding: var(--section-y) 0; }
.bg-dark { background-color: var(--bg-dark); color: var(--bg-paper); }
.bg-paper { background-color: var(--bg-paper); color: var(--text-body); }
.card {
  background: rgba(255, 255, 255, 0.6);
  border-radius: var(--radius-card);
  padding: 24px;
  border: var(--card-border);
  box-shadow: var(--card-shadow);
}
.bg-dark .card { background: rgba(255, 255, 255, 0.05); }

/* === 表格 === */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 400px; }
th, td { padding: 12px 16px; text-align: left; border-bottom: 1px solid rgba(21, 23, 35, 0.1); }
td:first-child { font-weight: 600; }
.bg-dark th, .bg-dark td { border-bottom-color: rgba(247, 245, 243, 0.1); }

/* === FAQ === */
details {
  margin-bottom: 12px;
  border: 1px solid rgba(21, 23, 35, 0.1);
  border-radius: var(--radius-card);
  padding: 16px;
}
details summary { cursor: pointer; font-weight: 600; list-style: none; display: flex; justify-content: space-between; align-items: center; }
details summary::-webkit-details-marker { display: none; }
details summary::after { content: "+"; font-size: 1.2em; }
details[open] summary::after { content: "−"; }
details p { margin-top: 12px; margin-bottom: 0; }

/* === 提示框 === */
.callout {
  border-left: 3px solid var(--brand);
  padding: 16px;
  margin: 24px 0;
  background: rgba(20, 44, 235, 0.05);
  border-radius: 0 var(--radius-card) var(--radius-card) 0;
}
.bg-dark .callout { border-left-color: var(--accent); background: rgba(110, 175, 237, 0.1); }

/* === 页脚 === */
.site-footer { padding: 48px 0; border-top: 1px solid rgba(21, 23, 35, 0.08); text-align: center; font-size: 0.9rem; color: rgba(21, 23, 35, 0.6); }

/* === SVG 动效 Keyframes === */
@keyframes float-layer {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}
@keyframes float-layer-alt {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}
@keyframes bubble-pop {
  0%, 100% { opacity: 0; transform: translateY(10px) scale(0.95); }
  15%, 85% { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes input-breathe {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 1; }
}
@keyframes slide-in-right {
  0%, 100% { transform: translateX(100%); opacity: 0; }
  20%, 80% { transform: translateX(0); opacity: 1; }
}
@keyframes flow-dash {
  to { stroke-dashoffset: -1; }
}

/* === SVG 动效类 === */
.anim-float { animation: float-layer 6s ease-in-out infinite; }
.anim-float-alt { animation: float-layer-alt 7s ease-in-out infinite; }
.anim-bubble { animation: bubble-pop 5s ease-in-out infinite; }
.anim-bubble-delay { animation: bubble-pop 5s ease-in-out infinite 1.5s; }
.anim-breathe { animation: input-breathe 2s ease-in-out infinite; }
.anim-slide { animation: slide-in-right 6s ease-in-out infinite; }
.anim-flow { animation: flow-dash 2s linear infinite; }

/* === 偏好减少动态效果 === */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    animation-name: none;
  }
}
