/* Animation utilities */

[data-aos] {
  pointer-events: auto;
}

[data-rotate-words] {
  transition: opacity 0.3s ease;
  color: #fff;
}

.reveal-hidden {
  opacity: 0;
  transform: translateY(30px);
}

.reveal-visible {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

/* Hero text chars */
.char {
  display: inline-block;
  opacity: 0;
  transform: translateY(40px);
}

/* Stagger children */
.stagger-item {
  opacity: 0;
  transform: translateY(24px);
}

/* Hover reveal on service cards */
.hover-reveal-content {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.4s ease, opacity 0.3s ease, margin 0.3s ease;
}

.service-card:hover .hover-reveal-content {
  max-height: 80px;
  opacity: 1;
  margin-top: 12px;
}

.hover-reveal-content p {
  font-size: 0.875rem;
  color: var(--text-secondary);
}

/* Fallback: konten tetap tampil jika AOS/GSAP CDN gagal load */
body:not(.aos-init) [data-aos] {
  opacity: 1 !important;
  transform: none !important;
}

/* Gradient mesh noise overlay */
.noise-overlay {
  position: absolute;
  inset: 0;
  opacity: 0.03;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* Button magnetic hover glow */
.btn-magnetic::after {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(0, 94, 184, 0.3), transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: -1;
}

.btn-magnetic:hover::after {
  opacity: 1;
}

/* Counter glow */
.stat-item h3 {
  text-shadow: 0 0 40px rgba(255, 255, 255, 0.2);
}

/* Page transition overlay */
.page-transition {
  position: fixed;
  inset: 0;
  background: var(--primary-700);
  z-index: 10001;
  transform: scaleY(0);
  transform-origin: bottom;
  pointer-events: none;
}

.page-transition.active {
  animation: pageWipe 0.6s ease forwards;
}

@keyframes pageWipe {
  0% { transform: scaleY(0); transform-origin: bottom; }
  50% { transform: scaleY(1); transform-origin: bottom; }
  51% { transform: scaleY(1); transform-origin: top; }
  100% { transform: scaleY(0); transform-origin: top; }
}

/* Floating blob background (subtle) */
.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.15;
  animation: blobFloat 8s ease-in-out infinite;
}

.blob-1 {
  width: 300px;
  height: 300px;
  background: var(--secondary-700);
  top: 10%;
  right: -5%;
}

.blob-2 {
  width: 200px;
  height: 200px;
  background: var(--primary-500);
  bottom: 20%;
  left: -5%;
  animation-delay: -4s;
}

@keyframes blobFloat {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(20px, -20px); }
}

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