/* =========================================
   全局设计变量与基础重置
   ========================================= */
:root {
  --bg-primary: #0b1221;
  --bg-surface: #111d33;
  --bg-card: #162640;
  --border-subtle: #1e3a5f;
  --text-heading: #e6f1ff;
  --text-body: #b3c6e8;
  --text-muted: #7a8bb5;
  --color-brand: #00d4ff;
  --color-accent: #00ffaa;
  --color-cta: #00eaff;
  --color-cta-hover: #00c8f5;
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --shadow-card: 0 8px 24px rgba(0, 0, 0, 0.35);
  --shadow-glow: 0 0 18px rgba(0, 212, 255, 0.25);
  --font-main: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  --line-height-base: 1.75;
  --container-max: 1200px;
  --spacing-section: clamp(48px, 8vw, 96px);
}

*, *::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-main);
  background-color: var(--bg-primary);
  color: var(--text-body);
  line-height: var(--line-height-base);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, svg {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease;
}

a:focus-visible, button:focus-visible, summary:focus-visible {
  outline: 2px solid var(--color-cta);
  outline-offset: 4px;
  border-radius: var(--radius-sm);
}

ul, ol {
  list-style: none;
}

h1, h2, h3, h4 {
  color: var(--text-heading);
  text-wrap: balance;
  line-height: 1.3;
}

h1 { font-size: clamp(2rem, 5vw, 3.2rem); font-weight: 800; }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.4rem); font-weight: 700; margin-bottom: 1.2rem; }
h3 { font-size: clamp(1.2rem, 2.2vw, 1.5rem); font-weight: 600; margin-bottom: 0.8rem; }

.container {
  width: min(92%, var(--container-max));
  margin-inline: auto;
}

.section {
  padding: var(--spacing-section) 0;
}

.section-title {
  position: relative;
  padding-left: 1rem;
  border-left: 4px solid var(--color-brand);
  margin-bottom: 2.5rem;
}

/* =========================================
   页头与页脚
   ========================================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(11, 18, 33, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-subtle);
  padding: 1rem 0;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text-heading);
}

.brand img {
  width: 36px;
  height: 36px;
  object-fit: contain;
}

.main-nav ul {
  display: flex;
  gap: 1.5rem;
}

.main-nav a {
  padding: 0.5rem 0;
  font-weight: 500;
  position: relative;
}

.main-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 2px;
  background: var(--color-brand);
  transition: width 0.25s ease;
}

.main-nav a:hover::after, .main-nav [aria-current="page"]::after {
  width: 100%;
}

.main-nav [aria-current="page"] {
  color: var(--color-brand);
}

.site-footer {
  border-top: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  padding: 3rem 0 2rem;
  margin-top: 2rem;
}

.footer-inner {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
}

.footer-col h4 {
  margin-bottom: 1rem;
  font-size: 1rem;
}

.footer-col ul li {
  margin-bottom: 0.6rem;
}

.footer-col a:hover {
  color: var(--color-brand);
}

.copyright {
  text-align: center;
  margin-top: 2.5rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* =========================================
   首屏 Hero
   ========================================= */
.hero {
  min-height: 85vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 3rem;
  padding-top: calc(var(--spacing-section) + 2rem);
  padding-bottom: calc(var(--spacing-section) + 2rem);
  position: relative;
  overflow: hidden;
}

.hero-content {
  max-width: 560px;
}

.hero-subtitle {
  font-size: 1.15rem;
  color: var(--text-muted);
  margin: 1.2rem 0 2rem;
  line-height: 1.8;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  background: linear-gradient(135deg, var(--color-cta), #00a8cc);
  color: #05101a;
  font-weight: 700;
  padding: 0.9rem 2rem;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-glow);
  transition: transform 0.2s, box-shadow 0.2s;
  cursor: pointer;
  border: none;
  font-size: 1rem;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 24px rgba(0, 234, 255, 0.45);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: transparent;
  border: 1px solid var(--color-brand);
  color: var(--color-brand);
  padding: 0.75rem 1.6rem;
  border-radius: var(--radius-md);
  font-weight: 600;
  margin-left: 1rem;
  transition: background 0.2s, color 0.2s;
}

.btn-secondary:hover {
  background: rgba(0, 212, 255, 0.1);
}

.hero-visual {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero-svg-wrapper {
  width: 100%;
  max-width: 520px;
  aspect-ratio: 4/3;
}

/* =========================================
   产品价值与核心功能
   ========================================= */
.value-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.value-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.8rem;
  transition: transform 0.25s, border-color 0.25s;
}

.value-card:hover {
  transform: translateY(-4px);
  border-color: var(--color-brand);
}

.feature-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2.5rem;
}

.feature-item {
  display: flex;
  gap: 1rem;
}

.feature-icon {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  background: rgba(0, 212, 255, 0.1);
  border-radius: var(--radius-md);
  display: grid;
  place-items: center;
}

.feature-icon svg {
  width: 24px;
  height: 24px;
  stroke: var(--color-brand);
}

.feature-text p {
  margin-top: 0.5rem;
  color: var(--text-body);
  line-height: 1.7;
}

/* =========================================
   界面示意与场景画廊
   ========================================= */
.ui-showcase {
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  padding: 2rem;
  margin: 2rem 0;
  border: 1px solid var(--border-subtle);
  overflow: hidden;
}

.gallery-row {
  display: flex;
  gap: 1.5rem;
  overflow-x: auto;
  padding-bottom: 1rem;
  scrollbar-width: thin;
  scrollbar-color: var(--color-brand) var(--bg-card);
}

.gallery-item {
  flex: 0 0 300px;
  background: var(--bg-card);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  border: 1px solid var(--border-subtle);
}

.step-list {
  counter-reset: step-counter;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.step-item {
  counter-increment: step-counter;
  padding: 1.2rem;
  background: var(--bg-card);
  border-left: 3px solid var(--color-accent);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

.step-item::before {
  content: counter(step-counter);
  display: block;
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--color-accent);
  margin-bottom: 0.5rem;
}

/* =========================================
   表格、安全与隐私
   ========================================= */
.version-table {
  width: 100%;
  border-collapse: collapse;
  margin: 2rem 0;
  background: var(--bg-card);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.version-table th, .version-table td {
  padding: 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border-subtle);
}

.version-table th {
  background: rgba(0, 212, 255, 0.08);
  color: var(--text-heading);
  font-weight: 600;
}

.version-table tr:last-child td {
  border-bottom: none;
}

.security-note {
  background: rgba(0, 255, 170, 0.05);
  border: 1px solid rgba(0, 255, 170, 0.2);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  margin: 2rem 0;
}

/* =========================================
   下载区块
   ========================================= */
.download-zone {
  background: linear-gradient(160deg, rgba(0, 212, 255, 0.08), rgba(0, 180, 212, 0.05));
  border: 1px solid var(--color-brand);
  border-radius: var(--radius-lg);
  padding: 3rem 2rem;
  text-align: center;
  margin: 2rem 0;
}

.download-zone h2 {
  margin-bottom: 1rem;
}

.download-meta {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin: 1.5rem 0;
  flex-wrap: wrap;
}

.meta-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
}

.meta-label {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.meta-value {
  font-weight: 600;
  color: var(--text-heading);
}

.install-steps {
  max-width: 600px;
  margin: 2rem auto;
  text-align: left;
}

.install-steps ol {
  padding-left: 1.5rem;
}

.install-steps li {
  margin-bottom: 0.8rem;
  line-height: 1.6;
}

/* =========================================
   FAQ
   ========================================= */
.faq-grid {
  display: grid;
  gap: 1rem;
}

.faq-item {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: border-color 0.2s;
}

.faq-item[open] {
  border-color: var(--color-brand);
}

.faq-item summary {
  padding: 1.2rem;
  cursor: pointer;
  font-weight: 600;
  color: var(--text-heading);
  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;
  transition: transform 0.2s;
}

.faq-item[open] summary::after {
  transform: rotate(45deg);
}

.faq-answer {
  padding: 0 1.2rem 1.2rem;
  line-height: 1.7;
  color: var(--text-body);
}

/* =========================================
   最新文章与相关阅读
   ========================================= */
.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
}

.news-card {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  border: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.news-date {
  font-size: 0.8rem;
  color: var(--color-brand);
  font-weight: 500;
}

.news-excerpt {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.btn-link {
  align-self: flex-start;
  margin-top: auto;
  color: var(--color-cta);
  font-weight: 600;
  font-size: 0.9rem;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.btn-link:hover {
  text-decoration: underline;
}

.related-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.2rem;
  margin-top: 2rem;
}

.related-item a {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  padding: 1rem;
  border-radius: var(--radius-sm);
  transition: background 0.2s;
}

.related-item a:hover {
  background: rgba(0, 212, 255, 0.08);
}

.related-title {
  font-weight: 600;
  color: var(--text-heading);
}

.related-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* =========================================
   SVG 动效关键帧
   ========================================= */
@keyframes node-pulse {
  0%, 100% { opacity: 0.3; transform: scale(0.85); }
  50% { opacity: 1; transform: scale(1.1); fill: var(--color-brand); }
}

@keyframes dash-flow {
  from { stroke-dashoffset: 1; }
  to { stroke-dashoffset: 0; }
}

@keyframes rotate-center {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.grid-node {
  transition: fill 0.4s ease, transform 0.4s ease;
  fill: var(--color-brand);
}

.grid-line {
  stroke: var(--color-brand);
  stroke-width: 1.5;
  pathLength: 1;
  stroke-dasharray: 1;
  stroke-dashoffset: 0;
  opacity: 0.6;
}

.draw-active {
  animation: dash-flow 2s ease-out forwards;
}

.rotate-slow {
  transform-box: fill-box;
  transform-origin: center;
  animation: rotate-center 24s linear infinite;
}

/* 减少动态效果偏好设置 */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .grid-node {
    opacity: 0.8;
    transform: scale(1);
  }
}

/* =========================================
   响应式适配
   ========================================= */
@media (max-width: 768px) {
  .hero {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 2rem;
  }
  .hero-content {
    max-width: 100%;
  }
  .header-inner {
    flex-wrap: wrap;
  }
  .main-nav ul {
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
  }
  .gallery-item {
    flex: 0 0 260px;
  }
  .download-meta {
    flex-direction: column;
    gap: 1rem;
  }
}

@media (max-width: 480px) {
  h1 { font-size: 1.8rem; }
  h2 { font-size: 1.5rem; }
  .btn-secondary { margin-left: 0; margin-top: 0.8rem; }
}
