/* ════════════════════════════════════════════════
   JK DIGI TECH — ANIMATIONS
   css/animations.css
   ════════════════════════════════════════════════ */

/* ── KEYFRAMES ── */
@keyframes floatY {
  0%, 100% { transform: translateY(0px); }
  50%       { transform: translateY(-10px); }
}

@keyframes scrollBounce {
  0%   { transform: translateY(0);    opacity: 1; }
  100% { transform: translateY(14px); opacity: 0; }
}

@keyframes pulse {
  0%, 100% { opacity: 0.6; transform: scale(1); }
  50%       { opacity: 1;   transform: scale(1.06); }
}

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

@keyframes heroEntrance {
  from { opacity: 0; transform: translateY(50px) scale(0.96); }
  to   { opacity: 1; transform: translateY(0)    scale(1); }
}

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

@keyframes orbPulse {
  0%, 100% { box-shadow: 0 0 20px rgba(6,182,212,0.3); }
  50%       { box-shadow: 0 0 50px rgba(6,182,212,0.7); }
}

@keyframes borderGlow {
  0%, 100% { border-color: rgba(6,182,212,0.15); }
  50%       { border-color: rgba(6,182,212,0.55); }
}

/* ── SCROLL REVEAL ── */
.fade-up {
  opacity: 0;
  transform: translateY(42px);
  transition: opacity 0.75s cubic-bezier(0.4, 0, 0.2, 1),
              transform 0.75s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* Delay utilities */
.delay-1 { transition-delay: 0.10s; }
.delay-2 { transition-delay: 0.20s; }
.delay-3 { transition-delay: 0.30s; }
.delay-4 { transition-delay: 0.40s; }
.delay-5 { transition-delay: 0.50s; }

/* Hero entrance overrides (run immediately) */
.hero-pill    { animation: fadeInDown 0.8s ease 0.2s both; }
.hero-h1      { animation: heroEntrance 1s ease 0.4s both; }
.hero-desc    { animation: heroEntrance 1s ease 0.6s both; }
.hero-btns    { animation: heroEntrance 1s ease 0.8s both; }
.trust-badges { animation: heroEntrance 1s ease 1.0s both; }

/* ── MICRO-INTERACTIONS ── */

/* Lift on hover for cards */
.svc-card,
.port-card,
.test-card,
.about-card {
  will-change: transform;
}

/* Glow ring on stat items */
.stat-item:hover .stat-num {
  filter: drop-shadow(0 0 12px rgba(6,182,212,0.6));
}

/* Shimmer on gradient text */
.grad-text {
  background-size: 200% auto;
  animation: shimmer 4s linear infinite;
}

/* Pulsing border on hero pill */
.hero-pill {
  animation: fadeInDown 0.8s ease 0.2s both, borderGlow 3s ease infinite 1.2s;
}

/* Service card icon pop */
.svc-card:hover .svc-icon {
  transform: scale(1.18) rotate(-4deg);
  display: inline-block;
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Avatar pulse */
.avatar {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.test-card:hover .avatar {
  transform: scale(1.1);
  box-shadow: 0 0 20px rgba(6,182,212,0.4);
}

/* Portfolio card image zoom */
.port-card:hover .port-img {
  font-size: 66px;
  transition: font-size 0.4s ease;
}

/* CTA phone button glow */
.btn-cta-phone {
  animation: orbPulse 3s ease infinite;
}

/* Mobile toggle animation */
.mobile-toggle.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.mobile-toggle.active span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}
.mobile-toggle.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Social button ripple */
.social-btn {
  position: relative;
  overflow: hidden;
}

.social-btn::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: rgba(6, 182, 212, 0.35);
  opacity: 0;
  transform: scale(0);
  transition: opacity 0.3s, transform 0.3s;
}

.social-btn:hover::after {
  opacity: 1;
  transform: scale(1);
}

/* Navbar link underline animation */
.nav-link {
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 2px;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--cyan-2, #22D3EE);
  border-radius: 1px;
  transition: width 0.3s ease, left 0.3s ease;
}

.nav-link:hover::after {
  width: 60%;
  left: 20%;
}

/* Form input focus lift */
.form-input:focus {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(6, 182, 212, 0.12);
}

/* Submit button ripple */
.btn-submit {
  position: relative;
  overflow: hidden;
}

.btn-submit::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: rgba(255,255,255,0.15);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width 0.6s ease, height 0.6s ease, opacity 0.6s ease;
  opacity: 0;
}

.btn-submit:active::before {
  width: 300px;
  height: 300px;
  opacity: 1;
}

/* Floating badges pulse */
.floating-badge {
  animation: floatY 3s ease infinite;
}

/* Section label slide in */
.section-label {
  display: inline-block;
  position: relative;
}

.section-label::before {
  content: '';
  position: absolute;
  left: -20px;
  top: 50%;
  transform: translateY(-50%);
  width: 12px;
  height: 2px;
  background: #22D3EE;
  border-radius: 1px;
}

/* Scroll dot bounce */
.scroll-dot {
  animation: scrollBounce 1.6s ease infinite;
}
