/* =============================================================================
   Animations CSS — Reveal, Parallax, Hover Effects
   NSTU Photography Portfolio
   ============================================================================= */

/* Nav overlay for mobile */
.nav-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  backdrop-filter: blur(2px);
}

.nav-overlay.visible {
  opacity: 1;
  visibility: visible;
}

/* =============================================================================
   Scroll-triggered text reveals
   ============================================================================= */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

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

/* =============================================================================
   Section title accent underline animation
   ============================================================================= */
.section-title-underline {
  position: relative;
  display: inline-block;
}

.section-title-underline::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 0;
  height: 2px;
  width: 0;
  background: var(--color-accent);
  transition: width 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.section-title-underline.animated::after {
  width: 100%;
}

/* =============================================================================
   Photo card shimmer loading skeleton
   ============================================================================= */
.photo-skeleton {
  background: var(--color-bg-muted);
  position: relative;
  overflow: hidden;
}

.photo-skeleton::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255,255,255,0.4) 50%,
    transparent 100%
  );
  animation: shimmer 1.5s ease-in-out infinite;
  transform: translateX(-100%);
}

@keyframes shimmer {
  to { transform: translateX(100%); }
}

/* =============================================================================
   Cursor dot (optional luxury touch)
   ============================================================================= */
.cursor-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-accent);
  position: fixed;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  transition: width 0.2s, height 0.2s, opacity 0.2s;
  mix-blend-mode: multiply;
}

.cursor-ring {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid rgba(212, 175, 55, 0.5);
  position: fixed;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  transition: width 0.3s, height 0.3s, border-color 0.3s;
}

@media (hover: none) {
  .cursor-dot,
  .cursor-ring { display: none; }
}

/* =============================================================================
   Image zoom-in animation on load
   ============================================================================= */
.photo-single__img {
  animation: zoomIn 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes zoomIn {
  from { opacity: 0; transform: scale(0.98); }
  to   { opacity: 1; transform: scale(1); }
}

/* =============================================================================
   Hero text animation (applied via JS after hero image loads)
   ============================================================================= */
.hero-animated .hero__eyebrow {
  animation: fadeUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.3s both;
}

.hero-animated .hero__title {
  animation: fadeUp 0.9s cubic-bezier(0.16, 1, 0.3, 1) 0.5s both;
}

.hero-animated .hero__subtitle {
  animation: fadeUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.7s both;
}

.hero-animated .hero__actions {
  animation: fadeUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.9s both;
}

/* =============================================================================
   Smooth page transitions
   ============================================================================= */
.page-transition-out {
  animation: pageOut 0.25s ease forwards;
}

@keyframes pageOut {
  to { opacity: 0; transform: translateY(-6px); }
}

/* =============================================================================
   Strip / Swiper fade on edges
   ============================================================================= */
.strip-section {
  position: relative;
}

.strip-section::before,
.strip-section::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: 80px;
  z-index: 2;
  pointer-events: none;
}

.strip-section::before {
  left: 0;
  background: linear-gradient(to right, var(--color-bg-soft), transparent);
}

.strip-section::after {
  right: 0;
  background: linear-gradient(to left, var(--color-bg-soft), transparent);
}

/* =============================================================================
   Button ripple effect
   ============================================================================= */
.btn {
  position: relative;
  overflow: hidden;
}

.btn-ripple {
  position: absolute;
  border-radius: 50%;
  transform: scale(0);
  animation: ripple 0.5s linear;
  background: rgba(255,255,255,0.3);
  pointer-events: none;
}

@keyframes ripple {
  to {
    transform: scale(2.5);
    opacity: 0;
  }
}

/* =============================================================================
   Scroll progress indicator
   ============================================================================= */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  background: var(--color-accent);
  z-index: 1100;
  width: 0%;
  transition: width 0.1s linear;
}
