/* ============================================================
   《抱朴学刊》— 动画样式文件
   ============================================================ */

/* ── 印章水墨晕染动画 ── */
@keyframes sealInkSpread {
  0%   { transform: scale(0); opacity: 0.8; }
  60%  { transform: scale(2.5); opacity: 0.3; }
  100% { transform: scale(3.5); opacity: 0; }
}

.seal-ink-ripple {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: rgba(255,255,255,0.45);
  animation: sealInkSpread 0.6s ease-out forwards;
  pointer-events: none;
}

/* ── 卷轴展开动画 ── */
@keyframes scrollUnfurl {
  from { clip-path: inset(0 100% 0 0); }
  to   { clip-path: inset(0 0% 0 0); }
}

.unfurl-text {
  animation: scrollUnfurl 1.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* ── 封面轮播淡入 ── */
@keyframes carouselFadeIn {
  from { opacity: 0; transform: scale(1.03); }
  to   { opacity: 1; transform: scale(1); }
}

.carousel-slide.active img {
  animation: carouselFadeIn 0.7s ease forwards;
}

/* ── 页面元素淡入上升 ── */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(28px); }
  to   { opacity: 1; transform: translateY(0); }
}

.anim-fadeInUp {
  animation: fadeInUp 0.7s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* ── 毛笔字逐字显现 ── */
@keyframes brushReveal {
  0%   { opacity: 0; filter: blur(4px); transform: translateY(8px); }
  100% { opacity: 1; filter: blur(0); transform: translateY(0); }
}

/* ── 龟裂纹脉冲（装饰效果） ── */
@keyframes crackPulse {
  0%, 100% { opacity: 0.3; }
  50%       { opacity: 0.6; }
}

/* ── 星辰闪烁 ── */
@keyframes twinkle {
  0%, 100% { opacity: 0.2; transform: scale(1); }
  50%       { opacity: 0.8; transform: scale(1.2); }
}

/* ── 水墨扩散圆（用于印章点击） ── */
@keyframes inkDrop {
  0%   { transform: scale(0); opacity: 0.7; border-radius: 50%; }
  50%  { transform: scale(1.8); opacity: 0.35; }
  100% { transform: scale(3);   opacity: 0; }
}

.ink-drop-effect {
  position: fixed;
  width: 60px;
  height: 60px;
  background: radial-gradient(circle, rgba(139,26,26,0.6) 0%, rgba(139,26,26,0) 70%);
  pointer-events: none;
  z-index: 9999;
  transform-origin: center;
  animation: inkDrop 0.8s ease-out forwards;
  margin-left: -30px;
  margin-top: -30px;
}

/* ── 刊首语标题书写笔划 ── */
@keyframes titleWrite {
  from {
    clip-path: inset(0 100% 0 0);
    opacity: 0.7;
  }
  to {
    clip-path: inset(0 0% 0 0);
    opacity: 1;
  }
}

/* ── 装饰线生长 ── */
@keyframes lineGrow {
  from { width: 0; }
  to   { width: 100%; }
}

/* ── 浮动动画 ── */
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-8px); }
}

.float-anim {
  animation: float 4s ease-in-out infinite;
}

/* ── 页面进入动画序列 ── */
.hero-anim-1 { animation: fadeInUp 0.8s ease 0.1s both; }
.hero-anim-2 { animation: fadeInUp 0.8s ease 0.25s both; }
.hero-anim-3 { animation: fadeInUp 0.8s ease 0.4s both; }
.hero-anim-4 { animation: fadeInUp 0.8s ease 0.55s both; }

/* ── 转场波纹 ── */
@keyframes rippleOut {
  from { transform: scale(1); opacity: 1; }
  to   { transform: scale(4); opacity: 0; }
}

/* ── 标签标记脉冲 ── */
@keyframes badgePulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(139,26,26,0.4); }
  50%       { box-shadow: 0 0 0 6px rgba(139,26,26,0); }
}

.badge-pulse {
  animation: badgePulse 2s ease-in-out infinite;
}

/* ── 导航链接滑入 ── */
@keyframes navSlideIn {
  from { opacity: 0; transform: translateX(-10px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* ── 加载骨架屏闪烁 ── */
@keyframes shimmer {
  0%   { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

.skeleton {
  background: linear-gradient(90deg,
    rgba(160,115,42,0.08) 25%,
    rgba(160,115,42,0.15) 50%,
    rgba(160,115,42,0.08) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s ease-in-out infinite;
  border-radius: 4px;
}
