/* =============================================
   PARALLAX — stili aggiuntivi (non sovrascrive style.css)
   ============================================= */

html {
  overflow-x: hidden;
}

#parallax-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}
.bg-layer {
  position: absolute;
  left: 0;
  width: 100%;
  height: 250%;
  top: -75%;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  transition: opacity 0.9s ease;
  will-change: transform;
}
#bg-a {
  opacity: 1;
  background-image: url('/images/og.jpg');
}
#bg-b {
  opacity: 0;
}

body {
  background: #1a1a2e;
}

.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.8) 0%, rgba(118, 75, 162, 0.88) 100%);
  z-index: 0;
}

.cards-section {
  position: relative;
}
.cards-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.25);
  pointer-events: none;
  z-index: 0;
}
.cards-section .container {
  position: relative;
  z-index: 1;
}
.cards-section .section-title {
  position: relative;
  z-index: 1;
}

.testimonials {
  background: rgba(248, 249, 250, 0.88) !important;
}

.parallax-particles {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  overflow: hidden;
}
.p-particle {
  position: absolute;
  font-size: 1.8rem;
  opacity: 0.18;
  animation: pFloat linear infinite;
  will-change: transform;
}
@keyframes pFloat {
  0% {
    transform: translateY(110vh) rotate(0deg);
    opacity: 0;
  }
  10% {
    opacity: 0.18;
  }
  90% {
    opacity: 0.18;
  }
  100% {
    transform: translateY(-20vh) rotate(360deg);
    opacity: 0;
  }
}
.hero-content {
  z-index: 2;
}

.card-preview {
  opacity: 0;
  transition:
    opacity 0.6s ease,
    transform 0.6s ease;
}
.card:nth-child(odd) .card-preview {
  transform: translateX(-70px);
}
.card:nth-child(even) .card-preview {
  transform: translateX(70px);
}
.card.preview-visible .card-preview {
  opacity: 1;
  transform: translateX(0);
}

.card-content {
  opacity: 0;
  transform: translateY(25px);
  transition:
    opacity 0.5s ease 0.2s,
    transform 0.5s ease 0.2s;
}
.card.content-visible .card-content {
  opacity: 1;
  transform: translateY(0);
}

.feature {
  opacity: 0;
  transform: translateY(40px);
  transition:
    opacity 0.55s ease,
    transform 0.55s ease;
}
.feature.visible {
  opacity: 1;
  transform: translateY(0);
}

.testimonial {
  opacity: 0;
  transform: translateX(-50px);
  transition:
    opacity 0.6s ease,
    transform 0.6s ease;
}
.testimonial:nth-child(even) {
  transform: translateX(50px);
}
.testimonial.visible {
  opacity: 1;
  transform: translateX(0);
}

.section-title {
  opacity: 0;
  transform: translateY(30px);
  transition:
    opacity 0.5s ease,
    transform 0.5s ease;
}
.section-title.visible {
  opacity: 1;
  transform: translateY(0);
}

.scroll-hint {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 13px;
  font-family: 'Inter', sans-serif;
  animation: hintBounce 2s ease-in-out infinite;
  cursor: default;
}
.scroll-hint svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: rgba(255, 255, 255, 0.7);
  stroke-width: 2;
  stroke-linecap: round;
}
@keyframes hintBounce {
  0%,
  100% {
    transform: translateX(-50%) translateY(0);
  }
  50% {
    transform: translateX(-50%) translateY(8px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .card-preview,
  .card-content,
  .feature,
  .testimonial,
  .section-title {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
  .p-particle {
    display: none;
  }
}
