/**
 * DA Renovation - Animations & Micro-Interactions
 * Performance-optimized CSS animations & scroll reveal system
 */

/* ==========================================================================
   1. SCROLL REVEAL BASE STYLES
   ========================================================================== */
/* Elements with [data-reveal] will start hidden and animate when visible */
[data-reveal] {
  opacity: 0;
  transition-property: opacity, transform;
  transition-duration: 0.8s;
  transition-timing-function: cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

/* Reveal Variations */
[data-reveal="fade-up"] {
  transform: translateY(35px);
}

[data-reveal="fade-down"] {
  transform: translateY(-35px);
}

[data-reveal="fade-left"] {
  transform: translateX(40px);
}

[data-reveal="fade-right"] {
  transform: translateX(-40px);
}

[data-reveal="scale-up"] {
  transform: scale(0.92);
}

[data-reveal="fade"] {
  transform: none;
}

/* Active State (triggered by Intersection Observer adding .is-revealed) */
[data-reveal].is-revealed,
.reveal.is-revealed {
  opacity: 1;
  transform: translate(0, 0) scale(1);
}

/* Stagger Delays */
[data-delay="100"] { transition-delay: 100ms; }
[data-delay="150"] { transition-delay: 150ms; }
[data-delay="200"] { transition-delay: 200ms; }
[data-delay="250"] { transition-delay: 250ms; }
[data-delay="300"] { transition-delay: 300ms; }
[data-delay="400"] { transition-delay: 400ms; }
[data-delay="500"] { transition-delay: 500ms; }
[data-delay="600"] { transition-delay: 600ms; }

/* ==========================================================================
   2. KEYFRAME ANIMATIONS
   ========================================================================== */

/* Shimmer Light Reflection (Used for gold accents and luxury borders) */
@keyframes shimmerGold {
  0% {
    background-position: -200% center;
  }
  100% {
    background-position: 200% center;
  }
}

.shimmer-gold {
  background: linear-gradient(
    90deg,
    rgba(185, 150, 85, 0) 0%,
    rgba(212, 176, 106, 0.4) 50%,
    rgba(185, 150, 85, 0) 100%
  );
  background-size: 200% 100%;
  animation: shimmerGold 3s infinite linear;
}

/* Subtle Floating Animation */
@keyframes floatSubtle {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-8px);
  }
}

.float-animation {
  animation: floatSubtle 4s ease-in-out infinite;
}

/* Gentle Pulse Glow */
@keyframes pulseGlow {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(128, 13, 18, 0.4);
  }
  50% {
    box-shadow: 0 0 0 12px rgba(128, 13, 18, 0);
  }
}

.pulse-glow {
  animation: pulseGlow 2.5s infinite;
}

/* Beacon Status Dot */
@keyframes beaconPulse {
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7);
  }
  70% {
    transform: scale(1);
    box-shadow: 0 0 0 8px rgba(37, 211, 102, 0);
  }
  100% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
  }
}

.status-beacon {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #25D366;
  animation: beaconPulse 2s infinite;
}

/* ==========================================================================
   3. HOVER & INTERACTION UTILITIES
   ========================================================================== */

/* Magnetic Hover Scale */
.hover-lift {
  transition: transform var(--transition-base), box-shadow var(--transition-base);
}

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

/* Image Zoom on Parent Hover */
.zoom-parent {
  overflow: hidden;
}

.zoom-parent img {
  transition: transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* Underline Growth on Link */
.link-hover-underline {
  position: relative;
  display: inline-block;
}

.link-hover-underline::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1.5px;
  background-color: currentColor;
  transition: width var(--transition-base);
}

.link-hover-underline:hover::after {
  width: 100%;
}

/* ==========================================================================
   4. ACCESSIBILITY: REDUCED MOTION PREFERENCE
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  [data-reveal] {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}
