/* ============================================================
   夸张动画（不影响布局）
   - Hero：标题从天砸下回弹 / 副标题侧甩 / 按钮弹跳 / 色流动感层 / 粒子 / 光斑 / 滚动指示器
   - 模块：大幅方向性甩入（左→右 / 右→左 / 下→上 / 3D翻转 / 缩放爆发）
   - 标题：逐字弹出（放大旋转模糊→归位）
   - 持续：卡片漂浮 / 数字呼吸环 / 视频光环 / Ken Burns / 进度条流光 / 鼠标光晕
   ============================================================ */

/* ---------- 对齐原站（必须保留，勿删） ---------- */
.s-section-1 .s-section {
  padding-top: 158px !important;
}
@media screen and (max-width: 767px) {
  .s-section-1 .s-section {
    padding-top: 129px !important;
  }
}
@media screen and (max-width: 767px) {
  #user_sites .slide.s-section-1 .s-section {
    min-height: 100vh !important;
  }
}
@media screen and (max-width: 767px) {
  .s-section-2 .s-grid-section-inner-wrapper {
    min-height: 300px !important;
  }
}
@media screen and (min-width: 768px) {
  .s-process-section .s-repeatable-item {
    margin-bottom: 0 !important;
  }
}
@media screen and (max-width: 767px) {
  .s-process-section .s-repeatable-item:last-child {
    margin-bottom: 0 !important;
  }
}

/* ============================================================
   Hero
   ============================================================ */
@keyframes hero-in {
  0% {
    opacity: 0;
    transform: translateY(-140px) scale(0.85);
  }
  55% {
    opacity: 1;
    transform: translateY(16px) scale(1.04);
  }
  75% {
    transform: translateY(-7px) scale(0.99);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes hero-side-in {
  0% {
    opacity: 0;
    transform: translateX(170px) rotate(4deg);
  }
  60% {
    opacity: 1;
    transform: translateX(-12px) rotate(-2deg);
  }
  100% {
    opacity: 1;
    transform: translateX(0) rotate(0);
  }
}

@keyframes hero-pop {
  0% {
    opacity: 0;
    transform: scale(0) rotate(-10deg);
  }
  60% {
    opacity: 1;
    transform: scale(1.2) rotate(4deg);
  }
  80% {
    transform: scale(0.92);
  }
  100% {
    opacity: 1;
    transform: scale(1) rotate(0);
  }
}

/* 标题：坠落回弹 + 金色流光 */
.hero-title-fx {
  background: linear-gradient(100deg, #ffffff 30%, #ffe97d 50%, #ffffff 70%) !important;
  background-size: 200% 100% !important;
  -webkit-background-clip: text !important;
  background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  color: transparent !important;
  animation: hero-in 1.9s cubic-bezier(0.34, 1.56, 0.64, 1) both,
    title-shimmer 7s linear infinite;
}

/* 副标题侧甩 / 按钮弹跳 */
.hero-anim-d1 {
  animation: hero-side-in 1.7s cubic-bezier(0.34, 1.56, 0.64, 1) both;
  animation-delay: 0.35s;
}
.hero-anim-d2 {
  animation: hero-pop 1.8s cubic-bezier(0.34, 1.56, 0.64, 1) both;
  animation-delay: 0.7s;
}

@keyframes title-shimmer {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

@keyframes btn-pulse {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(234, 227, 116, 0.55);
  }
  50% {
    box-shadow: 0 0 0 20px rgba(234, 227, 116, 0);
  }
}
.btn-pulse {
  animation: btn-pulse 3s ease-out infinite;
}

/* 色流动感渐变层 */
.hero-gradient-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(
    115deg,
    rgba(255, 233, 125, 0.2),
    rgba(140, 220, 255, 0.16),
    rgba(255, 255, 255, 0.08),
    rgba(255, 180, 120, 0.16),
    rgba(255, 233, 125, 0.2)
  );
  background-size: 300% 300%;
  animation: hue-drift 11s ease-in-out infinite;
  mix-blend-mode: screen;
}
@keyframes hue-drift {
  0%,
  100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}

/* Hero 光斑 */
.hero-glow-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.5;
  pointer-events: none;
  z-index: 1;
  animation: blob-float 16s ease-in-out infinite alternate;
}
@keyframes blob-float {
  0% {
    transform: translate(0, 0) scale(1);
  }
  50% {
    transform: translate(40px, -28px) scale(1.2);
  }
  100% {
    transform: translate(-26px, 30px) scale(0.9);
  }
}

/* Hero 上升粒子 */
.hero-particles {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  pointer-events: none;
  z-index: 1;
}
.hero-particles .particle {
  position: absolute;
  bottom: -12px;
  border-radius: 50%;
  opacity: 0;
  animation-name: particle-rise;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
}
@keyframes particle-rise {
  0% {
    transform: translateY(0) translateX(0) scale(0.6);
    opacity: 0;
  }
  8% {
    opacity: 0.9;
  }
  92% {
    opacity: 0.5;
  }
  100% {
    transform: translateY(-112vh) translateX(40px) scale(1.3);
    opacity: 0;
  }
}

/* 滚动指示器（鼠标形） */
.hero-scroll-hint {
  position: absolute;
  bottom: 26px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  width: 28px;
  height: 46px;
  border: 2px solid rgba(255, 255, 255, 0.75);
  border-radius: 16px;
  cursor: pointer;
  animation: hint-bob 2.2s ease-in-out infinite;
}
.hero-scroll-hint::after {
  content: '';
  position: absolute;
  top: 8px;
  left: 50%;
  width: 5px;
  height: 10px;
  margin-left: -2.5px;
  border-radius: 3px;
  background: #fff;
  animation: hint-dot 2.2s ease-in-out infinite;
}
@keyframes hint-bob {
  0%,
  100% {
    transform: translateX(-50%) translateY(0);
  }
  50% {
    transform: translateX(-50%) translateY(9px);
  }
}
@keyframes hint-dot {
  0% {
    opacity: 0;
    transform: translateY(0);
  }
  30% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translateY(15px);
  }
}

/* Hero 定位 */
.s-section-1 .s-section {
  position: relative;
  overflow: hidden;
}
.s-section-1 .container {
  position: relative;
  z-index: 2;
}

/* ============================================================
   滚动入场（大幅 + 弹性回弹）
   ============================================================ */
html {
  scroll-behavior: smooth;
}

html.js .reveal {
  opacity: 0;
  transform: translateY(60px);
  transition: opacity 1.3s ease, transform 1.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}
html.js .reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* 左→右 甩入 */
html.js .reveal.fx-left {
  transform: translateX(-260px) rotate(-4deg);
}
/* 右→左 甩入 */
html.js .reveal.fx-right {
  transform: translateX(260px) rotate(4deg);
}
/* 下→上 弹入 */
html.js .reveal.fx-bottom {
  transform: translateY(240px) scale(0.6);
}
/* 3D 翻转（图册） */
html.js .reveal.fx-flip {
  transform: perspective(900px) rotateY(85deg) translateY(90px) scale(0.7);
}
/* 缩放爆发（联系区） */
html.js .reveal.fx-zoom {
  transform: scale(0.3) translateY(90px);
}
html.js .reveal.fx-left.is-visible,
html.js .reveal.fx-right.is-visible,
html.js .reveal.fx-bottom.is-visible,
html.js .reveal.fx-flip.is-visible,
html.js .reveal.fx-zoom.is-visible {
  transform: perspective(900px) translate(0, 0) rotate(0) scale(1);
}

/* 特性卡片 3D 鼠标倾斜（入场完成后启用） */
html.js .reveal.tilt {
  transition: opacity 1.3s ease, transform 0.3s ease;
  will-change: transform;
}

/* 持续漂浮（入场完成后启用） */
@keyframes float-y {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-12px);
  }
}
.floaty {
  animation: float-y 5.5s ease-in-out var(--float-delay, 0s) infinite;
}

/* 流程数字呼吸光环 */
.process-item-index {
  animation: ring-pulse 3s ease-out infinite;
}
@keyframes ring-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(29, 32, 35, 0.4);
  }
  100% {
    box-shadow: 0 0 0 20px rgba(29, 32, 35, 0);
  }
}

/* 字体浮现：逐字弹出 */
html.js .text-fx .fx-char {
  display: inline-block;
  opacity: 0;
  transform: translateY(1.2em) scale(1.7) rotate(10deg);
  filter: blur(10px);
  transition: opacity 0.85s ease, transform 0.95s cubic-bezier(0.34, 1.56, 0.64, 1),
    filter 0.85s ease;
}
html.js .text-fx.fx-from-left .fx-char {
  transform: translateX(-1.7em) scale(1.5) rotate(-12deg);
}
html.js .text-fx.fx-from-right .fx-char {
  transform: translateX(1.7em) scale(1.5) rotate(12deg);
}
html.js .text-fx.fx-from-bottom .fx-char {
  transform: translateY(1.5em) scale(1.7) rotate(10deg);
}
html.js .text-fx.is-visible .fx-char,
html.js .text-fx.fx-from-left.is-visible .fx-char,
html.js .text-fx.fx-from-right.is-visible .fx-char,
html.js .text-fx.fx-from-bottom.is-visible .fx-char {
  opacity: 1;
  transform: translateY(0) translateX(0) scale(1) rotate(0);
  filter: blur(0);
}

/* ============================================================
   模块特效
   ============================================================ */
/* 区块2 图片：Ken Burns 缓慢推近 */
.s-section-2 .s-grid-section-cell-container.s-bg-image {
  animation: kenburns 22s ease-in-out infinite alternate;
  will-change: background-size;
}
@keyframes kenburns {
  from {
    background-size: auto 100%;
  }
  to {
    background-size: auto 134%;
  }
}

/* 视频：炸开式弹出 + 光环 */
.s-section-5 .s-item-media-wrapper.is-visible .video-frame {
  animation: video-pop 1.9s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}
@keyframes video-pop {
  0% {
    opacity: 0;
    transform: scale(0.3) rotate(-6deg);
  }
  65% {
    opacity: 1;
    transform: scale(1.08) rotate(1.5deg);
  }
  100% {
    opacity: 1;
    transform: scale(1) rotate(0);
  }
}
.s-section-5 .s-item-media-wrapper.is-visible .video-frame iframe {
  animation: video-glow 4s ease-in-out infinite;
}
@keyframes video-glow {
  0%,
  100% {
    box-shadow: 0 0 18px rgba(234, 227, 116, 0.3);
  }
  50% {
    box-shadow: 0 0 52px rgba(234, 227, 116, 0.65);
  }
}

/* ============================================================
   进度条 + 鼠标光晕
   ============================================================ */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 4px;
  width: 0;
  z-index: 9999;
  pointer-events: none;
  background: linear-gradient(90deg, #eae374, #fff59d, #f2c94c, #ff9a56, #eae374);
  background-size: 300% 100%;
  animation: progress-shimmer 3.5s linear infinite;
  box-shadow: 0 0 10px rgba(234, 227, 116, 0.6);
}
@keyframes progress-shimmer {
  0% {
    background-position: 0% 0;
  }
  100% {
    background-position: 300% 0;
  }
}

.cursor-glow {
  position: fixed;
  top: 0;
  left: 0;
  width: 460px;
  height: 460px;
  margin: -230px 0 0 -230px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 9998;
  background: radial-gradient(
    circle,
    rgba(234, 227, 116, 0.18),
    rgba(140, 220, 255, 0.09) 45%,
    transparent 70%
  );
  mix-blend-mode: screen;
  opacity: 0;
  transition: opacity 0.4s ease;
  will-change: transform;
}
body.cursor-on .cursor-glow {
  opacity: 1;
}

/* ============================================================
   更多视频轮播
   ============================================================ */
.s-section-more-videos .s-section {
  padding: 90px 0 110px;
}
.video-marquee {
  overflow: hidden;
  scrollbar-width: none;
  -ms-overflow-style: none;
  width: 100%;
  position: relative;
  padding: 10px 0 26px;
}
.video-marquee::-webkit-scrollbar {
  display: none;
}
.marquee-track {
  display: flex;
  gap: 24px;
  width: max-content;
  animation: marquee-right 50s linear infinite;
  will-change: transform;
}
.video-card {
  flex: 0 0 auto;
  width: 300px;
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  overflow: hidden;
  background: #000;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.4s ease;
}
.video-card a {
  display: block;
  width: 100%;
  height: 100%;
  position: relative;
}
.video-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
/* 播放按钮覆盖层 */
.video-card a::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 46px;
  height: 46px;
  margin: -23px 0 0 -23px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.55);
  border: 2px solid rgba(255, 255, 255, 0.85);
  transition: background 0.25s ease, transform 0.25s ease;
}
.video-card a::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  margin: -8px 0 0 -3px;
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
  border-left: 14px solid #fff;
  z-index: 1;
  transition: transform 0.25s ease;
}
.video-card:hover a::after {
  background: rgba(234, 227, 116, 0.9);
  transform: scale(1.15);
}
.video-card:hover a::before {
  transform: scale(1.15);
}
.video-marquee:hover .marquee-track {
  animation-play-state: paused;
}
.video-card:hover {
  transform: scale(1.2);
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.45);
  z-index: 2;
}
@keyframes marquee-right {
  from {
    transform: translateX(-50%);
  }
  to {
    transform: translateX(0);
  }
}
@media screen and (max-width: 767px) {
  .video-card {
    width: min(300px, 72vw);
  }
}

/* ============================================================
   版权页脚
   ============================================================ */
.site-footer {
  position: relative;
  overflow: hidden;
  /* 底色：沿用上方区块背景图的最底部 1/6，清晰 */
  background-image: url('/images/contact.webp');
  background-size: 100% 600%;
  background-position: 50% 100%;
  color: rgba(255, 255, 255, 0.8);
  text-align: center;
  padding: 42px 20px 48px;
  font-size: 14px;
  letter-spacing: 0.3px;
  line-height: 1.7;
}
/* 模糊层：顶部模糊，向下渐变消失露出清晰底部 */
.site-footer::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url('/images/contact.webp');
  background-size: 100% 600%;
  background-position: 50% 100%;
  filter: blur(30px);
  -webkit-mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 1), rgba(0, 0, 0, 0) 78%);
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 1), rgba(0, 0, 0, 0) 78%);
  z-index: 0;
}
/* 深色渐变：上部轻微、底部加深，保证文字可读 */
.site-footer::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.6));
  z-index: 0;
}
.site-footer .container {
  position: relative;
  z-index: 1;
}
.site-footer .footer-copy {
  margin-bottom: 8px;
}
.site-footer .footer-built {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: rgba(255, 255, 255, 0.7);
}
.footer-astro-logo {
  width: 20px;
  height: 20px;
  display: inline-block;
}
.site-footer a {
  color: #eae374;
  text-decoration: none;
  transition: color 0.25s ease;
}
.site-footer a:hover {
  color: #fff59d;
  text-decoration: underline;
}
