/* =============================================
   FAKTURANT - Animations & Effects
   ============================================= */

/* ---------- Keyframes ---------- */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(40px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInLeft {
  from {
    opacity: 0;
    transform: translateX(-40px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes fadeInRight {
  from {
    opacity: 0;
    transform: translateX(40px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.85);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes float {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-12px);
  }
}

@keyframes float-slow {
  0%, 100% {
    transform: translateY(0px) rotate(0deg);
  }
  33% {
    transform: translateY(-8px) rotate(1deg);
  }
  66% {
    transform: translateY(-4px) rotate(-1deg);
  }
}

@keyframes pulse-dot {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4);
    opacity: 1;
  }
  50% {
    box-shadow: 0 0 0 6px rgba(16, 185, 129, 0);
    opacity: 0.8;
  }
}

@keyframes shimmer {
  0% {
    background-position: -200% center;
  }
  100% {
    background-position: 200% center;
  }
}

@keyframes spin-slow {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

@keyframes count-up {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes draw-line {
  from {
    stroke-dashoffset: 1000;
  }
  to {
    stroke-dashoffset: 0;
  }
}

@keyframes orb-pulse {
  0%, 100% {
    transform: scale(1);
    opacity: 0.35;
  }
  50% {
    transform: scale(1.1);
    opacity: 0.5;
  }
}

@keyframes gradient-shift {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

/* ---------- Scroll Reveal Classes ---------- */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1),
              transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal.reveal-left {
  transform: translateX(-40px) translateY(0);
}

.reveal.reveal-right {
  transform: translateX(40px) translateY(0);
}

.reveal.reveal-scale {
  transform: scale(0.9) translateY(0);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0) translateX(0) scale(1);
}

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }
.reveal-delay-5 { transition-delay: 0.5s; }
.reveal-delay-6 { transition-delay: 0.6s; }

/* ---------- Hero Entrance Animations ---------- */
.hero-animate-1 {
  animation: fadeInDown 0.7s cubic-bezier(0.4, 0, 0.2, 1) both;
  animation-delay: 0.1s;
}

.hero-animate-2 {
  animation: fadeInUp 0.8s cubic-bezier(0.4, 0, 0.2, 1) both;
  animation-delay: 0.25s;
}

.hero-animate-3 {
  animation: fadeInUp 0.8s cubic-bezier(0.4, 0, 0.2, 1) both;
  animation-delay: 0.4s;
}

.hero-animate-4 {
  animation: fadeInUp 0.8s cubic-bezier(0.4, 0, 0.2, 1) both;
  animation-delay: 0.55s;
}

.hero-animate-5 {
  animation: fadeInUp 0.8s cubic-bezier(0.4, 0, 0.2, 1) both;
  animation-delay: 0.7s;
}

.hero-animate-img {
  animation: scaleIn 1s cubic-bezier(0.4, 0, 0.2, 1) both;
  animation-delay: 0.3s;
}

/* ---------- Floating Elements ---------- */
.float {
  animation: float 5s ease-in-out infinite;
}

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

.float-delay-1 { animation-delay: -1.5s; }
.float-delay-2 { animation-delay: -3s; }

/* ---------- Orb Animations ---------- */
.hero-orb-1 {
  animation: orb-pulse 6s ease-in-out infinite;
}
.hero-orb-2 {
  animation: orb-pulse 8s ease-in-out infinite;
  animation-delay: -3s;
}
.hero-orb-3 {
  animation: orb-pulse 5s ease-in-out infinite;
  animation-delay: -1.5s;
}

/* ---------- Shimmer Loading ---------- */
.shimmer {
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.3) 50%,
    transparent 100%
  );
  background-size: 200% 100%;
  animation: shimmer 2s infinite;
}

/* ---------- Number Counter ---------- */
.counter-number {
  animation: count-up 0.6s cubic-bezier(0.4, 0, 0.2, 1) both;
}

/* ---------- Hover Effects ---------- */
.hover-lift {
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
              box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.hover-lift:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 60px rgba(30, 64, 175, 0.18);
}

.hover-scale {
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.hover-scale:hover {
  transform: scale(1.05);
}

/* ---------- Image Hover Effect ---------- */
.img-hover-wrap {
  overflow: hidden;
  border-radius: inherit;
}

.img-hover-wrap img {
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.img-hover-wrap:hover img {
  transform: scale(1.06);
}

/* ---------- Card Glow Effect ---------- */
.card-glow {
  position: relative;
}

.card-glow::after {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  background: linear-gradient(135deg, var(--color-primary-light), var(--color-secondary));
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: -1;
  filter: blur(12px);
}

.card-glow:hover::after {
  opacity: 0.5;
}

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

.text-reveal-inner {
  display: inline-block;
  animation: fadeInUp 0.7s cubic-bezier(0.4, 0, 0.2, 1) both;
}

/* ---------- Gradient Text Animation ---------- */
.gradient-animate {
  background-size: 200% auto;
  animation: gradient-shift 4s linear infinite;
}

/* ---------- Stagger Children ---------- */
.stagger-children > * {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.stagger-children.is-visible > *:nth-child(1) { opacity: 1; transform: none; transition-delay: 0.0s; }
.stagger-children.is-visible > *:nth-child(2) { opacity: 1; transform: none; transition-delay: 0.1s; }
.stagger-children.is-visible > *:nth-child(3) { opacity: 1; transform: none; transition-delay: 0.2s; }
.stagger-children.is-visible > *:nth-child(4) { opacity: 1; transform: none; transition-delay: 0.3s; }
.stagger-children.is-visible > *:nth-child(5) { opacity: 1; transform: none; transition-delay: 0.4s; }
.stagger-children.is-visible > *:nth-child(6) { opacity: 1; transform: none; transition-delay: 0.5s; }

/* ---------- Particle/Dot Decorations ---------- */
.deco-dots {
  position: absolute;
  pointer-events: none;
  opacity: 0.5;
}

.deco-circle {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  animation: float-slow 8s ease-in-out infinite;
}

/* ---------- Progress Bar Animation ---------- */
.progress-bar {
  height: 4px;
  background: var(--border-color);
  border-radius: 4px;
  overflow: hidden;
  margin-top: 8px;
}

.progress-fill {
  height: 100%;
  background: var(--gradient-primary);
  border-radius: 4px;
  width: 0%;
  transition: width 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.progress-fill.animated {
  width: var(--target-width, 80%);
}

/* ---------- Typing Cursor ---------- */
.typing-cursor::after {
  content: '|';
  animation: blink 1s step-end infinite;
}

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

/* ---------- Page Transition ---------- */
.page-transition {
  animation: fadeInUp 0.5s cubic-bezier(0.4, 0, 0.2, 1) both;
}

/* ---------- Reduced Motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .reveal {
    opacity: 1;
    transform: none;
  }
}
