/* =========================================================
   RAIDER · V4 入场（CS2 加载屏质感）
   —— 巨型队名逐字硬切砸入 + 底部加载条扫满 + 扫描光 + 冲击抖屏
   —— 只在首次进入首页播放一次；点击标题可重播
   ========================================================= */

@font-face {
  font-family: "Anton";
  src: url("../fonts/anton-latin.woff2") format("woff2"),
    url("../fonts/anton-latin.ttf") format("truetype"),
    local("Anton");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* ---------- 标题字体：CS2 那种窄体重黑 ---------- */
.club-hero h1 {
  font-family: "Anton", var(--font-display), Impact, sans-serif;
  font-style: normal;
  font-weight: 400;
  letter-spacing: 0.005em;
  transform: skewX(-6deg);
  text-shadow: 5px 5px 0 #000;
  position: relative;
  cursor: pointer;
  user-select: none;
}

.club-hero h1 em {
  font-style: normal;
}

/* 逐字 */
.club-hero h1 .tch {
  display: inline-block;
  opacity: 0;
  transform: translateY(-0.3em) scaleY(1.35) skewX(-16deg);
  clip-path: inset(0 0 100% 0);
  animation: csChar 520ms cubic-bezier(0.16, 1, 0.3, 1) both;
  animation-delay: calc(1020ms + var(--i, 0) * 34ms);
}

.club-hero h1 .tspace {
  display: inline-block;
  width: 0.22em;
}

@keyframes csChar {
  0% {
    opacity: 0;
    transform: translateY(-0.34em) scaleY(1.4) skewX(-18deg);
    clip-path: inset(0 0 100% 0);
    filter: blur(2px);
  }
  55% {
    opacity: 1;
  }
  100% {
    opacity: 1;
    transform: none;
    clip-path: inset(0 0 0 0);
    filter: blur(0);
  }
}

/* 扫描光 + 冲击 */
.club-hero h1::after {
  content: "";
  position: absolute;
  top: -12%;
  bottom: -12%;
  left: -14%;
  width: 13%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.95), transparent);
  transform: skewX(-18deg);
  opacity: 0;
  pointer-events: none;
  animation: csSweep 480ms cubic-bezier(0.3, 0.7, 0.2, 1) 1150ms forwards;
}

@keyframes csSweep {
  0% {
    opacity: 0;
    left: -16%;
  }
  16% {
    opacity: 0.95;
  }
  100% {
    opacity: 0;
    left: 112%;
  }
}

/* 冲击抖屏：只在播放时挂到 hero 上 */
.club-hero.intro-running h1 {
  animation: csShake 240ms steps(2) 1180ms;
}

@keyframes csShake {
  0% { transform: skewX(-6deg) translate3d(0, 0, 0); }
  35% { transform: skewX(-6deg) translate3d(-3px, 1px, 0); }
  70% { transform: skewX(-6deg) translate3d(2px, -1px, 0); }
  100% { transform: skewX(-6deg) translate3d(0, 0, 0); }
}

/* ---------- 底部加载条（CS2 loading 屏） ---------- */
.cs-load {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 20px 0 0;
  max-width: 400px;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.22em;
  color: rgba(244, 244, 242, 0.5);
  opacity: 1;
}

.club-hero-in > .cs-load {
  animation: none !important;
  opacity: 1;
}

.cs-load b {
  color: var(--poster-yellow);
  font-weight: 700;
}

.cs-bar {
  position: relative;
  flex: 1;
  height: 4px;
  background: #17171d;
  overflow: hidden;
}

.cs-bar i {
  position: absolute;
  inset: 0;
  width: 0;
  background-image: repeating-linear-gradient(90deg, var(--poster-magenta) 0 6px, transparent 6px 9px);
  animation: csFill 1020ms steps(18) 140ms forwards;
}

.cs-pct {
  min-width: 4ch;
  text-align: right;
  color: #fff;
}

@keyframes csFill {
  to { width: 100%; }
}

/* 完成态：先变 OK，再收起 */
.cs-load.is-done {
  animation: none;
  opacity: 1;
}

.cs-load.is-done b::after {
  content: " OK";
  color: var(--poster-magenta);
}

.cs-load.is-hidden {
  display: none;
}

/* ---------- 跳过（已看过 / 减弱动效 / 无 JS） ---------- */
.club-hero.intro-skip .tch {
  animation: none;
  opacity: 1;
  transform: none;
  clip-path: none;
  filter: none;
}

.club-hero.intro-skip h1::after {
  display: none;
}

.club-hero.intro-skip .cs-load {
  display: none;
}

@media (prefers-reduced-motion: reduce) {
  .club-hero h1 .tch {
    animation: none;
    opacity: 1;
    transform: none;
    clip-path: none;
    filter: none;
  }

  .club-hero h1::after,
  .cs-load {
    display: none;
  }
}

/* 移动端：标题小一点，加载条短一点 */
@media (max-width: 760px) {
  .club-hero h1 {
    letter-spacing: 0;
    text-shadow: 3px 3px 0 #000;
  }

  .cs-load {
    max-width: 100%;
    font-size: 8px;
  }
}
