/* =========================================================
   ZERLAB STUDIO — COME FUNZIONA
   ========================================================= */

.how-it-works {
  width: 100%;

  padding:
    clamp(90px, 7vw, 120px)
    var(--page-padding)
    clamp(70px, 6vw, 95px);

  background: var(--navy);
  color: var(--white);

  overflow: hidden;
}


/* =========================================================
   HEADER
   ========================================================= */

.how-heading {
  max-width: 950px;

  margin-bottom:
    clamp(55px, 5vw, 75px);
}


.how-it-works .section-eyebrow {
  color: rgba(255, 255, 255, 0.55);
}


.how-it-works .section-eyebrow span {
  background: rgba(255, 255, 255, 0.55);
}


.how-heading h2 {
  color: var(--white);

  font-size:
    clamp(52px, 5.4vw, 82px);

  font-weight: 500;

  line-height: 0.96;

  letter-spacing: -4.5px;
}


.how-heading h2 strong {
  color: #7eabd1;

  font-weight: 700;
}


.how-heading > p {
  margin-top: 28px;

  color: rgba(255, 255, 255, 0.58);

  font-size: 15px;

  line-height: 1.65;
}


/* =========================================================
   PROCESSO
   ========================================================= */

.how-process {
  position: relative;

  width: 100%;

  display: grid;

  grid-template-columns:
    repeat(4, minmax(0, 1fr));

  gap:
    clamp(30px, 4vw, 70px);

  padding-top: 0;
}


/* =========================================================
   LINEA BASE
   ========================================================= */

.process-line {
  position: absolute;

  top: 76px;
  left: 0;

  width: 100%;
  height: 1px;

  background:
    rgba(255, 255, 255, 0.16);

  overflow: hidden;
}


/* =========================================================
   LINEA ANIMATA
   ========================================================= */

.process-line-progress {
  width: 0;
  height: 100%;

  background: #7eabd1;

  transition:
    width 2.4s
    cubic-bezier(0.22, 1, 0.36, 1);
}


.how-it-works.is-visible
.process-line-progress {
  width: 100%;
}


/* =========================================================
   STEP
   ========================================================= */

.process-step {
  position: relative;

  min-width: 0;
}


/* =========================================================
   NUMERO
   ========================================================= */

.process-number {
  margin-bottom: 48px;

  color:
    rgba(255, 255, 255, 0.25);

  font-size: 13px;
  font-weight: 700;

  letter-spacing: 2px;

  opacity: 0;

  transform:
    translateY(10px);

  transition:
    opacity 0.45s ease,
    transform 0.45s ease,
    color 0.45s ease;
}


/* =========================================================
   PALLINO
   ========================================================= */

.process-dot {
  position: absolute;

  top: 69px;
  left: 0;

  z-index: 3;

  width: 15px;
  height: 15px;

  border:
    4px solid
    var(--navy);

  border-radius: 50%;

  background:
    rgba(255, 255, 255, 0.22);

  transform:
    scale(0.7);

  opacity: 0;

  transition:
    opacity 0.4s ease,
    transform 0.4s ease,
    background 0.4s ease,
    box-shadow 0.4s ease;
}


/* =========================================================
   CONTENUTO
   ========================================================= */

.process-content {
  padding-top: 28px;

  opacity: 0;

  transform:
    translateY(20px);

  transition:
    opacity 0.6s ease,
    transform 0.6s ease;
}


.process-content > span {
  display: block;

  color: #7eabd1;

  font-size: 9px;
  font-weight: 700;

  letter-spacing: 2px;

  line-height: 1.4;

  text-transform: uppercase;
}


.process-content h3 {
  margin-top: 12px;

  color: var(--white);

  font-size:
    clamp(25px, 2.2vw, 34px);

  font-weight: 600;

  line-height: 1.1;

  letter-spacing: -1.5px;
}


.process-content p {
  max-width: 245px;

  margin-top: 15px;

  color:
    rgba(255, 255, 255, 0.55);

  font-size: 13px;

  line-height: 1.7;
}


/* =========================================================
   STATO ATTIVO GENERALE
   ========================================================= */

.how-it-works.is-visible
.process-number {
  opacity: 1;

  transform:
    translateY(0);

  color:
    rgba(255, 255, 255, 0.62);
}


.how-it-works.is-visible
.process-dot {
  opacity: 1;

  transform:
    scale(1);

  background: #7eabd1;

  box-shadow:
    0 0 0 5px
    rgba(126, 171, 209, 0.08);
}


.how-it-works.is-visible
.process-content {
  opacity: 1;

  transform:
    translateY(0);
}


/* =========================================================
   STEP 01
   ========================================================= */

.how-it-works.is-visible
.process-step:nth-of-type(1)
.process-number {
  transition-delay: 0.10s;
}


.how-it-works.is-visible
.process-step:nth-of-type(1)
.process-dot {
  transition-delay: 0.15s;
}


.how-it-works.is-visible
.process-step:nth-of-type(1)
.process-content {
  transition-delay: 0.25s;
}


/* =========================================================
   STEP 02
   ========================================================= */

.how-it-works.is-visible
.process-step:nth-of-type(2)
.process-number {
  transition-delay: 0.70s;
}


.how-it-works.is-visible
.process-step:nth-of-type(2)
.process-dot {
  transition-delay: 0.75s;
}


.how-it-works.is-visible
.process-step:nth-of-type(2)
.process-content {
  transition-delay: 0.85s;
}


/* =========================================================
   STEP 03
   ========================================================= */

.how-it-works.is-visible
.process-step:nth-of-type(3)
.process-number {
  transition-delay: 1.30s;
}


.how-it-works.is-visible
.process-step:nth-of-type(3)
.process-dot {
  transition-delay: 1.35s;
}


.how-it-works.is-visible
.process-step:nth-of-type(3)
.process-content {
  transition-delay: 1.45s;
}


/* =========================================================
   STEP 04
   ========================================================= */

.how-it-works.is-visible
.process-step:nth-of-type(4)
.process-number {
  transition-delay: 1.90s;
}


.how-it-works.is-visible
.process-step:nth-of-type(4)
.process-dot {
  transition-delay: 1.95s;
}


.how-it-works.is-visible
.process-step:nth-of-type(4)
.process-content {
  transition-delay: 2.05s;
}


/* =========================================================
   FINALE
   ========================================================= */

.how-finale {
  margin-top:
    clamp(75px, 7vw, 110px);

  display: flex;

  align-items: center;
  justify-content: center;

  flex-direction: column;

  gap: 18px;

  opacity: 0;

  transform:
    translateY(18px);

  transition:
    opacity 0.65s ease 2.5s,
    transform 0.65s ease 2.5s;
}


.how-it-works.is-visible
.how-finale {
  opacity: 1;

  transform:
    translateY(0);
}


.how-finale > span {
  color: var(--white);

  font-size: 10px;
  font-weight: 700;

  letter-spacing: 3px;

  text-transform: uppercase;
}


/* =========================================================
   FRECCIA
   ========================================================= */

.how-arrow {
  color: #7eabd1;

  font-size: 27px;

  line-height: 1;

  animation:
    howArrow
    1.5s
    ease-in-out
    infinite;
}


@keyframes howArrow {

  0%,
  100% {
    transform:
      translateY(0);
  }

  50% {
    transform:
      translateY(8px);
  }

}


/* =========================================================
   TABLET
   ========================================================= */

@media (max-width: 1000px) {

  .how-process {
    gap: 25px;
  }


  .process-content p {
    font-size: 12px;
  }

}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 700px) {

  .how-it-works {
    padding:
      80px
      20px
      65px;
  }


  /* HEADER */

  .how-heading {
    margin-bottom: 60px;
  }


  .how-heading h2 {
    font-size:
      clamp(48px, 13.5vw, 62px);

    line-height: 0.98;

    letter-spacing: -3.5px;
  }


  .how-heading > p {
    max-width: 290px;

    margin-top: 22px;

    font-size: 13px;
  }


  /* PROCESSO */

  .how-process {
    display: flex;

    flex-direction: column;

    gap: 0;

    padding-left: 42px;
  }


  /* LINEA VERTICALE */

  .process-line {
    top: 5px;
    left: 6px;

    width: 1px;
    height: calc(100% - 35px);
  }


  .process-line-progress {
    width: 100%;
    height: 0;

    transition:
      height 2.4s
      cubic-bezier(0.22, 1, 0.36, 1);
  }


  .how-it-works.is-visible
  .process-line-progress {
    width: 100%;
    height: 100%;
  }


  /* STEP */

  .process-step {
    min-height: 170px;

    padding-bottom: 35px;
  }


  /* NUMERO */

  .process-number {
    margin-bottom: 12px;

    font-size: 11px;
  }


  /* PALLINO */

  .process-dot {
    top: 0;
    left: -43px;
  }


  /* CONTENUTO */

  .process-content {
    padding-top: 0;
  }


  .process-content > span {
    font-size: 8px;
  }


  .process-content h3 {
    margin-top: 9px;

    font-size: 28px;
  }


  .process-content p {
    max-width: 285px;

    margin-top: 11px;

    font-size: 13px;
  }


  /* FINALE */

  .how-finale {
    margin-top: 45px;
  }

}


/* =========================================================
   ACCESSIBILITÀ — RIDUZIONE MOVIMENTO
   ========================================================= */

@media (prefers-reduced-motion: reduce) {

  .process-line-progress,
  .process-number,
  .process-dot,
  .process-content,
  .how-finale {
    transition: none;
  }


  .how-arrow {
    animation: none;
  }

}