/* ==========================================================
   紫东太初 · 科学智能 — 导航页样式
   色彩基调：深空紫（紫气东来）
   ========================================================== */

:root {
  /* 品牌色板 */
  --bg-deep: #0a0618;          /* 深空底色 */
  --bg-dark: #100a26;          /* 深紫区块 */
  --bg-panel: #17103a;         /* 面板紫 */
  --primary: #7c5cfc;          /* 主紫 */
  --primary-strong: #6c47f5;   /* 深主紫 */
  --violet: #a78bfa;           /* 亮紫 */
  --aurora-blue: #5aa2ff;      /* 极光蓝 */
  --text-hi: #f2effc;          /* 高亮文字 */
  --text-mid: #b6aed6;         /* 中性文字 */
  --text-low: #7d74a3;         /* 弱化文字 */
  --line: rgba(167, 139, 250, 0.16);
  --card: rgba(124, 92, 252, 0.06);
  --radius: 16px;
  --font: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg-deep);
  color: var(--text-hi);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

.container {
  width: min(1200px, 92%);
  margin: 0 auto;
}

a { text-decoration: none; color: inherit; }
ul { list-style: none; }
img { display: block; max-width: 100%; }

/* 渐变文字 */
.gradient-text {
  background: linear-gradient(105deg, #b79bff 10%, #7c5cfc 55%, #5aa2ff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ==================== 按钮 ==================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.02em;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
  cursor: pointer;
  border: none;
}

.btn-primary {
  background: linear-gradient(120deg, var(--primary-strong), var(--primary) 60%, #8f6ffd);
  color: #fff;
  box-shadow: 0 8px 28px rgba(124, 92, 252, 0.35);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 36px rgba(124, 92, 252, 0.5);
}

.btn-ghost {
  background: rgba(167, 139, 250, 0.08);
  color: var(--violet);
  border: 1px solid rgba(167, 139, 250, 0.35);
}
.btn-ghost:hover {
  background: rgba(167, 139, 250, 0.16);
  transform: translateY(-2px);
}

.btn-light {
  background: #fff;
  color: var(--primary-strong);
}
.btn-light:hover { transform: translateY(-2px); box-shadow: 0 10px 30px rgba(0,0,0,0.3); }

.btn-lg { padding: 15px 38px; font-size: 16px; }
.btn-sm { padding: 8px 20px; font-size: 14px; }

/* ==================== 顶部导航 ==================== */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  padding: 14px 0;
  transition: background 0.35s ease, box-shadow 0.35s ease, padding 0.35s ease;
}
.site-header.scrolled {
  background: rgba(10, 6, 24, 0.82);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: 0 1px 0 var(--line);
  padding: 10px 0;
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 28px;
}

.brand { display: flex; align-items: center; gap: 12px; }
.brand-logo { height: 26px; }
.brand-divider {
  width: 1px; height: 20px;
  background: rgba(167, 139, 250, 0.35);
}
.brand-sub {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.35em;
  color: var(--violet);
}

.main-nav {
  display: flex;
  gap: 6px;
  margin-left: auto;
}
.nav-link {
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 14.5px;
  color: var(--text-mid);
  transition: color 0.2s, background 0.2s;
}
.nav-link:hover { color: var(--text-hi); }
.nav-link.active {
  color: var(--text-hi);
  background: rgba(124, 92, 252, 0.18);
}

.header-cta { flex-shrink: 0; }

/* ==================== Hero ==================== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background: url("../assets/hero-bg.png") center / cover no-repeat;
}
.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(10,6,24,0.25) 0%, rgba(10,6,24,0) 35%, rgba(10,6,24,0.9) 100%),
    radial-gradient(ellipse 70% 60% at 30% 45%, rgba(10,6,24,0.35), transparent);
}

.hero-inner {
  position: relative;
  z-index: 2;
  padding: 140px 0 100px;
  max-width: 760px;
}

.hero-eyebrow {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.45em;
  color: var(--violet);
  margin-bottom: 22px;
  opacity: 0.9;
}

.hero-title {
  font-size: clamp(42px, 6.4vw, 72px);
  font-weight: 700;
  line-height: 1.18;
  letter-spacing: 0.02em;
  margin-bottom: 24px;
  text-shadow: 0 6px 60px rgba(124, 92, 252, 0.35);
}

.hero-desc {
  font-size: clamp(15px, 1.6vw, 18px);
  color: var(--text-mid);
  margin-bottom: 28px;
}

.hero-badges { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 40px; }
.badge {
  padding: 7px 16px;
  border-radius: 999px;
  font-size: 13px;
  color: var(--violet);
  background: rgba(124, 92, 252, 0.12);
  border: 1px solid rgba(167, 139, 250, 0.28);
  backdrop-filter: blur(6px);
}

.hero-actions { display: flex; flex-wrap: wrap; gap: 16px; }

/* 滚动提示 */
.hero-scroll-hint {
  position: absolute;
  bottom: 34px; left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  width: 24px; height: 40px;
  border: 1.5px solid rgba(167, 139, 250, 0.5);
  border-radius: 14px;
}
.hero-scroll-hint span {
  position: absolute;
  top: 7px; left: 50%;
  width: 3px; height: 8px;
  margin-left: -1.5px;
  border-radius: 3px;
  background: var(--violet);
  animation: scrollHint 1.8s ease-in-out infinite;
}
@keyframes scrollHint {
  0%   { transform: translateY(0); opacity: 1; }
  70%  { transform: translateY(14px); opacity: 0; }
  100% { transform: translateY(0); opacity: 0; }
}

/* ==================== 通用 Section ==================== */
.section { padding: 110px 0 40px; }
.section-dark {
  background: #fff;
  color: #19142f;
  padding-bottom: 110px;
}
.section-dark .section-sub { color: #6f6985; }

.section-head { text-align: center; margin-bottom: 64px; }
.section-title {
  font-size: clamp(28px, 3.6vw, 40px);
  font-weight: 700;
  letter-spacing: 0.02em;
  margin-bottom: 14px;
}
.section-sub { font-size: 16px; color: var(--text-mid); }

/* ==================== 核心能力 ==================== */
.cap-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
}

.cap-card {
  padding: 34px 26px;
  border-radius: var(--radius);
  background: #fff;
  border: 1px solid #ebe7f5;
  box-shadow: 0 10px 34px rgba(43, 28, 91, 0.07);
  transition: transform 0.3s ease, border-color 0.3s ease, background 0.3s ease;
}
.cap-card:hover {
  transform: translateY(-6px);
  border-color: rgba(167, 139, 250, 0.45);
  background: #fbfaff;
}

.cap-icon {
  width: 52px; height: 52px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 14px;
  margin-bottom: 20px;
  color: var(--violet);
  background: linear-gradient(135deg, rgba(124,92,252,0.22), rgba(90,162,255,0.14));
  border: 1px solid rgba(167, 139, 250, 0.3);
}
.cap-icon svg { width: 26px; height: 26px; }

.cap-card h3 { font-size: 18px; margin-bottom: 10px; letter-spacing: 0.03em; color: #19142f; }
.cap-card p { font-size: 14px; color: #6f6985; }

/* 卡片可点击化 */
button.cap-card {
  font-family: inherit;
  text-align: left;
  cursor: pointer;
  appearance: none;
}
.cap-expand-hint {
  display: inline-block;
  margin-top: 16px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--primary-strong);
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.cap-card:hover .cap-expand-hint { opacity: 1; transform: translateY(0); }
.cap-card.active {
  border-color: var(--primary);
  background: #fbfaff;
  box-shadow: 0 14px 40px rgba(108, 71, 245, 0.16);
}
.cap-card.active .cap-expand-hint { opacity: 1; transform: translateY(0); }

/* ==================== 能力详情面板（原地替换卡片区） ==================== */
/* 卡片区与详情面板叠放在同一网格单元，通过交叉淡入淡出原地切换 */
.cap-stage { display: grid; }
.cap-stage > .cap-grid,
.cap-stage > .cap-detail {
  grid-area: 1 / 1;
  transition: opacity 0.45s ease, transform 0.45s ease, visibility 0.45s;
}
.cap-stage > .cap-grid { align-self: center; }

.cap-detail {
  opacity: 0;
  transform: translateY(18px) scale(0.985);
  visibility: hidden;
  pointer-events: none;
}
.cap-stage.detail-open > .cap-grid {
  opacity: 0;
  transform: translateY(-18px) scale(0.985);
  visibility: hidden;
  pointer-events: none;
}
.cap-stage.detail-open > .cap-detail {
  opacity: 1;
  transform: translateY(0) scale(1);
  visibility: visible;
  pointer-events: auto;
  transition-delay: 0.1s;
}

.cap-detail-panel {
  position: relative;
  display: grid;
  grid-template-columns: 0.9fr 1.7fr;
  gap: 48px;
  height: 100%;
  padding: 44px 48px;
  border-radius: 20px;
  background:
    radial-gradient(ellipse 60% 90% at 0% 0%, rgba(124, 92, 252, 0.10), transparent),
    linear-gradient(135deg, #faf9fe, #f2eefb);
  border: 1px solid rgba(124, 92, 252, 0.22);
}

.cap-detail-left {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-right: 40px;
  border-right: 1px solid rgba(124, 92, 252, 0.18);
}
.cap-icon-lg { width: 64px; height: 64px; border-radius: 18px; }
.cap-icon-lg svg { width: 32px; height: 32px; }
.cap-detail-left h3 {
  margin-top: 20px;
  font-size: 24px;
  color: #19142f;
  letter-spacing: 0.03em;
}
.cap-detail-tag {
  margin-top: 10px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--primary-strong);
}

.cap-detail-right { display: flex; flex-direction: column; justify-content: center; }
.cap-detail-intro {
  font-size: 15px;
  color: #55506b;
  margin-bottom: 22px;
}
.cap-detail-points {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 28px;
}
.cap-detail-points li {
  position: relative;
  padding-left: 26px;
  font-size: 13.5px;
  color: #6f6985;
  line-height: 1.65;
}
.cap-detail-points li strong { color: #19142f; display: block; margin-bottom: 2px; }
.cap-detail-points li::before {
  content: "";
  position: absolute;
  left: 0; top: 6px;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: rgba(124, 92, 252, 0.16);
  border: 1px solid rgba(124, 92, 252, 0.45);
}
.cap-detail-points li::after {
  content: "";
  position: absolute;
  left: 5px; top: 11px;
  width: 4px; height: 4px;
  border-radius: 50%;
  background: var(--primary-strong);
}

.cap-detail-close {
  position: absolute;
  top: 16px; right: 20px;
  width: 32px; height: 32px;
  border: none;
  border-radius: 50%;
  background: rgba(124, 92, 252, 0.1);
  color: var(--primary-strong);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}
.cap-detail-close:hover { background: rgba(124, 92, 252, 0.2); transform: rotate(90deg); }

@media (max-width: 1024px) {
  .cap-detail-panel { grid-template-columns: 1fr; gap: 28px; padding: 32px 28px; }
  .cap-detail-left {
    border-right: none;
    border-bottom: 1px solid rgba(124, 92, 252, 0.18);
    padding-right: 0;
    padding-bottom: 24px;
  }
  .cap-detail-points { grid-template-columns: 1fr; }
}

/* ==================== 产品矩阵标题带（浅色 + 粒子动效） ==================== */
.matrix-banner {
  position: relative;
  overflow: hidden;
  padding: 170px 0 150px;
  background:
    radial-gradient(ellipse 55% 70% at 20% 0%, rgba(124, 92, 252, 0.08), transparent),
    radial-gradient(ellipse 55% 70% at 85% 100%, rgba(90, 162, 255, 0.07), transparent),
    linear-gradient(180deg, #faf9fe, #f3f0fb);
}
#matrixCanvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.matrix-banner .section-head {
  position: relative;
  z-index: 1;
  margin-bottom: 0;
}
.matrix-banner .section-title { color: #19142f; }
.matrix-banner .section-sub { color: #6f6985; }

/* ==================== 产品区块（白色系交替） ==================== */
.product-block {
  padding: 90px 0 40px;
  background: #fff;
  color: #19142f;
}
/* 交替使用淡紫白，形成产品之间的色差分割 */
.product-block-alt {
  background:
    radial-gradient(ellipse 55% 60% at 12% 20%, rgba(124, 92, 252, 0.06), transparent),
    #f5f3fb;
}

.product-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
  margin-bottom: 56px;
}
.product-inner-reverse .product-copy { order: 2; }
.product-inner-reverse .product-visual { order: 1; }

.product-tag {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.22em;
  color: var(--aurora-blue);
  margin-bottom: 16px;
}

.product-name {
  font-size: clamp(26px, 3vw, 34px);
  font-weight: 700;
  margin-bottom: 14px;
  letter-spacing: 0.02em;
  color: #19142f;
}
.product-cn { color: var(--primary-strong); }

.product-desc {
  font-size: 16px;
  color: #6f6985;
  margin-bottom: 26px;
}

.product-points { margin-bottom: 32px; display: grid; gap: 13px; }
.product-points li {
  position: relative;
  padding-left: 30px;
  font-size: 14.5px;
  color: #55506b;
}
.product-points li::before {
  content: "";
  position: absolute;
  left: 0; top: 3px;
  width: 18px; height: 18px;
  border-radius: 50%;
  background:
    url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="%236c47f5" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"><path d="M20 6L9 17l-5-5"/></svg>')
    center / 11px no-repeat,
    rgba(124, 92, 252, 0.12);
  border: 1px solid rgba(124, 92, 252, 0.35);
}

/* 产品配图 */
.visual-frame {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid rgba(124, 92, 252, 0.18);
  box-shadow:
    0 24px 60px rgba(43, 28, 91, 0.18),
    0 0 0 1px rgba(124, 92, 252, 0.05);
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}
.visual-frame:hover {
  transform: translateY(-6px) scale(1.012);
  box-shadow:
    0 34px 80px rgba(43, 28, 91, 0.26),
    0 0 60px rgba(124, 92, 252, 0.18);
}
.visual-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(160deg, rgba(167,139,250,0.10), transparent 40%);
  pointer-events: none;
}

/* ==================== 案例卡片 ==================== */
.cases-title {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #19142f;
  margin-bottom: 22px;
  padding-left: 14px;
  border-left: 3px solid var(--primary);
}

.cases-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  padding-bottom: 40px;
}

.case-card {
  display: flex;
  flex-direction: column;
  border-radius: var(--radius);
  overflow: hidden;
  background: #fff;
  border: 1px solid #ebe7f5;
  box-shadow: 0 8px 26px rgba(43, 28, 91, 0.06);
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}
.case-card:hover {
  transform: translateY(-6px);
  border-color: rgba(124, 92, 252, 0.4);
  box-shadow: 0 18px 46px rgba(43, 28, 91, 0.14), 0 0 30px rgba(124, 92, 252, 0.1);
}

.case-thumb {
  height: 128px;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(ellipse 80% 90% at 50% 110%, rgba(124, 92, 252, 0.18), transparent),
    linear-gradient(150deg, #f3effd, #ece6fa);
  border-bottom: 1px solid #ebe7f5;
}
.thumb-mark {
  font-size: 12.5px;
  letter-spacing: 0.25em;
  color: #8b82ad;
  padding: 6px 16px;
  border: 1px dashed rgba(124, 92, 252, 0.4);
  border-radius: 999px;
}

/* 带真实缩略图的案例封面 */
.case-thumb-img {
  position: relative;
  padding: 0;
  overflow: hidden;
}
.case-thumb-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.case-card:hover .case-thumb-img img { transform: scale(1.06); }
.case-badge {
  position: absolute;
  top: 10px; left: 10px;
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: #fff;
  background: rgba(108, 71, 245, 0.85);
  backdrop-filter: blur(4px);
  border-radius: 999px;
}

.case-body { padding: 18px 20px 20px; display: flex; flex-direction: column; flex: 1; }
.case-body h5 {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 8px;
  line-height: 1.5;
  color: #19142f;
}
.case-body p {
  font-size: 13px;
  color: #6f6985;
  margin-bottom: 14px;
  flex: 1;
}
.case-more {
  font-size: 13px;
  font-weight: 600;
  color: var(--primary-strong);
}
.case-card:hover .case-more { color: var(--primary); }

/* ==================== CTA ==================== */
.cta-band {
  position: relative;
  padding: 100px 0;
  text-align: center;
  background:
    radial-gradient(ellipse 55% 90% at 50% 120%, rgba(124, 92, 252, 0.4), transparent),
    linear-gradient(180deg, var(--bg-deep), #150c35);
  border-top: 1px solid var(--line);
  overflow: hidden;
}
.cta-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
/* 跟随光标的聚光辉光，位置由 JS 写入 --cta-mx / --cta-my */
.cta-spotlight {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.5s ease;
  background: radial-gradient(
    360px circle at var(--cta-mx, 50%) var(--cta-my, 50%),
    rgba(124, 92, 252, 0.22),
    transparent 70%
  );
}
.cta-band:hover .cta-spotlight { opacity: 1; }
.cta-inner { position: relative; z-index: 1; }
.cta-kicker {
  display: inline-block;
  margin-bottom: 18px;
  padding: 6px 18px;
  font-size: 13px;
  letter-spacing: 0.32em;
  color: var(--violet);
  border: 1px solid rgba(124, 92, 252, 0.35);
  border-radius: 999px;
  background: rgba(124, 92, 252, 0.08);
}
.cta-inner h2 {
  font-size: clamp(26px, 3.4vw, 38px);
  margin-bottom: 14px;
  letter-spacing: 0.02em;
}
.cta-inner > p {
  color: var(--text-mid);
  margin: 0 auto 32px;
  font-size: 16px;
  line-height: 1.9;
  max-width: 640px;
}
.cta-tags {
  display: flex;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 30px;
}
.cta-tag {
  display: inline-block;
  padding: 10px 22px;
  font-size: 14px;
  color: var(--text-hi, #f0edff);
  border: 1px solid rgba(124, 92, 252, 0.4);
  border-radius: 999px;
  background: rgba(124, 92, 252, 0.1);
  will-change: transform;
  transition: border-color 0.3s ease, background 0.3s ease, box-shadow 0.3s ease,
    transform 0.25s cubic-bezier(0.22, 1, 0.36, 1);
}
.cta-tag:hover {
  border-color: rgba(124, 92, 252, 0.9);
  background: rgba(124, 92, 252, 0.22);
  box-shadow: 0 0 24px rgba(124, 92, 252, 0.35);
}
.cta-note {
  font-size: 14px;
  letter-spacing: 0.14em;
  color: rgba(240, 237, 255, 0.55);
}

/* ==================== 页脚 ==================== */
.site-footer {
  background: #070412;
  border-top: 1px solid var(--line);
  padding: 70px 0 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 48px;
}

.footer-logo { height: 24px; margin-bottom: 18px; }
.footer-brand p { font-size: 13.5px; color: var(--text-low); max-width: 320px; }

.footer-col h4 {
  font-size: 14px;
  letter-spacing: 0.1em;
  margin-bottom: 18px;
  color: var(--text-hi);
}
.footer-col li { margin-bottom: 12px; font-size: 13.5px; color: var(--text-low); }
.footer-col a { transition: color 0.2s; }
.footer-col a:hover { color: var(--violet); }

.footer-bottom {
  border-top: 1px solid rgba(167, 139, 250, 0.08);
  padding: 22px 0;
  text-align: center;
  font-size: 12.5px;
  color: var(--text-low);
}

/* ==================== 滚动显现动画 ==================== */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ==================== 响应式 ==================== */
@media (max-width: 1024px) {
  .cap-grid { grid-template-columns: repeat(2, 1fr); }
  .cases-grid { grid-template-columns: repeat(2, 1fr); }
  .product-inner { grid-template-columns: 1fr; gap: 40px; }
  .product-inner-reverse .product-copy { order: 1; }
  .product-inner-reverse .product-visual { order: 2; }
  .main-nav { display: none; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 620px) {
  .cap-grid, .cases-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .hero-inner { padding-top: 120px; }
  .header-cta { display: none; }
}
