/* ==================== 设计变量与基础重置 ==================== */
:root {
  /* 色板 */
  --color-dark: #121531;
  --color-paper: #E8E9EA;
  --color-text: #151723;
  --color-brand: #142CEB;
  --color-accent: #ED7D6E;

  /* 组件参数 */
  --radius-card: 24px;
  --radius-btn: 999px;
  --card-border: 2px solid;
  --card-shadow: 4px 4px 0;
  --section-y: clamp(5rem, 10vw, 9rem);
  --gap: clamp(1.5rem, 3vw, 2.5rem);
  --content-max: 1280px;
  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans SC", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.75;
  color: var(--color-text);
  background: var(--color-paper);
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }

/* ==================== 模式与取色系统 ==================== */
.mode-paper {
  --bg: var(--color-paper);
  --fg: var(--color-text);
  --link: var(--color-brand);
  --accent: var(--color-brand);
}
.mode-dark {
  --bg: var(--color-dark);
  --fg: #fff;
  --link: var(--color-accent);
  --accent: var(--color-accent);
}
.card-light {
  --bg: #ffffff;
  --fg: var(--color-text);
  --link: var(--color-brand);
  --accent: var(--color-brand);
  border: var(--card-border) var(--fg);
  box-shadow: var(--card-shadow) var(--fg);
  background: var(--bg);
  color: var(--fg);
}

/* ==================== 布局与排版 ==================== */
.container {
  max-width: var(--content-max);
  margin-inline: auto;
  padding-inline: var(--gap);
}
.section {
  padding-block: var(--section-y);
  background: var(--bg);
  color: var(--fg);
}
.section-title {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-weight: 500;
  line-height: 1.25;
  margin-bottom: var(--gap);
  letter-spacing: -0.01em;
}
.section-subtitle {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--link);
  margin-bottom: 0.6rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.section-subtitle::before {
  content: "";
  display: inline-block;
  width: 16px;
  height: 2px;
  background: var(--link);
  border-radius: 2px;
}
p { margin-bottom: 1.2rem; max-width: 38em; }
h3 {
  font-size: clamp(1.2rem, 2vw, 1.5rem);
  font-weight: 500;
  line-height: 1.3;
  margin: 1.5rem 0 0.8rem;
}
.hl { color: var(--accent); }

/* ==================== 按钮 ==================== */
.btn-group { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 1.5rem; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  height: 52px;
  padding: 0 2rem;
  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;
  border: none;
}
.btn:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.btn:hover { transform: translateY(-2px); }
.btn-primary {
  background: var(--color-accent);
  color: var(--color-dark);
}
.btn-secondary {
  background: transparent;
  color: var(--fg);
  border: 2px solid var(--fg);
}
.btn-secondary:hover { background: rgba(128,128,128,0.1); }
.btn svg { width: 20px; height: 20px; stroke: currentColor; stroke-width: 2; fill: none; }

/* ==================== 卡片与网格 ==================== */
.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 {
  padding: 2rem;
  border-radius: var(--radius-card);
  transition: transform 0.2s ease;
}
.card:hover { transform: translateY(-4px); }
.card-header { font-weight: 600; font-size: 1.1rem; margin-bottom: 0.8rem; }

/* ==================== 表格 ==================== */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 1.5rem 0; }
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}
th, td {
  padding: 1rem;
  text-align: left;
  border-bottom: 1px solid rgba(128,128,128,0.2);
}
th { font-weight: 600; color: var(--link); }
td:first-child { font-weight: 500; }

/* ==================== FAQ ==================== */
.faq-item { margin-bottom: 1rem; border-bottom: 1px solid rgba(128,128,128,0.2); }
.faq-item summary {
  padding: 1.2rem 0;
  cursor: pointer;
  font-weight: 500;
  list-style: none;
  position: relative;
  padding-right: 2rem;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  position: absolute;
  right: 0;
  top: 1.2rem;
  font-size: 1.2rem;
  transition: transform 0.2s;
}
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item p { margin-top: 0.8rem; font-size: 0.95rem; line-height: 1.7; }

/* ==================== 页头与页脚 ==================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(232, 233, 234, 0.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(128,128,128,0.15);
  padding: 1rem 0;
}
.mode-dark .site-header { background: rgba(18, 21, 49, 0.95); border-color: rgba(255,255,255,0.1); }
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--content-max);
  margin-inline: auto;
  padding-inline: var(--gap);
}
.brand { display: flex; align-items: center; gap: 0.8rem; font-weight: 700; font-size: 1.2rem; }
.brand img { width: 32px; height: 32px; object-fit: contain; }
nav ul { display: flex; gap: 1.5rem; }
nav a { font-weight: 500; font-size: 0.95rem; opacity: 0.85; transition: opacity 0.2s; }
nav a:hover, nav a[aria-current="page"] { opacity: 1; color: var(--link); }
.site-footer {
  padding: 3rem 0;
  border-top: 1px solid rgba(128,128,128,0.2);
  text-align: center;
  font-size: 0.9rem;
  opacity: 0.85;
}
.footer-links { display: flex; justify-content: center; gap: 1.5rem; margin-bottom: 1rem; }
.footer-links a { color: var(--link); }

/* ==================== SVG 动效系统 ==================== */
.svg-hero-container {
  width: 100%;
  height: auto;
  max-width: 100%;
  overflow: hidden;
}
svg.hero-visual {
  width: 100%;
  height: auto;
  display: block;
}
svg.hero-visual .layer { transform-box: fill-box; transform-origin: center; }

@keyframes float-slow {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}
@keyframes float-medium {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-14px); }
}
@keyframes float-fast {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}
@keyframes draw-path {
  0% { stroke-dashoffset: 1; }
  100% { stroke-dashoffset: 0; }
}
@keyframes breathe {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 1; }
}
@keyframes slide-in {
  0%, 100% { transform: translateX(0); opacity: 0.8; }
  50% { transform: translateX(6px); opacity: 1; }
}

.layer-1 { animation: float-slow 6s ease-in-out infinite; }
.layer-2 { animation: float-medium 5s ease-in-out infinite 0.5s; }
.layer-3 { animation: float-fast 4.5s ease-in-out infinite 1s; }
.draw-line { animation: draw-path 3s ease forwards; animation-delay: 0.5s; }
.breathe-dot { animation: breathe 2.5s ease-in-out infinite; }
.slide-notif { animation: slide-in 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;
  }
  .draw-line { stroke-dashoffset: 0; }
}
