/* ===== 星松AI企划官网 - 自定义样式 ===== */

/* 全局字体 */
html {
  scroll-behavior: smooth;
  font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
}

body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ===== 全局动效系统 ===== */

/* 浮动动画（Hero示意图、装饰元素） */
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}
.animate-float {
  animation: float 6s ease-in-out infinite;
}

/* CTA按钮呼吸光晕 */
@keyframes pulseGlow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(52, 97, 255, 0.35); }
  50% { box-shadow: 0 0 0 12px rgba(52, 97, 255, 0); }
}
.pulse-glow {
  animation: pulseGlow 2.8s ease-in-out infinite;
}

/* 渐变流光线（深色区块顶部装饰） */
@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}
.shimmer-line {
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent 0%, #3461ff 25%, #8454eb 50%, #3461ff 75%, transparent 100%);
  background-size: 200% 100%;
  animation: shimmer 3.5s linear infinite;
  opacity: 0.7;
}

/* 渐变文字微光流动（Hero标题重点词） */
@keyframes gradientShift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}
.text-gradient {
  background-size: 200% 200%;
  animation: gradientShift 5s ease-in-out infinite;
}

/* 徽章轻微上下浮动（Hero浮动卡） */
@keyframes badgeFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}
.animate-badge {
  animation: badgeFloat 4s ease-in-out infinite;
}
.animate-badge-delay {
  animation: badgeFloat 4s ease-in-out infinite 2s;
}

/* 卡片渐入交错延迟 */
.fade-in:nth-child(2) { transition-delay: 0.1s; }
.fade-in:nth-child(3) { transition-delay: 0.2s; }
.fade-in:nth-child(4) { transition-delay: 0.3s; }

/* 无障碍：用户偏好减少动效时关闭动画 */
@media (prefers-reduced-motion: reduce) {
  .animate-float, .pulse-glow, .shimmer-line, .text-gradient,
  .animate-badge, .animate-badge-delay,
  .svg-flow, .svg-arc-flow, .svg-node-halo, .svg-block-glow {
    animation: none !important;
  }
  .fade-in {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ===== SVG 示意图内部动效（AI业务底座架构图）===== */

/* 数据流虚线流动（闭环节点间连线） */
@keyframes svgDashFlow {
  to { stroke-dashoffset: -18; }
}
.svg-flow {
  stroke-dasharray: 5 4;
  animation: svgDashFlow 1s linear infinite;
}

/* 回环弧线反向流动（迭代 → 执行反馈回路） */
.svg-arc-flow {
  animation: svgDashFlow 1.6s linear infinite reverse;
}

/* 节点脉冲光环：按执行顺序依次点亮 */
@keyframes svgHalo {
  0% { opacity: 0.55; transform: scale(0.8); }
  70%, 100% { opacity: 0; transform: scale(1.5); }
}
.svg-node-halo {
  fill: none;
  stroke-width: 2;
  transform-box: fill-box;
  transform-origin: center;
  animation: svgHalo 2.4s ease-out infinite;
}
.svg-node-halo.halo-2 { animation-delay: 0.6s; }
.svg-node-halo.halo-3 { animation-delay: 1.2s; }
.svg-node-halo.halo-4 { animation-delay: 1.8s; }

/* 能力块底色呼吸微光（依次错开） */
@keyframes svgBlockGlow {
  0%, 100% { fill-opacity: 0.14; }
  50% { fill-opacity: 0.34; }
}
.svg-block-glow { animation: svgBlockGlow 3.2s ease-in-out infinite; }
.svg-block-glow.block-2 { animation-delay: 0.8s; }
.svg-block-glow.block-3 { animation-delay: 1.6s; }
.svg-block-glow.block-4 { animation-delay: 2.4s; }

/* ===== 品牌渐变（核心视觉）===== */
/* 主渐变：品牌蓝 #3461ff → 品牌紫 #8454eb */
.btn-gradient {
  background-image: linear-gradient(146deg, #3461ff 0%, #8454eb 100%);
  transition: all 0.25s ease;
}
.btn-gradient:hover {
  background-image: linear-gradient(146deg, #2b4ed9 0%, #751dff 100%);
  box-shadow: 0 8px 20px rgba(52, 97, 255, 0.35);
}

/* 渐变文字（用于标题重点词） */
.text-gradient {
  background-image: linear-gradient(146deg, #3461ff 0%, #8454eb 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* 渐变描边卡片（用于重点卡片） */
.card-gradient-border {
  border: 1px solid transparent;
  background:
    linear-gradient(#fff, #fff) padding-box,
    linear-gradient(146deg, rgba(52, 97, 255, 0.4), rgba(132, 84, 235, 0.4)) border-box;
}

/* 导航栏滚动效果 */
#site-header.scrolled {
  box-shadow: 0 1px 3px rgba(11, 13, 33, 0.08);
  background: rgba(255, 255, 255, 0.98);
}

/* 卡片hover过渡 */
.card-hover {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.card-hover:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(52, 97, 255, 0.10);
}

/* 渐入动画 */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* 占位图渐变背景（蓝紫浅色系） */
.placeholder-gradient {
  background: linear-gradient(146deg, #eef1ff 0%, #f0e9fd 55%, #e4dcfb 100%);
}

/* 网格背景图案 */
.grid-pattern {
  background-image:
    linear-gradient(rgba(52, 97, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(52, 97, 255, 0.04) 1px, transparent 1px);
  background-size: 40px 40px;
}

/* 时间线连接线 */
.timeline-line {
  background: linear-gradient(to bottom, #3461ff 0%, #8454eb 50%, #a3a9f0 100%);
}

/* 滚动条样式 */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #f1f5f9;
}
::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* 焦点样式 */
*:focus-visible {
  outline: 2px solid #3461ff;
  outline-offset: 2px;
}
