/* !---------
! ELEMENTI ANIMAZIONI
! ---------*/
.layer {
  position: absolute;
  top: 0;
  left: 0;
  transform: translateX(0);
  width: 100%;
  height: 100%;
  z-index: 2;
  transition: transform 0.64s ease-in-out;
}
.layer.in-view {
  transform: translateX(-100%);
}
.layer.layer.layer-utd {
  transform: translateY(0);
}
.layer.layer-utd.in-view {
  transform: translateY(100%);
}
.animate-heading {
  position: relative;
  overflow: hidden;
}
.animate-heading :where(h1, h2, h3, h4, h5, h6) {
  opacity: 0;
  transform: translateY(100px) scaleX(0.88);
  transition:
    opacity 0.6s ease-out,
    transform 0.6s ease-out;
  transition-delay: 0.34s;
  transform-origin: left;
  overflow: hidden;
}
.animate-heading.in-view :where(h1, h2, h3, h4, h5, h6) {
  opacity: 1;
  transform: translateY(0) scaleX(1);
}
.animate-text {
  position: relative;
  overflow: hidden;
}
.animate-text :where(p) {
  opacity: 0;
  transform: translateY(100px);
  transition:
    opacity 0.6s ease-out,
    transform 0.6s ease-out;
  transition-delay: 0.42s;
  overflow: hidden;
}
.animate-text.in-view :where(p) {
  opacity: 1;
  transform: translateY(0);
}
.animate-icon {
  position: relative;
  overflow: hidden;
}
.animate-icon :where(svg) {
  opacity: 0;
  transform: translateY(30px);
  transition:
    opacity 0.6s ease-out,
    transform 0.6s ease-out;
  transition-delay: 0.42s;
}
.animate-icon.in-view :where(svg) {
  opacity: 1;
  transform: translateY(0);
}
.animate-clip {
  position: relative;
  overflow: hidden;
}

.animate-clip :where(img) {
  opacity: 0;
  clip-path: circle(0% at 100% 0%); /* parte dall'angolo in alto a destra */
  transition:
    opacity 0.6s ease-out,
    clip-path 0.7s ease-in-out;
  transition-delay: 0.42s;
}
.animate-before {
  position: relative;
}
.animate-before::before {
  opacity: 0;
  transform: translateX(-100px);
  transition:
    opacity 0.6s ease-out,
    transform 0.6s ease-out;
  transition-delay: 0.55s;
}
.animate-before.in-view::before {
  opacity: 1;
  transform: translateX(0);
}
.animate-before :where(p) {
  opacity: 0;
  transform: translateY(100px);
  transition:
    opacity 0.6s ease-out,
    transform 0.6s ease-out;
  transition-delay: 0.42s;
  overflow: hidden;
}
.animate-before.in-view :where(p) {
  opacity: 1;
  transform: translateY(0);
}
.animate-clip.in-view :where(img) {
  opacity: 1;
  clip-path: circle(150% at 100% 0%);
}
.animate-clip-down {
  position: relative;
  overflow: hidden;
}
.animate-clip-down :where(img) {
  opacity: 0;
  clip-path: inset(0 0 100% 0);
  transition:
    opacity 0.6s ease-out,
    clip-path 0.7s ease-in-out;
  transition-delay: 0.42s;
}
.animate-clip-down.in-view :where(img) {
  opacity: 1;
  clip-path: inset(0 0 0% 0);
}
.animate-banner {
  position: relative;
  overflow: hidden;
  opacity: 0;
  clip-path: inset(0 0 100% 0);
  transition:
    opacity 0.6s ease-out,
    clip-path 0.7s ease-in-out;
  transition-delay: 0.42s;
}
.animate-banner.in-view {
  opacity: 1;
  clip-path: inset(0 0 0% 0);
}
.animate-scale {
  overflow: hidden;
}
.animate-scale :where(img) {
  opacity: 0;
  transform: scale(1.03);
  transition:
    opacity 0.6s ease-out,
    transform 0.6s ease-out;
  transition-delay: 0.42s;
}
.animate-scale.in-view :where(img) {
  opacity: 1;
  transform: scale(1);
}
.animate-btn-block {
  position: relative;
  overflow: hidden;
}
.animate-btn-block :where(.elementor-widget-button),
.animate-btn-block {
  opacity: 0;
  transform: translateY(30px);
  transition:
    opacity 0.6s ease-out,
    transform 0.6s ease-out;
  transition-delay: 0.42s;
}
.animate-btn-block.in-view :where(.elementor-widget-button),
.animate-btn-block.in-view {
  opacity: 1;
  transform: translateY(0);
  overflow: visible;
}
.site-full-hero::before {
  opacity: 0;
  transform: translateY(-6%);
  transition:
    opacity 0.9s ease-out,
    transform 1.1s cubic-bezier(0.22, 1, 0.36, 1);
  transition-delay: 0.5s;
}

.site-full-hero.in-view::before {
  opacity: 0.55;
  transform: translateY(0);
}

.animate-cards-row > *::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 1px; /* stesso spessore del bordo Elementor */
  background-color: #ccc; /* stesso colore del bordo Elementor */
  transform-origin: left;
  transform: scaleX(0);
  transition: transform 0.6s ease-out;
  transition-delay: calc(0.4s + var(--stagger, 0s));
}
.animate-cards-row.in-view > *::after {
  transform: scaleX(1);
}

.animate-cards-row > * {
  position: relative;
}
.animate-cards-row :nth-child(1) {
  --stagger: 0s;
}
.animate-cards-row :nth-child(2) {
  --stagger: 0.15s;
}
.animate-cards-row :nth-child(3) {
  --stagger: 0.3s;
}
.animate-cards-row :nth-child(4) {
  --stagger: 0.45s;
}

.animate-cards-row :where(.animate-heading) :where(h1, h2, h3, h4, h5, h6),
.animate-cards-row :where(.animate-text) :where(p) {
  transition-delay: calc(0.2s + var(--stagger));
}
.animate-card-inner {
  position: relative;
}
.animate-card-inner::after {
  transform-origin: left;
  transform: scaleX(0);
  transition: transform 0.6s ease-out;
  transition-delay: calc(0.4s + var(--stagger));
}
.animate-cards-row.in-view .animate-card-inner::after {
  transform: scaleX(1);
}

.animate-curtain {
  position: relative;
  overflow: hidden;
}

/* Il "sipario" che scorre via */
.animate-curtain::before {
  content: "";
  position: absolute;
  inset: 0;
  background-color: var(--e-global-color-b201989);
  transform: translateY(101%);
  transform-origin: right;
  transition: transform 0.7s cubic-bezier(0.77, 0, 0.18, 1);

  z-index: -1;
}

.animate-curtain.in-view::before {
  transform: translateY(0); /* scorre fuori a destra */
}

/* Il testo parte nascosto e appare dopo che il sipario è passato */
.animate-curtain :where(h1, h2, h3, h4, h5, h6, p, svg) {
  opacity: 0;
  transition: opacity 0.4s ease-out;
  transition-delay: 0.6s; /* dopo che il sipario è quasi uscito */
}

.animate-curtain.in-view :where(h1, h2, h3, h4, h5, h6, p, svg) {
  opacity: 1;
}

.animate-icons-row :nth-child(1) {
  --stagger: 0s;
}
.animate-icons-row :nth-child(2) {
  --stagger: 0.12s;
}
.animate-icons-row :nth-child(3) {
  --stagger: 0.24s;
}
.animate-icons-row :nth-child(4) {
  --stagger: 0.36s;
}

.animate-icon-item {
  opacity: 0;
  transform: translateX(-30px);
  transition:
    opacity 0.5s ease-out,
    transform 0.5s ease-out;
  transition-delay: calc(0.2s + var(--stagger, 0s));
}

.animate-icons-row.in-view .animate-icon-item {
  opacity: 1;
  transform: translateX(0);
}
