/* ============================================================
   WCASE — Animations
   ============================================================ */

/* ── Hero entrance ───────────────────────────────────────── */
.hero.is-ready .subtitle {
    animation: wcase-fade-up 0.75s cubic-bezier(0.16, 1, 0.3, 1) 0.05s both,
        wcase-subtitle-glow 3s ease-in-out 0.8s infinite;
}

.hero.is-ready h1 {
    animation: wcase-fade-up 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.15s both;
}

.hero.is-ready .content > p {
    animation: wcase-fade-up 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.28s both;
}

.hero.is-ready .main-btn {
    animation: wcase-fade-up 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.4s both,
        wcase-btn-pulse 2.4s ease-in-out 1.2s infinite;
}

.hero.is-ready .socials {
    animation: wcase-fade-up 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.52s both;
}

.hero.is-ready .hero-image img {
    animation: wcase-hero-float 4.5s ease-in-out 0.6s infinite;
}

/* ── Scroll reveal ───────────────────────────────────────── */
[data-reveal] {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.65s cubic-bezier(0.16, 1, 0.3, 1),
        transform 0.65s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-reveal].is-visible {
    opacity: 1;
    transform: translateY(0);
}

.case-card[data-reveal] {
    transition-delay: var(--reveal-delay, 0ms);
}

/* ── Cases counter tick ──────────────────────────────────── */
.cases-counter__value.is-ticking {
    animation: wcase-counter-tick 0.45s cubic-bezier(0.16, 1, 0.3, 1);
    color: #ff3131;
}

/* ── Live dot + rare drops ─────────────────────────────────── */
.live-dot {
    animation: wcase-live-pulse 1.6s ease-in-out infinite;
}

.drop-item--rare {
    animation: wcase-rare-flash 0.9s ease-out;
    box-shadow: 0 0 18px rgba(255, 203, 59, 0.35);
}

/* ── Roulette pointer ────────────────────────────────────── */
.pointer.is-spinning {
    animation: wcase-pointer-shake 0.12s linear infinite;
}

/* ── Popups (Dark Carnival style) ────────────────────────── */
#wcase-overlay.is-active {
    animation: wcase-overlay-in 0.35s ease both;
}

#wcase-popup.is-enter {
    animation: wcase-popup-in 0.45s cubic-bezier(0.16, 1, 0.3, 1) both;
}

#wcase-step1.is-enter,
#wcase-step2.is-enter,
#wcase-step3.is-enter {
    animation: wcase-popup-in 0.38s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.wcase-prize-preview img {
    animation: wcase-prize-float 3.2s ease-in-out infinite;
}

.wcase-popup-btn--claim {
    position: relative;
    overflow: hidden;
    animation: wcase-btn-pulse 2.2s ease-in-out infinite;
}

.wcase-popup-btn--claim::after {
    content: "";
    position: absolute;
    top: 0;
    left: -120%;
    width: 80%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.22), transparent);
    animation: wcase-btn-shimmer 2.6s ease-in-out infinite;
}

.wcase-popup-btn--steam {
    animation: wcase-steam-pulse 2.2s ease-in-out infinite;
}

#wcase-confetti {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    border-radius: inherit;
}

#wcase-popup > *:not(#wcase-confetti) {
    position: relative;
    z-index: 1;
}

/* ── Fake browser open ───────────────────────────────────── */
#wcase-browser-overlay.is-opening {
    animation: wcase-overlay-in 0.3s ease both;
}

#wcase-browser-window.is-opening {
    animation: wcase-browser-in 0.38s cubic-bezier(0.16, 1, 0.3, 1) both;
}

/* ── Banner stripes drift ──────────────────────────────────── */
.banner::before {
    animation: wcase-banner-drift 18s linear infinite;
}

/* ── Keyframes ───────────────────────────────────────────── */
@keyframes wcase-fade-up {
    from {
        opacity: 0;
        transform: translateY(24px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes wcase-hero-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

@keyframes wcase-subtitle-glow {
    0%, 100% { text-shadow: 0 0 0 transparent; }
    50% { text-shadow: 0 0 14px rgba(139, 18, 27, 0.45); }
}

@keyframes wcase-btn-pulse {
    0%, 100% { transform: scale(1); box-shadow: 0 0 40px rgba(139, 18, 27, 0.15); }
    50% { transform: scale(1.03); box-shadow: 0 0 55px rgba(255, 49, 49, 0.35); }
}

@keyframes wcase-counter-tick {
    0% { transform: scale(1); }
    35% { transform: scale(1.06); }
    100% { transform: scale(1); }
}

@keyframes wcase-live-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.45; transform: scale(0.85); }
}

@keyframes wcase-rare-flash {
    0% { filter: brightness(1.8); }
    100% { filter: brightness(1); }
}

@keyframes wcase-pointer-shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-2px); }
    75% { transform: translateX(2px); }
}

@keyframes wcase-popup-in {
    from {
        opacity: 0;
        transform: scale(0.94) translateY(12px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

@keyframes wcase-overlay-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes wcase-browser-in {
    from {
        opacity: 0;
        transform: scale(0.96) translateY(10px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

@keyframes wcase-prize-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-7px); }
}

@keyframes wcase-btn-shimmer {
    0% { left: -120%; }
    55%, 100% { left: 140%; }
}

@keyframes wcase-steam-pulse {
    0%, 100% { box-shadow: 0 0 0 rgba(27, 157, 240, 0); }
    50% { box-shadow: 0 0 22px rgba(27, 157, 240, 0.45); }
}

@keyframes wcase-banner-drift {
    from { background-position: 0 0; }
    to { background-position: 160px 0; }
}

/* ── Wheel win burst ─────────────────────────────────────── */
.wcase-wheel-burst {
    position: absolute;
    left: 50%;
    top: 42%;
    width: 12px;
    height: 12px;
    margin: -6px 0 0 -6px;
    border-radius: 50%;
    pointer-events: none;
    background: radial-gradient(circle, rgba(255, 49, 49, 0.7) 0%, transparent 70%);
    animation: wcase-wheel-burst 0.85s ease-out forwards;
    z-index: 40;
}

.spin {
    position: relative;
}

@keyframes wcase-wheel-burst {
    from {
        opacity: 1;
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(255, 49, 49, 0.5);
    }
    to {
        opacity: 0;
        transform: scale(18);
        box-shadow: 0 0 60px 30px rgba(255, 49, 49, 0);
    }
}

/* ── Reduced motion ──────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    [data-reveal] {
        opacity: 1;
        transform: none;
    }

    .hero.is-ready .hero-image img {
        animation: none;
    }
}
