/* === 设计变量与基础重置 === */
:root {
  --color-dark: #271334;
  --color-paper: #E9E8EA;
  --color-text: #1D1523;
  --color-brand: #8A13DD;
  --color-accent: #9EED6E;
  
  --radius-card: 20px;
  --radius-btn: 12px;
  
  --card-border: 2px solid var(--color-text);
  --card-shadow: 4px 4px 0 var(--color-text);
  
  --section-y: clamp(3.5rem, 7vw, 6rem);
  --gap: clamp(1rem, 2vw, 1.75rem);
  
  --content-max: 1120px;
  
  --font-main: "PingFang SC", "Noto Sans SC", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  --line-h: 1.65;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-main);
  font-size: 16px;
  line-height: var(--line-h);
  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 { margin: 0; padding-left: 1.2em; }
h1, h2, h3, h4 { margin-top: 0; margin-bottom: 0.6em; font-weight: 600; letter-spacing: 0; line-height: 1.25; }
p { max-width: 38em; margin-bottom: 1em; }
.container { max-width: var(--content-max); margin-inline: auto; padding-inline: var(--gap); }

/* === 布局与区块 === */
.section { padding-block: var(--section-y); }
.section--dark { background-color: var(--color-dark); color: var(--color-paper); }
.section--paper { background-color: var(--color-paper); color: var(--color-text); }
.section__header { margin-bottom: 2rem; }
.section__eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
  text-transform: uppercase;
}
.section--paper .section__eyebrow { color: var(--color-brand); }
.section--dark .section__eyebrow { color: var(--color-accent); }
.hl { font-weight: 600; }
.section--paper .hl { color: var(--color-brand); }
.section--dark .hl { color: var(--color-accent); }

.grid { display: grid; gap: var(--gap); }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); }
.flex-center { display: flex; align-items: center; justify-content: center; }
.text-center { text-align: center; }

/* === 组件：卡片 === */
.card {
  border: var(--card-border);
  border-radius: var(--radius-card);
  box-shadow: var(--card-shadow);
  padding: 1.5rem;
  background: var(--color-paper);
  color: var(--color-text);
}
.section--dark .card {
  background: var(--color-paper);
  color: var(--color-text);
  border-color: var(--color-text);
}
.card__title { font-size: 1.1rem; font-weight: 600; margin-bottom: 0.5rem; }

/* === 组件：按钮 === */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 52px;
  padding: 0 1.5rem;
  border-radius: var(--radius-btn);
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: transform 0.2s ease, opacity 0.2s ease, background-color 0.2s ease;
  border: none;
}
.btn--primary {
  background-color: var(--color-accent);
  color: var(--color-dark);
}
.btn--secondary {
  background: transparent;
  border: 2px solid var(--color-text);
  color: var(--color-text);
}
.section--dark .btn--secondary {
  border-color: var(--color-paper);
  color: var(--color-paper);
}
.btn:hover { transform: translateY(-2px); }
.btn:focus-visible { outline: 3px solid var(--color-brand); outline-offset: 2px; }
.btn svg { width: 20px; height: 20px; flex-shrink: 0; }

/* === 组件：表格 === */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 400px; }
th, td { padding: 0.75rem 1rem; text-align: left; border-bottom: 1px solid rgba(0,0,0,0.1); }
th { font-weight: 600; background: rgba(0,0,0,0.03); }
tr:last-child td { border-bottom: none; }

/* === 组件：FAQ === */
.faq-item { border: 1px solid rgba(0,0,0,0.1); border-radius: var(--radius-card); margin-bottom: 0.75rem; overflow: hidden; }
.faq-item summary {
  padding: 1rem 1.25rem;
  cursor: pointer;
  font-weight: 600;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::before {
  content: "";
  display: inline-block;
  width: 16px;
  height: 16px;
  background: currentColor;
  mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12 5v14M5 12h14' stroke='currentColor' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
  mask-repeat: no-repeat;
  mask-position: center;
}
.faq-item[open] summary::before {
  mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M5 12h14' stroke='currentColor' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
}
.faq-item p { padding: 0 1.25rem 1rem; margin-bottom: 0; }

/* === 页头与页脚 === */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--color-paper);
  border-bottom: 1px solid rgba(0,0,0,0.05);
  transition: box-shadow 0.3s ease;
}
header.scrolled { box-shadow: 0 4px 12px rgba(0,0,0,0.08); }
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.logo { display: flex; align-items: center; gap: 0.5rem; font-weight: 700; font-size: 1.2rem; }
.logo img { height: 32px; width: auto; }
nav { display: flex; gap: 1.5rem; align-items: center; }
nav a { font-weight: 500; font-size: 0.95rem; position: relative; }
nav a[aria-current="page"], nav a:hover { color: var(--color-brand); }
nav a[aria-current="page"]::after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--color-brand);
}
footer { background: var(--color-dark); color: var(--color-paper); padding-block: 3rem; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 2rem; }
.footer-col h4 { color: var(--color-accent); margin-bottom: 1rem; font-size: 1rem; }
.footer-col ul { list-style: none; padding: 0; }
.footer-col li { margin-bottom: 0.5rem; }
.footer-col a:hover { text-decoration: underline; }
.copyright { text-align: center; margin-top: 2rem; padding-top: 1.5rem; border-top: 1px solid rgba(255,255,255,0.1); font-size: 0.85rem; opacity: 0.8; }

/* === SVG 动效关键帧 === */
@keyframes orbit-breathe {
  0%, 100% { transform: scale(1); opacity: 0.5; }
  50% { transform: scale(1.06); opacity: 1; }
}
@keyframes dash-draw {
  to { stroke-dashoffset: 0; }
}
@keyframes float-up {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}
@keyframes slide-in-right {
  from { transform: translateX(30px); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

.anim-orbit {
  animation: orbit-breathe 6s ease-in-out infinite;
  transform-origin: center;
  transform-box: fill-box;
}
.anim-orbit-slow { animation-duration: 9s; }
.anim-draw {
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  animation: dash-draw 5s ease forwards;
}
.anim-float {
  animation: float-up 5s ease-in-out infinite;
  transform-origin: center;
  transform-box: fill-box;
}
.anim-slide {
  animation: slide-in-right 1.5s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

@media (prefers-reduced-motion: reduce) {
  .anim-orbit, .anim-orbit-slow, .anim-draw, .anim-float, .anim-slide {
    animation: none !important;
  }
}

/* === 响应式微调 === */
@media (max-width: 768px) {
  .header-inner { padding: 0.5rem var(--gap); }
  nav { display: none; } /* 移动端简化导航，实际项目可加汉堡菜单，此处保持静态结构 */
  .hero-layout { flex-direction: column; }
  .split-layout { flex-direction: column-reverse; }
}
/* factory-contrast-width */
@media (min-width: 1440px) {
  [data-fc-1440="ink"] {
    color: #1d1523 !important;
    -webkit-text-fill-color: #1d1523 !important;
  }
}
@media (min-width: 1440px) {
  [data-fc-1440="ink"] {
    color: #1d1523 !important;
    -webkit-text-fill-color: #1d1523 !important;
  }
}
@media (min-width: 1440px) {
  [data-fc-1440="ink"] {
    color: #1d1523 !important;
    -webkit-text-fill-color: #1d1523 !important;
  }
}
@media (min-width: 1440px) {
  [data-fc-1440="ink"] {
    color: #1d1523 !important;
    -webkit-text-fill-color: #1d1523 !important;
  }
}
@media (min-width: 1440px) {
  [data-fc-1440="ink"] {
    color: #1d1523 !important;
    -webkit-text-fill-color: #1d1523 !important;
  }
}
@media (min-width: 1440px) {
  [data-fc-1440="ink"] {
    color: #1d1523 !important;
    -webkit-text-fill-color: #1d1523 !important;
  }
}
@media (min-width: 1440px) {
  [data-fc-1440="ink"] {
    color: #1d1523 !important;
    -webkit-text-fill-color: #1d1523 !important;
  }
}
@media (min-width: 1440px) {
  [data-fc-1440="ink"] {
    color: #1d1523 !important;
    -webkit-text-fill-color: #1d1523 !important;
  }
}
@media (min-width: 1440px) {
  [data-fc-1440="ink"] {
    color: #1d1523 !important;
    -webkit-text-fill-color: #1d1523 !important;
  }
}
@media (min-width: 1440px) {
  [data-fc-1440="ink"] {
    color: #1d1523 !important;
    -webkit-text-fill-color: #1d1523 !important;
  }
}
