/* ========================================
   LUMINOR WEBSITE - ANIMATIONS
   Premium Animation System with AOS
   ======================================== */

/* ========================================
   AOS INTEGRATION - Animate On Scroll
   ======================================== */

[data-aos] {
  opacity: 0;
  transition-property: opacity, transform;
  transition-duration: 0.6s;
  transition-timing-function: ease-out;
}

[data-aos].aos-animate {
  opacity: 1;
  transform: translate(0);
}

/* Fade Animations */
[data-aos="fade"] {
  opacity: 0;
}

[data-aos="fade-up"] {
  opacity: 0;
  transform: translate3d(0, 40px, 0);
}

[data-aos="fade-down"] {
  opacity: 0;
  transform: translate3d(0, -40px, 0);
}

[data-aos="fade-left"] {
  opacity: 0;
  transform: translate3d(40px, 0, 0);
}

[data-aos="fade-right"] {
  opacity: 0;
  transform: translate3d(-40px, 0, 0);
}

/* Slide Animations */
[data-aos="slide-up"] {
  opacity: 0;
  transform: translate3d(0, 100px, 0);
}

[data-aos="slide-down"] {
  opacity: 0;
  transform: translate3d(0, -100px, 0);
}

[data-aos="slide-left"] {
  opacity: 0;
  transform: translate3d(100px, 0, 0);
}

[data-aos="slide-right"] {
  opacity: 0;
  transform: translate3d(-100px, 0, 0);
}

/* Scale Animations */
[data-aos="zoom-in"] {
  opacity: 0;
  transform: scale3d(0.9, 0.9, 0.9);
}

[data-aos="zoom-in-up"] {
  opacity: 0;
  transform: translate3d(0, 40px, 0) scale3d(0.95, 0.95, 0.95);
}

[data-aos="zoom-in-down"] {
  opacity: 0;
  transform: translate3d(0, -40px, 0) scale3d(0.95, 0.95, 0.95);
}

[data-aos="zoom-in-left"] {
  opacity: 0;
  transform: translate3d(40px, 0, 0) scale3d(0.95, 0.95, 0.95);
}

[data-aos="zoom-in-right"] {
  opacity: 0;
  transform: translate3d(-40px, 0, 0) scale3d(0.95, 0.95, 0.95);
}

/* Flip Animations */
[data-aos="flip-left"] {
  opacity: 0;
  transform: perspective(2500px) rotateY(100deg);
}

[data-aos="flip-right"] {
  opacity: 0;
  transform: perspective(2500px) rotateY(-100deg);
}

[data-aos="flip-up"] {
  opacity: 0;
  transform: perspective(2500px) rotateX(100deg);
}

[data-aos="flip-down"] {
  opacity: 0;
  transform: perspective(2500px) rotateX(-100deg);
}

/* Bounce Animations */
[data-aos="bounce-up"] {
  animation: bounceUp 0.8s ease-out;
}

[data-aos="bounce-down"] {
  animation: bounceDown 0.8s ease-out;
}

[data-aos="bounce-left"] {
  animation: bounceLeft 0.8s ease-out;
}

[data-aos="bounce-right"] {
  animation: bounceRight 0.8s ease-out;
}

/* ========================================
   SCROLL-TRIGGERED ANIMATIONS
   ======================================== */

/* Parallax Effect */
.parallax-bg {
  background-attachment: fixed;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
}

@supports not (background-attachment: fixed) {
  .parallax-bg {
    background-attachment: scroll;
  }
}

/* Staggered List Animation */
.stagger-list li {
  animation: slideInLeft 0.6s ease-out both;
}

.stagger-list li:nth-child(1) { animation-delay: 0.1s; }
.stagger-list li:nth-child(2) { animation-delay: 0.2s; }
.stagger-list li:nth-child(3) { animation-delay: 0.3s; }
.stagger-list li:nth-child(4) { animation-delay: 0.4s; }
.stagger-list li:nth-child(5) { animation-delay: 0.5s; }

/* Staggered Grid Animation */
.grid > * {
  animation: fadeInUp 0.6s ease-out both;
}

.grid > :nth-child(1) { animation-delay: 0.1s; }
.grid > :nth-child(2) { animation-delay: 0.2s; }
.grid > :nth-child(3) { animation-delay: 0.3s; }
.grid > :nth-child(4) { animation-delay: 0.4s; }
.grid > :nth-child(5) { animation-delay: 0.5s; }
.grid > :nth-child(6) { animation-delay: 0.6s; }
.grid > :nth-child(7) { animation-delay: 0.7s; }
.grid > :nth-child(8) { animation-delay: 0.8s; }
.grid > :nth-child(9) { animation-delay: 0.9s; }

/* ========================================
   HOVER MICRO-INTERACTIONS
   ======================================== */

/* Card Lift & Glow */
.card-hover {
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.card-hover:hover {
  transform: translateY(-8px);
  box-shadow: 0 15px 40px rgba(11, 79, 140, 0.2);
}

.card-hover:hover::before {
  animation: glow 2s ease-in-out;
}

/* Button Glow */
.button-glow {
  position: relative;
  transition: all 0.3s ease-out;
}

.button-glow::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.3), transparent);
  border-radius: inherit;
  transform: translate(-50%, -50%) scale(0);
  pointer-events: none;
  transition: transform 0.5s ease-out;
}

.button-glow:hover::after {
  transform: translate(-50%, -50%) scale(2);
}

/* Icon Pulse */
.icon-pulse {
  animation: pulse 2s ease-in-out infinite;
}

/* Text Shimmer */
.text-shimmer {
  background: linear-gradient(90deg, 
    var(--dark-text) 0%,
    var(--sea-blue) 50%,
    var(--dark-text) 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: shimmer 3s linear infinite;
}

@keyframes shimmer {
  0% {
    background-position: -200% center;
  }
  100% {
    background-position: 200% center;
  }
}

/* ========================================
   INTERACTIVE ANIMATIONS
   ======================================== */

/* Loading Spinner */
.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid rgba(11, 79, 140, 0.2);
  border-top-color: var(--sea-blue);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Bouncing Dots */
.bouncing-dots {
  display: flex;
  gap: 5px;
  align-items: center;
  justify-content: center;
}

.dot {
  width: 8px;
  height: 8px;
  background: var(--sea-blue);
  border-radius: 50%;
  animation: bounce 1.4s infinite;
}

.dot:nth-child(1) { animation-delay: 0s; }
.dot:nth-child(2) { animation-delay: 0.2s; }
.dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes bounce {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-15px);
  }
}

/* ========================================
   TEXT ANIMATIONS
   ======================================== */

/* Gradient Text Animation */
.gradient-text {
  background: linear-gradient(90deg,
    var(--sea-blue) 0%,
    var(--sky-blue) 25%,
    var(--greenish-blue) 50%,
    var(--sky-blue) 75%,
    var(--sea-blue) 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradientShift 6s linear infinite;
}

@keyframes gradientShift {
  0% {
    background-position: 0% center;
  }
  100% {
    background-position: 200% center;
  }
}

/* Typing Animation */
@keyframes typing {
  from {
    width: 0;
  }
  to {
    width: 100%;
  }
}

@keyframes blink {
  50% {
    border-color: transparent;
  }
}

.typing {
  width: 0;
  overflow: hidden;
  white-space: nowrap;
  border-right: 3px solid var(--sea-blue);
  animation: typing 3s steps(40, end), blink 0.75s step-end infinite;
}

/* ========================================
   SECTION REVEAL ANIMATIONS
   ======================================== */

/* Line Reveal */
.line-reveal {
  position: relative;
}

.line-reveal::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, var(--sea-blue), var(--sky-blue));
  transform: scaleX(0);
  transform-origin: left;
  animation: lineReveal 0.8s ease-out forwards;
}

@keyframes lineReveal {
  to {
    transform: scaleX(1);
  }
}

/* Mask Reveal */
.mask-reveal {
  overflow: hidden;
  animation: maskReveal 0.8s ease-out;
}

@keyframes maskReveal {
  from {
    clip-path: inset(0 100% 0 0);
  }
  to {
    clip-path: inset(0 0 0 0);
  }
}

/* ========================================
   CUSTOM KEYFRAME ANIMATIONS
   ======================================== */

@keyframes bounceUp {
  0% {
    opacity: 0;
    transform: translateY(40px);
  }
  50% {
    opacity: 1;
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes bounceDown {
  0% {
    opacity: 0;
    transform: translateY(-40px);
  }
  50% {
    opacity: 1;
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes bounceLeft {
  0% {
    opacity: 0;
    transform: translateX(40px);
  }
  50% {
    opacity: 1;
  }
  100% {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes bounceRight {
  0% {
    opacity: 0;
    transform: translateX(-40px);
  }
  50% {
    opacity: 1;
  }
  100% {
    opacity: 1;
    transform: translateX(0);
  }
}

/* ========================================
   TIMING VARIATIONS
   ======================================== */

[data-aos][data-aos-duration="300"] {
  transition-duration: 300ms;
}

[data-aos][data-aos-duration="500"] {
  transition-duration: 500ms;
}

[data-aos][data-aos-duration="700"] {
  transition-duration: 700ms;
}

[data-aos][data-aos-duration="1000"] {
  transition-duration: 1000ms;
}

/* ========================================
   DESKTOP ONLY ANIMATIONS
   ======================================== */

@media (prefers-reduced-motion: no-preference) {
  * {
    scroll-behavior: smooth;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ========================================
   MOBILE OPTIMIZATION
   ======================================== */

@media (max-width: 768px) {
  [data-aos] {
    transition-duration: 0.4s;
  }

  .parallax-bg {
    background-attachment: scroll;
  }

  /* Reduce stagger delay on mobile */
  .stagger-list li {
    animation-delay: 0.05s !important;
  }

  /* Disable complex animations on lower-end devices */
  @media (max-width: 480px) {
    [data-aos="flip-left"],
    [data-aos="flip-right"],
    [data-aos="flip-up"],
    [data-aos="flip-down"] {
      animation: fadeInUp 0.6s ease-out both;
      transform: none;
    }
  }
}
