/* ============================================================
   INOVENTRICS — ANIMATIONS CSS
   ============================================================ */

/* --- REVEAL ANIMATIONS --- */
.reveal-up {
  opacity: 0;
  transform: translateY(40px);
}
.reveal-right {
  opacity: 0;
  transform: translateX(60px);
}
.reveal-left {
  opacity: 0;
  transform: translateX(-60px);
}
.reveal-scale {
  opacity: 0;
  transform: scale(0.92);
}

/* Animation classes added by JS */
.revealed {
  opacity: 1;
  transform: none;
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

/* --- STAGGER DELAY CLASSES --- */
.d-1 { transition-delay: 0.1s; }
.d-2 { transition-delay: 0.2s; }
.d-3 { transition-delay: 0.3s; }
.d-4 { transition-delay: 0.4s; }
.d-5 { transition-delay: 0.5s; }
.d-6 { transition-delay: 0.6s; }

/* --- ANIMATED GRADIENT BG --- */
@keyframes gradient-shift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.animated-gradient {
  background: linear-gradient(270deg, #050505, #0a1a10, #050505);
  background-size: 400% 400%;
  animation: gradient-shift 12s ease infinite;
}

/* --- GLOW PULSE --- */
@keyframes glow-pulse {
  0%, 100% { box-shadow: 0 0 20px rgba(0,255,136,0.2); }
  50% { box-shadow: 0 0 40px rgba(0,255,136,0.4); }
}
.glow-animate {
  animation: glow-pulse 3s ease-in-out infinite;
}

/* --- ORBS ANIMATION --- */
@keyframes orb-float-1 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(30px, -20px) scale(1.05); }
  66% { transform: translate(-20px, 10px) scale(0.95); }
}
@keyframes orb-float-2 {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(-40px, -30px); }
}
@keyframes orb-float-3 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(20px, 20px) scale(1.1); }
}

.orb-1 { animation: orb-float-1 15s ease-in-out infinite; }
.orb-2 { animation: orb-float-2 20s ease-in-out infinite; }
.orb-3 { animation: orb-float-3 12s ease-in-out infinite; }

/* --- SERVICE CARD BORDER ANIMATION --- */
@keyframes border-trace {
  0% { background-position: 0% 0%; }
  100% { background-position: 200% 0%; }
}

/* --- TECH PILL FLOAT --- */
@keyframes pill-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

.tpill:nth-child(odd) {
  animation: pill-float 3s ease-in-out infinite;
  animation-delay: calc(var(--i, 0) * 0.3s);
}
.tpill:nth-child(even) {
  animation: pill-float 3.5s ease-in-out infinite;
  animation-delay: calc(var(--i, 0) * 0.25s);
}

/* --- SPLIT TEXT --- */
.split-text .char {
  display: inline-block;
  opacity: 0;
  transform: translateY(60px) rotate(5deg);
  transition: opacity 0.6s cubic-bezier(0.16,1,0.3,1),
              transform 0.6s cubic-bezier(0.16,1,0.3,1);
}
.split-text.revealed .char {
  opacity: 1;
  transform: none;
}

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

/* --- PROJECT ROW REVEAL --- */
.project-row .proj-visual {
  opacity: 0;
  transform: translateX(-40px);
  transition: all 0.9s cubic-bezier(0.16, 1, 0.3, 1);
}
.project-row .proj-right .proj-visual {
  transform: translateX(40px);
}
.project-row .proj-info {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.9s cubic-bezier(0.16, 1, 0.3, 1) 0.15s;
}
.project-row.in-view .proj-visual,
.project-row.in-view .proj-info {
  opacity: 1;
  transform: none;
}

/* --- SERVICES CARD STAGGER --- */
.scard {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s cubic-bezier(0.16,1,0.3,1),
              transform 0.6s cubic-bezier(0.16,1,0.3,1),
              background 0.3s ease;
}
.scard.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Why cards stagger */
.why-card {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s cubic-bezier(0.16,1,0.3,1),
              transform 0.6s cubic-bezier(0.16,1,0.3,1),
              border-color 0.3s,
              background 0.3s,
              box-shadow 0.3s;
}
.why-card.visible {
  opacity: 1;
  transform: translateY(0);
}

body:not(.loading) .why-card {
  opacity: 1;
  transform: translateY(0);
}

/* Testimonial carousel reveal */
.testimonial-carousel-scene {
  will-change: opacity, transform;
}

/* --- PAGE TRANSITION OVERLAY --- */
.page-transition {
  position: fixed;
  inset: 0;
  background: var(--bg);
  z-index: 99998;
  transform: scaleY(0);
  transform-origin: bottom;
}

/* --- UNDERLINE HOVER --- */
.hover-underline {
  position: relative;
}
.hover-underline::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--green);
  transition: width 0.3s ease;
}
.hover-underline:hover::after { width: 100%; }

/* --- LOADING BAR ANIMATION --- */
@keyframes loader-progress {
  0% { width: 0%; }
  60% { width: 65%; }
  90% { width: 88%; }
  100% { width: 100%; }
}
/* --- PAGE TRANSITION --- */
.transition-overlay {
  position: fixed;
  inset: 0;
  z-index: 100001;
  display: flex;
  pointer-events: none;
}
.stair {
  flex: 1;
  height: 0;
  background: var(--bg2);
  will-change: height, transform;
}
#page-content {
  opacity: 1;
  transform: none;
  transform-origin: top center;
}

.nav-link.active { color: var(--white) !important; background: rgba(255,255,255,0.07) !important; }
@keyframes shake { 0%, 100% { transform: translateX(0); } 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }
