/* === 设计变量与基础重置 === */
:root {
  /* 色板 */
  --color-dark: #140E25;
  --color-paper: #F7F5F3;
  --color-text: #191523;
  --color-brand: #5214EB;
  --color-accent: #C8ED6E;
  
  /* 结构 Token */
  --radius-card: 8px;
  --radius-btn: 6px;
  --card-border: 0;
  --card-shadow: 0 10px 28px -14px rgba(25, 21, 35, 0.3);
  --section-y: clamp(3.5rem, 7vw, 6rem);
  --gap: clamp(1rem, 2vw, 1.75rem);
  --content-max: 1120px;
  
  /* 排版 */
  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans SC", sans-serif;
  --lh-body: 1.65;
  --lh-tight: 1.25;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: var(--lh-body);
  color: var(--color-text);
  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, select, textarea { font: inherit; color: inherit; }

/* === 容器与布局 === */
.container {
  max-width: var(--content-max);
  margin-inline: auto;
  padding-inline: var(--gap);
}
.section {
  padding-block: var(--section-y);
  position: relative;
}
.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
  gap: var(--gap);
  align-items: center;
}
.flex-col { display: flex; flex-direction: column; }
.text-center { text-align: center; }

/* === 背景面管理 === */
.bg-dark {
  background-color: var(--color-dark);
  color: var(--color-paper);
}
.bg-dark .hl { color: var(--color-accent); }
.bg-dark .subtitle { color: var(--color-accent); }
.bg-dark a:not(.btn) { color: var(--color-accent); }
.bg-paper { background-color: var(--color-paper); color: var(--color-text); }
.bg-paper .hl { color: var(--color-brand); }
.bg-paper .subtitle { color: var(--color-brand); }
.bg-paper a:not(.btn) { color: var(--color-brand); }

/* 卡片内部恢复纸面取色 */
.card-light-on-dark {
  background-color: var(--color-paper);
  color: var(--color-text);
  border-radius: var(--radius-card);
  padding: var(--gap);
  box-shadow: var(--card-shadow);
}
.card-light-on-dark .hl { color: var(--color-brand); }
.card-light-on-dark .subtitle { color: var(--color-brand); }
.card-light-on-dark a:not(.btn) { color: var(--color-brand); }

/* === 排版组件 === */
.subtitle {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
  display: inline-block;
}
h1 {
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
}
h2 {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-weight: 700;
  line-height: var(--lh-tight);
  margin-bottom: 1.5rem;
  letter-spacing: 0.02em;
}
h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  line-height: 1.3;
}
p { margin-bottom: 1rem; max-width: 38em; }
strong { font-weight: 600; }
.hl { font-weight: 700; }

/* === 按钮 === */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  height: 48px;
  padding: 0 1.5rem;
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: var(--radius-btn);
  cursor: pointer;
  transition: transform 0.2s ease, opacity 0.2s ease, box-shadow 0.2s ease;
  border: none;
}
.btn:hover { transform: translateY(-1px); }
.btn:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }
.btn-primary {
  background-color: var(--color-accent);
  color: var(--color-dark);
}
.btn-primary:hover { opacity: 0.9; }
.btn-secondary {
  background: transparent;
  border: 1px solid var(--color-text);
  color: var(--color-text);
}
.bg-dark .btn-secondary {
  border-color: var(--color-paper);
  color: var(--color-paper);
}

/* === 列表与标记 === */
.list-marked li {
  position: relative;
  padding-left: 1.5rem;
  margin-bottom: 0.75rem;
}
.list-marked li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.45em;
  width: 0.5rem;
  height: 0.5rem;
  background-color: currentColor;
  border-radius: 2px;
  opacity: 0.6;
}
.bg-dark .list-marked li::before { background-color: var(--color-accent); }

/* === 表格 === */
.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid rgba(25, 21, 35, 0.1);
  border-radius: var(--radius-card);
}
table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.95rem;
}
th, td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid rgba(25, 21, 35, 0.08);
}
th { font-weight: 600; background: rgba(25, 21, 35, 0.03); }
tr:last-child td { border-bottom: none; }

/* === 新闻卡片 === */
.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
  gap: var(--gap);
}
.news-card {
  background: var(--color-paper);
  border: 1px solid rgba(25, 21, 35, 0.08);
  border-radius: var(--radius-card);
  padding: var(--gap);
  box-shadow: 0 4px 12px rgba(25, 21, 35, 0.05);
  transition: box-shadow 0.2s ease;
}
.news-card:hover { box-shadow: var(--card-shadow); }
.news-date {
  font-size: 0.8rem;
  color: rgba(25, 21, 35, 0.6);
  margin-bottom: 0.5rem;
  display: block;
}
.news-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  line-height: 1.35;
}
.news-excerpt {
  font-size: 0.95rem;
  line-height: 1.6;
  color: rgba(25, 21, 35, 0.8);
}

/* === FAQ === */
.faq-item {
  border-bottom: 1px solid rgba(25, 21, 35, 0.1);
  margin-bottom: 1rem;
}
.faq-item summary {
  padding: 1rem 0;
  cursor: pointer;
  font-weight: 600;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::marker { display: none; }
.faq-item summary::before {
  content: "+";
  font-weight: 400;
  color: currentColor;
  opacity: 0.5;
}
.faq-item[open] summary::before { content: "−"; }
.faq-answer {
  padding-bottom: 1rem;
  line-height: 1.7;
  color: rgba(25, 21, 35, 0.85);
}

/* === 页头页脚 === */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(247, 245, 243, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(25, 21, 35, 0.08);
}
.bg-dark .site-header { background: rgba(20, 14, 37, 0.95); border-bottom-color: rgba(247, 245, 243, 0.1); }
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 800;
  font-size: 1.1rem;
}
.logo img { height: 28px; width: auto; }
.nav-links { display: flex; gap: 1.5rem; align-items: center; }
.nav-links a {
  font-size: 0.9rem;
  font-weight: 500;
  padding: 0.25rem 0;
  position: relative;
}
.nav-links a:hover { opacity: 0.8; }
.nav-links a[aria-current="page"] { color: var(--color-brand); font-weight: 700; }
.bg-dark .nav-links a[aria-current="page"] { color: var(--color-accent); }

.site-footer {
  padding: 3rem 0 2rem;
  border-top: 1px solid rgba(25, 21, 35, 0.08);
  font-size: 0.9rem;
  color: rgba(25, 21, 35, 0.7);
}
.bg-dark .site-footer { border-top-color: rgba(247, 245, 243, 0.1); color: rgba(247, 245, 243, 0.7); }
.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}
.footer-col h4 {
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  letter-spacing: 0.05em;
}
.footer-col ul li { margin-bottom: 0.5rem; }
.footer-col a:hover { text-decoration: underline; }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(25, 21, 35, 0.05);
}
.bg-dark .footer-bottom { border-top-color: rgba(247, 245, 243, 0.1); }

/* === SVG 动效系统 === */
.svg-panel {
  width: 100%;
  height: auto;
  max-width: 100%;
}
.svg-anim-draw {
  pathLength: 1;
  stroke-dasharray: 1;
  stroke-dashoffset: 0;
}
@keyframes dashDraw {
  from { stroke-dashoffset: 1; }
  to { stroke-dashoffset: 0; }
}
.anim-draw {
  animation: dashDraw 4s ease-in-out infinite alternate;
}
@keyframes floatPulse {
  0%, 100% { transform: translateY(0); opacity: 0.85; }
  50% { transform: translateY(-6px); opacity: 1; }
}
.anim-float {
  animation: floatPulse 5s ease-in-out infinite;
}
@keyframes geoRotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
.anim-geo {
  animation: geoRotate 12s linear infinite;
  transform-box: fill-box;
  transform-origin: center;
}
@keyframes breathe {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 1; }
}
.anim-breathe {
  animation: breathe 3s 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;
  }
  .anim-draw, .anim-float, .anim-geo, .anim-breathe {
    animation: none !important;
  }
}

/* 响应式微调 */
@media (max-width: 768px) {
  .header-inner { flex-direction: row; }
  .nav-links { display: none; } /* 简化移动端，实际项目可加汉堡菜单，此处保持纯静态 */
  .grid-2 { grid-template-columns: 1fr; }
  .hero-layout { flex-direction: column-reverse; }
}
