/* ============================================================
   CSMG Supply Chain — 精致商务动态效果 (dynamic-effects)
   由 Reasonix 生成 · 2026-08-06 · 不覆盖任何现有样式，仅新增类
   ============================================================ */

/* ---------- 1. 滚动入场 Reveal 系统 ---------- */
.dy-reveal,
.dy-reveal-left,
.dy-reveal-right,
.dy-reveal-scale,
.dy-reveal-blur {
  opacity: 0;
  will-change: transform, opacity, filter;
  transition:
    opacity 0.85s cubic-bezier(0.22, 0.61, 0.36, 1),
    transform 0.85s cubic-bezier(0.22, 0.61, 0.36, 1),
    filter 0.85s cubic-bezier(0.22, 0.61, 0.36, 1);
  transition-delay: var(--dy-delay, 0s);
}
.dy-reveal { transform: translateY(38px); }
.dy-reveal-left { transform: translateX(-46px); }
.dy-reveal-right { transform: translateX(46px); }
.dy-reveal-scale { transform: scale(0.92); }
.dy-reveal-blur { transform: translateY(24px); filter: blur(6px); }

.dy-reveal.in-view,
.dy-reveal-left.in-view,
.dy-reveal-right.in-view,
.dy-reveal-scale.in-view,
.dy-reveal-blur.in-view {
  opacity: 1;
  transform: none;
  filter: none;
}

/* 级联延迟工具（配合 JS 自动分配，也可手动指定） */
[data-dy-delay] { transition-delay: var(--dy-delay, 0s); }

/* ---------- 2. Hero 动态光晕背景 ---------- */
.dy-hero {
  position: relative;
  overflow: hidden;
}
.dy-aurora {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0;
  pointer-events: none;
  z-index: 0;
  animation: dy-aurora-fade 2.4s ease 0.3s forwards;
}
.dy-aurora-1 {
  width: 560px; height: 560px;
  background: radial-gradient(circle, rgba(0,113,227,0.20), transparent 65%);
  top: -140px; left: -120px;
  animation: dy-drift-1 16s ease-in-out infinite alternate, dy-aurora-fade 2.4s ease 0.3s forwards;
}
.dy-aurora-2 {
  width: 640px; height: 640px;
  background: radial-gradient(circle, rgba(201,168,76,0.16), transparent 65%);
  bottom: -180px; right: -140px;
  animation: dy-drift-2 20s ease-in-out infinite alternate, dy-aurora-fade 2.4s ease 0.5s forwards;
}
.dy-aurora-3 {
  width: 420px; height: 420px;
  background: radial-gradient(circle, rgba(0,113,227,0.12), transparent 65%);
  top: 30%; left: 52%;
  animation: dy-drift-3 24s ease-in-out infinite alternate, dy-aurora-fade 2.4s ease 0.7s forwards;
}

@keyframes dy-aurora-fade { to { opacity: 1; } }
@keyframes dy-drift-1 {
  0%   { transform: translate(0, 0) scale(1); }
  100% { transform: translate(90px, 60px) scale(1.15); }
}
@keyframes dy-drift-2 {
  0%   { transform: translate(0, 0) scale(1); }
  100% { transform: translate(-70px, -50px) scale(1.1); }
}
@keyframes dy-drift-3 {
  0%   { transform: translate(0, 0) scale(1); }
  100% { transform: translate(-60px, 40px) scale(1.2); }
}

/* Hero 标题逐字浮现 */
.dy-word {
  display: inline-block;
  opacity: 0;
  transform: translateY(26px) rotate(2deg);
  filter: blur(4px);
  animation: dy-word-in 0.7s cubic-bezier(0.22, 0.61, 0.36, 1) forwards;
  animation-delay: var(--dy-wd, 0s);
}
@keyframes dy-word-in {
  to { opacity: 1; transform: none; filter: none; }
}

/* 滚动指示器动画 */
.dy-scroll-hint {
  animation: dy-bounce 2s ease-in-out infinite;
}
@keyframes dy-bounce {
  0%, 100% { transform: translateY(0); opacity: 0.9; }
  50%      { transform: translateY(10px); opacity: 0.4; }
}

/* ---------- 3. 导航毛玻璃 ---------- */
#topbar.dy-nav-scrolled {
  background: rgba(255, 255, 255, 0.82) !important;
  backdrop-filter: saturate(160%) blur(16px);
  -webkit-backdrop-filter: saturate(160%) blur(16px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06) !important;
  box-shadow: 0 4px 24px rgba(11, 22, 40, 0.08);
  transition: background 0.35s ease, box-shadow 0.35s ease;
}

/* 导航链接下划线动效 */
#topbar a[href]:not(img) { position: relative; }
#topbar .desktop-only a[href]:not(img):not([style*="background"])::after {
  content: "";
  position: absolute;
  left: 14px; right: 14px; bottom: 2px;
  height: 2px;
  background: linear-gradient(90deg, #0071E3, #C9A84C);
  border-radius: 2px;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s cubic-bezier(0.22, 0.61, 0.36, 1);
}
#topbar .desktop-only a[href]:not(img):not([style*="background"]):hover::after {
  transform: scaleX(1);
}

/* ---------- 4. 按钮动态 ---------- */
/* 主按钮流光 */
.dy-btn-sheen { position: relative; overflow: hidden; }
.dy-btn-sheen::after {
  content: "";
  position: absolute;
  top: 0; left: -80%;
  width: 50%; height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.35), transparent);
  transform: skewX(-20deg);
  animation: dy-sheen 3.2s ease-in-out infinite;
}
@keyframes dy-sheen {
  0%   { left: -80%; }
  55%  { left: 130%; }
  100% { left: 130%; }
}

/* 按钮悬停上浮 */
.dy-btn-lift {
  transition: transform 0.25s cubic-bezier(0.22, 0.61, 0.36, 1), box-shadow 0.25s ease !important;
}
.dy-btn-lift:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 28px rgba(0, 113, 227, 0.28) !important;
}

/* 金色 CTA 光晕 */
.dy-btn-glow { position: relative; }
.dy-btn-glow::before {
  content: "";
  position: absolute; inset: -2px;
  border-radius: inherit;
  background: linear-gradient(120deg, rgba(201,168,76,0.6), rgba(0,113,227,0.5), rgba(201,168,76,0.6));
  background-size: 200% 200%;
  z-index: -1;
  filter: blur(10px);
  opacity: 0;
  transition: opacity 0.35s ease;
  animation: dy-glow-move 3.5s linear infinite;
}
.dy-btn-glow:hover::before { opacity: 1; }
@keyframes dy-glow-move { 0% { background-position: 0% 50%; } 100% { background-position: 200% 50%; } }

/* ---------- 5. 卡片 3D 悬浮 ---------- */
.dy-card-3d {
  transition:
    transform 0.4s cubic-bezier(0.22, 0.61, 0.36, 1),
    box-shadow 0.4s ease;
  will-change: transform;
}
.dy-card-3d:hover {
  transform: translateY(-8px);
  box-shadow: 0 22px 44px rgba(11, 22, 40, 0.14) !important;
}
.dy-card-3d:hover .apple-card-image,
.dy-card-3d:hover img[class*="card-image"],
.dy-card-3d:hover > div:first-child img {
  transform: scale(1.07);
}
.dy-card-3d .apple-card-image,
.dy-card-3d img {
  transition: transform 0.6s cubic-bezier(0.22, 0.61, 0.36, 1) !important;
}

/* 卡片顶部渐变描边 */
.dy-card-edge { position: relative; }
.dy-card-edge::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  border-radius: 3px 3px 0 0;
  background: linear-gradient(90deg, #0071E3, #C9A84C);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.45s cubic-bezier(0.22, 0.61, 0.36, 1);
  z-index: 2;
}
.dy-card-edge:hover::before { transform: scaleX(1); }

/* 能力图标微动 */
.dy-icon-float { transition: transform 0.4s ease; }
.dy-card-3d:hover .dy-icon-float,
.dy-card-edge:hover .dy-icon-float { transform: translateY(-4px) scale(1.06); }

/* ---------- 6. 统计数字区 ---------- */
.dy-stats {
  position: relative;
  overflow: hidden;
}
/* 背景网格光点 */
.dy-stats::before {
  content: "";
  position: absolute; inset: 0;
  background-image:
    radial-gradient(rgba(255, 255, 255, 0.14) 1px, transparent 1px);
  background-size: 34px 34px;
  opacity: 0.35;
  animation: dy-grid-pan 40s linear infinite;
  pointer-events: none;
}
@keyframes dy-grid-pan {
  0%   { background-position: 0 0; }
  100% { background-position: 34px 34px; }
}
/* 金色大数字 */
.dy-stat-num {
  background: linear-gradient(120deg, #E0C878, #C9A84C, #F3E3B0);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

/* ---------- 7. Logo 墙跑马灯 ---------- */
.dy-marquee {
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  width: 100%;
}
.dy-marquee-track {
  display: flex;
  gap: 56px;
  width: max-content;
  animation: dy-marquee-scroll 26s linear infinite;
}
.dy-marquee:hover .dy-marquee-track { animation-play-state: paused; }
@keyframes dy-marquee-scroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
.dy-marquee-item {
  display: flex; align-items: center; gap: 10px;
  font-size: 1.5rem; font-weight: 700; color: var(--apple-text-primary);
  opacity: 0.75; filter: grayscale(40%);
  white-space: nowrap;
  transition: opacity 0.3s ease, transform 0.3s ease;
}
.dy-marquee-item:hover { opacity: 1; filter: none; transform: translateY(-3px); }

/* ---------- 8. 评价轮播增强 ---------- */
.dy-testimonial-slide {
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.dy-testimonial-slide.dy-slide-hidden {
  opacity: 0.25;
  transform: scale(0.96);
}
/* 引用大引号 */
.dy-quote-mark,
.dy-quote::before {
  font-family: Georgia, serif;
  font-size: 4rem;
  line-height: 0.6;
  color: #C9A84C;
  opacity: 0.85;
  display: block;
  margin-bottom: 10px;
}
.dy-quote::before { content: "\201C"; }

/* ---------- 9. 图片画廊悬浮 ---------- */
.dy-gallery-item {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  cursor: pointer;
}
.dy-gallery-item img {
  transition: transform 0.7s cubic-bezier(0.22, 0.61, 0.36, 1) !important;
}
.dy-gallery-item:hover img { transform: scale(1.08) !important; }
.dy-gallery-item::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 55%, rgba(11, 22, 40, 0.55));
  opacity: 0;
  transition: opacity 0.45s ease;
}
.dy-gallery-item:hover::after { opacity: 1; }

/* ---------- 10. 深色区柔光 ---------- */
.dy-dark-glow {
  position: relative;
}
.dy-dark-glow::after {
  content: "";
  position: absolute;
  top: -160px; right: -120px;
  width: 480px; height: 480px;
  background: radial-gradient(circle, rgba(201, 168, 76, 0.12), transparent 65%);
  pointer-events: none;
}

/* ---------- 11. 尊重减弱动态偏好 ---------- */
@media (prefers-reduced-motion: reduce) {
  .dy-reveal, .dy-reveal-left, .dy-reveal-right, .dy-reveal-scale, .dy-reveal-blur,
  .dy-word, .dy-aurora, .dy-btn-sheen::after, .dy-marquee-track {
    animation: none !important;
    transition: none !important;
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
  }
}

/* ---------- 12. 移动端降级 ---------- */
@media (max-width: 767px) {
  .dy-reveal-left, .dy-reveal-right { transform: translateY(30px); }
  .dy-aurora-1 { width: 340px; height: 340px; }
  .dy-aurora-2 { width: 380px; height: 380px; }
  .dy-marquee-track { gap: 36px; animation-duration: 20s; }
}
