/**
 * CLOe – Hero WOW: azzurro, nuvola, effetto che stupisce
 */

/* ==========================================================================
   Hero full-viewport con gradient animato
   ========================================================================== */

.wow-hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 4rem 1rem;
  --implode-top: 18%;
  --implode-left: 50%;
}

.wow-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    #0d7a8a 0%,
    #1a9cad 25%,
    #24d2e5 50%,
    #5ee0ed 75%,
    #8eeaf2 100%
  );
  background-size: 400% 400%;
  animation: gradient-shift 12s ease infinite;
  z-index: 0;
}

@keyframes gradient-shift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

/* Implosione: particelle che convergono sopra la tagline */
.wow-hero-implode-particles {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  overflow: hidden;
}

.wow-hero-implode-particles span {
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.85);
  left: var(--start-left, 50%);
  top: var(--start-top, 50%);
  transform: translate(-50%, -50%);
  animation: implode-particle 1.2s ease-in forwards;
}

@keyframes implode-particle {
  0% {
    left: var(--start-left, 50%);
    top: var(--start-top, 50%);
    transform: translate(-50%, -50%) scale(1);
    opacity: 0.9;
  }
  100% {
    left: var(--implode-left, 50%);
    top: var(--implode-top, 18%);
    transform: translate(-50%, -50%) scale(0);
    opacity: 0;
  }
}

/* Logo implosione: sopra la tagline, ben visibile con ombreggiatura */
.wow-hero-logo-implode {
  position: absolute;
  left: 50%;
  top: var(--implode-top, 18%);
  width: min(70%, 420px);
  height: auto;
  max-height: 38vh;
  object-fit: contain;
  z-index: 3;
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, -50%) scale(4);
  filter: blur(25px);
  animation: logo-implode 1.4s 0.5s ease-out forwards;
}

@keyframes logo-implode {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(4);
    filter: blur(25px);
  }
  100% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
    filter: blur(0)
      drop-shadow(0 4px 20px rgba(0, 0, 0, 0.25))
      drop-shadow(0 0 40px rgba(255, 255, 255, 0.2))
      drop-shadow(0 8px 32px rgba(0, 0, 0, 0.15));
  }
}

/* Shimmer – luce che attraversa lo sfondo */
.wow-hero-shimmer {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(
    105deg,
    transparent 0%,
    transparent 40%,
    rgba(255, 255, 255, 0.06) 48%,
    rgba(255, 255, 255, 0.12) 50%,
    rgba(255, 255, 255, 0.06) 52%,
    transparent 60%,
    transparent 100%
  );
  background-size: 200% 100%;
  animation: shimmer 6s ease-in-out infinite;
}

@keyframes shimmer {
  0%, 100% { background-position: 150% 0; }
  50% { background-position: -50% 0; }
}

/* Blob flottanti – più grandi e dinamici */
.wow-hero-blobs {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

.wow-hero-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.4;
  animation: blob-float 22s ease-in-out infinite;
}

.wow-hero-blob:nth-child(1) {
  width:  min(90vw, 450px);
  height: min(90vw, 450px);
  background: rgba(255, 255, 255, 0.5);
  top: 5%;
  left: -15%;
  animation-delay: 0s;
  animation-duration: 20s;
}

.wow-hero-blob:nth-child(2) {
  width:  min(70vw, 320px);
  height: min(70vw, 320px);
  background: rgba(255, 255, 255, 0.3);
  bottom: 10%;
  right: -10%;
  animation-delay: -4s;
  animation-duration: 24s;
}

.wow-hero-blob:nth-child(3) {
  width:  min(55vw, 260px);
  height: min(55vw, 260px);
  background: rgba(26, 156, 173, 0.5);
  top: 45%;
  left: 25%;
  animation-delay: -8s;
  animation-duration: 18s;
}

.wow-hero-blob:nth-child(4) {
  width:  min(40vw, 200px);
  height: min(40vw, 200px);
  background: rgba(255, 255, 255, 0.25);
  top: 70%;
  left: 60%;
  animation-delay: -12s;
  animation-duration: 26s;
}

@keyframes blob-float {
  0%, 100% { transform: translate(0, 0) scale(1) rotate(0deg); }
  25% { transform: translate(40px, -30px) scale(1.08) rotate(2deg); }
  50% { transform: translate(-25px, 20px) scale(0.92) rotate(-1deg); }
  75% { transform: translate(20px, 25px) scale(1.05) rotate(1deg); }
}

/* Particelle – container (le particelle sono generate da JS) */
.wow-hero-particles {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  overflow: hidden;
}

.wow-hero-particles span {
  position: absolute;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.6);
  animation: particle-float 14s ease-in-out infinite;
}

@keyframes particle-float {
  0%, 100% {
    transform: translate(0, 0) scale(1);
    opacity: 0.5;
  }
  25% {
    transform: translate(15px, -20px) scale(1.2);
    opacity: 0.9;
  }
  50% {
    transform: translate(-10px, 10px) scale(0.8);
    opacity: 0.6;
  }
  75% {
    transform: translate(-20px, -15px) scale(1.1);
    opacity: 0.8;
  }
}

/* Contenuto hero – Proposta 1: headline split reveal + numeri + CTA */
.wow-hero-inner {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 900px;
  margin: 0 auto;
}

/* Headline a due righe – prima grida (come originale WP) */
.wow-hero-headline {
  margin: 0 0 1rem;
  line-height: 1.15;
  color: #fff;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.2);
  display: block;
  text-align: center;
}

.wow-hero-headline-main {
  display: block;
  font-family: var(--cloe-font);
  font-size: clamp(2.25rem, 7vw, 4rem);
  font-weight: var(--cloe-font-weight-bold);
  margin-bottom: 0.35em;
  opacity: 0;
  transform: translateY(28px);
  animation: word-reveal 0.8s cubic-bezier(0.22, 1, 0.36, 1) 0.1s forwards;
}

@keyframes word-reveal {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.wow-hero-tagline {
  color: rgba(255, 255, 255, 0.95);
  font-family: var(--cloe-font);
  font-size: clamp(1.05rem, 2.2vw, 1.3rem);
  font-weight: var(--cloe-font-weight-medium);
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  margin: 0 0 2rem;
  animation: fade-up 0.8s 0.15s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  opacity: 0;
  transform: translateY(20px);
}

@keyframes fade-up {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Blocco numeri – entrano in sequenza (effetto “esplodono”) */
.wow-hero-stats {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2rem 2.5rem;
  margin: 0 0 2rem;
  padding: 1.5rem 0;
}

.wow-hero-stat {
  opacity: 0;
  transform: scale(0.85) translateY(16px);
  animation: stat-pop 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
  animation-delay: calc(0.5s + 0.12s * var(--i, 0));
  text-align: center;
}

@keyframes stat-pop {
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.wow-hero-stat-number {
  display: block;
  font-family: var(--cloe-font);
  font-size: clamp(2rem, 5vw, 2.75rem);
  font-weight: var(--cloe-font-weight-bold);
  color: #fff;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.25);
  line-height: 1.1;
}

.wow-hero-stat-suffix {
  font-size: 0.85em;
  font-weight: 700;
  color: #fff;
  vertical-align: top;
}

.wow-hero-stat-label {
  display: block;
  font-family: var(--cloe-font);
  font-size: clamp(0.85rem, 1.8vw, 1rem);
  font-weight: var(--cloe-font-weight-medium);
  color: rgba(255, 255, 255, 0.9);
  margin-top: 0.25rem;
  text-transform: lowercase;
}

.wow-hero-cta {
  animation: fade-up 0.8s 1s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  opacity: 0;
  transform: translateY(20px);
}

.wow-hero-cta .btn {
  background: #fff;
  color: var(--cloe-primary-dark);
  font-family: var(--cloe-font);
  font-weight: var(--cloe-font-weight-semibold);
  padding: 0.85rem 2rem;
  font-size: 1.1rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.wow-hero-cta .btn:hover {
  background: rgba(255, 255, 255, 0.95);
  color: var(--cloe-primary-dark);
  transform: translateY(-3px);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.2);
}

/* Scroll hint – invita a scorrere */
.wow-hero-scroll {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  animation: bounce 2s ease-in-out infinite;
}

.wow-hero-scroll span {
  display: block;
  width: 28px;
  height: 44px;
  border: 2px solid rgba(255, 255, 255, 0.8);
  border-radius: 14px;
  position: relative;
}

.wow-hero-scroll span::after {
  content: "";
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 8px;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 2px;
  animation: scroll-dot 2s ease-in-out infinite;
}

@keyframes bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(8px); }
}

@keyframes scroll-dot {
  0%, 100% { opacity: 1; top: 8px; }
  50% { opacity: 0.3; top: 18px; }
}

/* ==========================================================================
   Responsive – hero su mobile e tablet
   ========================================================================== */

@media (max-width: 767px) {
  .wow-hero {
    padding: 2rem 0.75rem 3rem;
    min-height: 100vh;
    min-height: 100dvh;
  }

  .wow-hero-inner {
    padding: 0 0.5rem;
  }

  .wow-hero-stats {
    gap: 1.25rem 1.5rem;
    margin-bottom: 1.5rem;
    padding: 1rem 0;
  }

  .wow-hero-tagline {
    margin-bottom: 1.5rem;
  }

  .wow-hero-cta .btn {
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
  }

  .wow-hero-scroll {
    bottom: 1.25rem;
  }

  .wow-hero-scroll span {
    width: 24px;
    height: 38px;
  }
}

@media (max-width: 480px) {
  .wow-hero {
    padding: 1.5rem 0.5rem 2.5rem;
  }

  .wow-hero-stats {
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1.25rem;
  }

  .wow-hero-stat-number {
    font-size: 1.75rem;
  }

  .wow-hero-stat-label {
    font-size: 0.8rem;
  }

  .wow-hero-logo-implode {
    width: min(85%, 320px);
    max-height: 32vh;
  }
}
