/* ==========================================================
   Ritsuai 律合官网 · 律合Studio（studio.html）自定义样式
   ========================================================== */

/* ----- 缓动变量 ----- */
:root {
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-out-back: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-in-out-smooth: cubic-bezier(0.65, 0, 0.35, 1);
}

/* ----- 滚动触发动画（studio 版：animation） ----- */
.reveal-on-scroll { opacity: 0; }
/* 用 animation 长属性写法，避免简写把 animation-delay 重置为 0，
   从而使 .stagger-N 的交错延迟（transition-delay 之外的动画延迟）真正生效 */
.reveal-on-scroll.revealed {
  animation-name: fadeInUp;
  animation-duration: 0.75s;
  animation-timing-function: var(--ease-out-expo);
  animation-fill-mode: forwards;
}
.reveal-on-scroll.reveal-left.revealed {
  animation-name: fadeInLeft;
  animation-duration: 0.75s;
  animation-timing-function: var(--ease-out-expo);
  animation-fill-mode: forwards;
}
.reveal-on-scroll.reveal-right.revealed {
  animation-name: fadeInRight;
  animation-duration: 0.75s;
  animation-timing-function: var(--ease-out-expo);
  animation-fill-mode: forwards;
}
.reveal-on-scroll.reveal-scale.revealed {
  animation-name: scaleIn;
  animation-duration: 0.6s;
  animation-timing-function: var(--ease-out-back);
  animation-fill-mode: forwards;
}

@keyframes fadeInUp { from { opacity: 0; transform: translateY(32px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeInLeft { from { opacity: 0; transform: translateX(-24px); } to { opacity: 1; transform: translateX(0); } }
@keyframes fadeInRight { from { opacity: 0; transform: translateX(24px); } to { opacity: 1; transform: translateX(0); } }
@keyframes scaleIn { from { opacity: 0; transform: scale(0.92); } to { opacity: 1; transform: scale(1); } }
@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}
@keyframes breathe {
  0%, 100% { transform: scale(1); opacity: 0.5; }
  50% { transform: scale(1.05); opacity: 0.8; }
}

/* ----- Hero 装饰 ----- */
.hero-deco-circle { position: absolute; border-radius: 50%; pointer-events: none; }
.hero-deco-circle.c1 {
  width: 320px; height: 320px;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.12) 0%, transparent 70%);
  top: -80px; right: -80px;
  animation: breathe 6s ease-in-out infinite;
}
.hero-deco-circle.c2 {
  width: 240px; height: 240px;
  background: radial-gradient(circle, rgba(244, 63, 94, 0.1) 0%, transparent 70%);
  bottom: -60px; left: -60px;
  animation: breathe 8s ease-in-out infinite 2s;
}
.hero-deco-circle.c3 {
  width: 160px; height: 160px;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.08) 0%, transparent 70%);
  top: 40%; left: 50%;
  animation: breathe 7s ease-in-out infinite 4s;
}
.hero-geo-dots {
  background-image: radial-gradient(rgba(0, 0, 0, 0.04) 1px, transparent 1px);
  background-size: 20px 20px;
}

/* ----- 音频播放器悬浮卡片 ----- */
.player-card {
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.5);
  transition: all 0.45s var(--ease-out-expo);
}
.player-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
  border-color: rgba(99, 102, 241, 0.3);
}
.player-card.playing {
  border-color: rgba(99, 102, 241, 0.5);
  box-shadow: 0 0 24px rgba(99, 102, 241, 0.15);
}
.wave-bar { width: 2px; background: #6366f1; border-radius: 1px; transition: height 0.15s ease; }

/* ----- 哲学卡片 ----- */
.phil-icon { transition: all 0.4s var(--ease-out-expo); }
.phil-card:hover .phil-icon { transform: scale(1.12); box-shadow: 0 6px 20px rgba(99, 102, 241, 0.2); }
.phil-card:nth-child(2):hover .phil-icon { box-shadow: 0 6px 20px rgba(139, 92, 246, 0.2); }
.phil-card:nth-child(3):hover .phil-icon { box-shadow: 0 6px 20px rgba(244, 63, 94, 0.2); }

/* ----- 作品卡片 ----- */
.work-item { transition: all 0.5s var(--ease-out-expo); position: relative; overflow: hidden; }
.work-item::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg,
    transparent 35%,
    rgba(255,255,255,0.03) 40%,
    rgba(255,255,255,0.08) 50%,
    rgba(255,255,255,0.03) 60%,
    transparent 65%);
  background-size: 200% 100%;
  transform: translateX(-100%);
  transition: none;
  pointer-events: none;
  z-index: 1;
}
.work-item:hover::after { animation: shimmer 0.8s var(--ease-in-out-smooth) forwards; }
.work-item:hover { transform: translateX(6px); border-color: rgba(99, 102, 241, 0.25) !important; box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2); }
@keyframes shimmer { 0% { background-position: -200% 0; } 100% { background-position: 200% 0; } }
.work-thumb { transition: transform 0.5s var(--ease-out-expo), opacity 0.4s var(--ease-out-expo); }
.work-item:hover .work-thumb { transform: scale(1.08); opacity: 1 !important; }
.work-play-icon { transition: all 0.4s var(--ease-out-back); }
.work-item:hover .work-play-icon { transform: scale(1.2); opacity: 1 !important; }

/* ----- 统计卡片 ----- */
.stat-card { transition: all 0.4s var(--ease-out-expo); position: relative; overflow: hidden; }
.stat-card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 3px;
  background: linear-gradient(180deg, #6366f1, #8b5cf6);
  border-radius: 0 2px 2px 0;
}
.stat-card:hover { transform: translateX(4px); box-shadow: 0 6px 24px rgba(0, 0, 0, 0.08); }
.stat-number { display: inline-block; }

/* ----- 团队 Logo 悬浮 ----- */
.partner-logo { transition: all 0.45s var(--ease-out-expo); }
.partner-logo:hover { transform: translateY(-4px); box-shadow: 0 8px 28px rgba(0, 0, 0, 0.12); }
.partner-logo img { transition: transform 0.6s var(--ease-out-expo); }
.partner-logo:hover img { transform: scale(1.08); }

/* ----- 图片遮罩 ----- */
.image-mask { position: relative; overflow: hidden; }
.image-mask img { transition: transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94); }
.image-mask:hover img { transform: scale(1.05); }

/* ----- 标题下划线装饰（studio 版） ----- */
.section-heading-underline { position: relative; display: inline-block; padding-bottom: 6px; }
.section-heading-underline::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, #6366f1, #8b5cf6, transparent);
  border-radius: 1px;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.7s var(--ease-out-expo);
}
.section-heading-underline.visible::after { transform: scaleX(1); }

/* ----- 交错延迟（hero 入场用） ----- */
.stagger-1 { animation-delay: 0.05s; }
.stagger-2 { animation-delay: 0.15s; }
.stagger-3 { animation-delay: 0.25s; }
.stagger-4 { animation-delay: 0.35s; }
.stagger-5 { animation-delay: 0.45s; }

@media (max-width: 768px) {
  .glass-card:hover { transform: translateY(-3px); }
  .work-item:hover { transform: translateX(3px); }
}
