/* =========================================
   设计变量与基础重置
   ========================================= */
:root {
  --color-bg: #f6f9fc;
  --color-surface: #ffffff;
  --color-primary: #0f2945;       /* 午夜蓝主色 */
  --color-primary-dark: #091b30;
  --color-primary-light: #1a3a5c;
  --color-accent: #ff6b2b;        /* 暖橙强调 */
  --color-accent-hover: #e5551d;
  --color-accent-subtle: rgba(255, 107, 43, 0.08);
  --color-text: #1e293b;
  --color-text-secondary: #475569;
  --color-text-muted: #64748b;
  --color-border: #cbd5e1;
  --color-border-light: #e2e8f0;
  --font-main: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: "JetBrains Mono", "SF Mono", ui-monospace, Menlo, monospace;
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --shadow-card: 0 4px 12px rgba(15, 41, 69, 0.05);
  --shadow-hover: 0 8px 24px rgba(15, 41, 69, 0.09);
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2.5rem;
  --space-xl: 4rem;
  --max-width: 1200px;
  --transition-base: 0.2s ease;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font-main);
  background-color: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, h4 { color: var(--color-primary); font-weight: 600; text-wrap: balance; }
h1 { font-size: clamp(2rem, 4vw, 2.75rem); letter-spacing: -0.02em; line-height: 1.2; }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); margin-bottom: var(--space-md); }
h3 { font-size: clamp(1.125rem, 2vw, 1.35rem); margin-bottom: var(--space-sm); }
p { margin-bottom: var(--space-sm); max-width: 75ch; }
a { color: var(--color-accent); text-decoration: none; transition: color var(--transition-base); }
a:hover { color: var(--color-accent-hover); }
ul, ol { padding-left: var(--space-md); }
li { margin-bottom: var(--space-xs); }

img, svg { display: block; max-width: 100%; height: auto; }
.container { width: 100%; max-width: var(--max-width); margin: 0 auto; padding: 0 var(--space-md); }
.section { padding: var(--space-xl) 0; }
.section-header { margin-bottom: var(--space-lg); text-align: center; }
.section-header p { margin: var(--space-sm) auto 0; color: var(--color-text-secondary); }

/* =========================================
   导航与页头页脚
   ========================================= */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,0.92); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--color-border-light);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: flex; align-items: center; gap: var(--space-xs); }
.brand img { width: 110px; height: 32px; object-fit: contain; }
.brand span { font-weight: 700; color: var(--color-primary); font-size: 1.1rem; }
.nav { display: flex; gap: var(--space-md); }
.nav a {
  padding: 6px 12px; border-radius: var(--radius-sm); font-size: 0.95rem; color: var(--color-text-secondary);
  transition: background var(--transition-base), color var(--transition-base);
}
.nav a:hover, .nav a[aria-current="page"] { background: var(--color-accent-subtle); color: var(--color-primary); }
.mobile-menu-btn { display: none; background: none; border: 1px solid var(--color-border); padding: 8px; border-radius: var(--radius-sm); cursor: pointer; }

.site-footer {
  background: var(--color-primary); color: #e2e8f0; padding: var(--space-lg) 0 var(--space-md);
  margin-top: var(--space-xl);
}
.footer-inner { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: var(--space-lg); }
.footer-col h4 { color: #fff; font-size: 1rem; margin-bottom: var(--space-sm); }
.footer-col a { display: block; color: #94a3b8; font-size: 0.9rem; margin-bottom: 8px; }
.footer-col a:hover { color: var(--color-accent); }
.footer-bottom { text-align: center; margin-top: var(--space-lg); padding-top: var(--space-md); border-top: 1px solid rgba(255,255,255,0.1); color: #64748b; font-size: 0.85rem; }

/* =========================================
   通用组件
   ========================================= */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 24px; border-radius: var(--radius-md); font-weight: 600; font-size: 1rem;
  border: none; cursor: pointer; transition: transform var(--transition-base), box-shadow var(--transition-base), background var(--transition-base);
}
.btn:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; }
.btn-primary { background: var(--color-accent); color: #fff; }
.btn-primary:hover { background: var(--color-accent-hover); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(255,107,43,0.3); }
.btn-outline { background: transparent; border: 1.5px solid var(--color-primary); color: var(--color-primary); }
.btn-outline:hover { background: var(--color-primary); color: #fff; }

.card {
  background: var(--color-surface); border: 1px solid var(--color-border-light);
  border-radius: var(--radius-lg); padding: var(--space-md); box-shadow: var(--shadow-card);
  transition: transform var(--transition-base), box-shadow var(--transition-base);
}
.card:hover { transform: translateY(-2px); box-shadow: var(--shadow-hover); }

.grid-bento {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-md);
}
@media (max-width: 900px) { .grid-bento { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .grid-bento { grid-template-columns: 1fr; } }

.bento-item { display: flex; flex-direction: column; height: 100%; }
.bento-icon { width: 40px; height: 40px; margin-bottom: var(--space-sm); color: var(--color-primary); }
.bento-content { flex: 1; }
.bento-content p { font-size: 0.95rem; color: var(--color-text-secondary); margin-bottom: 0; }

table.platform-table {
  width: 100%; border-collapse: collapse; margin: var(--space-md) 0; font-size: 0.95rem;
}
table.platform-table th, table.platform-table td { padding: 12px; border: 1px solid var(--color-border-light); text-align: left; }
table.platform-table th { background: var(--color-primary-light); color: #fff; }
table.platform-table tr:nth-child(even) { background: #f1f5f9; }

details.faq-item {
  background: var(--color-surface); border: 1px solid var(--color-border-light);
  border-radius: var(--radius-md); margin-bottom: var(--space-sm); overflow: hidden;
}
details.faq-item summary {
  padding: var(--space-sm) var(--space-md); cursor: pointer; font-weight: 600;
  list-style: none; display: flex; align-items: center; justify-content: space-between;
}
details.faq-item summary::-webkit-details-marker { display: none; }
details.faq-item summary::marker { display: none; }
details.faq-item summary::after {
  content: "+"; font-size: 1.2rem; color: var(--color-accent); font-weight: 700;
  transition: transform var(--transition-base);
}
details.faq-item[open] summary::after { transform: rotate(45deg); }
details.faq-item p { padding: 0 var(--space-md) var(--space-sm); color: var(--color-text-secondary); font-size: 0.95rem; }

.news-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: var(--space-md); }
.news-card { display: flex; flex-direction: column; }
.news-meta { font-family: var(--font-mono); font-size: 0.8rem; color: var(--color-text-muted); margin-bottom: var(--space-xs); }
.news-card h4 { font-size: 1.05rem; margin-bottom: var(--space-xs); }
.news-card p { font-size: 0.9rem; color: var(--color-text-secondary); margin-bottom: var(--space-sm); }
.link-list { display: flex; flex-direction: column; gap: var(--space-sm); }
.link-list li { font-size: 1rem; }
.link-list a::before { content: "→ "; color: var(--color-accent); margin-right: 6px; }

.steps-list { counter-reset: step-counter; list-style: none; padding: 0; }
.steps-list li {
  position: relative; padding-left: 36px; margin-bottom: var(--space-md);
}
.steps-list li::before {
  counter-increment: step-counter; content: counter(step-counter);
  position: absolute; left: 0; top: 0; width: 28px; height: 28px;
  background: var(--color-accent); color: #fff; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 0.9rem;
}

/* =========================================
   SVG 动效体系
   ========================================= */
.svg-icon { width: 24px; height: 24px; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; fill: none; }
.hero-svg { width: 100%; max-width: 600px; height: auto; margin: 0 auto; overflow: visible; }
.card-stack { position: relative; width: 100%; height: 320px; }
.card-layer {
  position: absolute; left: 50%; transform: translateX(-50%);
  width: 80%; height: 60%; border-radius: 12px;
  border: 2px solid var(--color-primary-light); background: rgba(255,255,255,0.8);
  box-shadow: 0 6px 16px rgba(15, 41, 69, 0.08);
}
.card-layer.layer-1 { bottom: 10%; z-index: 1; animation: floatY 6s ease-in-out infinite; }
.card-layer.layer-2 { bottom: 20%; z-index: 2; animation: floatY 7s ease-in-out infinite 0.5s; }
.card-layer.layer-3 { bottom: 30%; z-index: 3; animation: floatY 5.5s ease-in-out infinite 1s; }
@keyframes floatY {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(-12px); }
}

.divider-svg { width: 100%; height: 60px; margin: var(--space-lg) 0; opacity: 0.6; }
.draw-path { pathLength: 1; stroke-dasharray: 1; stroke-dashoffset: 0; animation: drawLine 8s linear infinite; }
@keyframes drawLine {
  0% { stroke-dashoffset: 0; }
  50% { stroke-dashoffset: -0.4; }
  100% { stroke-dashoffset: -1; }
}

.pulse-circle { transform-box: fill-box; transform-origin: center; animation: pulseAnim 4s ease-in-out infinite; }
@keyframes pulseAnim {
  0%, 100% { transform: scale(1); opacity: 0.4; }
  50% { transform: scale(1.15); opacity: 0.8; }
}

/* =========================================
   响应式与无障碍
   ========================================= */
@media (max-width: 768px) {
  .nav { display: none; }
  .mobile-menu-btn { display: block; }
  .section { padding: var(--space-lg) 0; }
}

@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;
  }
  .card-layer, .draw-path, .pulse-circle { animation: none !important; }
}
