/* ==========================================================================
   Satan's Choice Clothing — Animations & Eye Candy
   All keyframe animations, flame effects, glow effects, and visual flair
   ========================================================================== */

/* ==========================================================================
   Flame Animations
   ========================================================================== */

@keyframes flameBorderPulse {
    0%, 100% {
        opacity: 0.6;
        filter: brightness(1);
    }
    50% {
        opacity: 1;
        filter: brightness(1.3);
    }
}

@keyframes flameFlicker {
    0%, 100% {
        opacity: 0.6;
        transform: scaleY(1) scaleX(1);
    }
    25% {
        opacity: 0.8;
        transform: scaleY(1.05) scaleX(0.98);
    }
    50% {
        opacity: 0.5;
        transform: scaleY(0.95) scaleX(1.02);
    }
    75% {
        opacity: 0.9;
        transform: scaleY(1.03) scaleX(0.97);
    }
}

@keyframes flameDance {
    0% {
        clip-path: polygon(
            0% 100%, 5% 80%, 10% 90%, 15% 70%, 20% 85%,
            25% 65%, 30% 80%, 35% 60%, 40% 75%, 45% 55%,
            50% 70%, 55% 50%, 60% 72%, 65% 58%, 70% 78%,
            75% 62%, 80% 82%, 85% 68%, 90% 88%, 95% 75%,
            100% 100%
        );
    }
    33% {
        clip-path: polygon(
            0% 100%, 5% 75%, 10% 85%, 15% 65%, 20% 80%,
            25% 60%, 30% 75%, 35% 55%, 40% 70%, 45% 50%,
            50% 65%, 55% 45%, 60% 68%, 65% 55%, 70% 75%,
            75% 58%, 80% 78%, 85% 64%, 90% 84%, 95% 70%,
            100% 100%
        );
    }
    66% {
        clip-path: polygon(
            0% 100%, 5% 82%, 10% 88%, 15% 72%, 20% 82%,
            25% 68%, 30% 78%, 35% 58%, 40% 73%, 45% 53%,
            50% 68%, 55% 48%, 60% 70%, 65% 60%, 70% 76%,
            75% 65%, 80% 80%, 85% 66%, 90% 86%, 95% 73%,
            100% 100%
        );
    }
    100% {
        clip-path: polygon(
            0% 100%, 5% 80%, 10% 90%, 15% 70%, 20% 85%,
            25% 65%, 30% 80%, 35% 60%, 40% 75%, 45% 55%,
            50% 70%, 55% 50%, 60% 72%, 65% 58%, 70% 78%,
            75% 62%, 80% 82%, 85% 68%, 90% 88%, 95% 75%,
            100% 100%
        );
    }
}

/* CSS Flame element — use inside a container with position:relative */
.flame-border-top,
.flame-border-bottom {
    position: absolute;
    left: 0;
    right: 0;
    height: 40px;
    pointer-events: none;
    z-index: 5;
}

.flame-border-top {
    top: -20px;
    background: linear-gradient(to bottom,
        transparent 0%,
        rgba(204, 0, 0, 0.4) 40%,
        rgba(255, 102, 0, 0.3) 60%,
        rgba(255, 170, 0, 0.1) 80%,
        transparent 100%
    );
    animation: flameDance 2s ease-in-out infinite, flameBorderPulse 3s ease-in-out infinite;
    transform: scaleY(-1);
}

.flame-border-bottom {
    bottom: -20px;
    background: linear-gradient(to bottom,
        transparent 0%,
        rgba(204, 0, 0, 0.4) 40%,
        rgba(255, 102, 0, 0.3) 60%,
        rgba(255, 170, 0, 0.1) 80%,
        transparent 100%
    );
    animation: flameDance 2s ease-in-out infinite, flameBorderPulse 3s ease-in-out infinite;
}

/* ==========================================================================
   Glow & Pulse Animations
   ========================================================================== */

@keyframes devilEyePulse {
    0%, 100% {
        filter: drop-shadow(0 0 8px rgba(204, 0, 0, 0.4))
                drop-shadow(0 0 15px rgba(204, 0, 0, 0.2));
    }
    50% {
        filter: drop-shadow(0 0 15px rgba(204, 0, 0, 0.7))
                drop-shadow(0 0 30px rgba(204, 0, 0, 0.4))
                drop-shadow(0 0 45px rgba(204, 0, 0, 0.2));
    }
}

@keyframes redGlow {
    0%, 100% {
        text-shadow: 0 0 10px rgba(204, 0, 0, 0.5),
                     0 0 20px rgba(204, 0, 0, 0.3);
    }
    50% {
        text-shadow: 0 0 20px rgba(204, 0, 0, 0.8),
                     0 0 40px rgba(204, 0, 0, 0.5),
                     0 0 60px rgba(204, 0, 0, 0.2);
    }
}

@keyframes borderGlow {
    0%, 100% {
        box-shadow: 0 0 5px rgba(204, 0, 0, 0.3),
                    inset 0 0 5px rgba(204, 0, 0, 0.1);
    }
    50% {
        box-shadow: 0 0 15px rgba(204, 0, 0, 0.5),
                    0 0 30px rgba(204, 0, 0, 0.2),
                    inset 0 0 10px rgba(204, 0, 0, 0.15);
    }
}

@keyframes buttonPulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(204, 0, 0, 0.4);
    }
    50% {
        box-shadow: 0 0 0 10px rgba(204, 0, 0, 0);
    }
}

/* Apply to elements with .glow-pulse */
.glow-pulse {
    animation: borderGlow 3s ease-in-out infinite;
}

.text-glow-animate {
    animation: redGlow 3s ease-in-out infinite;
}

.btn-pulse {
    animation: buttonPulse 2s ease-in-out infinite;
}

/* ==========================================================================
   Hero Animations
   ========================================================================== */

@keyframes heroGradientShift {
    0%, 100% {
        background: radial-gradient(ellipse at center bottom, rgba(204, 0, 0, 0.15) 0%, transparent 60%),
                    radial-gradient(ellipse at 20% 80%, rgba(255, 102, 0, 0.08) 0%, transparent 50%),
                    radial-gradient(ellipse at 80% 80%, rgba(255, 102, 0, 0.08) 0%, transparent 50%);
    }
    33% {
        background: radial-gradient(ellipse at center bottom, rgba(204, 0, 0, 0.2) 0%, transparent 65%),
                    radial-gradient(ellipse at 30% 70%, rgba(255, 102, 0, 0.12) 0%, transparent 55%),
                    radial-gradient(ellipse at 70% 85%, rgba(255, 102, 0, 0.06) 0%, transparent 45%);
    }
    66% {
        background: radial-gradient(ellipse at center bottom, rgba(204, 0, 0, 0.12) 0%, transparent 55%),
                    radial-gradient(ellipse at 15% 85%, rgba(255, 102, 0, 0.06) 0%, transparent 45%),
                    radial-gradient(ellipse at 85% 75%, rgba(255, 102, 0, 0.1) 0%, transparent 50%);
    }
}

@keyframes heroFadeIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-content {
    animation: heroFadeIn 1.2s ease-out 0.3s both;
}

.hero-content .hero-title {
    animation: heroFadeIn 1s ease-out 0.5s both;
}

.hero-content .hero-tagline {
    animation: heroFadeIn 1s ease-out 0.7s both;
}

.hero-content .btn {
    animation: heroFadeIn 1s ease-out 0.9s both;
}

/* ==========================================================================
   Ember / Smoke Particle Effects
   ========================================================================== */

@keyframes emberFloat {
    0% {
        transform: translateY(0) translateX(0) scale(1);
        opacity: 1;
    }
    100% {
        transform: translateY(-80px) translateX(20px) scale(0);
        opacity: 0;
    }
}

@keyframes emberFloat2 {
    0% {
        transform: translateY(0) translateX(0) scale(1);
        opacity: 0.8;
    }
    100% {
        transform: translateY(-60px) translateX(-15px) scale(0);
        opacity: 0;
    }
}

@keyframes emberFloat3 {
    0% {
        transform: translateY(0) translateX(0) scale(1);
        opacity: 0.6;
    }
    100% {
        transform: translateY(-100px) translateX(10px) scale(0);
        opacity: 0;
    }
}

/* Ember container - add to product cards or sections */
.ember-container {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
    opacity: 0;
    transition: opacity var(--transition-base);
}

.product-card:hover .ember-container {
    opacity: 1;
}

.ember {
    position: absolute;
    bottom: 0;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--sc-flame-orange);
    box-shadow: 0 0 6px var(--sc-flame-orange), 0 0 12px var(--sc-blood-red);
}

.ember:nth-child(1) {
    left: 20%;
    animation: emberFloat 1.5s ease-out infinite;
    animation-delay: 0s;
}

.ember:nth-child(2) {
    left: 40%;
    animation: emberFloat2 1.8s ease-out infinite;
    animation-delay: 0.3s;
}

.ember:nth-child(3) {
    left: 60%;
    animation: emberFloat3 1.4s ease-out infinite;
    animation-delay: 0.6s;
}

.ember:nth-child(4) {
    left: 80%;
    animation: emberFloat 1.7s ease-out infinite;
    animation-delay: 0.2s;
}

.ember:nth-child(5) {
    left: 30%;
    animation: emberFloat2 2s ease-out infinite;
    animation-delay: 0.8s;
}

.ember:nth-child(6) {
    left: 70%;
    animation: emberFloat3 1.6s ease-out infinite;
    animation-delay: 0.4s;
}

/* ==========================================================================
   Animated Gradient Background
   ========================================================================== */

@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.animated-gradient-bg {
    background: linear-gradient(
        -45deg,
        var(--sc-black),
        var(--sc-deep-black),
        #1a0000,
        var(--sc-deep-black),
        #0d0000,
        var(--sc-black)
    );
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
}

/* ==========================================================================
   Smoke Effect
   ========================================================================== */

@keyframes smokeRise {
    0% {
        transform: translateY(0) scale(1);
        opacity: 0.15;
    }
    50% {
        transform: translateY(-30px) scale(1.5);
        opacity: 0.08;
    }
    100% {
        transform: translateY(-60px) scale(2);
        opacity: 0;
    }
}

.smoke-effect {
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(100, 100, 100, 0.15) 0%, transparent 70%);
    pointer-events: none;
    animation: smokeRise 3s ease-out infinite;
}

/* ==========================================================================
   Loading / Skeleton Animations
   ========================================================================== */

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

.skeleton {
    background: linear-gradient(
        90deg,
        var(--sc-dark-grey) 25%,
        var(--sc-mid-grey) 50%,
        var(--sc-dark-grey) 75%
    );
    background-size: 200% 100%;
    animation: shimmer 1.5s ease-in-out infinite;
}

/* ==========================================================================
   Cursor Trail Effect
   ========================================================================== */

.cursor-dot {
    position: fixed;
    top: 0;
    left: 0;
    width: 8px;
    height: 8px;
    background: var(--sc-blood-red);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    transition: transform 0.1s ease;
    box-shadow: 0 0 10px rgba(204, 0, 0, 0.8),
                0 0 20px rgba(204, 0, 0, 0.4);
    mix-blend-mode: screen;
}

.cursor-ring {
    position: fixed;
    top: 0;
    left: 0;
    width: 30px;
    height: 30px;
    border: 1px solid rgba(204, 0, 0, 0.4);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9998;
    transition: all 0.15s ease;
}

.cursor-ring.hovering {
    width: 50px;
    height: 50px;
    border-color: var(--sc-hellfire-red);
    background: rgba(204, 0, 0, 0.05);
}

/* ==========================================================================
   Parallax Layers
   ========================================================================== */

.parallax-section {
    position: relative;
    overflow: hidden;
}

.parallax-bg {
    position: absolute;
    inset: -50px;
    background-size: cover;
    background-position: center;
    will-change: transform;
}

/* ==========================================================================
   Entrance Animations (used with scroll reveal)
   ========================================================================== */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-40px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(40px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==========================================================================
   Logo Spin (for loading or accent)
   ========================================================================== */

@keyframes slowSpin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.logo-spin {
    animation: slowSpin 20s linear infinite;
}

/* ==========================================================================
   Flame Text Effect
   ========================================================================== */

@keyframes flameTextShift {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

.flame-text {
    background: linear-gradient(
        90deg,
        var(--sc-blood-red),
        var(--sc-flame-orange),
        var(--sc-flame-yellow),
        var(--sc-flame-orange),
        var(--sc-blood-red)
    );
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: flameTextShift 3s ease-in-out infinite;
}

/* ==========================================================================
   Card Hover Shine
   ========================================================================== */

@keyframes cardShine {
    0% {
        left: -100%;
    }
    100% {
        left: 150%;
    }
}

.shine-on-hover {
    position: relative;
    overflow: hidden;
}

.shine-on-hover::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 60%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.03),
        transparent
    );
    transform: skewX(-15deg);
    pointer-events: none;
}

.shine-on-hover:hover::after {
    animation: cardShine 0.8s ease;
}

/* ==========================================================================
   Noise / Grain Texture Overlay
   ========================================================================== */

@keyframes grain {
    0%, 100% { transform: translate(0, 0); }
    10% { transform: translate(-5%, -10%); }
    20% { transform: translate(-15%, 5%); }
    30% { transform: translate(7%, -25%); }
    40% { transform: translate(-5%, 25%); }
    50% { transform: translate(-15%, 10%); }
    60% { transform: translate(15%, 0%); }
    70% { transform: translate(0%, 15%); }
    80% { transform: translate(3%, 35%); }
    90% { transform: translate(-10%, 10%); }
}

.noise-overlay::before {
    content: '';
    position: fixed;
    top: -50%;
    left: -50%;
    right: -50%;
    bottom: -50%;
    width: 200%;
    height: 200%;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.03'/%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 9000;
    animation: grain 8s steps(10) infinite;
    opacity: 0.4;
}

/* ==========================================================================
   Prefers Reduced Motion
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .cursor-dot,
    .cursor-ring {
        display: none;
    }

    .parallax-bg {
        transform: none !important;
    }

    .reveal,
    .reveal-left,
    .reveal-right {
        opacity: 1;
        transform: none;
    }

    .stagger-children > * {
        opacity: 1;
        transform: none;
    }
}
