/* =====================================================
   EXOTIC CARS TECHNICIAN - ANIMATIONS
   ===================================================== */

/* REVEAL ANIMATIONS */
.reveal {
  opacity: 0;
  transform: translateY(60px);
  transition:
    opacity 0.8s var(--ease-out),
    transform 0.8s var(--ease-out);
}

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

.reveal-left {
  opacity: 0;
  transform: translateX(-60px);
  transition:
    opacity 0.8s var(--ease-out),
    transform 0.8s var(--ease-out);
}

.reveal-left.active {
  opacity: 1;
  transform: translateX(0);
}

.reveal-right {
  opacity: 0;
  transform: translateX(60px);
  transition:
    opacity 0.8s var(--ease-out),
    transform 0.8s var(--ease-out);
}

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

.reveal-scale {
  opacity: 0;
  transform: scale(0.9);
  transition:
    opacity 0.8s var(--ease-out),
    transform 0.8s var(--ease-out);
}

.reveal-scale.active {
  opacity: 1;
  transform: scale(1);
}

/* STAGGER CHILDREN */
.stagger-children > * {
  opacity: 0;
  transform: translateY(30px);
  transition:
    opacity 0.6s var(--ease-out),
    transform 0.6s var(--ease-out);
}

.stagger-children.active > *:nth-child(1) {
  transition-delay: 0.1s;
}

.stagger-children.active > *:nth-child(2) {
  transition-delay: 0.2s;
}

.stagger-children.active > *:nth-child(3) {
  transition-delay: 0.3s;
}

.stagger-children.active > *:nth-child(4) {
  transition-delay: 0.4s;
}

.stagger-children.active > *:nth-child(5) {
  transition-delay: 0.5s;
}

.stagger-children.active > *:nth-child(6) {
  transition-delay: 0.6s;
}

.stagger-children.active > *:nth-child(7) {
  transition-delay: 0.7s;
}

.stagger-children.active > *:nth-child(8) {
  transition-delay: 0.8s;
}

.stagger-children.active > * {
  opacity: 1;
  transform: translateY(0);
}

/* TEXT SPLIT ANIMATION */
.split-text .char {
  display: inline-block;
  opacity: 0;
  transform: translateY(50px) rotateX(-90deg);
  transform-origin: center bottom;
}

.split-text.active .char {
  opacity: 1;
  transform: translateY(0) rotateX(0);
  transition:
    opacity 0.4s var(--ease-out),
    transform 0.6s var(--ease-out);
}

/* COUNTER ANIMATION */
.counter {
  font-family: var(--font-heading);
  font-size: var(--text-4xl);
  font-weight: var(--weight-bold);
  color: var(--color-gold);
}

/* FLOATING ANIMATION */
.float {
  animation: float 6s ease-in-out infinite;
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-20px);
  }
}

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

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

  50% {
    transform: scale(1.05);
    opacity: 0.8;
  }
}

/* GLOW ANIMATION */
.glow {
  animation: glow 2s ease-in-out infinite;
}

@keyframes glow {
  0%,
  100% {
    box-shadow: 0 0 20px rgba(201, 162, 39, 0.3);
  }

  50% {
    box-shadow: 0 0 40px rgba(201, 162, 39, 0.6);
  }
}

/* SHIMMER EFFECT */
.shimmer {
  position: relative;
  overflow: hidden;
}

.shimmer::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.1) 50%,
    transparent 100%
  );
  animation: shimmer 2s infinite;
  will-change: transform;
}

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

  100% {
    transform: translateX(100%);
  }
}

/* PARALLAX BASE */
.parallax-layer {
  will-change: transform;
}

/* MAGNETIC EFFECT STYLES */
.magnetic {
  transition: transform 0.3s var(--ease-out);
}

/* IMAGE REVEAL */
.img-reveal {
  position: relative;
  overflow: hidden;
}

.img-reveal::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--color-gold);
  transform: scaleY(1);
  transform-origin: top;
  transition: transform 1s var(--ease-out);
  z-index: 1;
}

.img-reveal.active::before {
  transform: scaleY(0);
  transform-origin: bottom;
}

.img-reveal img {
  transform: scale(1.3);
  transition: transform 1.2s var(--ease-out);
}

.img-reveal.active img {
  transform: scale(1);
}

/* LINE DRAW */
.line-draw {
  stroke-dasharray: 1000;
  stroke-dashoffset: 1000;
  transition: stroke-dashoffset 2s var(--ease-out);
}

.line-draw.active {
  stroke-dashoffset: 0;
}

/* TYPEWRITER */
.typewriter {
  overflow: hidden;
  border-right: 2px solid var(--color-gold);
  white-space: nowrap;
  animation:
    typing 3s steps(30) forwards,
    blink 0.7s step-end infinite;
}

@keyframes typing {
  from {
    width: 0;
  }

  to {
    width: 100%;
  }
}

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

/* SCALE ON SCROLL */
.scale-scroll {
  transform: scale(0.95);
  opacity: 0.8;
  transition:
    transform 0.5s var(--ease-out),
    opacity 0.5s var(--ease-out);
}

.scale-scroll.in-view {
  transform: scale(1);
  opacity: 1;
}

/* TILT EFFECT BASE */
.tilt {
  transform-style: preserve-3d;
  perspective: 1000px;
}

.tilt-inner {
  transform-style: preserve-3d;
  transition: transform 0.3s var(--ease-out);
}
