/* === 设计变量与基础重置 === */
:root {
  --bg-dark: #271231;
  --bg-paper: #F5F0E5;
  --text-main: #1F1523;
  --brand: #9B12D8;
  --accent: #ED6EC0;
  --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);
  --content-max: 1280px;
  --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 { font-size: 16px; scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { font-family: var(--font-sans); background: var(--bg-paper); color: var(--text-main); line-height: 1.65; overflow-x: hidden; }
img, svg { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }

/* === 主题面变量覆盖 === */
.paper-face { background: var(--bg-paper); color: var(--text-main); }
.dark-face { background: var(--bg-dark); color: var(--bg-paper); }
.paper-face .hl { color: var(--brand); }
.dark-face .hl { color: var(--accent); }
.paper-face .mark { color: var(--brand); }
.dark-face .mark { color: var(--accent); }
.paper-face .btn-secondary { color: var(--text-main); border-color: var(--text-main); }
.dark-face .btn-secondary { color: var(--bg-paper); border-color: var(--bg-paper); }
.paper-face .card { background: var(--bg-paper); color: var(--text-main); }
.dark-face .card { background: var(--bg-paper); color: var(--text-main); }

/* === 布局容器 === */
.container { max-width: var(--content-max); margin: 0 auto; padding: 0 var(--gap); }
.section { padding: var(--section-y) 0; border-bottom: 1px solid rgba(31, 21, 35, 0.1); }
.section:last-child { border-bottom: none; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: var(--gap); }
.flex-row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--gap); }
.text-center { text-align: center; }

/* === 排版系统 === */
h1 { font-size: clamp(2.2rem, 5vw, 4rem); font-weight: 800; line-height: 1.15; letter-spacing: -0.02em; text-wrap: balance; }
h2 { font-size: clamp(1.6rem, 3vw, 2.4rem); font-weight: 700; line-height: 1.25; margin-bottom: var(--gap); text-wrap: balance; }
h3 { font-size: 1.25rem; font-weight: 700; line-height: 1.3; margin-bottom: 0.75rem; }
p { max-width: 38em; margin-bottom: 1rem; }
.mark { display: block; font-size: 0.8rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; margin-bottom: 0.5rem; }
.hl { font-weight: 800; }
.fact-line { font-size: 0.85rem; opacity: 0.8; margin-top: 0.5rem; }

/* === 组件：按钮 === */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; padding: 0 1.5rem; height: 52px; font-size: 1rem; font-weight: 600; cursor: pointer; transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease; border: none; text-decoration: none; white-space: nowrap; }
.btn-primary { background: var(--accent); color: var(--bg-dark); }
.btn-primary:hover { transform: translateY(-2px); background: #d95aae; }
.btn-secondary { background: transparent; }
.btn-secondary:hover { background: rgba(31, 21, 35, 0.05); }
.dark-face .btn-secondary:hover { background: rgba(245, 240, 229, 0.1); }
.btn-icon { width: 20px; height: 20px; flex-shrink: 0; }

/* === 组件：卡片 === */
.card { border: var(--card-border); border-radius: var(--radius-card); box-shadow: var(--card-shadow); padding: var(--gap); transition: box-shadow 0.3s ease; }
.card:hover { box-shadow: 0 14px 32px -12px rgba(31, 21, 35, 0.35); }

/* === 组件：表格 === */
.table-wrapper { overflow-x: auto; margin: var(--gap) 0; }
table { width: 100%; border-collapse: collapse; min-width: 500px; }
th, td { padding: 0.85rem 1rem; text-align: left; border-bottom: 1px solid rgba(31, 21, 35, 0.1); vertical-align: top; }
th { font-weight: 700; background: rgba(31, 21, 35, 0.03); }
td:first-child { font-weight: 600; width: 35%; }

/* === 组件：FAQ === */
details { border: 1px solid rgba(31, 21, 35, 0.1); padding: 1rem; margin-bottom: 0.75rem; background: transparent; }
summary { cursor: pointer; font-weight: 600; list-style: none; display: flex; justify-content: space-between; align-items: center; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; font-size: 1.2rem; font-weight: 400; transition: transform 0.2s; }
details[open] summary::after { transform: rotate(45deg); }
details p { margin-top: 0.75rem; font-size: 0.95rem; }

/* === 组件：步骤时间线 === */
.step-list { counter-reset: step; }
.step-item { position: relative; padding-left: 3rem; margin-bottom: 1.5rem; }
.step-item::before { counter-increment: step; content: counter(step, decimal-leading-zero); position: absolute; left: 0; top: 0; width: 2rem; height: 2rem; display: flex; align-items: center; justify-content: center; background: var(--accent); color: var(--bg-dark); font-weight: 700; font-size: 0.9rem; }
.step-title { font-weight: 700; margin-bottom: 0.25rem; }

/* === 焦点与无障碍 === */
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

/* === SVG 动效关键帧 === */
@keyframes floatY { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
@keyframes breathe { 0%, 100% { opacity: 0.3; } 50% { opacity: 1; } }
@keyframes slideInRight { from { transform: translateX(24px); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
@keyframes dashFlow { to { stroke-dashoffset: -24; } }
@keyframes gridNodeLight { 0%, 100% { opacity: 0.15; transform: scale(0.7); } 50% { opacity: 1; transform: scale(1.1); fill: var(--accent); } }

.anim-float { animation: floatY 4s ease-in-out infinite; }
.anim-breathe { animation: breathe 2.5s ease-in-out infinite; }
.anim-slide { animation: slideInRight 1.5s ease-out forwards; }
.anim-dash { stroke-dasharray: 24; stroke-dashoffset: 24; animation: dashFlow 2s linear infinite; }
.grid-node { animation: gridNodeLight 5s ease-in-out infinite; }
.d1 { animation-delay: 0s; } .d2 { animation-delay: 0.6s; } .d3 { animation-delay: 1.2s; } .d4 { animation-delay: 1.8s; } .d5 { animation-delay: 2.4s; }

/* === 响应式适配 === */
@media (max-width: 768px) {
  .grid-2 { grid-template-columns: 1fr; }
  .hero-layout { flex-direction: column; }
  .hero-visual { order: -1; max-width: 320px; margin: 0 auto; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}
