/* ============================================
   灵犀 LingXi · 落地页样式
   ============================================ */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg-0: #06060b;
  --bg-1: #0d0d18;
  --bg-2: #14142b;
  --bg-3: #1c1c3a;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.16);
  --text: #f5f5fa;
  --text-dim: #a0a0b8;
  --text-mute: #6a6a82;
  --primary: #7c3aed;
  --primary-light: #a78bfa;
  --accent: #00d4ff;
  --accent-2: #ff6b9d;
  --grad-1: linear-gradient(135deg, #00d4ff 0%, #7c3aed 50%, #ff6b9d 100%);
  --grad-2: linear-gradient(135deg, #7c3aed 0%, #ff6b9d 100%);
  --radius: 16px;
  --radius-sm: 10px;
  --shadow-glow: 0 0 80px rgba(124, 58, 237, 0.25);
  --container: 1200px;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC',
    'Hiragino Sans GB', 'Microsoft YaHei', '微软雅黑', 'Helvetica Neue',
    Helvetica, Arial, sans-serif;
  background: var(--bg-0);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  color: var(--accent);
}

img {
  max-width: 100%;
  display: block;
}

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

/* ============================================
   背景动效
   ============================================ */
.bg-grid {
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 50px 50px;
  pointer-events: none;
  z-index: 0;
  mask-image: radial-gradient(ellipse at top, black 30%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse at top, black 30%, transparent 70%);
}

.bg-glow {
  position: fixed;
  top: -200px;
  left: 50%;
  transform: translateX(-50%);
  width: 1200px;
  height: 800px;
  background: radial-gradient(ellipse, rgba(124, 58, 237, 0.3) 0%, rgba(0, 212, 255, 0.15) 30%, transparent 60%);
  pointer-events: none;
  z-index: 0;
  filter: blur(60px);
}

/* ============================================
   导航
   ============================================ */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  background: rgba(6, 6, 11, 0.7);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 18px;
}

.brand-mark {
  font-size: 20px;
  background: var(--grad-1);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 12px rgba(124, 58, 237, 0.6));
}

.brand-logo {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  object-fit: cover;
  filter: drop-shadow(0 0 10px rgba(124, 58, 237, 0.4));
  transition: transform 0.25s, filter 0.25s;
}

.brand:hover .brand-logo {
  transform: rotate(-6deg) scale(1.05);
  filter: drop-shadow(0 0 16px rgba(0, 212, 255, 0.6));
}

.brand-logo-lg {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  margin-bottom: 4px;
}

.brand-name em {
  font-style: normal;
  font-size: 13px;
  color: var(--text-dim);
  font-weight: 500;
  margin-left: 4px;
}

.nav-links {
  display: flex;
  gap: 32px;
  font-size: 14px;
  color: var(--text-dim);
}

.nav-links a:hover {
  color: var(--text);
}

/* ============================================
   按钮
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  font-size: 15px;
  font-weight: 600;
  border-radius: 100px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
  font-family: inherit;
}

.btn-sm {
  padding: 8px 16px;
  font-size: 13px;
}

.btn-primary {
  background: var(--grad-2);
  color: white;
  box-shadow: 0 8px 24px rgba(124, 58, 237, 0.4);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(124, 58, 237, 0.55);
  color: white;
}

.btn-primary .arrow {
  transition: transform 0.2s;
}

.btn-primary:hover .arrow {
  transform: translateX(4px);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--border-strong);
  color: var(--text);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.3);
  color: var(--text);
}

/* ============================================
   Hero
   ============================================ */
.hero {
  position: relative;
  z-index: 1;
  padding: 100px 0 80px;
  text-align: center;
}

.hero-inner {
  position: relative;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: rgba(124, 58, 237, 0.1);
  border: 1px solid rgba(124, 58, 237, 0.3);
  border-radius: 100px;
  font-size: 13px;
  color: var(--primary-light);
  margin-bottom: 24px;
  animation: fadeInUp 0.6s ease-out;
}

.hero-badge .dot {
  width: 6px;
  height: 6px;
  background: #10b981;
  border-radius: 50%;
  box-shadow: 0 0 8px #10b981;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.hero-title {
  font-size: clamp(40px, 6vw, 72px);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 24px;
  animation: fadeInUp 0.6s ease-out 0.1s both;
}

.grad {
  background: var(--grad-1);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  background-size: 200% 200%;
  animation: gradShift 6s ease infinite;
}

@keyframes gradShift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.hero-sub {
  font-size: clamp(15px, 1.6vw, 19px);
  color: var(--text-dim);
  max-width: 720px;
  margin: 0 auto 36px;
  animation: fadeInUp 0.6s ease-out 0.2s both;
}

.hero-cta {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 24px;
  animation: fadeInUp 0.6s ease-out 0.3s both;
}

.hero-meta {
  display: flex;
  gap: 24px;
  justify-content: center;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--text-mute);
  margin-bottom: 60px;
  animation: fadeInUp 0.6s ease-out 0.4s both;
}

.hero-meta span::before {
  content: '✓';
  color: #10b981;
  margin-right: 4px;
  font-weight: 700;
}

/* Hero 下载条 */
.hero-download {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 13px;
  margin-bottom: 20px;
  animation: fadeInUp 0.6s ease-out 0.35s both;
}

.dl-label {
  color: var(--text-mute);
  margin-right: 4px;
}

.dl-link {
  padding: 5px 11px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: 100px;
  color: var(--text-dim);
  transition: all 0.2s;
}

.dl-link:hover {
  color: var(--accent);
  border-color: rgba(0, 212, 255, 0.4);
  background: rgba(0, 212, 255, 0.08);
  transform: translateY(-1px);
}

.dl-sep {
  color: var(--text-mute);
  opacity: 0.4;
  font-size: 11px;
}

/* 终端 demo */
.terminal {
  max-width: 720px;
  margin: 0 auto;
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  text-align: left;
  box-shadow: var(--shadow-glow), 0 30px 60px rgba(0, 0, 0, 0.4);
  animation: fadeInUp 0.8s ease-out 0.5s both;
}

.terminal-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: var(--bg-2);
  border-bottom: 1px solid var(--border);
}

.terminal-bar .dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.terminal-bar .red { background: #ff5f57; }
.terminal-bar .yellow { background: #ffbd2e; }
.terminal-bar .green { background: #28c93f; }

.terminal-title {
  margin-left: 8px;
  font-size: 12px;
  color: var(--text-mute);
  font-family: 'JetBrains Mono', 'Cascadia Code', monospace;
}

.terminal-body {
  padding: 20px;
  font-family: 'JetBrains Mono', 'Cascadia Code', 'Consolas', 'Monaco',
    'Courier New', monospace;
  font-size: 14px;
  line-height: 1.8;
}

.term-line {
  display: flex;
  gap: 10px;
  margin-bottom: 8px;
}

.term-line:last-child {
  margin-bottom: 0;
}

.term-line .prompt {
  color: var(--accent);
  font-weight: 700;
  flex-shrink: 0;
}

.term-line .prompt.ai {
  color: var(--primary-light);
}

.term-line .msg {
  color: var(--text);
}

.term-line .msg a {
  color: var(--accent);
  text-decoration: underline;
}

.term-line .msg.typing::after {
  content: '▊';
  animation: blink 1s steps(2) infinite;
  color: var(--accent);
}

@keyframes blink {
  50% { opacity: 0; }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ============================================
   数据栏
   ============================================ */
.stats {
  position: relative;
  z-index: 1;
  padding: 60px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.01);
}

.stats-inner {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  text-align: center;
}

.stat b {
  display: block;
  font-size: clamp(32px, 4vw, 48px);
  font-weight: 800;
  background: var(--grad-1);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  letter-spacing: -0.02em;
  line-height: 1;
  margin-bottom: 8px;
}

.stat span {
  font-size: 14px;
  color: var(--text-dim);
}

/* ============================================
   Section 通用
   ============================================ */
.section {
  position: relative;
  z-index: 1;
  padding: 100px 0;
}

.section-alt {
  background: linear-gradient(180deg, transparent 0%, rgba(124, 58, 237, 0.03) 50%, transparent 100%);
}

.section-head {
  text-align: center;
  margin-bottom: 60px;
}

.section-head h2 {
  font-size: clamp(28px, 3.5vw, 44px);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
  line-height: 1.2;
}

.section-head p {
  font-size: 16px;
  color: var(--text-dim);
}

/* ============================================
   四大能力
   ============================================ */
.ability-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.ability-card {
  position: relative;
  padding: 32px;
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: all 0.3s;
  overflow: hidden;
}

.ability-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top left, rgba(124, 58, 237, 0.15), transparent 60%);
  opacity: 0;
  transition: opacity 0.3s;
}

.ability-card:hover {
  transform: translateY(-4px);
  border-color: rgba(124, 58, 237, 0.4);
}

.ability-card:hover::before {
  opacity: 1;
}

.ability-icon {
  font-size: 36px;
  margin-bottom: 16px;
  position: relative;
}

.ability-card h3 {
  font-size: 19px;
  font-weight: 700;
  margin-bottom: 12px;
  position: relative;
  line-height: 1.4;
}

.ability-card p {
  color: var(--text-dim);
  font-size: 14px;
  margin-bottom: 16px;
  position: relative;
}

.ability-case {
  position: relative;
  padding: 12px 14px;
  background: rgba(124, 58, 237, 0.08);
  border-left: 2px solid var(--primary);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 13px;
  color: var(--text-dim);
}

/* ============================================
   对比表
   ============================================ */
.compare-table {
  max-width: 900px;
  margin: 0 auto;
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.compare-row {
  display: grid;
  grid-template-columns: 1.2fr 1.4fr 1.4fr;
  border-bottom: 1px solid var(--border);
  transition: background 0.2s;
}

.compare-row:last-child {
  border-bottom: none;
}

.compare-row > div {
  padding: 18px 24px;
  font-size: 14px;
}

.compare-row .label {
  color: var(--text-dim);
  font-weight: 600;
}

.compare-row > div:not(.label) {
  color: var(--text-dim);
}

.compare-row .hl {
  color: var(--text);
  font-weight: 600;
  position: relative;
}

.compare-head {
  background: var(--bg-2);
  font-weight: 700;
  font-size: 15px;
}

.compare-head > div {
  color: var(--text);
}

.compare-head .hl {
  color: var(--primary-light);
}

.compare-row:hover {
  background: rgba(124, 58, 237, 0.04);
}

/* ============================================
   场景技能
   ============================================ */
.scene-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.scene-card {
  position: relative;
  padding: 28px;
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: all 0.3s;
}

.scene-card:hover {
  transform: translateY(-4px);
  border-color: rgba(0, 212, 255, 0.4);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.scene-featured {
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.15) 0%, rgba(0, 212, 255, 0.08) 100%);
  border-color: rgba(124, 58, 237, 0.4);
}

.scene-flag {
  position: absolute;
  top: 16px;
  right: 16px;
  padding: 4px 10px;
  background: var(--grad-2);
  border-radius: 100px;
  font-size: 11px;
  font-weight: 600;
  color: white;
}

.scene-icon {
  font-size: 32px;
  margin-bottom: 14px;
}

.scene-card h3 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 8px;
}

.scene-card p {
  color: var(--text-dim);
  font-size: 14px;
  margin-bottom: 16px;
}

.scene-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.scene-tags span {
  padding: 4px 10px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  border-radius: 100px;
  font-size: 12px;
  color: var(--text-dim);
}

/* ============================================
   三步上手
   ============================================ */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.step {
  position: relative;
  padding: 32px 28px;
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: transform 0.3s;
}

.step:hover {
  transform: translateY(-4px);
}

.step-num {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--grad-2);
  border-radius: 14px;
  font-size: 22px;
  font-weight: 800;
  color: white;
  margin-bottom: 20px;
  box-shadow: 0 8px 20px rgba(124, 58, 237, 0.4);
}

.step h3 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 10px;
  line-height: 1.4;
}

.step p {
  color: var(--text-dim);
  font-size: 14px;
}

.chat-tags {
  display: flex;
  gap: 8px;
  margin-top: 14px;
  flex-wrap: wrap;
}

.chat-tags span {
  padding: 4px 10px;
  background: rgba(0, 212, 255, 0.1);
  border: 1px solid rgba(0, 212, 255, 0.3);
  border-radius: 100px;
  font-size: 12px;
  color: var(--accent);
}

/* ============================================
   FAQ
   ============================================ */
.faq-list {
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.faq-item {
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  transition: border-color 0.2s;
}

.faq-item[open] {
  border-color: rgba(124, 58, 237, 0.4);
}

.faq-item summary {
  padding: 18px 24px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  position: relative;
  user-select: none;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: '+';
  position: absolute;
  right: 24px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 22px;
  color: var(--text-dim);
  transition: transform 0.2s;
}

.faq-item[open] summary::after {
  content: '−';
  color: var(--accent);
}

.faq-item p {
  padding: 0 24px 20px;
  color: var(--text-dim);
  font-size: 14px;
  line-height: 1.7;
}

/* ============================================
   CTA Section
   ============================================ */
.cta-section {
  padding: 120px 0;
  text-align: center;
}

.cta-inner {
  position: relative;
  padding: 60px 40px;
  background:
    radial-gradient(ellipse at top, rgba(124, 58, 237, 0.2), transparent 60%),
    var(--bg-1);
  border: 1px solid var(--border-strong);
  border-radius: 24px;
  overflow: hidden;
}

.cta-inner::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 30px 30px;
  pointer-events: none;
}

.cta-inner h2 {
  font-size: clamp(28px, 3.5vw, 40px);
  font-weight: 800;
  margin-bottom: 12px;
  position: relative;
}

.cta-inner > p {
  color: var(--text-dim);
  font-size: 16px;
  margin-bottom: 32px;
  position: relative;
}

.cta-inner .hero-cta {
  margin-bottom: 16px;
  position: relative;
}

.cta-tip {
  font-size: 13px;
  color: var(--text-mute);
  position: relative;
}

/* ============================================
   Footer
   ============================================ */
.footer {
  position: relative;
  z-index: 1;
  padding: 60px 0 30px;
  border-top: 1px solid var(--border);
  background: var(--bg-1);
}

.footer-inner {
  display: grid;
  grid-template-columns: 1.5fr 3fr;
  gap: 40px;
  margin-bottom: 40px;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-brand .brand {
  margin-bottom: 8px;
}

.footer-brand p {
  color: var(--text-dim);
  font-size: 14px;
}

.footer-cols {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.footer-cols h4 {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 14px;
  color: var(--text);
}

.footer-cols a {
  display: block;
  color: var(--text-dim);
  font-size: 13px;
  margin-bottom: 10px;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  font-size: 13px;
  color: var(--text-mute);
}

.footer-bottom a {
  color: var(--text-mute);
  margin: 0 4px;
}

/* ============================================
   响应式
   ============================================ */
@media (max-width: 900px) {
  .ability-grid,
  .scene-grid,
  .steps {
    grid-template-columns: 1fr;
  }

  .stats-inner {
    grid-template-columns: repeat(2, 1fr);
    gap: 32px 16px;
  }

  .nav-links {
    display: none;
  }

  .footer-inner {
    grid-template-columns: 1fr;
  }

  .footer-cols {
    grid-template-columns: repeat(3, 1fr);
  }

  .section {
    padding: 70px 0;
  }

  .hero {
    padding: 60px 0 50px;
  }

  .compare-row {
    grid-template-columns: 1fr 1fr;
  }

  .compare-row > div:first-child {
    grid-column: 1 / -1;
    background: var(--bg-2);
    font-weight: 700;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }
}

@media (max-width: 600px) {
  .footer-cols {
    grid-template-columns: 1fr 1fr;
  }

  .hero-cta {
    flex-direction: column;
    width: 100%;
  }

  .hero-cta .btn {
    width: 100%;
  }
}

/* 滚动出现动画(纯 CSS,页面加载时一次性播放) */
.reveal {
  animation: revealIn 0.7s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.reveal:nth-child(2) { animation-delay: 0.08s; }
.reveal:nth-child(3) { animation-delay: 0.16s; }
.reveal:nth-child(4) { animation-delay: 0.24s; }
.reveal:nth-child(5) { animation-delay: 0.32s; }
.reveal:nth-child(6) { animation-delay: 0.4s; }

@keyframes revealIn {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 兼容旧 JS 逻辑 */
.reveal.visible {
  /* 已经被 JS 标记的,直接显示,避免重播 */
  animation: none;
  opacity: 1;
  transform: none;
}
