/* ============================================================
   首页视觉升级样式（仅 index.html 使用）
   依赖 css/style.css 的 :root 设计令牌
   ============================================================ */

/* ===== Hero 景深粒子层（js/home.js 动态插入） ===== */
.hero-depth-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

/* ===== 统计条 3D 化（白蓝玻璃质感，白色磁贴承载） ===== */
.stat-item .stat-3d-icon {
  display: block;
  width: 80px;
  height: 80px;
  object-fit: contain;
  margin: 0;
  flex: none;
  padding: 5px;
  background: #fff;
  border: 1px solid #e8eef5;
  border-radius: 20px;
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.08);
  animation: statIconFloat 5.5s ease-in-out infinite;
}
.stat-item .stat-body {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.stat-item:nth-child(2) .stat-3d-icon { animation-delay: 0.5s; }
.stat-item:nth-child(3) .stat-3d-icon { animation-delay: 1s; }
.stat-item:nth-child(4) .stat-3d-icon { animation-delay: 1.5s; }

@keyframes statIconFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

/* ===== 产品 Tab 底部滑动指示条 ===== */
.product-tabs {
  position: relative;
}
.tab-indicator {
  position: absolute;
  left: 0;
  top: 0;
  width: 0;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent-500), var(--indigo-500));
  box-shadow: 0 2px 10px rgba(8, 145, 178, 0.45);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1), width 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
}

/* ===== 产品 Panel 玻璃质感容器与过渡 ===== */
.panel-visual {
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.06), rgba(99, 102, 241, 0.09));
}
.panel-visual::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 18% 22%, rgba(6, 182, 212, 0.18), transparent 42%),
    radial-gradient(circle at 82% 78%, rgba(99, 102, 241, 0.20), transparent 46%);
  pointer-events: none;
  z-index: 0;
}
.panel-visual::after {
  content: '';
  position: absolute;
  inset: 14px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.10), rgba(255, 255, 255, 0.03));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4), 0 12px 30px rgba(8, 145, 178, 0.14);
  pointer-events: none;
  z-index: 0;
}
.visual-card {
  position: relative;
  z-index: 1;
}
.visual-card > svg {
  animation: visualFloat 6s ease-in-out infinite;
}

@keyframes visualFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-7px); }
}

/* Tab 切换：淡入 + 上移 */
.tab-panel.active {
  animation: panelFadeUp 0.45s ease both;
}

@keyframes panelFadeUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===== 业务场景驾驶舱（首页 · 大屏图 + 胶囊滑块 Tab · 浅色卡片风） ===== */
.scenario-entry {
  scroll-margin-top: 84px;
}
.scenario-entry .section-header {
  text-align: center;
  margin-bottom: 20px;
}

.cab {
  position: relative;
}
.cab::before,
.cab::after {
  content: '';
  position: absolute;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.32;
  pointer-events: none;
}
.cab::before {
  left: -90px;
  bottom: -110px;
  background: rgba(6, 182, 212, 0.4);
}
.cab::after {
  right: -80px;
  top: -100px;
  background: rgba(99, 102, 241, 0.34);
}

/* ---- 顶部胶囊 Tab + 滑动光标 ---- */
.cab-tabs {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: center;
  gap: 4px;
  padding: 5px;
  border-radius: 999px;
  background: var(--white);
  border: 1px solid var(--gray-200);
  box-shadow: var(--shadow-sm);
  overflow-x: auto;
  scrollbar-width: none;
}
.cab-tabs::-webkit-scrollbar {
  display: none;
}
.cab-cursor {
  position: absolute;
  top: 5px;
  left: 0;
  height: calc(100% - 10px);
  border-radius: 999px;
  background: linear-gradient(135deg, #06b6d4, #6366f1);
  box-shadow: 0 6px 18px rgba(79, 70, 229, 0.38);
  transition: transform 0.42s cubic-bezier(0.55, 0.06, 0.25, 1.25), width 0.42s cubic-bezier(0.55, 0.06, 0.25, 1.25);
  will-change: transform, width;
  pointer-events: none;
}
.cab-tab {
  position: relative;
  z-index: 1;
  padding: 9px 16px;
  border: 0;
  background: transparent;
  color: var(--gray-600);
  font-size: 0.82rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  white-space: nowrap;
  border-radius: 999px;
  transition: color 0.25s ease;
}
.cab-tab:hover {
  color: var(--accent-600);
}
.cab-tab.active {
  color: #fff;
}

/* ---- 主区：信息卡 + 大屏（间距收紧、左右均衡） ---- */
.cab-main {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 330px minmax(0, 1fr);
  gap: 24px;
  align-items: stretch;
  margin-top: 16px;
}

/* ---- 行业信息卡（浅色白卡 + 功能要点清单） ---- */
.cab-info {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 22px 24px;
  border-radius: 16px;
  background: var(--white);
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(6px);
  transition: opacity 0.22s ease, transform 0.22s ease;
}
.cab-info-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.cab-info-num {
  font-family: var(--font-mono, monospace);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 4px;
  color: var(--accent-600);
}
.cab-live {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 2px;
  color: #16a34a;
}
.cab-live i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 8px rgba(34, 197, 94, 0.7);
  animation: cab-pulse 1.6s ease infinite;
}
@keyframes cab-pulse {
  50% {
    opacity: 0.3;
  }
}
.cab-info-title {
  margin: 0;
  font-size: 1.26rem;
  font-weight: 800;
  color: var(--gray-900);
  letter-spacing: 1px;
}
.cab-info-desc {
  margin: 0;
  font-size: 0.85rem;
  line-height: 1.75;
  color: var(--gray-500);
}
.cab-info-list {
  list-style: none;
  margin: 2px 0 0;
  padding: 14px 0 0;
  display: grid;
  gap: 9px;
  border-top: 1px solid var(--gray-100);
}
.cab-info-list li {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  font-size: 0.86rem;
  font-weight: 500;
  line-height: 1.5;
  color: var(--gray-700);
}
.cab-info-list li svg {
  flex: none;
  margin-top: 3px;
}

/* ---- 大屏主图（完整显示 + 错位渐变衬板） ---- */
.cab-screen {
  position: relative;
  width: 100%;
  border-radius: 16px;
  background: var(--white);
  box-shadow: var(--shadow-xl);
}
.cab-screen::before {
  content: '';
  position: absolute;
  inset: 0;
  transform: translate(14px, 14px);
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.18), rgba(99, 102, 241, 0.18));
  z-index: -1;
}
.cab-screen img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: contain;
  border-radius: 15px;
  transition: opacity 0.26s ease, transform 0.34s ease;
}
.cab-screen img.swap-out {
  opacity: 0;
  transform: scale(0.975);
}
.cab-shine {
  position: absolute;
  inset: 0;
  transform: translateX(-130%);
  pointer-events: none;
  border-radius: 15px;
  background: linear-gradient(105deg, transparent 32%, rgba(255, 255, 255, 0.12) 46%, rgba(103, 232, 249, 0.2) 50%, rgba(255, 255, 255, 0.12) 54%, transparent 68%);
}
.cab-shine.run {
  animation: cab-shine 0.95s ease forwards;
}
@keyframes cab-shine {
  to {
    transform: translateX(130%);
  }
}

/* ---- 内容切换淡入淡出 ---- */
.cab-swap {
  opacity: 0;
  transform: translateY(6px);
}

/* ---- 响应式 ---- */
@media (max-width: 1024px) {
  .cab-main {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .cab-tabs {
    justify-content: flex-start;
  }
  .cab-info {
    padding: 20px;
  }
}
@media (max-width: 768px) {
  .cab-info {
    padding: 18px;
  }
  .cab-info-list {
    gap: 7px;
  }
}

/* ---- 降低动效 ---- */
@media (prefers-reduced-motion: reduce) {
  .cab-cursor,
  .cab-screen img,
  .cab-info {
    transition: none !important;
  }
  .cab-live i,
  .cab-shine {
    animation: none;
    display: none;
  }
}

.scenario-entry {
  padding: 72px 0 76px;
  background: linear-gradient(180deg, var(--gray-50) 0%, var(--white) 100%);
}
.scenario-entry .section-header {
  text-align: center;
  margin-bottom: 24px;
}

/* ===== 合作 CTA 版块 ===== */
.home-cta {
  padding: 84px 0;
}
.home-cta .cta-desc {
  color: rgba(255, 255, 255, 0.65);
  font-size: 1.1rem;
  margin-bottom: 32px;
}
.home-cta-actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 16px;
}

/* ===== 通用错落入场（js/home.js 的 [data-reveal] 机制） ===== */
[data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
[data-reveal].visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== 响应式 768px ===== */
@media (max-width: 768px) {
  .stat-item .stat-3d-icon {
    width: 62px;
    height: 62px;
    padding: 4px;
    border-radius: 16px;
    margin: 0;
  }
  .product-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .product-tabs::-webkit-scrollbar {
    display: none;
  }
  .scenario-entry {
    padding: 48px 0 56px;
  }
  .home-cta {
    padding: 56px 0;
  }
}

/* ===== 降低动效偏好 ===== */
@media (prefers-reduced-motion: reduce) {
  .stat-item .stat-3d-icon,
  .visual-card > svg,
  .tab-indicator,
  [data-reveal] {
    opacity: 1;
    transform: none;
    transition: none !important;
  }
}

/* ===== 移动端 hero 修正：为 fixed header 让位，避免标题重叠与底部按钮裁切 ===== */
@media (max-width: 768px) {
  .hero-content {
    padding-top: 96px;
    padding-bottom: 40px;
  }
}
