/* === 设计变量与基础设置 === */
:root {
  /* 颜色系统 */
  --color-dark: #21163C;
  --color-paper: #F4F3F7;
  --color-text: #191523;
  --color-brand: #5214EB;
  --color-accent: #ED926E;
  
  /* 组件样式变量 */
  --radius-card: 20px;
  --radius-btn: 12px;
  --card-border: 1px solid rgba(25, 21, 35, 0.16);
  --card-shadow: none;
  --section-y: clamp(3.5rem, 7vw, 6rem);
  --gap: clamp(1rem, 2vw, 1.75rem);
  --content-max: 960px;
  
  /* 排版变量 */
  --font-heading: 'Inter', system-ui, -apple-system, sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;
}

/* 全局重置 */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  color: var(--color-text);
  background-color: var(--color-paper);
  line-height: 1.65;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, svg {
  display: block;
  max-width: 100%;
}

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);
}

.section {
  padding-top: var(--section-y);
  padding-bottom: var(--section-y);
  position: relative;
}

.section--dark {
  background-color: var(--color-dark);
  color: var(--color-paper);
}

.section--light {
  background-color: var(--color-paper);
  color: var(--color-text);
}

/* 分割线 */
.divider {
  height: 1px;
  background-color: rgba(25, 21, 35, 0.1);
  margin: 0 auto;
  max-width: calc(var(--content-max) + var(--gap) * 2);
}

/* === 排版 === */
h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

h1 {
  font-size: clamp(2.4rem, 6vw, 4.5rem);
  margin-bottom: 1.5rem;
}

h2 {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  margin-bottom: 1.25rem;
}

h3 {
  font-size: clamp(1.4rem, 2.5vw, 1.8rem);
  margin-bottom: 1rem;
}

p {
  margin-bottom: 1rem;
  max-width: 38em;
}

.text-center {
  text-align: center;
}

.text-balance {
  text-wrap: balance;
}

/* 眉标 */
.eyebrow {
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
  display: inline-block;
}

.paper-surface .eyebrow {
  color: var(--color-brand);
}

.dark-surface .eyebrow {
  color: var(--color-accent);
}

/* 高亮词 */
.hl {
  color: var(--color-brand);
}

.dark-surface .hl {
  color: var(--color-accent);
}

/* === 按钮 === */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  height: 52px;
  padding: 0 24px;
  border-radius: var(--radius-btn);
  font-weight: 700;
  font-size: 1rem;
  transition: transform 0.2s ease, opacity 0.2s ease, background-color 0.2s ease;
  cursor: pointer;
  border: none;
}

.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 {
  transform: translateY(-2px);
  opacity: 0.9;
}

.btn--secondary {
  background-color: transparent;
  border: 2px solid var(--color-text);
  color: var(--color-text);
}

.dark-surface .btn--secondary {
  border-color: var(--color-paper);
  color: var(--color-paper);
}

.btn--secondary:hover {
  background-color: rgba(25, 21, 35, 0.05);
}

.dark-surface .btn--secondary:hover {
  background-color: rgba(244, 243, 247, 0.1);
}

/* === 导航栏 === */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: rgba(244, 243, 247, 0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(25, 21, 35, 0.05);
}

.dark-surface .header {
  background-color: rgba(33, 22, 60, 0.9);
  border-bottom: 1px solid rgba(244, 243, 247, 0.1);
}

.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  font-size: 1.25rem;
}

.logo img {
  width: 32px;
  height: 32px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-link {
  font-weight: 600;
  font-size: 0.95rem;
  transition: color 0.2s ease;
}

.nav-link:hover {
  color: var(--color-brand);
}

.dark-surface .nav-link:hover {
  color: var(--color-accent);
}

.nav-link[aria-current="page"] {
  color: var(--color-brand);
}

.dark-surface .nav-link[aria-current="page"] {
  color: var(--color-accent);
}

@media (max-width: 768px) {
  .nav-links {
    display: none; /* 简化处理，移动端暂不展示完整菜单，保留主按钮 */
  }
  .navbar .btn {
    display: none;
  }
}

/* === 卡片与面板 === */
.card {
  background-color: white;
  border: var(--card-border);
  border-radius: var(--radius-card);
  padding: 24px;
  box-shadow: var(--card-shadow);
}

.dark-surface .card {
  background-color: rgba(244, 243, 247, 0.05);
  border-color: rgba(244, 243, 247, 0.1);
}

.panel {
  background-color: var(--color-dark);
  border-radius: var(--radius-card);
  padding: 32px;
  overflow: hidden;
  position: relative;
}

.paper-surface .panel {
  background-color: var(--color-brand);
  color: var(--color-paper);
}

/* === 表格 === */
.table-wrapper {
  overflow-x: auto;
  border-radius: var(--radius-card);
  border: var(--card-border);
}

table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

th, td {
  padding: 16px 24px;
  border-bottom: 1px solid rgba(25, 21, 35, 0.1);
}

th {
  font-weight: 700;
  background-color: rgba(25, 21, 35, 0.03);
}

.dark-surface th {
  background-color: rgba(244, 243, 247, 0.05);
}

tr:last-child td {
  border-bottom: none;
}

td a {
  color: var(--color-brand);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.dark-surface td a {
  color: var(--color-accent);
}

/* === FAQ (Details/Summary) === */
details {
  border: var(--card-border);
  border-radius: var(--radius-card);
  margin-bottom: 16px;
  overflow: hidden;
  background-color: white;
}

.dark-surface details {
  background-color: rgba(244, 243, 247, 0.03);
  border-color: rgba(244, 243, 247, 0.1);
}

summary {
  padding: 20px 24px;
  font-weight: 700;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background-color 0.2s ease;
}

summary::-webkit-details-marker {
  display: none;
}

summary:hover {
  background-color: rgba(25, 21, 35, 0.02);
}

.dark-surface summary:hover {
  background-color: rgba(244, 243, 247, 0.05);
}

summary::after {
  content: '+';
  font-size: 1.5rem;
  font-weight: 400;
  color: var(--color-brand);
}

.dark-surface summary::after {
  color: var(--color-accent);
}

details[open] summary::after {
  content: '−';
}

.details-content {
  padding: 0 24px 24px;
  color: var(--color-text);
}

.dark-surface .details-content {
  color: var(--color-paper);
}

/* === 列表样式 === */
.list-check li {
  position: relative;
  padding-left: 32px;
  margin-bottom: 12px;
}

.list-check li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 8px;
  width: 16px;
  height: 16px;
  background-color: var(--color-brand);
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'%3E%3C/polyline%3E%3C/svg%3E");
  mask-repeat: no-repeat;
  mask-position: center;
}

.dark-surface .list-check li::before {
  background-color: var(--color-accent);
}

/* === SVG 动效 === */
.svg-illustration {
  width: 100%;
  height: auto;
  max-width: 100%;
}

.draw-path {
  pathLength: 1;
  stroke-dasharray: 1;
  stroke-dashoffset: 0;
  animation: drawStroke 3s ease-in-out infinite alternate;
}

.float-element {
  animation: floatBounce 4s ease-in-out infinite;
}

.breath-opacity {
  animation: breatheOpacity 3s ease-in-out infinite alternate;
}

.slide-in-up {
  animation: slideInUp 2s ease-out infinite alternate;
}

@keyframes drawStroke {
  0%, 100% { stroke-dashoffset: 0; }
  50% { stroke-dashoffset: 1; }
}

@keyframes floatBounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

@keyframes breatheOpacity {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 1; }
}

@keyframes slideInUp {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

/* 减少动态效果 */
@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-path, .float-element, .breath-opacity, .slide-in-up {
    animation: none;
    opacity: 1;
    transform: none;
  }
}

/* === 页脚 === */
.footer {
  background-color: var(--color-dark);
  color: var(--color-paper);
  padding: 64px 0 32px;
  border-top: 1px solid rgba(244, 243, 247, 0.1);
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 48px;
  margin-bottom: 48px;
}

.footer-col h4 {
  color: var(--color-accent);
  margin-bottom: 16px;
  font-size: 1rem;
}

.footer-col ul li {
  margin-bottom: 12px;
}

.footer-col a {
  opacity: 0.8;
  transition: opacity 0.2s ease;
}

.footer-col a:hover {
  opacity: 1;
}

.footer-bottom {
  text-align: center;
  padding-top: 32px;
  border-top: 1px solid rgba(244, 243, 247, 0.1);
  font-size: 0.875rem;
  opacity: 0.6;
}

/* === 响应式调整 === */
@media (max-width: 768px) {
  h1 {
    font-size: clamp(2rem, 8vw, 3rem);
  }
  .grid-2-col {
    grid-template-columns: 1fr;
  }
  .order-mobile-reverse {
    order: -1;
  }
}

.grid-2-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--gap);
}
