/**
 * HashDrip Animated Hero Background
 * Smoke, drips, and premium vibes
 *
 * @package HashDrip
 * @version 1.0.0
 */

/* ==========================================================================
   HERO CONTAINER SETUP
   ========================================================================== */
.hd-hero-section {
    position: relative;
    overflow: hidden;
    background: linear-gradient(180deg, #0A0A0A 0%, #0D0D0D 50%, #0A0A0A 100%);
}

.hd-hero-section__bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    background-image: url('../images/hero-bg.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0.4;
}

/* ==========================================================================
   SMOKE/HAZE LAYERS
   ========================================================================== */
.hd-smoke-container {
    position: absolute;
    inset: 0;
    z-index: 1;
    overflow: hidden;
    opacity: 0.6;
}

.hd-smoke {
    position: absolute;
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse at center, rgba(212, 168, 67, 0.15) 0%, transparent 70%);
    filter: blur(40px);
    animation: smokeFloat 20s ease-in-out infinite;
}

.hd-smoke--1 {
    top: -20%;
    left: -20%;
    width: 80%;
    height: 80%;
    animation-delay: 0s;
    animation-duration: 25s;
}

.hd-smoke--2 {
    top: 30%;
    right: -30%;
    width: 70%;
    height: 70%;
    animation-delay: -5s;
    animation-duration: 30s;
    animation-direction: reverse;
}

.hd-smoke--3 {
    bottom: -20%;
    left: 20%;
    width: 90%;
    height: 60%;
    animation-delay: -10s;
    animation-duration: 22s;
}

.hd-smoke--4 {
    top: 10%;
    left: 40%;
    width: 50%;
    height: 50%;
    background: radial-gradient(ellipse at center, rgba(244, 208, 63, 0.1) 0%, transparent 60%);
    animation-delay: -7s;
    animation-duration: 18s;
}

@keyframes smokeFloat {
    0%, 100% {
        transform: translate(0, 0) scale(1) rotate(0deg);
        opacity: 0.4;
    }
    25% {
        transform: translate(5%, 3%) scale(1.1) rotate(2deg);
        opacity: 0.6;
    }
    50% {
        transform: translate(-3%, 5%) scale(0.95) rotate(-1deg);
        opacity: 0.5;
    }
    75% {
        transform: translate(-5%, -3%) scale(1.05) rotate(1deg);
        opacity: 0.7;
    }
}

/* ==========================================================================
   FLOWING MIST WAVES
   ========================================================================== */
.hd-mist-container {
    position: absolute;
    inset: 0;
    z-index: 2;
    overflow: hidden;
    pointer-events: none;
}

.hd-mist-wave {
    position: absolute;
    width: 200%;
    height: 200px;
    background: linear-gradient(180deg,
        transparent 0%,
        rgba(212, 168, 67, 0.03) 30%,
        rgba(212, 168, 67, 0.08) 50%,
        rgba(212, 168, 67, 0.03) 70%,
        transparent 100%
    );
    filter: blur(30px);
    animation: mistFlow 15s linear infinite;
}

.hd-mist-wave--1 {
    top: 20%;
    animation-duration: 20s;
}

.hd-mist-wave--2 {
    top: 50%;
    animation-duration: 25s;
    animation-delay: -8s;
    opacity: 0.7;
}

.hd-mist-wave--3 {
    top: 75%;
    animation-duration: 18s;
    animation-delay: -12s;
    opacity: 0.5;
}

@keyframes mistFlow {
    0% {
        transform: translateX(-50%) skewX(-5deg);
    }
    100% {
        transform: translateX(0%) skewX(-5deg);
    }
}

/* ==========================================================================
   GOLD DRIP EFFECT
   ========================================================================== */
.hd-drip-container {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 100%;
    z-index: 3;
    pointer-events: none;
    overflow: hidden;
}

.hd-drip {
    position: absolute;
    top: -100px;
    width: 3px;
    background: linear-gradient(180deg,
        transparent 0%,
        rgba(212, 168, 67, 0.8) 20%,
        rgba(244, 208, 63, 1) 50%,
        rgba(212, 168, 67, 0.8) 80%,
        transparent 100%
    );
    border-radius: 0 0 50% 50%;
    filter: blur(1px);
    animation: dripFall linear infinite;
}

.hd-drip::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 8px;
    height: 10px;
    background: radial-gradient(ellipse at center, rgba(244, 208, 63, 0.9) 0%, rgba(212, 168, 67, 0.6) 60%, transparent 100%);
    border-radius: 50% 50% 50% 50% / 40% 40% 60% 60%;
    filter: blur(1px);
}

/* Individual drips with different positions and timing */
.hd-drip--1 { left: 5%; height: 80px; animation-duration: 4s; animation-delay: 0s; }
.hd-drip--2 { left: 12%; height: 60px; animation-duration: 5s; animation-delay: -1s; }
.hd-drip--3 { left: 23%; height: 100px; animation-duration: 4.5s; animation-delay: -2s; }
.hd-drip--4 { left: 35%; height: 70px; animation-duration: 6s; animation-delay: -0.5s; }
.hd-drip--5 { left: 48%; height: 90px; animation-duration: 5.5s; animation-delay: -3s; }
.hd-drip--6 { left: 62%; height: 65px; animation-duration: 4.2s; animation-delay: -1.5s; }
.hd-drip--7 { left: 75%; height: 85px; animation-duration: 5.8s; animation-delay: -2.5s; }
.hd-drip--8 { left: 88%; height: 75px; animation-duration: 4.8s; animation-delay: -0.8s; }
.hd-drip--9 { left: 95%; height: 95px; animation-duration: 5.2s; animation-delay: -3.5s; }

@keyframes dripFall {
    0% {
        transform: translateY(-100px) scaleY(0.5);
        opacity: 0;
    }
    10% {
        transform: translateY(0) scaleY(1);
        opacity: 1;
    }
    90% {
        transform: translateY(calc(100vh + 50px)) scaleY(1.2);
        opacity: 0.8;
    }
    100% {
        transform: translateY(calc(100vh + 100px)) scaleY(0.8);
        opacity: 0;
    }
}

/* Drip splash at bottom */
.hd-splash-container {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 100px;
    z-index: 4;
    pointer-events: none;
}

.hd-splash {
    position: absolute;
    bottom: 20px;
    width: 30px;
    height: 10px;
    background: radial-gradient(ellipse at center, rgba(212, 168, 67, 0.4) 0%, transparent 70%);
    border-radius: 50%;
    animation: splashPulse 2s ease-out infinite;
    filter: blur(2px);
}

.hd-splash--1 { left: 5%; animation-delay: 0s; }
.hd-splash--2 { left: 23%; animation-delay: -0.5s; }
.hd-splash--3 { left: 48%; animation-delay: -1s; }
.hd-splash--4 { left: 75%; animation-delay: -1.5s; }
.hd-splash--5 { left: 95%; animation-delay: -0.8s; }

@keyframes splashPulse {
    0%, 100% {
        transform: scale(0.5);
        opacity: 0;
    }
    50% {
        transform: scale(1.5);
        opacity: 0.6;
    }
}

/* ==========================================================================
   ENHANCED PARTICLE SYSTEM
   ========================================================================== */
.hd-particles-enhanced {
    position: absolute;
    inset: 0;
    z-index: 5;
    pointer-events: none;
}

.hd-particle-trail {
    position: absolute;
    width: 4px;
    height: 4px;
    background: rgba(212, 168, 67, 0.8);
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(212, 168, 67, 0.5),
                0 0 20px rgba(212, 168, 67, 0.3);
    animation: particleRise 8s ease-in-out infinite;
}

.hd-particle-trail::before {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: 30px;
    background: linear-gradient(180deg, rgba(212, 168, 67, 0.5), transparent);
    border-radius: 50%;
}

@keyframes particleRise {
    0% {
        transform: translateY(100vh) scale(0);
        opacity: 0;
    }
    10% {
        opacity: 1;
        transform: translateY(90vh) scale(1);
    }
    90% {
        opacity: 0.8;
        transform: translateY(-10vh) scale(0.8);
    }
    100% {
        transform: translateY(-20vh) scale(0);
        opacity: 0;
    }
}

/* ==========================================================================
   AMBIENT GLOW PULSES
   ========================================================================== */
.hd-glow-container {
    position: absolute;
    inset: 0;
    z-index: 0;
    overflow: hidden;
}

.hd-ambient-glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    animation: ambientPulse 8s ease-in-out infinite;
}

.hd-ambient-glow--1 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(212, 168, 67, 0.15) 0%, transparent 70%);
    top: 10%;
    left: 10%;
    animation-delay: 0s;
}

.hd-ambient-glow--2 {
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(244, 208, 63, 0.1) 0%, transparent 70%);
    top: 60%;
    right: 15%;
    animation-delay: -3s;
}

.hd-ambient-glow--3 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(212, 168, 67, 0.08) 0%, transparent 70%);
    bottom: -10%;
    left: 40%;
    animation-delay: -5s;
}

@keyframes ambientPulse {
    0%, 100% {
        transform: scale(1);
        opacity: 0.5;
    }
    50% {
        transform: scale(1.2);
        opacity: 0.8;
    }
}

/* ==========================================================================
   VIGNETTE OVERLAY
   ========================================================================== */
.hd-vignette {
    position: absolute;
    inset: 0;
    z-index: 6;
    pointer-events: none;
    background: radial-gradient(ellipse at center, transparent 40%, rgba(0, 0, 0, 0.4) 100%);
}

/* ==========================================================================
   GRAIN/NOISE TEXTURE
   ========================================================================== */
.hd-grain {
    position: absolute;
    inset: 0;
    z-index: 7;
    pointer-events: none;
    opacity: 0.03;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' 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)'/%3E%3C/svg%3E");
    background-repeat: repeat;
}

/* ==========================================================================
   TINY FLOATING DUST
   ========================================================================== */
.hd-dust-container {
    position: absolute;
    inset: 0;
    z-index: 4;
    overflow: hidden;
    pointer-events: none;
}

.hd-dust {
    position: absolute;
    width: 3px;
    height: 3px;
    background: rgba(212, 168, 67, 0.6);
    border-radius: 50%;
    box-shadow: 0 0 6px rgba(212, 168, 67, 0.4);
    animation: dustFloat 12s ease-in-out infinite;
}

@keyframes dustFloat {
    0% {
        transform: translateY(100vh) translateX(0);
        opacity: 0;
    }
    10% {
        opacity: 0.8;
    }
    50% {
        transform: translateY(50vh) translateX(20px);
    }
    90% {
        opacity: 0.6;
    }
    100% {
        transform: translateY(-10vh) translateX(-10px);
        opacity: 0;
    }
}

/* ==========================================================================
   CONTENT Z-INDEX
   ========================================================================== */
.hd-hero-section__content {
    position: relative;
    z-index: 10;
}

.hd-hero-section__overlay {
    z-index: 8;
}

.hd-hero-section__scroll {
    z-index: 10;
}

/* ==========================================================================
   RESPONSIVE ADJUSTMENTS
   ========================================================================== */
@media (max-width: 768px) {
    .hd-smoke {
        filter: blur(30px);
    }

    .hd-drip {
        width: 2px;
    }

    .hd-drip--2, .hd-drip--4, .hd-drip--6, .hd-drip--8 {
        display: none;
    }

    .hd-ambient-glow--1,
    .hd-ambient-glow--2,
    .hd-ambient-glow--3 {
        width: 200px;
        height: 200px;
    }
}

/* ==========================================================================
   REDUCE MOTION FOR ACCESSIBILITY
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
    .hd-smoke,
    .hd-mist-wave,
    .hd-drip,
    .hd-splash,
    .hd-particle-trail,
    .hd-ambient-glow,
    .hd-dust {
        animation: none;
    }
}
