/* === 设计变量与基础设定 === */
:root {
  /* 色板 */
  --color-dark-bg: #21163C;
  --color-paper: #E9E8EA;
  --color-text: #191523;
  --color-brand: #5214EB;
  --color-accent: #ED926E;

  /* 圆角 */
  --radius-card: 20px;
  --radius-btn: 12px;

  /* 卡片边界与阴影 */
  --card-border: 0;
  --card-shadow: 0 10px 28px -14px rgba(25, 21, 35, 0.3);

  /* 节奏与密度 */
  --section-y: clamp(3.5rem, 7vw, 6rem);
  --gap: clamp(1rem, 2vw, 1.75rem);

  /* 内容最大宽度 */
  --content-max: 1120px;

  /* 字体 */
  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans SC", sans-serif;
}

/* === 重置与排版 === */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  color: var(--color-text);
  background-color: var(--color-paper);
  line-height: 1.65;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

img, svg {
  display: block;
  max-width: 100%;
}

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-top: var(--section-y);
  padding-bottom: var(--section-y);
  position: relative;
}

.section--dark {
  background-color: var(--color-dark-bg);
  color: var(--color-paper);
}

.section__header {
  margin-bottom: var(--gap);
  text-align: center;
}

.section__eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 0.5em;
}

.paper-surface .section__eyebrow {
  color: var(--color-brand);
}

.dark-surface .section__eyebrow {
  color: var(--color-accent);
}

.section__title {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: 0;
  margin-bottom: 0.5em;
}

.section__subtitle {
  font-size: clamp(1rem, 2vw, 1.25rem);
  opacity: 0.85;
  max-width: 60ch;
  margin: 0 auto;
}

.hl {
  /* 高亮关键词样式，颜色由上下文变量决定 */
}

.paper-surface .hl {
  color: var(--color-brand);
}

.dark-surface .hl {
  color: var(--color-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, background-color 0.2s ease, opacity 0.2s ease;
  cursor: pointer;
  border: none;
  gap: 8px;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

.btn--primary {
  background-color: var(--color-accent);
  color: var(--color-dark-bg);
}

.btn--primary:hover {
  filter: brightness(1.1);
}

.btn--secondary {
  background-color: transparent;
  color: var(--color-text);
  border: 1px solid var(--color-text);
}

.dark-surface .btn--secondary {
  color: var(--color-paper);
  border-color: var(--color-paper);
}

.btn--icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

/* === 卡片 === */
.card {
  background-color: white;
  border-radius: var(--radius-card);
  box-shadow: var(--card-shadow);
  padding: var(--gap);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.dark-surface .card {
  background-color: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 32px -12px rgba(25, 21, 35, 0.4);
}

.dark-surface .card:hover {
  background-color: rgba(255, 255, 255, 0.08);
}

.card__title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.5em;
  color: var(--color-text);
}

.dark-surface .card__title {
  color: var(--color-paper);
}

.card__text {
  font-size: 0.95rem;
  line-height: 1.6;
  opacity: 0.9;
}

/* === 网格系统 === */
.grid {
  display: grid;
  gap: var(--gap);
}

.grid--2 {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 400px), 1fr));
}

.grid--3 {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
}

/* === 表格 === */
.table-wrapper {
  overflow-x: auto;
  border-radius: var(--radius-card);
  box-shadow: var(--card-shadow);
}

table {
  width: 100%;
  border-collapse: collapse;
  background: white;
  text-align: left;
}

th, td {
  padding: 16px 24px;
  border-bottom: 1px solid rgba(25, 21, 35, 0.1);
}

th {
  font-weight: 700;
  background-color: rgba(25, 21, 35, 0.03);
  white-space: nowrap;
}

.dark-surface table {
  background: rgba(255, 255, 255, 0.05);
  color: var(--color-paper);
}

.dark-surface th {
  background-color: rgba(255, 255, 255, 0.1);
  color: var(--color-paper);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.dark-surface td {
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

tr:last-child th, tr:last-child td {
  border-bottom: none;
}

/* === FAQ (Details/Summary) === */
details {
  background: white;
  border-radius: var(--radius-card);
  margin-bottom: 12px;
  box-shadow: var(--card-shadow);
  overflow: hidden;
}

.dark-surface details {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

summary {
  padding: 20px 24px;
  cursor: pointer;
  font-weight: 600;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--color-text);
}

.dark-surface summary {
  color: var(--color-paper);
}

summary::-webkit-details-marker {
  display: none;
}

summary::after {
  content: "+";
  font-size: 1.5rem;
  font-weight: 400;
  opacity: 0.5;
  transition: transform 0.2s ease;
}

details[open] summary::after {
  transform: rotate(45deg);
}

details p {
  padding: 0 24px 20px 24px;
  line-height: 1.7;
  color: var(--color-text);
  opacity: 0.9;
}

.dark-surface details p {
  color: var(--color-paper);
}

/* === 导航栏 === */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: rgba(233, 232, 234, 0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(25, 21, 35, 0.05);
  padding: 16px 0;
}

.dark-surface .navbar {
  background-color: rgba(33, 22, 60, 0.9);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.navbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.navbar__brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  font-size: 1.2rem;
}

.navbar__brand img {
  height: 32px;
  width: auto;
}

.navbar__links {
  display: flex;
  gap: 24px;
  align-items: center;
}

.navbar__link {
  font-weight: 500;
  font-size: 0.95rem;
  transition: opacity 0.2s;
}

.navbar__link:hover {
  opacity: 0.7;
}

.navbar__link[aria-current="page"] {
  color: var(--color-brand);
  font-weight: 700;
}

.dark-surface .navbar__link[aria-current="page"] {
  color: var(--color-accent);
}

@media (max-width: 768px) {
  .navbar__links {
    display: none; 
    /* 简化处理：移动端隐藏链接，实际项目应添加汉堡菜单 */
  }
  .navbar__cta {
    display: none;
  }
}

/* === 页脚 === */
.footer {
  background-color: var(--color-dark-bg);
  color: var(--color-paper);
  padding: 64px 0 32px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--gap);
  margin-bottom: var(--gap);
}

.footer__col h4 {
  font-size: 1rem;
  margin-bottom: 16px;
  color: var(--color-accent);
}

.footer__col a {
  display: block;
  margin-bottom: 8px;
  opacity: 0.8;
  transition: opacity 0.2s;
}

.footer__col a:hover {
  opacity: 1;
}

.footer__bottom {
  text-align: center;
  font-size: 0.85rem;
  opacity: 0.6;
  padding-top: 32px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* === SVG 动效 (Concentric Orbit Breathing) === */
@keyframes breathe-scale {
  0%, 100% { transform: scale(1); opacity: 0.3; }
  50% { transform: scale(1.15); opacity: 0.8; }
}

@keyframes breathe-scale-alt {
  0%, 100% { transform: scale(1.1); opacity: 0.6; }
  50% { transform: scale(0.95); opacity: 0.2; }
}

.svg-orbit {
  animation: breathe-scale 8s ease-in-out infinite;
  transform-origin: center;
  transform-box: fill-box;
}

.svg-orbit--alt {
  animation: breathe-scale-alt 12s ease-in-out infinite;
  transform-origin: center;
  transform-box: fill-box;
}

/* === 响应式调整 === */
@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;
  }
}

@media (max-width: 768px) {
  .section__title {
    font-size: clamp(1.4rem, 5vw, 2rem);
  }
  
  .grid--2, .grid--3 {
    grid-template-columns: 1fr;
  }
  
  .hero-layout {
    flex-direction: column-reverse;
  }
  
  .hero-layout__visual {
    width: 100%;
    margin-bottom: 32px;
  }
}
