/* ================================
   EFFECTS - Animations & Transitions
   ================================ */

/* ---- Text Reveal Animation ---- */
.reveal-line {
  display: block;
  opacity: 0;
  transform: translateY(20px);
  animation: revealLine 0.6s ease forwards;
}

.reveal-line:nth-child(1) { animation-delay: 0.1s; }
.reveal-line:nth-child(2) { animation-delay: 0.2s; }
.reveal-line:nth-child(3) { animation-delay: 0.3s; }
.reveal-line:nth-child(4) { animation-delay: 0.4s; }
.reveal-line:nth-child(5) { animation-delay: 0.5s; }

.hero__tagline.reveal-line {
  animation-delay: 0.7s;
}

/* Page header reveals */
.page-header .reveal-line:nth-child(1) { animation-delay: 0.1s; }
.page-header .reveal-line:nth-child(2) { animation-delay: 0.25s; }

@keyframes revealLine {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ---- Reduced Motion ---- */
@media (prefers-reduced-motion: reduce) {
  .reveal-line {
    animation: none;
    opacity: 1;
    transform: none;
  }
}

/* ---- Lightbox (for image enlargement) ---- */
.lightbox-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.lightbox-overlay.active {
  opacity: 1;
  visibility: visible;
}

.lightbox-image {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
  transform: scale(0.95);
  transition: transform 0.3s ease;
}

.lightbox-overlay.active .lightbox-image {
  transform: scale(1);
}

.lightbox-close {
  position: absolute;
  top: var(--space-24);
  right: var(--space-24);
  width: 48px;
  height: 48px;
  background: transparent;
  border: none;
  color: white;
  font-size: 2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.7;
  transition: opacity 0.2s ease;
}

.lightbox-close:hover {
  opacity: 1;
}

/* Clickable images */
.case-study-image,
.image-compare__base {
  cursor: zoom-in;
}
