/* Glitch Effect */
.glitch-container {
  position: relative;
  display: inline-block;
  margin-bottom: 1rem;
}

.glitch {
  position: relative;
  color: var(--color-text);
}

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

.glitch::before {
  left: -2px;
  text-shadow: 2px 0 var(--color-primary);
  animation: glitch-animation-1 2s infinite linear alternate-reverse;
}

.glitch::after {
  left: 2px;
  text-shadow: -2px 0 var(--color-secondary);
  animation: glitch-animation-2 3s infinite linear alternate-reverse;
}

@keyframes glitch-animation-1 {
  0% {
    clip: rect(36px, 9999px, 9px, 0);
  }
  5% {
    clip: rect(85px, 9999px, 78px, 0);
  }
  10% {
    clip: rect(32px, 9999px, 11px, 0);
  }
  15% {
    clip: rect(91px, 9999px, 59px, 0);
  }
  20% {
    clip: rect(27px, 9999px, 100px, 0);
  }
  25% {
    clip: rect(86px, 9999px, 11px, 0);
  }
  30% {
    clip: rect(57px, 9999px, 98px, 0);
  }
  35% {
    clip: rect(29px, 9999px, 31px, 0);
  }
  40% {
    clip: rect(65px, 9999px, 53px, 0);
  }
  45% {
    clip: rect(10px, 9999px, 84px, 0);
  }
  50% {
    clip: rect(33px, 9999px, 12px, 0);
  }
  55% {
    clip: rect(17px, 9999px, 46px, 0);
  }
  60% {
    clip: rect(44px, 9999px, 78px, 0);
  }
  65% {
    clip: rect(32px, 9999px, 23px, 0);
  }
  70% {
    clip: rect(60px, 9999px, 56px, 0);
  }
  75% {
    clip: rect(18px, 9999px, 75px, 0);
  }
  80% {
    clip: rect(100px, 9999px, 55px, 0);
  }
  85% {
    clip: rect(40px, 9999px, 47px, 0);
  }
  90% {
    clip: rect(57px, 9999px, 4px, 0);
  }
  95% {
    clip: rect(29px, 9999px, 44px, 0);
  }
  100% {
    clip: rect(70px, 9999px, 64px, 0);
  }
}

@keyframes glitch-animation-2 {
  0% {
    clip: rect(96px, 9999px, 3px, 0);
  }
  5% {
    clip: rect(38px, 9999px, 92px, 0);
  }
  10% {
    clip: rect(66px, 9999px, 75px, 0);
  }
  15% {
    clip: rect(86px, 9999px, 22px, 0);
  }
  20% {
    clip: rect(38px, 9999px, 87px, 0);
  }
  25% {
    clip: rect(99px, 9999px, 7px, 0);
  }
  30% {
    clip: rect(72px, 9999px, 54px, 0);
  }
  35% {
    clip: rect(28px, 9999px, 86px, 0);
  }
  40% {
    clip: rect(46px, 9999px, 3px, 0);
  }
  45% {
    clip: rect(11px, 9999px, 84px, 0);
  }
  50% {
    clip: rect(46px, 9999px, 16px, 0);
  }
  55% {
    clip: rect(2px, 9999px, 100px, 0);
  }
  60% {
    clip: rect(57px, 9999px, 73px, 0);
  }
  65% {
    clip: rect(100px, 9999px, 8px, 0);
  }
  70% {
    clip: rect(67px, 9999px, 37px, 0);
  }
  75% {
    clip: rect(17px, 9999px, 23px, 0);
  }
  80% {
    clip: rect(64px, 9999px, 28px, 0);
  }
  85% {
    clip: rect(23px, 9999px, 85px, 0);
  }
  90% {
    clip: rect(42px, 9999px, 51px, 0);
  }
  95% {
    clip: rect(45px, 9999px, 65px, 0);
  }
  100% {
    clip: rect(76px, 9999px, 12px, 0);
  }
}

/* Fade In Animation */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  animation: fadeIn 1s ease forwards;
}

/* Reveal Animation */
@keyframes reveal {
  from {
    clip-path: polygon(0 0, 0 0, 0 100%, 0 100%);
  }
  to {
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
  }
}

.reveal {
  animation: reveal 1s ease forwards;
}

/* Hover Effects */
.service-card:hover .service-icon,
.value-card:hover .value-icon {
  transform: scale(1.1);
  filter: drop-shadow(0 0 8px rgba(0, 255, 170, 0.5));
}

.service-card:hover h3,
.value-card:hover h3 {
  color: var(--color-primary);
}

/* Pulse Animation */
@keyframes pulse {
  0% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.05);
    opacity: 0.8;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

.pulse {
  animation: pulse 2s infinite;
}

/* Typing Animation */
@keyframes typing {
  from {
    width: 0;
  }
  to {
    width: 100%;
  }
}

@keyframes blink {
  50% {
    border-color: transparent;
  }
}

.typing {
  display: inline-block;
  overflow: hidden;
  white-space: nowrap;
  border-right: 3px solid var(--color-primary);
  animation: typing 3.5s steps(40, end), blink 0.75s step-end infinite;
}

/* Floating Animation */
@keyframes float {
  0% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
  100% {
    transform: translateY(0);
  }
}

.float {
  animation: float 4s ease-in-out infinite;
}

/* Glow Animation */
@keyframes glow {
  0% {
    box-shadow: 0 0 5px rgba(0, 255, 170, 0.5);
  }
  50% {
    box-shadow: 0 0 20px rgba(0, 255, 170, 0.8);
  }
  100% {
    box-shadow: 0 0 5px rgba(0, 255, 170, 0.5);
  }
}

.glow {
  animation: glow 2s infinite;
}

/* Slide In Animation */
@keyframes slideInLeft {
  from {
    transform: translateX(-100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes slideInRight {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

.slide-in-left {
  animation: slideInLeft 1s ease forwards;
}

.slide-in-right {
  animation: slideInRight 1s ease forwards;
}

/* Rotate Animation */
@keyframes rotate {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.rotate {
  animation: rotate 10s linear infinite;
}

/* Scale Animation */
@keyframes scale {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
  100% {
    transform: scale(1);
  }
}

.scale {
  animation: scale 2s ease-in-out infinite;
}
