/* =============================================
   TALHA STUDIO - Animations & Transitions
   ============================================= */

/* ----- FADE IN ----- */
.fade-in {
  opacity: 0;
  animation: fadeIn 0.6s ease forwards;
}

.fade-in-1 { animation-delay: 0.1s; }
.fade-in-2 { animation-delay: 0.2s; }
.fade-in-3 { animation-delay: 0.3s; }
.fade-in-4 { animation-delay: 0.4s; }
.fade-in-5 { animation-delay: 0.5s; }

/* ----- SLIDE UP ----- */
.slide-up {
  opacity: 0;
  transform: translateY(30px);
  animation: fadeInUp 0.6s ease forwards;
}

.slide-up-1 { animation-delay: 0.1s; }
.slide-up-2 { animation-delay: 0.2s; }
.slide-up-3 { animation-delay: 0.3s; }
.slide-up-4 { animation-delay: 0.4s; }
.slide-up-5 { animation-delay: 0.5s; }

/* ----- SCALE IN ----- */
.scale-in {
  opacity: 0;
  transform: scale(0.9);
  animation: scaleIn 0.5s ease forwards;
}

/* ----- GLASS CARD ----- */
.glass {
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
}

/* ----- HOVER LIFT ----- */
.hover-lift {
  transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}

.hover-lift:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

/* ----- IMAGE ZOOM ----- */
.img-zoom {
  overflow: hidden;
}

.img-zoom img {
  transition: transform var(--transition-slow);
}

.img-zoom:hover img {
  transform: scale(1.1);
}

/* ----- LINE ANIMATION ----- */
.animated-line {
  width: 60px;
  height: 2px;
  background: var(--accent);
  margin: 1rem auto;
  position: relative;
  overflow: hidden;
}

.animated-line::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: var(--accent-light);
  animation: lineMove 2s ease infinite;
}

@keyframes lineMove {
  0% { left: -100%; }
  100% { left: 100%; }
}

/* ----- COUNTER ANIMATION ----- */
.counter-number {
  display: inline-block;
  font-variant-numeric: tabular-nums;
}

/* ----- STAGGER ANIMATION ----- */
.stagger-children > * {
  opacity: 0;
  animation: fadeInUp 0.5s ease forwards;
}

.stagger-children > *:nth-child(1) { animation-delay: 0.05s; }
.stagger-children > *:nth-child(2) { animation-delay: 0.1s; }
.stagger-children > *:nth-child(3) { animation-delay: 0.15s; }
.stagger-children > *:nth-child(4) { animation-delay: 0.2s; }
.stagger-children > *:nth-child(5) { animation-delay: 0.25s; }
.stagger-children > *:nth-child(6) { animation-delay: 0.3s; }
.stagger-children > *:nth-child(7) { animation-delay: 0.35s; }
.stagger-children > *:nth-child(8) { animation-delay: 0.4s; }
.stagger-children > *:nth-child(9) { animation-delay: 0.45s; }
.stagger-children > *:nth-child(10) { animation-delay: 0.5s; }

/* ----- REVEAL ANIMATION (Intersection Observer) ----- */
.reveal {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

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

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

.reveal-right.visible {
  opacity: 1;
  transform: translateX(0);
}

/* ----- PARALLAX ----- */
.parallax {
  background-attachment: fixed;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
}

/* ----- TYPING ANIMATION ----- */
.typing-text {
  overflow: hidden;
  white-space: nowrap;
  border-right: 2px solid var(--accent);
  animation: typing 3s steps(40) infinite, blink 0.75s step-end infinite;
}

@keyframes typing {
  0%, 100% { width: 0; }
  50% { width: 100%; }
}

@keyframes blink {
  50% { border-color: transparent; }
}

/* ----- PULSE ----- */
.pulse {
  animation: pulse 2s ease infinite;
}

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

/* ----- SHIMMER TEXT ----- */
.shimmer-text {
  background: linear-gradient(90deg, var(--primary) 25%, var(--accent) 50%, var(--primary) 75%);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: shimmer 2s ease infinite;
}

/* ----- DRAW BORDER ----- */
.draw-border {
  position: relative;
}

.draw-border::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width 0.3s ease;
}

.draw-border::after {
  content: '';
  position: absolute;
  bottom: 0;
  right: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width 0.3s ease 0.15s;
}

.draw-border:hover::before,
.draw-border:hover::after {
  width: 100%;
}
