/* 
   Sincerus Consulting - Animations Stylesheet
*/

/* Loader */
#loader {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background-color: #040b3c;
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.8s ease, visibility 0.8s ease;
}
#loader.loaded {
    opacity: 0;
    visibility: hidden;
}
.loader-content img {
    width: 200px;
    height: auto;
    filter: brightness(0) invert(1);
    animation: pulse 2s infinite ease-in-out;
}
@keyframes pulse {
    0% { transform: scale(1); opacity: 1; filter: brightness(0) invert(1); }
    50% { transform: scale(1.05); opacity: 1; filter: brightness(0) invert(1) drop-shadow(0 0 15px #00e5ff); }
    100% { transform: scale(1); opacity: 1; filter: brightness(0) invert(1); }
}



/* -----------------------------
   Custom Cursor 
----------------------------- */
.custom-cursor {
    position: fixed;
    top: 0;
    left: 0;
    width: 10px;
    height: 10px;
    background-color: var(--color-accent);
    border-radius: 50%;
    pointer-events: none;
    z-index: 10000;
    transform: translate(-50%, -50%);
    transition: width 0.3s, height 0.3s, background-color 0.3s;
}

body:hover .custom-cursor {
    opacity: 1;
}

/* Hover state for links and buttons */
.custom-cursor.hover {
    width: 20px;
    height: 20px;
    background-color: var(--color-accent-glow);
}

@media (max-width: 992px) {
    .custom-cursor {
        display: none !important;
    }
}

/* -----------------------------
   Glitch Text Effect
----------------------------- */
.glitch-text {
    position: relative;
    display: inline-block;
}

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

.glitch-text::before {
    left: 2px;
    text-shadow: -2px 0 red;
    clip: rect(44px, 450px, 56px, 0);
    animation: glitch-anim 5s infinite linear alternate-reverse;
    z-index: -1;
}

.glitch-text::after {
    left: -2px;
    text-shadow: -2px 0 blue;
    clip: rect(44px, 450px, 56px, 0);
    animation: glitch-anim2 5s infinite linear alternate-reverse;
    z-index: -2;
}

@keyframes glitch-anim {
  0% { clip: rect(25px, 9999px, 83px, 0); }
  5% { clip: rect(69px, 9999px, 81px, 0); }
  10% { clip: rect(31px, 9999px, 12px, 0); }
  15% { clip: rect(81px, 9999px, 7px, 0); }
  20% { clip: rect(98px, 9999px, 7px, 0); }
  25% { clip: rect(93px, 9999px, 20px, 0); }
  30% { clip: rect(8px, 9999px, 11px, 0); }
  35% { clip: rect(22px, 9999px, 3px, 0); }
  40% { clip: rect(96px, 9999px, 49px, 0); }
  45% { clip: rect(27px, 9999px, 63px, 0); }
  50% { clip: rect(78px, 9999px, 3px, 0); }
  55% { clip: rect(98px, 9999px, 2px, 0); }
  60% { clip: rect(76px, 9999px, 49px, 0); }
  65% { clip: rect(21px, 9999px, 51px, 0); }
  70% { clip: rect(48px, 9999px, 76px, 0); }
  75% { clip: rect(10px, 9999px, 54px, 0); }
  80% { clip: rect(82px, 9999px, 55px, 0); }
  85% { clip: rect(11px, 9999px, 4px, 0); }
  90% { clip: rect(62px, 9999px, 72px, 0); }
  95% { clip: rect(25px, 9999px, 19px, 0); }
  100% { clip: rect(75px, 9999px, 29px, 0); }
}

@keyframes glitch-anim2 {
  0% { clip: rect(11px, 9999px, 44px, 0); }
  5% { clip: rect(20px, 9999px, 99px, 0); }
  10% { clip: rect(69px, 9999px, 12px, 0); }
  15% { clip: rect(89px, 9999px, 48px, 0); }
  20% { clip: rect(14px, 9999px, 73px, 0); }
  25% { clip: rect(10px, 9999px, 27px, 0); }
  30% { clip: rect(2px, 9999px, 36px, 0); }
  35% { clip: rect(59px, 9999px, 11px, 0); }
  40% { clip: rect(14px, 9999px, 4px, 0); }
  45% { clip: rect(68px, 9999px, 73px, 0); }
  50% { clip: rect(31px, 9999px, 60px, 0); }
  55% { clip: rect(51px, 9999px, 100px, 0); }
  60% { clip: rect(81px, 9999px, 39px, 0); }
  65% { clip: rect(80px, 9999px, 77px, 0); }
  70% { clip: rect(8px, 9999px, 18px, 0); }
  75% { clip: rect(82px, 9999px, 78px, 0); }
  80% { clip: rect(78px, 9999px, 70px, 0); }
  85% { clip: rect(38px, 9999px, 11px, 0); }
  90% { clip: rect(34px, 9999px, 24px, 0); }
  95% { clip: rect(54px, 9999px, 47px, 0); }
  100% { clip: rect(98px, 9999px, 95px, 0); }
}

/* -----------------------------
   Scroll Animations 
----------------------------- */
.fade-up {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeUpAnim 0.8s forwards cubic-bezier(0.16, 1, 0.3, 1);
}

.fade-up-on-scroll {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.fade-up-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

@keyframes fadeUpAnim {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}
