/* === 设计变量 === */
:root {
  /* 色板 */
  --color-dark-bg: #271231;
  --color-paper: #F5F0E5;
  --color-text: #1F1523;
  --color-brand: #9B12D8;
  --color-accent: #ED6EC0;
  
  /* 取色变量（默认纸面） */
  --bg-surface: var(--color-paper);
  --text-primary: var(--color-text);
  --text-secondary: var(--color-text);
  --accent-color: var(--color-brand);
  --link-color: var(--color-brand);

  /* 圆角 */
  --radius-card: 0;
  --radius-btn: 0;

  /* 卡片边界与阴影 */
  --card-border: 0;
  --card-shadow: 0 10px 28px -14px rgba(31, 21, 35, 0.3);

  /* 节奏与密度 */
  --section-y: clamp(3.5rem, 7vw, 6rem);
  --gap: clamp(1rem, 2vw, 1.75rem);
  --line-height: 1.65;

  /* 内容最大宽度 */
  --content-max: 960px;

  /* 字体 */
  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* === 基础排版 === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-family: var(--font-sans); background: var(--bg-surface); color: var(--text-primary); line-height: var(--line-height); -webkit-font-smoothing: antialiased; }
body { min-height: 100vh; display: flex; flex-direction: column; }
img, svg { display: block; max-width: 100%; height: auto; }
a { color: var(--link-color); text-decoration: none; transition: color 0.2s ease; }
a:hover { color: var(--accent-color); }
a:focus-visible { outline: 2px solid var(--accent-color); outline-offset: 2px; }

/* === 容器 === */
.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: var(--bg-surface); border-bottom: 1px solid rgba(0,0,0,0.08); backdrop-filter: blur(8px); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.logo { display: flex; align-items: center; gap: 12px; font-weight: 800; font-size: 1.25rem; color: var(--text-primary); }
.logo img { height: 32px; width: auto; }
nav { display: flex; gap: 24px; align-items: center; }
nav a { font-weight: 600; font-size: 0.95rem; color: var(--text-primary); }
nav a[aria-current="page"] { color: var(--accent-color); }
.nav-cta { background: var(--accent-color); color: var(--color-dark-bg) !important; padding: 8px 20px; font-weight: 700; transition: transform 0.2s ease, box-shadow 0.2s ease; }
.nav-cta:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(237, 110, 192, 0.4); }

/* === 按钮 === */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; height: 52px; padding: 0 28px; font-weight: 700; font-size: 1rem; border-radius: var(--radius-btn); cursor: pointer; transition: all 0.2s ease; text-decoration: none; }
.btn-primary { background: var(--accent-color); color: var(--color-dark-bg); border: none; }
.btn-primary:hover { background: #d95bae; transform: translateY(-2px); box-shadow: 0 6px 16px rgba(237, 110, 192, 0.35); }
.btn-secondary { background: transparent; color: var(--text-primary); border: 2px solid var(--text-primary); }
.btn-secondary:hover { background: rgba(31, 21, 35, 0.05); transform: translateY(-2px); }
.btn-icon { width: 20px; height: 20px; flex-shrink: 0; }

/* === 区块通用 === */
.section { padding-top: var(--section-y); padding-bottom: var(--section-y); border-bottom: 1px solid rgba(0,0,0,0.08); }
.section:last-child { border-bottom: none; }
.section-dark { background: var(--color-dark-bg); color: var(--color-paper); }
.section-dark .container { color: var(--color-paper); }
.section-dark .btn-primary { background: var(--accent-color); color: var(--color-dark-bg); }
.section-dark .btn-secondary { color: var(--color-paper); border-color: var(--color-paper); }
.section-dark .btn-secondary:hover { background: rgba(245, 240, 229, 0.1); }

/* === 标题系统 === */
.eyebrow { display: inline-block; font-size: 0.8rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent-color); margin-bottom: 16px; }
.section-dark .eyebrow { color: var(--accent-color); }
h1 { font-size: clamp(2.2rem, 5vw, 3.8rem); font-weight: 800; line-height: 1.15; letter-spacing: -0.02em; margin-bottom: 24px; text-wrap: balance; }
h2 { font-size: clamp(1.6rem, 3vw, 2.4rem); font-weight: 700; line-height: 1.25; margin-bottom: 24px; letter-spacing: 0.02em; }
h3 { font-size: 1.35rem; font-weight: 700; line-height: 1.3; margin-bottom: 12px; margin-top: 24px; }
p { margin-bottom: 16px; max-width: 38em; }
.text-muted { opacity: 0.8; font-size: 0.95rem; }
.hl { color: var(--accent-color); }
.section-dark .hl { color: var(--accent-color); }

/* === 卡片与面板 === */
.card { background: var(--bg-surface); border: var(--card-border); box-shadow: var(--card-shadow); padding: 24px; transition: box-shadow 0.2s ease; }
.card:hover { box-shadow: 0 12px 32px -12px rgba(31, 21, 35, 0.4); }
.panel { background: var(--color-dark-bg); border-radius: var(--radius-card); padding: 32px; box-shadow: var(--card-shadow); }
.paper-card { background: var(--color-paper); color: var(--color-text); }

/* === 表格 === */
.data-table { width: 100%; border-collapse: collapse; margin: 24px 0; font-size: 0.95rem; }
.data-table th, .data-table td { padding: 16px; text-align: left; border-bottom: 1px solid rgba(0,0,0,0.1); }
.data-table th { font-weight: 700; background: rgba(0,0,0,0.02); }
.data-table tr:last-child td { border-bottom: none; }

/* === 列表与徽标 === */
.step-list { list-style: none; counter-reset: steps; }
.step-list li { counter-increment: steps; display: flex; gap: 16px; margin-bottom: 24px; align-items: flex-start; }
.step-badge { flex-shrink: 0; width: 32px; height: 32px; background: var(--accent-color); color: var(--color-dark-bg); display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 0.9rem; }
.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: var(--gap); }

/* === FAQ === */
.faq-item { border-bottom: 1px solid rgba(0,0,0,0.1); }
.faq-item summary { padding: 20px 0; cursor: pointer; font-weight: 600; list-style: none; display: flex; justify-content: space-between; align-items: center; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; font-size: 1.5rem; font-weight: 300; }
.faq-item[open] summary::after { content: "−"; }
.faq-item p { padding-bottom: 20px; margin-bottom: 0; }

/* === 资讯卡片 === */
.news-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: var(--gap); }
.news-card { display: flex; flex-direction: column; height: 100%; }
.news-card h3 { margin-top: 0; font-size: 1.15rem; }
.news-card time { font-size: 0.85rem; opacity: 0.7; margin-bottom: 8px; display: block; }
.news-card p { font-size: 0.95rem; flex-grow: 1; }

/* === 页脚 === */
.site-footer { background: var(--color-dark-bg); color: var(--color-paper); padding: 64px 0 32px; margin-top: auto; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 48px; margin-bottom: 48px; }
.footer-col h4 { color: var(--accent-color); margin-bottom: 16px; font-size: 1rem; text-transform: uppercase; letter-spacing: 0.1em; }
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 10px; }
.footer-col a { color: var(--color-paper); opacity: 0.8; }
.footer-col a:hover { opacity: 1; color: var(--accent-color); }
.footer-bottom { border-top: 1px solid rgba(245, 240, 229, 0.1); padding-top: 24px; text-align: center; font-size: 0.85rem; opacity: 0.6; }

/* === SVG 动效 Keyframes === */
@keyframes twinkle {
  0%, 100% { opacity: 0.2; }
  50% { opacity: 0.8; }
}
@keyframes draw-line {
  0% { stroke-dashoffset: 1; }
  100% { stroke-dashoffset: 0; }
}
@keyframes float-up {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}
@keyframes breathe {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 1; }
}
@keyframes slide-in-right {
  0% { transform: translateX(20px); opacity: 0; }
  100% { transform: translateX(0); opacity: 1; }
}

/* === 动效类 === */
.star { animation: twinkle 4s infinite ease-in-out; }
.star:nth-child(2) { animation-delay: 1s; }
.star:nth-child(3) { animation-delay: 2.5s; }
.line-draw { stroke-dasharray: 1; stroke-dashoffset: 0; animation: draw-line 3s infinite linear; }
.float { animation: float-up 6s infinite ease-in-out; }
.breathe { animation: breathe 2.5s infinite ease-in-out; }
.slide-in { animation: slide-in-right 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) forwards; }

/* === 响应式 === */
@media (max-width: 768px) {
  nav { gap: 16px; }
  .header-inner { flex-wrap: wrap; height: auto; padding: 16px 0; }
  .hero-layout { flex-direction: column; }
  .split-row { flex-direction: column; }
  .split-row.reverse { flex-direction: column; }
}

/* === 减少动态效果 === */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    animation-delay: 0ms !important;
  }
  html { scroll-behavior: auto; }
}

/* 兜底：裁掉横向溢出 */
div.container {
  overflow-x: clip;
}
