/* ============================================================
   icpcltd.com 动效层 motion.css  v=20261123
   风格契约：品牌蓝金克制风 —— 光球慢漂、网络脉冲、机房LED（灰位常驻/
   绿填充保持/偶发红黄故障/忌彩虹扫描）、跑马灯、卡片微光、入场渐显。
   全部动效在 prefers-reduced-motion 下自动降级为静态。
   ============================================================ */

/* ---------- A. Hero 背景光球（v2 加量：更亮、更大位移、更快） ---------- */
.hero { position: relative; overflow: hidden; }
.bg-orbs { position: absolute; inset: 0; z-index: 0; pointer-events: none; filter: blur(42px); }
.bg-orbs i { position: absolute; border-radius: 50%; will-change: transform; display: block; }
.bg-orbs .orb-a { width: 480px; height: 480px; left: -140px; top: -100px;
  background: radial-gradient(circle at 32% 32%, rgba(0,102,255,.38), rgba(0,102,255,0) 70%);
  animation: icpOrbA 16s ease-in-out infinite; }
.bg-orbs .orb-b { width: 420px; height: 420px; right: -120px; top: 10px;
  background: radial-gradient(circle at 60% 40%, rgba(0,198,255,.32), rgba(0,198,255,0) 70%);
  animation: icpOrbB 20s ease-in-out infinite; }
.bg-orbs .orb-c { width: 360px; height: 360px; left: 34%; bottom: -170px;
  background: radial-gradient(circle at 50% 50%, rgba(61,139,255,.28), rgba(61,139,255,0) 70%);
  animation: icpOrbA 14s ease-in-out infinite reverse; }
@keyframes icpOrbA { 0%,100% { transform: translate(0,0) scale(1); } 50% { transform: translate(96px,60px) scale(1.16); } }
@keyframes icpOrbB { 0%,100% { transform: translate(0,0) scale(1); } 50% { transform: translate(-84px,68px) scale(1.12); } }

/* ---------- A2. Hero 渐变字流动（gradShift 同族） ---------- */
.hero h1 .highlight { background-size: 220% 100%; animation: icpGradShift 4.5s ease-in-out infinite; }
@keyframes icpGradShift { 0%,100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }

/* ---------- A3. 地球浮动已停（26-11-23 用户令：整个图片上下运动停掉） ---------- */
.hero-visual { overflow: hidden; animation: none; }

/* ---------- B. 地球网络层 v2：粗线快流 + 大节点强脉冲 ---------- */
.net-overlay { position: absolute; inset: 0; z-index: 3; pointer-events: none; }
.net-overlay svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.net-overlay svg path { fill: none; stroke: url(#icpNetGrad); stroke-width: 2.6;
  stroke-dasharray: 9 8; opacity: 1; animation: icpArcFlow 2s linear infinite; }
.net-overlay svg path.p2 { animation-duration: 3s; animation-direction: reverse; opacity: .8; }
.net-overlay svg path.p3 { opacity: .6; animation-duration: 3.8s; }
@keyframes icpArcFlow { to { stroke-dashoffset: -170; } }
.net-overlay .n-node { position: absolute; width: 12px; height: 12px; margin: -6px 0 0 -6px;
  border-radius: 50%; background: var(--accent, #00C6FF);
  box-shadow: 0 0 0 0 rgba(0,198,255,.6); animation: icpNodePing 2.4s ease-out infinite; }
.net-overlay .n-node.d2 { background: var(--primary, #0066FF);
  box-shadow: 0 0 0 0 rgba(0,102,255,.6); animation-delay: .9s; }
@keyframes icpNodePing { 0% { box-shadow: 0 0 0 0 rgba(0,198,255,.65); } 70% { box-shadow: 0 0 0 20px rgba(0,198,255,0); } 100% { box-shadow: 0 0 0 0 rgba(0,198,255,0); } }

/* ---------- C. 机房 LED 状态芯片（灰位常驻 · 绿填充保持 · 偶发红黄故障） ---------- */
.rack-chip { position: absolute; left: 14px; bottom: 14px; z-index: 4;
  display: inline-flex; align-items: center; gap: 9px;
  background: rgba(6,18,38,.88); color: #DFE9F5;
  padding: 9px 14px; border-radius: 12px; border: 1px solid rgba(0,198,255,.28);
  font: 600 11px/1 ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  letter-spacing: .14em; backdrop-filter: blur(6px);
  box-shadow: 0 10px 28px rgba(2,16,38,.35); }
.rack-chip .live-dot { width: 7px; height: 7px; border-radius: 50%; background: #19D269;
  box-shadow: 0 0 0 0 rgba(25,210,105,.5); animation: icpLivePulse 2.2s ease-out infinite; flex: none; }
@keyframes icpLivePulse { 0% { box-shadow: 0 0 0 0 rgba(25,210,105,.5); } 70% { box-shadow: 0 0 0 8px rgba(25,210,105,0); } 100% { box-shadow: 0 0 0 0 rgba(25,210,105,0); } }
.rack-chip .leds { display: inline-flex; gap: 3px; align-items: flex-end; margin-left: 2px; }
.rack-chip .leds i { width: 5px; height: 14px; border-radius: 1.5px; background: #26374e; display: block; }
.rack-chip .leds i.on   { background: #19D269; box-shadow: 0 0 6px rgba(25,210,105,.75); }
.rack-chip .leds i.warn { background: #F5B81F; box-shadow: 0 0 6px rgba(245,184,31,.75); }
.rack-chip .leds i.err  { background: #F5484F; box-shadow: 0 0 6px rgba(245,72,79,.75); }

/* ---------- D. 跑马灯（能力带，46s 匀速、悬停暂停） ---------- */
.tech-mq { border-top: 1px solid var(--border, #E0EAF5); border-bottom: 1px solid var(--border, #E0EAF5);
  background: var(--bg-card, #F8FBFF); overflow: hidden; position: relative;
  max-width: var(--max-width, 1200px); margin: 0 auto; }
.tech-mq .mq-track { display: flex; width: max-content; animation: icpMq 46s linear infinite; }
.tech-mq:hover .mq-track { animation-play-state: paused; }
.tech-mq span { display: inline-block; padding: 12px 0; white-space: nowrap;
  font: 600 12.5px/1 ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  letter-spacing: .2em; color: var(--text-light, #7A8B9E); }
@keyframes icpMq { to { transform: translateX(-50%); } }

/* ---------- E. 能力卡微光扫过（hover 触发一次） ---------- */
.features-grid .feature-card { position: relative; overflow: hidden; }
.features-grid .feature-card::after { content: ''; position: absolute; top: 0; left: -120%;
  width: 60%; height: 100%; pointer-events: none;
  background: linear-gradient(105deg, transparent, rgba(0,102,255,.08), transparent);
  transform: skewX(-18deg); }
.features-grid .feature-card:hover::after { animation: icpShimmer .9s ease forwards; }
@keyframes icpShimmer { to { left: 135%; } }

/* ---------- F. Hero 文案入场（错峰渐显） ---------- */
.hero-text > * { opacity: 0; transform: translateY(14px);
  animation: icpFadeUp .7s cubic-bezier(.2,.7,.2,1) forwards; }
.hero-text > .hero-badge   { animation-delay: .05s; }
.hero-text > h1            { animation-delay: .14s; }
.hero-text > .hero-desc    { animation-delay: .24s; }
.hero-text > .hero-buttons { animation-delay: .34s; }
.hero-text > .hero-stats   { animation-delay: .44s; }
@keyframes icpFadeUp { to { opacity: 1; transform: none; } }

/* ---------- 降级：prefers-reduced-motion 一律静态 ---------- */
@media (prefers-reduced-motion: reduce) {
  .bg-orbs i, .net-overlay svg path, .net-overlay .n-node,
  .rack-chip .live-dot, .tech-mq .mq-track { animation: none !important; }
  .hero-text > * { opacity: 1 !important; transform: none !important; animation: none !important; }
}

/* ---------- G. 算力全链路流动图（about 区块：四板块节点 + 流动虚线 + 脉冲点） ---------- */
.chain-flow-wrap { max-width: var(--max-width, 1200px); margin: 36px auto 0; padding: 0 24px; }
.chain-flow { display: flex; align-items: stretch; }
.chain-flow .cf-node { flex: 1 1 0; position: relative; text-align: center;
  background: #fff; border: 1px solid var(--border, #E0EAF5); border-radius: 14px;
  padding: 14px 10px 12px; box-shadow: 0 6px 18px rgba(0,70,160,.06); }
.chain-flow .cf-ico { display: block; font-size: 20px; line-height: 1; margin-bottom: 7px; }
.chain-flow b { display: block; font-size: 13.5px; color: var(--text-dark, #0A1628); letter-spacing: .02em; }
.chain-flow .cf-sub { display: block; font-size: 11px; color: var(--text-light, #7A8B9E); margin-top: 4px; letter-spacing: .05em; }
.chain-flow .cf-dot { position: absolute; top: 9px; right: 10px; width: 6px; height: 6px;
  border-radius: 50%; background: var(--accent, #00C6FF);
  box-shadow: 0 0 0 0 rgba(0,198,255,.5); animation: icpNodePing 3.4s ease-out infinite; }
.chain-flow .cf-node:nth-child(3) .cf-dot { animation-delay: .8s; }
.chain-flow .cf-node:nth-child(5) .cf-dot { animation-delay: 1.6s; }
.chain-flow .cf-node:nth-child(7) .cf-dot { animation-delay: 2.4s; }
.chain-flow .cf-link { flex: 0 0 84px; align-self: center; }
.chain-flow .cf-link svg { width: 100%; height: 24px; display: block; }
.chain-flow .cf-link path { fill: none; stroke-width: 2; stroke-dasharray: 7 9; }
.chain-flow .cf-link .cf-d1 { stroke: var(--primary, #0066FF); opacity: .5; animation: icpArcFlow 1.5s linear infinite; }
.chain-flow .cf-link .cf-d2 { stroke: var(--accent, #00C6FF); opacity: .32; animation: icpArcFlow 2.4s linear infinite reverse; }
@media (max-width: 860px) {
  .chain-flow { flex-wrap: wrap; gap: 10px; }
  .chain-flow .cf-node { flex: 1 1 44%; }
  .chain-flow .cf-link { display: none; }
}

/* ---------- H. 滚动入场（.has-motion 下才生效，无 JS 不隐身） ---------- */
.has-motion [data-reveal] { opacity: 0; transform: translateY(16px);
  transition: opacity .7s cubic-bezier(.2,.7,.2,1), transform .7s cubic-bezier(.2,.7,.2,1); }
.has-motion [data-reveal].revealed { opacity: 1; transform: none; }
.has-motion [data-reveal="chain"] .cf-node { opacity: 0; transform: translateY(12px);
  transition: opacity .55s ease, transform .55s ease; }
.has-motion [data-reveal="chain"].revealed .cf-node { opacity: 1; transform: none; }
.has-motion [data-reveal="chain"].revealed .cf-node:nth-child(3) { transition-delay: .12s; }
.has-motion [data-reveal="chain"].revealed .cf-node:nth-child(5) { transition-delay: .24s; }
.has-motion [data-reveal="chain"].revealed .cf-node:nth-child(7) { transition-delay: .36s; }
@media (prefers-reduced-motion: reduce) {
  .chain-flow .cf-link path, .chain-flow .cf-dot { animation: none !important; }
  .has-motion [data-reveal], .has-motion [data-reveal] .cf-node { opacity: 1 !important; transform: none !important; transition: none !important; }
}

/* ============================================================
   V2 加量段（26-11-23 用户令「动的不够明显」）—— 更粗更快更亮
   ============================================================ */

/* 链路：粗虚线快速流动 */
.chain-flow .cf-link { flex: 0 0 110px; position: relative; }
.chain-flow .cf-link path { stroke-width: 3; stroke-dasharray: 12 8; }
.chain-flow .cf-link .cf-d1 { opacity: .9; animation-duration: .8s; }
.chain-flow .cf-link .cf-d2 { opacity: .5; animation-duration: 1.3s; }

/* 光包：发光圆点沿链路飞行（JS 注入 .cf-pkt，错峰出发） */
.chain-flow .cf-pkt { position: absolute; top: 50%; left: -3%; width: 10px; height: 10px;
  margin: -5px 0 0 -5px; border-radius: 50%; background: var(--primary, #0066FF);
  box-shadow: 0 0 14px rgba(0,102,255,.95), 0 0 5px rgba(0,198,255,.9);
  animation: icpPacket 1.5s linear infinite; will-change: left, opacity; }
@keyframes icpPacket { 0% { left: -3%; opacity: 0; } 10% { opacity: 1; } 88% { opacity: 1; } 100% { left: 103%; opacity: 0; } }

/* 跑马灯：提速一倍 + 品牌蓝加粗 */
.tech-mq .mq-track { animation-duration: 22s; }
.tech-mq span { font-weight: 700; font-size: 13px; color: var(--primary, #0066FF); letter-spacing: .18em; }

/* 节点卡脉冲点加大 */
.chain-flow .cf-dot { width: 8px; height: 8px; }

/* reduce 降级补光包 */
@media (prefers-reduced-motion: reduce) {
  .chain-flow .cf-pkt { display: none !important; }
}

/* ============================================================
   V3（26-11-23 用户令）：LED 指示器移出图片 → 图片正下方，宽 100%，均衡器造型
   ============================================================ */
.rack-chip { position: relative; width: 100%; margin: 0; box-sizing: border-box; left: auto; bottom: auto;
  justify-content: flex-start; border-radius: 0 0 22px 22px; border-left: none; border-right: none; border-bottom: none; }
.rack-chip .leds { flex: 1; justify-content: space-between; margin-left: 12px; gap: 4px; }
.rack-chip .leds i { height: 12px; }
.rack-chip .leds i:nth-child(3n)  { height: 17px; }
.rack-chip .leds i:nth-child(4n)  { height: 9px; }
.rack-chip .leds i:nth-child(5n)  { height: 20px; }
.rack-chip .leds i.on   { background: #19D269; box-shadow: 0 0 8px rgba(25,210,105,.85); }

/* ============================================================
   V4（26-11-23 用户令）：链路双向流动（蓝去黄回）+ LED 柱间距微调
   ============================================================ */
.chain-flow .cf-link .cf-d1 { stroke: var(--primary, #0066FF); opacity: .9; }
.chain-flow .cf-link .cf-d2 { stroke: #F5B81F; opacity: .8; }
.chain-flow .cf-pkt.y { background: #F5B81F;
  box-shadow: 0 0 14px rgba(245,184,31,.95), 0 0 5px rgba(255,220,120,.9);
  animation-name: icpPacketRev; }
@keyframes icpPacketRev { 0% { left: 103%; opacity: 0; } 10% { opacity: 1; } 88% { opacity: 1; } 100% { left: -3%; opacity: 0; } }
.rack-chip .leds { gap: 3px; }
.rack-chip .leds i { width: 4px; }

/* ============================================================
   V5（26-11-23 用户令）：绿柱细密化（60根×3px）
   ============================================================ */
.rack-chip .leds { gap: 2px; }
.rack-chip .leds i { width: 3px; height: 10px; }
.rack-chip .leds i:nth-child(3n)  { height: 14px; }
.rack-chip .leds i:nth-child(4n)  { height: 8px; }
.rack-chip .leds i:nth-child(5n)  { height: 16px; }
.rack-chip .leds i:nth-child(7n)  { height: 12px; }

/* ============================================================
   V6（26-11-23 用户令）：芯片文字禁换行（GPU 集群 · 实时 保持一行）
   ============================================================ */
.rack-chip { white-space: nowrap; font-size: 10px; letter-spacing: .1em; }
.rack-chip > span { white-space: nowrap; }
.rack-chip .leds { min-width: 0; overflow: hidden; }

/* ============================================================
   V7（26-11-23 用户令）：链路再提速 / 地球弧线微提速 / 去中间圆角
   ============================================================ */
/* 链路虚线大幅提速 */
.chain-flow .cf-link .cf-d1 { animation-duration: .4s; }
.chain-flow .cf-link .cf-d2 { animation-duration: .7s; }
.chain-flow .cf-pkt { animation-duration: .9s; }
.chain-flow .cf-pkt.y { animation-duration: .9s; }
/* 地球弧线微提速（比链路慢） */
.net-overlay svg path { animation-duration: 1.3s; }
.net-overlay svg path.p2 { animation-duration: 2s; }
.net-overlay svg path.p3 { animation-duration: 2.6s; }
.net-overlay .n-node { animation-duration: 2s; }
/* 去掉图片与指示条之间的过渡圆角：图片下角改直角，芯片圆角清零 */
.hero-visual .hero-earth { border-radius: 24px 24px 0 0; }
.rack-chip { border-radius: 0; }

/* ============================================================
   V8（26-11-23 用户令校准）：链路减速到很低，地球弧线比链路稍快
   ============================================================ */
.chain-flow .cf-link .cf-d1 { animation-duration: 3.2s; }
.chain-flow .cf-link .cf-d2 { animation-duration: 4.6s; }
.chain-flow .cf-pkt { animation-duration: 2.2s; }
.chain-flow .cf-pkt.y { animation-duration: 2.2s; }
.net-overlay svg path { animation-duration: 2.2s; }
.net-overlay svg path.p2 { animation-duration: 3.2s; }
.net-overlay svg path.p3 { animation-duration: 4s; }
.net-overlay .n-node { animation-duration: 2.4s; }

/* ============================================================
   V9（26-11-23 用户令实验）：线静止（含光包暂停），只看球动；车道再拉开
   ============================================================ */
.chain-flow .cf-link path { animation: none !important; }
.chain-flow .cf-pkt { display: none !important; }

/* ============================================================
   V10（26-11-23 用户令）：链路正弦曲线化，光点沿曲线滑行（SMIL）
   ============================================================ */
.chain-flow .cf-orb.b  { fill: #0066FF; filter: drop-shadow(0 0 4px rgba(0,102,255,.95)); }
.chain-flow .cf-orb.y2 { fill: #F5B81F; filter: drop-shadow(0 0 4px rgba(245,184,31,.95)); }
@media (prefers-reduced-motion: reduce) {
  .chain-flow .cf-orb { display: none; }
}

/* ============================================================
   V11（26-11-23 用户令）：双线交会（同中线相位互补）+ 振幅近满高
   ============================================================ */
.chain-flow .cf-link svg { overflow: visible; }

/* ============================================================
   V12（26-11-23 用户令）：波峰对齐卡片顶、波谷对齐卡片底（等高拉伸）
   ============================================================ */
.chain-flow .cf-link { align-self: stretch; }
.chain-flow .cf-link svg { height: 100%; }
