/* ════════════════════════════════════════════════════════════
   星核科技 CoreNova · AI 解决方案页样式
   设计概念：神经网络 / Neural Network
   ─ 节点脉动 + 连接线 + 数据流动画
   ════════════════════════════════════════════════════════════ */

/* ── AI Hero 背景：神经网络节点 ─────────────────────────── */
.ai-hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  padding: calc(var(--nav-h) + 3rem) 0 4rem;
}

.ai-hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.ai-nodes {
  position: absolute;
  inset: 0;
}

.ai-node {
  position: absolute;
  left: var(--nx);
  top: var(--ny);
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 12px 3px rgba(53, 224, 255, 0.55),
              0 0 30px 8px rgba(53, 224, 255, 0.22);
  animation: node-pulse var(--nd) ease-in-out infinite alternate;
  will-change: transform;
  /* 鼠标视差：近景节点乘数大（~50px），远景乘数小（~12px），正负号交错制造深度 */
  transform: translate(
    calc(var(--mx, 0) * var(--px, 30px)),
    calc(var(--my, 0) * var(--py, 30px))
  );
}

.ai-edges {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

.ai-node:nth-child(even) {
  background: var(--violet);
  animation-name: node-pulse-violet;
}

@keyframes node-pulse {
  0%   { opacity: 0.35; box-shadow: 0 0 6px 2px rgba(53,224,255,0.30), 0 0 18px 4px rgba(53,224,255,0.08); }
  50%  { opacity: 1;    box-shadow: 0 0 18px 5px rgba(53,224,255,0.65), 0 0 38px 12px rgba(53,224,255,0.28); }
  100% { opacity: 0.65; box-shadow: 0 0 10px 3px rgba(53,224,255,0.45), 0 0 24px 6px rgba(53,224,255,0.18); }
}

@keyframes node-pulse-violet {
  0%   { opacity: 0.35; box-shadow: 0 0 6px 2px rgba(122,92,255,0.30), 0 0 18px 4px rgba(122,92,255,0.08); }
  50%  { opacity: 1;    box-shadow: 0 0 18px 5px rgba(122,92,255,0.65), 0 0 38px 12px rgba(122,92,255,0.28); }
  100% { opacity: 0.65; box-shadow: 0 0 10px 3px rgba(122,92,255,0.45), 0 0 24px 6px rgba(122,92,255,0.18); }
}

.ai-hero-inner {
  position: relative;
  z-index: 1;
  max-width: 800px;
}

.ai-hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1.6rem;
}

.ai-hero-tags .mono-tag {
  padding: 0.35rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: 20px;
  font-size: 0.68rem;
}

/* ── Agent 循环三列 ────────────────────────────────────── */
.agent-loop {
  margin-top: 3rem;
}

.agent-loop-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.agent-loop-card {
  background: var(--glass);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 2rem 1.6rem;
  text-align: center;
  transition: border-color 0.35s var(--ease-out), transform 0.35s var(--ease-out);
}

.agent-loop-card:hover {
  border-color: var(--line-strong);
  transform: translateY(-4px);
}

.agent-loop-icon {
  width: 52px;
  height: 52px;
  margin: 0 auto 1.2rem;
  color: var(--cyan);
}

.agent-loop-num {
  display: block;
  margin-bottom: 0.5rem;
}

.agent-loop-card h3 {
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 0.65rem;
}

.agent-loop-card p {
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.65;
  margin-bottom: 1rem;
}

.agent-loop-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  justify-content: center;
}

.agent-loop-tags span {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--faint);
  padding: 0.2rem 0.55rem;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.agent-loop-line {
  margin-top: 0.5rem;
  overflow: visible;
}

.agent-loop-line svg {
  width: 100%;
  height: 60px;
}

/* ── AI 服务卡片（交替布局，同 products） ──────────────── */
.ai-services-grid {
  display: flex;
  flex-direction: column;
  gap: 3rem;
}

.ai-service-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
  background: var(--glass);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 2.5rem;
}

.ai-service-flip .ai-service-visual {
  order: 2;
}

.ai-service-flip .ai-service-info {
  order: 1;
}

.ai-service-visual {
  display: flex;
  align-items: center;
  justify-content: center;
}

.ai-service-info .product-tag { margin-bottom: 0.4rem; }
.ai-service-info h3 {
  font-size: 1.45rem;
  font-weight: 600;
  margin-bottom: 0.7rem;
}
.ai-service-info > p {
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.7;
  margin-bottom: 1rem;
}

/* AI 服务 mock 容器 */
.ai-svc-mock {
  width: 100%;
  max-width: 380px;
  background: var(--ink-2);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 1.2rem;
  font-size: 0.78rem;
  line-height: 1.5;
}

/* 聊天 mock */
.chat-mock .chat-bubble {
  padding: 0.55rem 0.8rem;
  border-radius: 10px;
  margin-bottom: 0.5rem;
  max-width: 85%;
  font-size: 0.75rem;
  line-height: 1.55;
}
.chat-mock .chat-bubble.user {
  background: rgba(122, 92, 255, 0.18);
  margin-left: auto;
  color: var(--text);
}
.chat-mock .chat-bubble.bot {
  background: var(--ink-3);
  color: var(--muted);
}
.chat-mock .chat-bubble.action {
  background: rgba(53, 224, 255, 0.12);
  color: var(--cyan);
  font-family: var(--font-mono);
  font-size: 0.7rem;
}

/* 仪表盘 mock */
.dash-query {
  padding: 0.6rem 0.8rem;
  background: var(--ink-3);
  border-radius: 8px;
  font-size: 0.7rem;
  margin-bottom: 0.8rem;
  color: var(--text);
}
.dash-chart-bars {
  display: flex;
  align-items: flex-end;
  gap: 0.5rem;
  height: 100px;
}
.dash-chart-bars span {
  flex: 1;
  background: linear-gradient(to top, var(--cyan), var(--violet));
  border-radius: 4px 4px 0 0;
  height: var(--h);
  position: relative;
  min-height: 20px;
}
.dash-chart-bars span em {
  position: absolute;
  bottom: calc(var(--h) + 2px);
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.55rem;
  font-style: normal;
  white-space: nowrap;
  color: var(--faint);
}
.dash-chart-bars span strong {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(-90deg);
  font-size: 0.6rem;
  font-weight: 400;
  white-space: nowrap;
  color: rgba(255,255,255,0.8);
}

/* 工作流 mock */
.flow-mock {
  text-align: center;
  padding: 1rem 1.5rem;
}
.flow-node {
  padding: 0.45rem 0.8rem;
  background: var(--ink-3);
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 0.75rem;
  color: var(--text);
}
.flow-arrow {
  color: var(--cyan);
  font-size: 0.9rem;
  padding: 0.15rem 0;
}

/* 知识库 mock */
.kb-mock .kb-sources {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 0.8rem;
}
.kb-mock .kb-sources span {
  font-size: 0.65rem;
  padding: 0.2rem 0.5rem;
  background: var(--ink-3);
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--muted);
}
.kb-cite {
  display: block;
  margin-top: 0.5rem;
  font-size: 0.65rem !important;
  color: var(--faint);
}

/* ── AI 技术栈 ──────────────────────────────────────────── */
.ai-tech-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
  margin-top: 2rem;
}

.ai-tech-col {
  background: var(--glass);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.6rem;
}

.ai-tech-col h3 {
  margin-bottom: 0.9rem;
}

/* ── AI 落地流程 ────────────────────────────────────────── */
.ai-process-steps {
  max-width: 700px;
  margin: 2.5rem auto 0;
  display: flex;
  flex-direction: column;
  gap: 1.8rem;
}

.ai-process-step {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
  background: var(--glass);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem 1.8rem;
  transition: border-color 0.35s var(--ease-out);
}

.ai-process-step:hover {
  border-color: var(--line-strong);
}

.ai-process-num {
  flex-shrink: 0;
  font-family: var(--font-mono);
  font-size: 1.8rem;
  font-weight: 600;
  background: var(--grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
}

.ai-process-step h3 {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 0.3rem;
}

.ai-process-step p {
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.6;
  margin-bottom: 0.5rem;
}

.ai-process-step .mono-tag {
  font-size: 0.65rem;
}

/* ── AI 场景网格 ────────────────────────────────────────── */
.ai-scenes-grid {
  grid-template-columns: repeat(3, 1fr);
}

/* ── FAQ ────────────────────────────────────────────────── */
.faq-list {
  max-width: 700px;
  margin: 2rem auto 0;
}

.faq-item {
  border: 1px solid var(--line);
  border-radius: 12px;
  margin-bottom: 0.6rem;
  background: var(--glass);
  transition: border-color 0.3s var(--ease-out);
}

.faq-item:hover {
  border-color: var(--line-strong);
}

.faq-item summary {
  padding: 1rem 1.3rem;
  font-weight: 500;
  font-size: 0.95rem;
  cursor: pointer;
  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-family: var(--font-mono);
  font-size: 1.1rem;
  color: var(--cyan);
  transition: transform 0.3s var(--ease-out);
}

.faq-item[open] summary::after {
  content: '−';
  transform: rotate(180deg);
}

.faq-body {
  padding: 0 1.3rem 1rem;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.75;
}

.faq-body strong {
  color: var(--text);
}

/* ── CTA band micro-adjust ──────────────────────────────── */
.cta-band {
  text-align: center;
  padding: 5rem 0;
}

/* ── 响应式 ─────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .agent-loop-cards {
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
  }
  .ai-tech-grid {
    grid-template-columns: 1fr;
  }
  .ai-scenes-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .agent-loop-cards {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  .agent-loop-line { display: none; }

  .ai-service-card,
  .ai-service-flip {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    padding: 1.5rem;
  }
  .ai-service-flip .ai-service-visual { order: 1; }
  .ai-service-flip .ai-service-info { order: 2; }

  .ai-scenes-grid {
    grid-template-columns: 1fr;
  }

  .ai-tech-grid {
    grid-template-columns: 1fr;
  }

  .ai-process-step {
    flex-direction: column;
    gap: 0.6rem;
    padding: 1.2rem;
  }

  .ai-hero-inner .section-title {
    font-size: 1.9rem;
  }

  .ai-hero-tags { gap: 0.4rem; }
  .ai-hero-tags .mono-tag { font-size: 0.62rem; padding: 0.3rem 0.65rem; }
}

@media (max-width: 560px) {
  .ai-hero {
    min-height: auto;
    padding: calc(var(--nav-h) + 2rem) 0 2rem;
  }
  .ai-service-card {
    padding: 1.2rem;
  }
  .agent-loop-card {
    padding: 1.4rem 1.2rem;
  }
}
