/* ==================== 设计变量 ==================== */
:root {
  --color-dark: #271231;
  --color-paper: #F5F0E5;
  --color-text: #1F1523;
  --color-brand: #9B12D8;
  --color-accent: #ED6EC0;
  
  --radius-card: 0;
  --radius-btn: 0;
  --card-border: 1px solid rgba(31, 21, 35, 0.16);
  --card-shadow: none;
  
  --section-y: clamp(2.5rem, 5vw, 4rem);
  --gap: clamp(0.75rem, 1.5vw, 1.25rem);
  --content-max: 960px;
  
  --font-body: 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; }
body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  color: var(--color-text);
  background-color: var(--color-paper);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; height: auto; }
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-block: var(--section-y);
}
.section-header {
  margin-bottom: var(--gap);
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 0.6em;
}
.paper-theme .eyebrow { color: var(--color-brand); }
.dark-theme .eyebrow { color: var(--color-accent); }

h1, h2, h3, h4 {
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.01em;
}
h1 { font-size: clamp(2.6rem, 6.4vw, 5rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.4rem); margin-top: calc(var(--section-y) * 0.6); }
h3 { font-size: clamp(1.2rem, 2vw, 1.5rem); margin-top: var(--gap); }
p { margin-bottom: var(--gap); max-width: 38em; }
.highlight { color: var(--color-brand); }
.dark-theme .highlight { color: var(--color-accent); }

/* ==================== 按钮组件 ==================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 48px;
  padding: 0 24px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: transform 0.2s ease, background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; }
.btn-primary {
  background-color: var(--color-accent);
  color: var(--color-dark);
}
.btn-secondary {
  background: transparent;
  color: var(--color-text);
  border: 1px solid var(--color-text);
}
.dark-theme .btn-secondary {
  color: var(--color-paper);
  border-color: var(--color-paper);
}

/* ==================== 卡片与表格 ==================== */
.card {
  border: var(--card-border);
  box-shadow: var(--card-shadow);
  padding: var(--gap);
  background: var(--color-paper);
  position: relative;
}
.dark-theme .card {
  background: var(--color-dark);
  border-color: rgba(245, 240, 229, 0.15);
}
.table-wrap {
  overflow-x: auto;
  margin-bottom: var(--gap);
  border: var(--card-border);
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}
th, td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid rgba(31, 21, 35, 0.08);
}
.dark-theme th, .dark-theme td {
  border-bottom-color: rgba(245, 240, 229, 0.1);
}
th { font-weight: 600; background: rgba(31, 21, 35, 0.03); }
.dark-theme th { background: rgba(245, 240, 229, 0.05); }
tr:last-child td { border-bottom: none; }

/* ==================== FAQ (Details/Summary) ==================== */
.faq-item { border-bottom: var(--card-border); }
.faq-item summary {
  padding: 16px 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.2rem; font-weight: 400; transition: transform 0.2s; }
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item p { padding-bottom: 16px; margin-top: 0; font-size: 0.95rem; }

/* ==================== 页头与页脚 ==================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(245, 240, 229, 0.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(31, 21, 35, 0.08);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.1rem; }
.brand img { height: 32px; width: auto; }
nav { display: flex; gap: 24px; align-items: center; }
nav a { font-size: 0.95rem; font-weight: 500; opacity: 0.8; transition: opacity 0.2s; }
nav a:hover, nav a[aria-current="page"] { opacity: 1; color: var(--color-brand); }
.dark-theme nav a { color: var(--color-paper); }
.dark-theme nav a:hover, .dark-theme nav a[aria-current="page"] { color: var(--color-accent); }

.site-footer {
  padding: var(--section-y) 0;
  border-top: 1px solid rgba(31, 21, 35, 0.08);
  margin-top: var(--section-y);
}
.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--gap);
}
.footer-col h4 { font-size: 0.9rem; font-weight: 600; margin-bottom: 12px; }
.footer-col ul li { margin-bottom: 8px; font-size: 0.9rem; }
.footer-col ul li a { opacity: 0.8; transition: opacity 0.2s; }
.footer-col ul li a:hover { opacity: 1; }
.copyright {
  margin-top: var(--gap);
  padding-top: var(--gap);
  border-top: 1px solid rgba(31, 21, 35, 0.08);
  font-size: 0.85rem;
  opacity: 0.7;
  text-align: center;
}

/* ==================== SVG 动效 Keyframes ==================== */
@keyframes drawLine {
  0%, 100% { stroke-dashoffset: 1; }
  50% { stroke-dashoffset: 0; }
}
@keyframes floatBubble {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}
@keyframes breatheDots {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 1; }
}
@keyframes slideIn {
  0% { transform: translateX(20px); opacity: 0; }
  100% { transform: translateX(0); opacity: 1; }
}
@keyframes orbitPulse {
  0%, 100% { transform: scale(1); opacity: 0.15; }
  50% { transform: scale(1.05); opacity: 0.35; }
}
@keyframes flowDash {
  0% { stroke-dashoffset: 1; }
  100% { stroke-dashoffset: 0; }
}

/* SVG 动效类 */
.draw-path {
  pathLength: 1;
  stroke-dasharray: 1;
  stroke-dashoffset: 0;
  animation: drawLine 3s ease-in-out infinite;
}
.float-group { animation: floatBubble 4s ease-in-out infinite; }
.breathe-dot { animation: breatheDots 2s ease-in-out infinite; }
.slide-element { animation: slideIn 1.5s ease-out forwards; }
.orbit-ring {
  transform-box: fill-box;
  transform-origin: center;
  animation: orbitPulse 6s ease-in-out infinite;
}
.flow-line {
  pathLength: 1;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  animation: flowDash 2s linear infinite;
}

/* 延迟错开动画 */
.delay-1 { animation-delay: 0.2s; }
.delay-2 { animation-delay: 0.5s; }
.delay-3 { animation-delay: 0.8s; }
.delay-4 { animation-delay: 1.1s; }

/* ==================== 响应式与无障碍 ==================== */
@media (max-width: 768px) {
  .header-inner { flex-direction: column; height: auto; padding: 12px 0; }
  nav { gap: 16px; flex-wrap: wrap; justify-content: center; }
  .hero-layout { flex-direction: column-reverse !important; }
  .split-row { flex-direction: column !important; }
  .split-row .text-side, .split-row .visual-side { width: 100% !important; }
  h1 { font-size: clamp(2rem, 8vw, 3.2rem); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    animation-delay: 0s !important;
  }
  .draw-path, .flow-line { stroke-dashoffset: 0 !important; }
  .float-group, .orbit-ring { transform: none !important; }
  .slide-element { opacity: 1 !important; transform: none !important; }
}
