/* 设计变量与基础重置 */
:root {
  --bg-primary: #0B0B0F;
  --bg-secondary: #121218;
  --bg-card: #181820;
  --accent: #22C55E;
  --accent-hover: #16A34A;
  --text-primary: #F4F4F5;
  --text-secondary: #A1A1AA;
  --border-color: #27272A;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --spacing-section: clamp(4rem, 8vw, 8rem);
  --max-width: 1200px;
  --header-height: 72px;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease;
}

ul, ol {
  list-style: none;
}

img, svg {
  display: block;
  max-width: 100%;
}

/* 排版系统 */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 clamp(1rem, 5vw, 2rem);
}

h1, h2, h3 {
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

h1 { font-size: clamp(2.25rem, 5vw + 1rem, 3.75rem); }
h2 { font-size: clamp(1.75rem, 3vw + 1rem, 2.5rem); margin-bottom: 1.5rem; }
h3 { font-size: clamp(1.125rem, 1.5vw + 0.5rem, 1.5rem); margin-bottom: 0.75rem; }

p {
  font-size: clamp(1rem, 0.5vw + 0.8rem, 1.125rem);
  color: var(--text-secondary);
  max-width: 65ch;
}

.section {
  padding-block: var(--spacing-section);
}

.section-alt {
  background-color: var(--bg-secondary);
}

/* 页头与导航 */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(11, 11, 15, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  height: var(--header-height);
  display: flex;
  align-items: center;
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.brand-nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.brand-logo img {
  height: 32px;
  width: auto;
  vertical-align: middle;
}

.brand-name {
  font-weight: 700;
  font-size: 1rem;
  margin-left: 0.5rem;
}

.nav-links {
  display: flex;
  gap: 2rem;
  font-size: 0.95rem;
  font-weight: 500;
}

.nav-link {
  position: relative;
  padding: 0.25rem 0;
}

.nav-link[aria-current="page"] {
  color: var(--accent);
}

.nav-link:not([aria-current="page"]):hover {
  color: #fff;
}

.nav-link::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.2s ease;
}

.nav-link:hover::after, .nav-link[aria-current="page"]::after {
  transform: scaleX(1);
  transform-origin: left;
}

/* 按钮组件 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 1.75rem;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  border: none;
  transition: all 0.2s ease;
  gap: 0.5rem;
}

.btn-primary {
  background: var(--accent);
  color: #000;
}

.btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
}

.btn-secondary {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-primary);
}

.btn-secondary:hover {
  border-color: var(--text-secondary);
  background: rgba(255,255,255,0.05);
}

.btn:focus-visible, .nav-link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

/* 英雄区块 (Hero) */
.hero {
  min-height: calc(100vh - var(--header-height));
  display: grid;
  place-items: center;
  position: relative;
  overflow: hidden;
  padding-top: 2rem;
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
  padding: 0 1rem;
}

.hero-subtitle {
  margin-top: 1.5rem;
  font-size: clamp(1.1rem, 1.5vw, 1.35rem);
  color: var(--text-secondary);
}

.hero-actions {
  margin-top: 2.5rem;
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.hero-svg-bg {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  height: 100%;
  z-index: 1;
  opacity: 0.6;
  pointer-events: none;
}

/* 特性网格 */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.feature-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
}

.feature-icon {
  width: 48px;
  height: 48px;
  margin-bottom: 1.25rem;
  color: var(--accent);
}

/* 界面示意 */
.ui-mockup {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin: 3rem auto;
  max-width: 900px;
  position: relative;
  overflow: hidden;
}

.mockup-header {
  height: 48px;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.mockup-sidebar {
  width: 240px;
  height: 400px;
  background: var(--bg-secondary);
  border-radius: var(--radius-sm);
  padding: 1rem;
}

.mockup-chat {
  flex: 1;
  height: 400px;
  background: var(--bg-primary);
  border-radius: var(--radius-sm);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.message-bubble {
  background: var(--bg-card);
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  max-width: 70%;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

/* 场景与步骤 */
.scenario-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2.5rem;
}

.scenario-card {
  background: var(--bg-card);
  border-left: 3px solid var(--accent);
  padding: 1.5rem;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

.step-list {
  counter-reset: step;
  display: grid;
  gap: 1rem;
  margin-top: 1.5rem;
}

.step-item {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.step-number {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  background: var(--accent);
  color: #000;
  font-weight: 700;
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-size: 0.85rem;
}

/* 表格 */
.table-wrapper {
  overflow-x: auto;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  margin: 2rem 0;
}

.platform-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 600px;
}

.platform-table th, .platform-table td {
  padding: 1rem 1.25rem;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
}

.platform-table th {
  background: var(--bg-secondary);
  font-weight: 600;
  color: var(--text-primary);
}

.platform-table tr:last-child td {
  border-bottom: none;
}

.platform-table td {
  color: var(--text-secondary);
}

/* FAQ */
.faq-list {
  display: grid;
  gap: 1rem;
  margin-top: 2rem;
}

.faq-item {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.faq-item summary {
  padding: 1.25rem 1.5rem;
  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.25rem;
  color: var(--accent);
  transition: transform 0.2s ease;
}

.faq-item[open] summary::after {
  transform: rotate(45deg);
}

.faq-item p {
  padding: 0 1.5rem 1.25rem;
  margin: 0;
  font-size: 0.95rem;
}

/* 新闻卡片 */
.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.news-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  height: 100%;
}

.news-date {
  font-size: 0.85rem;
  color: var(--accent);
  font-weight: 500;
}

.news-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
}

.news-excerpt {
  font-size: 0.95rem;
  color: var(--text-secondary);
  flex: 1;
}

.news-link {
  align-self: flex-start;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--accent);
  margin-top: auto;
}

/* 相关阅读 */
.related-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1rem;
  margin-top: 2rem;
}

.related-item {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 1rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  transition: border-color 0.2s ease;
}

.related-item:hover {
  border-color: var(--accent);
}

.related-title {
  font-weight: 600;
  color: var(--text-primary);
}

.related-desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

/* 页脚 */
.site-footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  padding: 3rem 0;
  margin-top: var(--spacing-section);
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
}

.footer-col h4 {
  font-size: 1rem;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.footer-col ul {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footer-col a {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.footer-col a:hover {
  color: var(--accent);
}

.footer-bottom {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-color);
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

/* SVG 动效关键帧 */
@keyframes orbit-spin {
  0% { transform: rotate(0deg) scale(1); opacity: 0.6; }
  50% { transform: rotate(180deg) scale(1.08); opacity: 1; }
  100% { transform: rotate(360deg) scale(1); opacity: 0.6; }
}

@keyframes orbit-pulse {
  0% { transform: scale(0.95); opacity: 0.5; }
  50% { transform: scale(1.05); opacity: 0.9; }
  100% { transform: scale(0.95); opacity: 0.5; }
}

@keyframes draw-line {
  0% { stroke-dashoffset: 1; }
  100% { stroke-dashoffset: 0; }
}

.orbit-ring {
  transform-box: fill-box;
  transform-origin: center;
  animation: orbit-spin 12s linear infinite;
}

.orbit-ring:nth-child(2) {
  animation-duration: 18s;
  animation-direction: reverse;
}

.orbit-ring:nth-child(3) {
  animation-duration: 24s;
}

.draw-path {
  pathLength: 1;
  stroke-dasharray: 1;
  stroke-dashoffset: 0;
  animation: draw-line 4s ease-in-out infinite alternate;
}

/* 减少动态效果适配 */
@media (prefers-reduced-motion: reduce) {
  .orbit-ring, .draw-path {
    animation: none !important;
  }
  .hero-svg-bg {
    opacity: 0.4;
  }
}

/* 响应式微调 */
@media (max-width: 768px) {
  .nav-links { display: none; }
  .mockup-sidebar { display: none; }
  .scenario-grid { grid-template-columns: 1fr; }
  h1 { font-size: clamp(2rem, 6vw, 3rem); }
}
