/* Advanced Animation Library for EmadBRZ Theme */

/* ==========================================================================
   AOS (Animate On Scroll) Custom Styles
   ========================================================================== */
[data-aos] {
    opacity: 0;
    transition-property: transform, opacity;
}

[data-aos].aos-animate {
    opacity: 1;
}

[data-aos="fade"] {
    opacity: 0;
    transition-property: opacity;
}

[data-aos="fade"].aos-animate {
    opacity: 1;
}

[data-aos="fade-up"] {
    transform: translate3d(0, 100px, 0);
}

[data-aos="fade-up"].aos-animate {
    transform: translate3d(0, 0, 0);
}

[data-aos="fade-down"] {
    transform: translate3d(0, -100px, 0);
}

[data-aos="fade-down"].aos-animate {
    transform: translate3d(0, 0, 0);
}

[data-aos="fade-left"] {
    transform: translate3d(-100px, 0, 0);
}

[data-aos="fade-left"].aos-animate {
    transform: translate3d(0, 0, 0);
}

[data-aos="fade-right"] {
    transform: translate3d(100px, 0, 0);
}

[data-aos="fade-right"].aos-animate {
    transform: translate3d(0, 0, 0);
}

[data-aos="zoom-in"] {
    transform: scale3d(0.6, 0.6, 0.6);
}

[data-aos="zoom-in"].aos-animate {
    transform: scale3d(1, 1, 1);
}

[data-aos="zoom-out"] {
    transform: scale3d(1.2, 1.2, 1.2);
}

[data-aos="zoom-out"].aos-animate {
    transform: scale3d(1, 1, 1);
}

/* ==========================================================================
   Custom Advanced Animations
   ========================================================================== */

/* Typing Animation */
.typing-animation {
    overflow: hidden;
    border-right: 3px solid var(--primary-white);
    white-space: nowrap;
    margin: 0 auto;
    animation: typing 3.5s steps(40, end), blink-caret 0.75s step-end infinite;
}

@keyframes typing {
    from { width: 0; }
    to { width: 100%; }
}

@keyframes blink-caret {
    from, to { border-color: transparent; }
    50% { border-color: var(--primary-white); }
}

/* Glitch Effect */
.glitch {
    position: relative;
    color: var(--primary-white);
    font-size: 4em;
    font-weight: bold;
    text-transform: uppercase;
    animation: glitch-skew 1s infinite linear alternate-reverse;
}

.glitch::before,
.glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.glitch::before {
    animation: glitch-anim 2s infinite linear alternate-reverse;
    color: #ff0000;
    z-index: -1;
}

.glitch::after {
    animation: glitch-anim2 1s infinite linear alternate-reverse;
    color: #00ff00;
    z-index: -2;
}

@keyframes glitch-anim {
    0% { clip: rect(42px, 9999px, 44px, 0); transform: skew(0.85deg); }
    5% { clip: rect(12px, 9999px, 59px, 0); transform: skew(0.40deg); }
    10% { clip: rect(48px, 9999px, 29px, 0); transform: skew(0.30deg); }
    15% { clip: rect(42px, 9999px, 73px, 0); transform: skew(0.81deg); }
    20% { clip: rect(63px, 9999px, 27px, 0); transform: skew(0.70deg); }
    25% { clip: rect(34px, 9999px, 55px, 0); transform: skew(0.91deg); }
    30% { clip: rect(86px, 9999px, 73px, 0); transform: skew(0.38deg); }
    35% { clip: rect(20px, 9999px, 20px, 0); transform: skew(0.41deg); }
    40% { clip: rect(26px, 9999px, 60px, 0); transform: skew(0.07deg); }
    45% { clip: rect(99px, 9999px, 99px, 0); transform: skew(0.15deg); }
    50% { clip: rect(65px, 9999px, 15px, 0); transform: skew(0.23deg); }
    55% { clip: rect(46px, 9999px, 05px, 0); transform: skew(0.44deg); }
    60% { clip: rect(31px, 9999px, 42px, 0); transform: skew(0.52deg); }
    65% { clip: rect(14px, 9999px, 92px, 0); transform: skew(0.90deg); }
    70% { clip: rect(22px, 9999px, 85px, 0); transform: skew(0.59deg); }
    75% { clip: rect(85px, 9999px, 99px, 0); transform: skew(0.96deg); }
    80% { clip: rect(15px, 9999px, 43px, 0); transform: skew(0.24deg); }
    85% { clip: rect(66px, 9999px, 74px, 0); transform: skew(0.88deg); }
    90% { clip: rect(67px, 9999px, 54px, 0); transform: skew(0.90deg); }
    95% { clip: rect(34px, 9999px, 43px, 0); transform: skew(0.84deg); }
    100% { clip: rect(67px, 9999px, 18px, 0); transform: skew(0.70deg); }
}

@keyframes glitch-anim2 {
    0% { clip: rect(65px, 9999px, 100px, 0); transform: skew(0.30deg); }
    5% { clip: rect(52px, 9999px, 31px, 0); transform: skew(0.70deg); }
    10% { clip: rect(16px, 9999px, 34px, 0); transform: skew(0.61deg); }
    15% { clip: rect(40px, 9999px, 91px, 0); transform: skew(0.04deg); }
    20% { clip: rect(12px, 9999px, 69px, 0); transform: skew(0.73deg); }
    25% { clip: rect(21px, 9999px, 99px, 0); transform: skew(0.13deg); }
    30% { clip: rect(65px, 9999px, 75px, 0); transform: skew(0.68deg); }
    35% { clip: rect(40px, 9999px, 61px, 0); transform: skew(0.52deg); }
    40% { clip: rect(14px, 9999px, 100px, 0); transform: skew(0.12deg); }
    45% { clip: rect(66px, 9999px, 39px, 0); transform: skew(0.78deg); }
    50% { clip: rect(67px, 9999px, 56px, 0); transform: skew(0.82deg); }
    55% { clip: rect(13px, 9999px, 83px, 0); transform: skew(0.15deg); }
    60% { clip: rect(47px, 9999px, 22px, 0); transform: skew(0.62deg); }
    65% { clip: rect(64px, 9999px, 68px, 0); transform: skew(0.18deg); }
    70% { clip: rect(37px, 9999px, 39px, 0); transform: skew(0.19deg); }
    75% { clip: rect(83px, 9999px, 40px, 0); transform: skew(0.44deg); }
    80% { clip: rect(29px, 9999px, 70px, 0); transform: skew(0.25deg); }
    85% { clip: rect(29px, 9999px, 97px, 0); transform: skew(0.53deg); }
    90% { clip: rect(62px, 9999px, 70px, 0); transform: skew(0.72deg); }
    95% { clip: rect(96px, 9999px, 89px, 0); transform: skew(0.78deg); }
    100% { clip: rect(13px, 9999px, 91px, 0); transform: skew(0.83deg); }
}

@keyframes glitch-skew {
    0% { transform: skew(0deg); }
    10% { transform: skew(-1deg); }
    20% { transform: skew(1deg); }
    30% { transform: skew(0deg); }
    40% { transform: skew(1deg); }
    50% { transform: skew(-1deg); }
    60% { transform: skew(0deg); }
    70% { transform: skew(-1deg); }
    80% { transform: skew(1deg); }
    90% { transform: skew(0deg); }
    100% { transform: skew(-1deg); }
}

/* Neon Effect */
.neon {
    color: var(--primary-white);
    text-shadow: 
        0 0 5px var(--primary-white),
        0 0 10px var(--primary-white),
        0 0 15px var(--primary-white),
        0 0 20px #ff00de,
        0 0 35px #ff00de,
        0 0 40px #ff00de,
        0 0 50px #ff00de,
        0 0 75px #ff00de;
    animation: neon-flicker 1.5s infinite alternate;
}

@keyframes neon-flicker {
    0%, 18%, 22%, 25%, 53%, 57%, 100% {
        text-shadow: 
            0 0 5px var(--primary-white),
            0 0 10px var(--primary-white),
            0 0 15px var(--primary-white),
            0 0 20px #ff00de,
            0 0 35px #ff00de,
            0 0 40px #ff00de,
            0 0 50px #ff00de,
            0 0 75px #ff00de;
    }
    20%, 24%, 55% {
        text-shadow: none;
    }
}

/* Particle Background */
.particles-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
}

.particle {
    position: absolute;
    background: var(--primary-white);
    border-radius: 50%;
    opacity: 0.1;
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); opacity: 0.1; }
    50% { transform: translateY(-100px) rotate(180deg); opacity: 0.3; }
}

/* Morphing Animation */
.morph {
    border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
    animation: morph 8s ease-in-out infinite;
    background: linear-gradient(45deg, var(--primary-white), var(--gray-lighter));
}

@keyframes morph {
    0% { border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%; }
    50% { border-radius: 30% 60% 70% 40% / 50% 60% 30% 60%; }
    100% { border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%; }
}

/* Text Reveal Animation */
.text-reveal {
    position: relative;
    overflow: hidden;
}

.text-reveal::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--primary-white);
    transform: translateX(-100%);
    animation: reveal 2s ease-in-out;
}

@keyframes reveal {
    0% { transform: translateX(-100%); }
    50% { transform: translateX(0%); }
    100% { transform: translateX(100%); }
}

/* Matrix Rain Effect */
.matrix-rain {
    position: relative;
    overflow: hidden;
}

.matrix-rain::before {
    content: '';
    position: absolute;
    top: -100%;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(
        90deg,
        transparent,
        transparent 98px,
        var(--primary-white) 100px
    );
    animation: matrix-fall 3s linear infinite;
    opacity: 0.1;
}

@keyframes matrix-fall {
    0% { transform: translateY(-100%); }
    100% { transform: translateY(100vh); }
}

/* Pulse Animation */
.pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Bounce Animation */
.bounce {
    animation: bounce 1s infinite;
}

@keyframes bounce {
    0%, 20%, 53%, 80%, 100% { transform: translate3d(0, 0, 0); }
    40%, 43% { transform: translate3d(0, -30px, 0); }
    70% { transform: translate3d(0, -15px, 0); }
    90% { transform: translate3d(0, -4px, 0); }
}

/* Shake Animation */
.shake {
    animation: shake 0.82s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}

@keyframes shake {
    10%, 90% { transform: translate3d(-1px, 0, 0); }
    20%, 80% { transform: translate3d(2px, 0, 0); }
    30%, 50%, 70% { transform: translate3d(-4px, 0, 0); }
    40%, 60% { transform: translate3d(4px, 0, 0); }
}

/* Flip Animation */
.flip {
    animation: flip 1s ease-in-out;
}

@keyframes flip {
    0% { transform: perspective(400px) rotateY(0); }
    40% { transform: perspective(400px) translateZ(150px) rotateY(-190deg); }
    50% { transform: perspective(400px) translateZ(150px) rotateY(-190deg); }
    80% { transform: perspective(400px) rotateY(0deg); }
    100% { transform: perspective(400px) rotateY(0deg); }
}

/* Hover Effects */
.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(255, 255, 255, 0.1);
}

.hover-glow {
    transition: box-shadow 0.3s ease;
}

.hover-glow:hover {
    box-shadow: 
        0 0 20px rgba(255, 255, 255, 0.3),
        0 0 40px rgba(255, 255, 255, 0.2),
        0 0 60px rgba(255, 255, 255, 0.1);
}


