/* === 设计变量与 Token === */
:root {
  /* 色板 */
  --color-bg-dark: #13102D;
  --color-bg-paper: #F7F5F3;
  --color-text-body: #171523;
  --color-brand: #2714EB;
  --color-accent: #89ED6E;

  /* 结构性 Token */
  --radius-card: 24px;
  --radius-btn: 999px;
  --card-border: 0;
  --card-shadow: 0 10px 28px -14px rgba(23, 21, 35, 0.3);
  --section-y: clamp(3.5rem, 7vw, 6rem);
  --gap: clamp(1rem, 2vw, 1.75rem);
  --content-max: 960px;
  
  /* 字体 */
  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --line-height-base: 1.65;
}

/* === 基础重置与排版 === */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background-color: var(--color-bg-paper);
  color: var(--color-text-body);
  line-height: var(--line-height-base);
  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 {
  max-width: var(--content-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--gap);
  padding-right: var(--gap);
}

.section {
  padding-top: var(--section-y);
  padding-bottom: var(--section-y);
}

.section.dark {
  background-color: var(--color-bg-dark);
  color: var(--color-bg-paper);
}

.section.paper {
  background-color: var(--color-bg-paper);
  color: var(--color-text-body);
}

/* 取色变量系统 */
.section.paper {
  --text-main: var(--color-text-body);
  --text-muted: var(--color-text-body);
  --accent: var(--color-brand);
  --bg-card: #FFFFFF;
}

.section.dark {
  --text-main: var(--color-bg-paper);
  --text-muted: rgba(247, 245, 243, 0.7);
  --accent: var(--color-accent);
  --bg-card: #1E1B3A;
}

.section.dark .card {
  background-color: var(--bg-card);
  color: var(--color-bg-paper);
}

/* 眉标 */
.eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
  color: var(--accent);
}

/* 标题 */
h1, h2, h3, h4 {
  font-weight: 500;
  line-height: 1.15;
  color: var(--text-main);
  margin-bottom: 0.75rem;
}

h1 {
  font-size: clamp(2.6rem, 6.4vw, 5rem);
  letter-spacing: -0.02em;
  text-wrap: balance;
}

h2 {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  margin-bottom: 1.5rem;
}

h3 {
  font-size: clamp(1.4rem, 2.5vw, 1.8rem);
  margin-bottom: 0.75rem;
}

p {
  margin-bottom: 1rem;
  max-width: 38em;
}

.hl {
  color: var(--accent);
}

/* === 组件：按钮 === */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 48px;
  padding: 0 24px;
  border-radius: var(--radius-btn);
  font-weight: 600;
  font-size: 1rem;
  transition: transform 0.2s ease, opacity 0.2s ease, box-shadow 0.2s ease;
  cursor: pointer;
  border: none;
  gap: 8px;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

.btn-primary {
  background-color: var(--accent);
  color: var(--color-bg-dark);
}

.btn-primary:hover {
  opacity: 0.9;
}

.btn-secondary {
  background-color: transparent;
  color: var(--text-main);
  border: 1px solid var(--text-main);
}

.btn-secondary:hover {
  background-color: rgba(128, 128, 128, 0.1);
}

.btn svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* === 组件：卡片 === */
.card {
  background-color: var(--bg-card);
  border-radius: var(--radius-card);
  border: var(--card-border);
  box-shadow: var(--card-shadow);
  padding: 24px;
  transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.card:hover {
  box-shadow: 0 14px 32px -12px rgba(23, 21, 35, 0.4);
  transform: translateY(-4px);
}

/* === 组件：表格 === */
.table-wrapper {
  overflow-x: auto;
  border-radius: var(--radius-card);
  border: 1px solid rgba(128, 128, 128, 0.2);
}

table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

th, td {
  padding: 16px 24px;
  border-bottom: 1px solid rgba(128, 128, 128, 0.1);
}

th {
  font-weight: 600;
  background-color: rgba(128, 128, 128, 0.05);
}

tr:last-child th, tr:last-child td {
  border-bottom: none;
}

/* === 组件：FAQ === */
details {
  margin-bottom: 16px;
  border-bottom: 1px solid rgba(128, 128, 128, 0.2);
  padding-bottom: 16px;
}

summary {
  font-weight: 600;
  font-size: 1.1rem;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  color: var(--text-main);
}

summary::-webkit-details-marker {
  display: none;
}

summary::after {
  content: "+";
  font-size: 1.5rem;
  font-weight: 300;
  transition: transform 0.2s ease;
}

details[open] summary::after {
  transform: rotate(45deg);
}

details p {
  margin-top: 8px;
  color: var(--text-muted);
}

/* === 布局辅助 === */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
  gap: var(--gap);
}

.flex-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--gap);
  align-items: center;
}

.text-center {
  text-align: center;
}

.mt-lg {
  margin-top: 2rem;
}

.mb-md {
  margin-bottom: 1.5rem;
}

/* === 页头与页脚 === */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: rgba(247, 245, 243, 0.9);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  padding: 16px 0;
}

.section.dark ~ .site-footer,
.site-footer {
  background-color: var(--color-bg-dark);
  color: var(--color-bg-paper);
  padding: 48px 0;
  margin-top: var(--section-y);
}

.nav-list {
  display: flex;
  gap: 24px;
}

.nav-link {
  font-weight: 500;
  opacity: 0.8;
  transition: opacity 0.2s;
}

.nav-link:hover, .nav-link[aria-current="page"] {
  opacity: 1;
  color: var(--accent);
}

.brand-logo img {
  height: 32px;
  width: auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 32px;
}

.footer-col h4 {
  color: var(--color-accent);
  margin-bottom: 16px;
  font-size: 1rem;
}

.footer-links li {
  margin-bottom: 8px;
}

.footer-links a {
  opacity: 0.7;
  transition: opacity 0.2s;
}

.footer-links a:hover {
  opacity: 1;
}

/* === SVG 动效 === */
@keyframes twinkle {
  0%, 100% { opacity: 0.2; }
  50% { opacity: 1; }
}

@keyframes dash-flow {
  to { stroke-dashoffset: -1; }
}

@keyframes float-y {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

@keyframes fade-in-up {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

.star {
  animation: twinkle 4s infinite ease-in-out;
}

.star:nth-child(odd) {
  animation-delay: 1s;
  animation-duration: 5s;
}

.star:nth-child(even) {
  animation-delay: 2.5s;
  animation-duration: 3.5s;
}

.line-draw {
  stroke-dasharray: 1;
  stroke-dashoffset: 0;
  animation: dash-flow 3s linear infinite;
}

.float-panel {
  animation: float-y 6s ease-in-out infinite;
}

.fade-element {
  animation: fade-in-up 1s ease-out forwards;
}

/* 减少动态效果 */
@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;
  }
  .star, .line-draw, .float-panel, .fade-element {
    animation: none !important;
  }
}

/* === 响应式调整 === */
@media (max-width: 768px) {
  h1 { font-size: clamp(2.2rem, 8vw, 3.5rem); }
  h2 { font-size: clamp(1.6rem, 5vw, 2.2rem); }
  .grid-2 { grid-template-columns: 1fr; }
  .flex-row { flex-direction: column; align-items: stretch; }
  .btn { width: 100%; }
}
/* factory-contrast-width */
@media (min-width: 1440px) {
  [data-fc-1440="paper"] {
    color: #f7f5f3 !important;
    -webkit-text-fill-color: #f7f5f3 !important;
  }
}
@media (min-width: 1440px) {
  [data-fc-1440="paper"] {
    color: #f7f5f3 !important;
    -webkit-text-fill-color: #f7f5f3 !important;
  }
}
@media (min-width: 1440px) {
  [data-fc-1440="paper"] {
    color: #f7f5f3 !important;
    -webkit-text-fill-color: #f7f5f3 !important;
  }
}
@media (min-width: 1440px) {
  [data-fc-1440="paper"] {
    color: #f7f5f3 !important;
    -webkit-text-fill-color: #f7f5f3 !important;
  }
}
@media (min-width: 1440px) {
  [data-fc-1440="paper"] {
    color: #f7f5f3 !important;
    -webkit-text-fill-color: #f7f5f3 !important;
  }
}
