/* 设计变量与基础重置 */
:root {
  --color-bg: #f7f8fa;
  --color-surface: #ffffff;
  --color-border: #e5e7eb;
  --color-text: #111827;
  --color-text-secondary: #4b5563;
  --color-accent: #25d366;
  --color-accent-hover: #1da851;
  --color-accent-light: rgba(37, 211, 102, 0.08);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-pill: 999px;
  --shadow-card: 0 4px 6px -1px rgba(0, 0, 0, 0.06), 0 2px 4px -1px rgba(0, 0, 0, 0.04);
  --shadow-hover: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.04);
  --font-main: "PingFang SC", "Noto Sans SC", "Source Han Sans CN", "Microsoft YaHei", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --spacing-section: clamp(60px, 8vw, 100px);
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-main);
  background-color: var(--color-bg);
  color: var(--color-text);
  line-height: 1.75;
  font-size: 16px;
  overflow-x: hidden;
}

img, svg {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
}

ul, ol {
  list-style: none;
}

/* 容器与排版 */
.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

section {
  padding: var(--spacing-section) 0;
}

h1, h2, h3, h4 {
  line-height: 1.25;
  text-wrap: balance;
  letter-spacing: -0.01em;
}

h1 {
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  font-weight: 800;
  margin-bottom: 1.25rem;
}

h2 {
  font-size: clamp(1.6rem, 4vw, 2.25rem);
  font-weight: 700;
  margin-bottom: 2.5rem;
  position: relative;
  padding-left: 1.25rem;
}

h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.15em;
  bottom: 0.15em;
  width: 4px;
  background: var(--color-accent);
  border-radius: 2px;
}

h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

p {
  color: var(--color-text-secondary);
  margin-bottom: 1rem;
}

/* 导航与页头页脚 */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border);
}

.nav-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 72px;
}

.brand-link {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--color-text);
}

.logo-img {
  height: 32px;
  width: auto;
  object-fit: contain;
}

nav ul {
  display: flex;
  gap: 8px;
}

nav a {
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-weight: 500;
  font-size: 0.95rem;
  transition: color 0.2s, background 0.2s;
}

nav a:hover, nav a[aria-current="page"] {
  color: var(--color-accent);
  background: var(--color-accent-light);
}

footer {
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
  padding: 56px 0 32px;
  margin-top: var(--spacing-section);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}

.footer-col h4 {
  font-size: 0.95rem;
  margin-bottom: 16px;
  color: var(--color-text);
}

.footer-col ul li {
  margin-bottom: 10px;
}

.footer-col a {
  color: var(--color-text-secondary);
  font-size: 0.9rem;
  transition: color 0.2s;
}

.footer-col a:hover {
  color: var(--color-accent);
}

.copyright {
  text-align: center;
  font-size: 0.85rem;
  color: #6b7280;
  padding-top: 24px;
  border-top: 1px solid var(--color-border);
}

/* 按钮 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 32px;
  border-radius: var(--radius-pill);
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  border: none;
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
}

.btn-primary {
  background: var(--color-accent);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(37, 211, 102, 0.25);
}

.btn-primary:hover {
  background: var(--color-accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(37, 211, 102, 0.35);
}

.btn-outline {
  background: transparent;
  border: 1.5px solid var(--color-accent);
  color: var(--color-accent);
}

.btn-outline:hover {
  background: var(--color-accent-light);
}

/* 卡片与网格 */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 28px;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
}

.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 28px;
  transition: transform 0.25s, box-shadow 0.25s, border-color 0.25s;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
  border-color: var(--color-accent);
}

.card-icon {
  width: 44px;
  height: 44px;
  margin-bottom: 16px;
  color: var(--color-accent);
}

.card-icon svg {
  width: 100%;
  height: 100%;
  stroke-width: 1.8;
}

/* 表格 */
.data-table {
  width: 100%;
  border-collapse: collapse;
  margin: 32px 0;
  background: var(--color-surface);
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--color-border);
}

.data-table th, .data-table td {
  padding: 14px 20px;
  text-align: left;
  border-bottom: 1px solid var(--color-border);
  font-size: 0.95rem;
}

.data-table th {
  background: #f3f4f6;
  font-weight: 600;
  color: var(--color-text);
}

.data-table tr:last-child td {
  border-bottom: none;
}

/* FAQ */
.faq-list {
  max-width: 800px;
}

details {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  margin-bottom: 12px;
  background: var(--color-surface);
  transition: border-color 0.2s;
}

details:hover {
  border-color: #c3cbd6;
}

details[open] {
  border-color: var(--color-accent);
}

summary {
  padding: 16px 20px;
  cursor: pointer;
  font-weight: 500;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  user-select: none;
}

summary::-webkit-details-marker {
  display: none;
}

summary::after {
  content: "+";
  font-size: 1.25rem;
  font-weight: 400;
  transition: transform 0.25s;
  color: var(--color-text-secondary);
}

details[open] summary::after {
  transform: rotate(45deg);
  color: var(--color-accent);
}

details p {
  padding: 0 20px 18px;
  margin: 0;
  font-size: 0.95rem;
  color: var(--color-text-secondary);
}

/* 新闻卡片 */
.news-card {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.news-card .date {
  font-size: 0.85rem;
  color: #6b7280;
  margin-bottom: 8px;
}

.news-card .content {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.news-card .actions {
  margin-top: 16px;
}

.news-card .actions a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--color-accent);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.news-card .actions a:hover {
  text-decoration: underline;
}

/* 相关阅读 */
.related-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.related-item a {
  display: flex;
  flex-direction: column;
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
  transition: background 0.2s, border-color 0.2s;
}

.related-item a:hover {
  background: #fafafa;
  border-color: #d1d5db;
}

.related-item strong {
  font-size: 0.95rem;
  margin-bottom: 4px;
}

.related-item span {
  font-size: 0.85rem;
  color: var(--color-text-secondary);
  line-height: 1.5;
}

/* SVG 动效基础 */
.svg-wave-container {
  width: 100%;
  overflow: hidden;
  line-height: 0;
  margin-top: 24px;
}

.wave-path {
  fill: none;
  stroke: var(--color-accent);
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  pathLength: 1;
  stroke-dasharray: 1;
  stroke-dashoffset: 0;
  animation: wave-drift 5s ease-in-out infinite alternate;
}

.wave-path:nth-child(1) { opacity: 0.9; animation-delay: 0s; }
.wave-path:nth-child(2) { opacity: 0.6; animation-delay: -1.5s; stroke-width: 2; }
.wave-path:nth-child(3) { opacity: 0.4; animation-delay: -3s; stroke-width: 1.5; }

@keyframes wave-drift {
  0% { transform: translateY(0); }
  100% { transform: translateY(-10px); }
}

.draw-init {
  stroke-dashoffset: 1;
  animation: draw-line 2.5s ease forwards;
}

@keyframes draw-line {
  to { stroke-dashoffset: 0; }
}

/* 焦点与无障碍 */
:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
  border-radius: 4px;
}

/* 响应式适配 */
@media (max-width: 768px) {
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  nav ul {
    gap: 4px;
  }
  nav a {
    padding: 6px 10px;
    font-size: 0.85rem;
  }
  .brand-text {
    display: none;
  }
}

/* 减少动态效果偏好 */
@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;
  }
  .draw-init {
    stroke-dashoffset: 0;
    animation: none;
  }
}
