/* TeDaCo Smooth Interactions & Micro-Animations */

/* Global Text Sharpening */
* {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* Prevent blur from transforms */
.services .box,
.services .box *,
.text-3d,
.holographic,
.business-area-header * {
  transform: translateZ(0);
  backface-visibility: hidden;
  will-change: transform;
}

/* Smooth Scrolling */
html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #1a1a1a;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #3fcdc7, #e98e06);
  border-radius: 4px;
  transition: all 0.3s ease;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #ff689b, #8660fe);
  box-shadow: 0 0 10px rgba(63, 205, 199, 0.5);
}

/* Button Micro-Interactions */
.btn-get-started {
  position: relative;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.23, 1, 0.320, 1);
  transform: translateZ(0);
}

.btn-get-started::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.6s ease;
}

.btn-get-started:hover::before {
  left: 100%;
}

.btn-get-started:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 
    0 10px 25px rgba(63, 205, 199, 0.3),
    0 0 0 1px rgba(63, 205, 199, 0.5);
}

.btn-get-started:active {
  transform: translateY(-1px) scale(1.02);
}

/* Navigation Micro-Interactions */
.navbar ul li a {
  position: relative;
  transition: all 0.3s cubic-bezier(0.23, 1, 0.320, 1);
}

.navbar ul li a::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 50%;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, #3fcdc7, #e98e06);
  transition: all 0.4s cubic-bezier(0.23, 1, 0.320, 1);
  transform: translateX(-50%);
}

.navbar ul li a:hover::after,
.navbar ul li a.active::after {
  width: 100%;
}

.navbar ul li a:hover {
  transform: translateY(-2px);
  text-shadow: 0 5px 15px rgba(63, 205, 199, 0.3);
}

/* Loading Animations */
.loading-element {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s cubic-bezier(0.23, 1, 0.320, 1);
}

.loading-element.loaded {
  opacity: 1;
  transform: translateY(0);
}

/* Staggered Loading */
.loading-element:nth-child(1) { transition-delay: 0.1s; }
.loading-element:nth-child(2) { transition-delay: 0.2s; }
.loading-element:nth-child(3) { transition-delay: 0.3s; }
.loading-element:nth-child(4) { transition-delay: 0.4s; }
.loading-element:nth-child(5) { transition-delay: 0.5s; }
.loading-element:nth-child(6) { transition-delay: 0.6s; }

/* Hover Ripple Effect */
.ripple-effect {
  position: relative;
  overflow: hidden;
}

.ripple-effect::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(63, 205, 199, 0.3);
  transform: translate(-50%, -50%);
  transition: width 0.6s ease, height 0.6s ease;
}

.ripple-effect:hover::before {
  width: 300px;
  height: 300px;
}

/* Magnetic Effect */
.magnetic {
  transition: transform 0.3s cubic-bezier(0.23, 1, 0.320, 1);
}

.magnetic:hover {
  transform: scale(1.1);
}

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

.text-reveal::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #3fcdc7;
  transform: translateX(-100%);
  transition: transform 0.8s cubic-bezier(0.23, 1, 0.320, 1);
}

.text-reveal.animate::before {
  transform: translateX(100%);
}

/* Pulse Animation */
@keyframes pulse-glow {
  0%, 100% {
    box-shadow: 0 0 5px rgba(63, 205, 199, 0.5);
  }
  50% {
    box-shadow: 0 0 20px rgba(63, 205, 199, 0.8);
  }
}

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

/* Typewriter Effect */
.typewriter {
  overflow: hidden;
  border-right: 2px solid #3fcdc7;
  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: #3fcdc7; }
}

/* Gradient Border Animation */
.gradient-border {
  position: relative;
  background: linear-gradient(45deg, #1a1a1a, #2a2a2a);
  border-radius: 10px;
  padding: 2px;
}

.gradient-border::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: 10px;
  padding: 2px;
  background: linear-gradient(45deg, #3fcdc7, #e98e06, #ff689b, #8660fe);
  background-size: 400% 400%;
  animation: gradient-border-rotate 3s ease infinite;
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask-composite: exclude;
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: destination-out;
}

@keyframes gradient-border-rotate {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

/* Elastic Animation */
@keyframes elastic {
  0% { transform: scale(1); }
  20% { transform: scale(1.2, 0.8); }
  40% { transform: scale(0.8, 1.2); }
  60% { transform: scale(1.1, 0.9); }
  80% { transform: scale(0.95, 1.05); }
  100% { transform: scale(1); }
}

.elastic:hover {
  animation: elastic 0.6s ease-in-out;
}

/* Shake Animation */
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  10%, 30%, 50%, 70%, 90% { transform: translateX(-2px); }
  20%, 40%, 60%, 80% { transform: translateX(2px); }
}

.shake:hover {
  animation: shake 0.5s ease-in-out;
}

/* Bounce Animation */
@keyframes bounce-in {
  0% { transform: scale(0.3); opacity: 0; }
  50% { transform: scale(1.05); }
  70% { transform: scale(0.9); }
  100% { transform: scale(1); opacity: 1; }
}

.bounce-in {
  animation: bounce-in 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* Slide Animations */
.slide-in-left {
  transform: translateX(-100px);
  opacity: 0;
  transition: all 0.8s cubic-bezier(0.23, 1, 0.320, 1);
}

.slide-in-left.animate {
  transform: translateX(0);
  opacity: 1;
}

.slide-in-right {
  transform: translateX(100px);
  opacity: 0;
  transition: all 0.8s cubic-bezier(0.23, 1, 0.320, 1);
}

.slide-in-right.animate {
  transform: translateX(0);
  opacity: 1;
}

/* Fade Animations */
.fade-in-up {
  transform: translateY(50px);
  opacity: 0;
  transition: all 0.8s cubic-bezier(0.23, 1, 0.320, 1);
}

.fade-in-up.animate {
  transform: translateY(0);
  opacity: 1;
}

/* Scale Animations */
.scale-in {
  transform: scale(0.8);
  opacity: 0;
  transition: all 0.6s cubic-bezier(0.23, 1, 0.320, 1);
}

.scale-in.animate {
  transform: scale(1);
  opacity: 1;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
  .btn-get-started:hover {
    transform: translateY(-2px) scale(1.02);
  }
  
  .navbar ul li a:hover {
    transform: translateY(-1px);
  }
  
  .magnetic:hover {
    transform: scale(1.05);
  }
}
