/* Elementor entrance keyframes (bundled — no async CSS load delay) */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translate3d(0, 40px, 0);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translate3d(0, 40px, 0);
    visibility: visible;
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

@keyframes rotateInUpLeft {
  from {
    transform-origin: left bottom;
    transform: rotate3d(0, 0, 1, 18deg) translate3d(0, 24px, 0);
    opacity: 0;
  }
  to {
    transform-origin: left bottom;
    transform: none;
    opacity: 1;
  }
}

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

@keyframes zoomIn {
  from {
    opacity: 0;
    transform: scale3d(0.92, 0.92, 1);
  }
  to {
    opacity: 1;
    transform: scale3d(1, 1, 1);
  }
}

.fadeInUp {
  animation-name: fadeInUp;
}
.slideInUp {
  animation-name: slideInUp;
}
.rotateInUpLeft {
  animation-name: rotateInUpLeft;
}
.fadeIn {
  animation-name: fadeIn;
}
.zoomIn {
  animation-name: zoomIn;
}

/* Smooth Elementor-style entrance timing */
.elementor-invisible.shpe-animating,
.elementor-invisible.animated {
  visibility: visible !important;
}

.animated.fadeInUp,
.animated.slideInUp,
.animated.rotateInUpLeft,
.animated.fadeIn,
.animated.zoomIn {
  animation-duration: 0.85s;
  animation-timing-function: cubic-bezier(0.22, 1, 0.36, 1);
  animation-fill-mode: both;
}

.animated.animated-fast.fadeInUp,
.animated.animated-fast.slideInUp,
.animated.animated-fast.rotateInUpLeft,
.animated.animated-fast.fadeIn,
.animated.animated-fast.zoomIn {
  animation-duration: 0.55s;
}

.animated.animated-slow.fadeInUp,
.animated.animated-slow.slideInUp,
.animated.animated-slow.rotateInUpLeft,
.animated.animated-slow.fadeIn,
.animated.animated-slow.zoomIn {
  animation-duration: 1.15s;
}

/* Scroll-reveal for gallery grids and sections */
.shpe-scroll-reveal {
  opacity: 0;
  transform: translate3d(0, 24px, 0);
  transition:
    opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: opacity, transform;
}

.shpe-scroll-reveal.shpe-visible {
  opacity: 1;
  transform: none;
  will-change: auto;
}

/* Rotating headline (clip style) */
.elementor-headline-animation-type-clip .elementor-headline-dynamic-wrapper.shpe-headline-ready {
  overflow: hidden;
  display: inline-block;
  vertical-align: top;
  position: relative;
  will-change: width;
  transition: width 0.65s cubic-bezier(0.4, 0, 0.2, 1);
}

.elementor-headline-animation-type-clip .elementor-headline-dynamic-wrapper.shpe-headline-collapsing {
  transition: width 0.55s cubic-bezier(0.4, 0, 1, 1);
}

.elementor-headline-animation-type-clip .elementor-headline-dynamic-wrapper.shpe-headline-expanding {
  transition: width 0.75s cubic-bezier(0, 0, 0.2, 1);
}

.elementor-headline-animation-type-clip .elementor-headline-dynamic-text {
  display: inline-block;
  white-space: nowrap;
  vertical-align: top;
}

.elementor-headline-animation-type-clip .elementor-headline-dynamic-text.elementor-headline-text-inactive {
  position: absolute;
  left: 0;
  top: 0;
  visibility: hidden;
  pointer-events: none;
}

.elementor-headline-animation-type-clip .elementor-headline-dynamic-text.elementor-headline-text-active {
  position: relative;
  visibility: visible;
}

.elementor-headline-animation-type-clip .elementor-headline-dynamic-wrapper.shpe-headline-ready:after {
  animation: shpe-headline-cursor-blink 1.15s ease-in-out infinite;
}

@keyframes shpe-headline-cursor-blink {
  0%,
  45% {
    opacity: 1;
  }
  50%,
  95% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}

/* Portfolio + homepage gallery hover — subtle shadow only (images use contain) */
.elementor-image-gallery .gallery-item,
.elementor-gallery__container .e-gallery-item {
  overflow: hidden;
}

.elementor-image-gallery .gallery-icon,
.elementor-gallery__container .e-gallery-item {
  transition: box-shadow 0.3s ease;
}

/* Subtle link / button polish */
.elementor-button,
.jkit-menu a,
.elementor-icon-list-item a {
  transition: color 0.25s ease, opacity 0.25s ease, transform 0.25s ease;
}

.elementor-button:hover {
  transform: translateY(-1px);
}

/* Performance + smooth scrolling */
html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .shpe-scroll-reveal {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }

  .animated,
  .elementor-invisible {
    animation: none !important;
    transition: none !important;
    visibility: visible !important;
    opacity: 1 !important;
    transform: none !important;
  }

  .elementor-image-gallery .gallery-item img,
  .elementor-gallery__container .e-gallery-item img {
    transition: none !important;
  }
}

/* Below-fold sections: faster initial paint */
.elementor .e-con.e-parent:not(:first-of-type) {
  content-visibility: auto;
  contain-intrinsic-size: auto 500px;
}

@media (max-width: 767px) {
  .elementor .e-con.e-parent:not(:first-of-type) {
    content-visibility: visible;
    contain-intrinsic-size: auto;
  }
}
