/* ==========================================
   ANIMATIONS — Premium micro-interactions
   ========================================== */

/* ── Scroll Reveal ── */
.fade-in {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.8s var(--ease-out-expo), transform 0.8s var(--ease-out-expo);
}

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

/* Staggered children */
.fade-in.is-visible .feature-card,
.fade-in.is-visible .faculty-card,
.fade-in.is-visible .stat-item {
  animation: slideUp 0.6s var(--ease-out-expo) both;
}

.fade-in.is-visible .feature-card:nth-child(1),
.fade-in.is-visible .stat-item:nth-child(1) { animation-delay: 0.05s; }
.fade-in.is-visible .feature-card:nth-child(2),
.fade-in.is-visible .stat-item:nth-child(2) { animation-delay: 0.1s; }
.fade-in.is-visible .feature-card:nth-child(3),
.fade-in.is-visible .stat-item:nth-child(3) { animation-delay: 0.15s; }
.fade-in.is-visible .feature-card:nth-child(4),
.fade-in.is-visible .stat-item:nth-child(4) { animation-delay: 0.2s; }
.fade-in.is-visible .feature-card:nth-child(5) { animation-delay: 0.25s; }

.fade-in.is-visible .faculty-card:nth-child(1) { animation-delay: 0.05s; }
.fade-in.is-visible .faculty-card:nth-child(2) { animation-delay: 0.1s; }
.fade-in.is-visible .faculty-card:nth-child(3) { animation-delay: 0.15s; }
.fade-in.is-visible .faculty-card:nth-child(4) { animation-delay: 0.2s; }
.fade-in.is-visible .faculty-card:nth-child(5) { animation-delay: 0.25s; }

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ── Float Loop ── */
.float-loop {
  animation: floatLoop 6s ease-in-out infinite;
}

.float-loop:nth-child(2) { animation-delay: -2s; animation-duration: 7s; }
.float-loop:nth-child(3) { animation-delay: -4s; animation-duration: 5s; }

@keyframes floatLoop {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50%      { transform: translateY(-14px) rotate(2deg); }
}

/* ── Hover Lift ── */
.hover-lift {
  transition: transform 0.35s var(--ease-out-expo), box-shadow 0.35s var(--ease-out-expo);
}

.hover-lift:hover {
  transform: translateY(-8px);
}

/* ── Button Press ── */
.pressable {
  transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}

.pressable:active {
  transform: scale(0.97);
  filter: brightness(0.96);
}

/* ── Shimmer effect for hero badge ── */
.hero-badge {
  position: relative;
  overflow: hidden;
}

.hero-badge::after {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
  animation: shimmer 4s ease-in-out infinite;
}

@keyframes shimmer {
  0%, 100% { left: -100%; }
  50%      { left: 150%; }
}

/* ── Gradient border pulse ── */
.stats-pill {
  position: relative;
}

.stats-pill::before {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: calc(var(--radius-xl) + 2px);
  background: linear-gradient(135deg, var(--accent-indigo), var(--accent-blue), var(--accent-light));
  z-index: -1;
  opacity: 0.6;
  animation: pulseGlow 3s ease-in-out infinite alternate;
}

@keyframes pulseGlow {
  0%   { opacity: 0.4; filter: blur(0px); }
  100% { opacity: 0.7; filter: blur(4px); }
}

/* ── Navbar scroll transition ── */
.glass-nav {
  transition: background 0.3s ease, box-shadow 0.3s ease, padding 0.3s ease;
}

.glass-nav.scrolled {
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  padding-top: 8px;
  padding-bottom: 8px;
}

/* ── Icon clay hover glow ── */
.icon-clay {
  transition: transform 0.3s var(--ease-out-expo), box-shadow 0.3s var(--ease-out-expo);
}

.feature-card:hover .icon-clay {
  transform: scale(1.08);
  box-shadow: 0 12px 32px rgba(37, 99, 235, 0.25);
}

/* ── Faculty card hover ── */
.faculty-avatar {
  transition: transform 0.4s var(--ease-out-expo), box-shadow 0.4s var(--ease-out-expo);
}

.faculty-card:hover .faculty-avatar {
  transform: scale(1.06);
  box-shadow: 0 16px 40px rgba(37, 99, 235, 0.2);
}

/* ── Event card slide ── */
.event-card {
  transition: transform 0.3s var(--ease-out-expo), box-shadow 0.3s var(--ease-out-expo), border-color 0.3s ease;
}

.event-card:hover {
  transform: translateX(6px);
  box-shadow: var(--shadow-md);
  border-color: rgba(59, 130, 246, 0.1);
}

/* ── Floating badge entrance ── */
.floating-badge {
  animation: badgeSlide 1s var(--ease-out-expo) 0.5s both;
}

@keyframes badgeSlide {
  from { opacity: 0; transform: translateY(-12px) scale(0.95); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* ── Social icon bounce ── */
.social-row a {
  transition: background 0.25s ease, transform 0.35s var(--ease-spring), box-shadow 0.25s ease;
}

.social-row a:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(37, 99, 235, 0.3);
}

/* ── CTA panel subtle gradient animation ── */
.cta-panel {
  background-size: 200% 200%;
  animation: gradientShift 8s ease infinite;
}

@keyframes gradientShift {
  0%, 100% { background-position: 0% 50%; }
  50%      { background-position: 100% 50%; }
}
