.how {
  min-height: 710px;
  border-top: 1px solid #e6efe9;
  border-bottom: 1px solid #e6efe9;
  background-color: #f6faf7;
}

.how .container {
  position: relative;
}

.how__wrap {
  display: flex;
  flex-direction: column;
  gap: 64px;
  max-width: 1152px;
  width: 100%;
  min-width: 0;
}

.how__head {
  max-width: 822px;
  text-align: center;
}

.how__title {
  margin-top: 0;
}

.how__steps {
  position: relative;
}

.how__line {
  position: absolute;
  top: 62px;
  right: 8%;
  left: 8%;
  border-top: 2px dashed #bfe0cc;
}

.how__grid {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.how-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 30px;
  border: 1px solid #e6efe9;
  border-radius: 26px;
  background-color: var(--opt-white);
  transition: transform 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease;
}

/* Only where there is a pointer to hover with: on a tablet a tap leaves :hover on and the
   tapped card stayed tilted until the next tap somewhere else. */
@media (hover: hover) {
  .how-card:hover {
    border-color: #9fd2b4;
    box-shadow: 0 40px 70px -40px rgba(0, 80, 40, 0.5);
    transform: perspective(900px) rotateX(4deg) rotateY(-4deg) translateY(-6px);
  }
}

.how-card__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 76px;
  height: 76px;
  border-radius: 22px;
  background-color: #e8f5ee;
}

.how-card__icon svg {
  fill: none;
  stroke: var(--opt-green);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.how-card__icon svg circle {
  fill: var(--opt-green);
  stroke: none;
}

.how-card__copy {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.how-card__title {
  margin: 0;
  font-size: 23px;
  font-weight: 600;
  line-height: 1.06;
  letter-spacing: -0.03em;
  color: var(--opt-ink);
}

.how-card__text {
  max-width: 296px;
  margin: 0;
  font-size: 15.5px;
  line-height: 1.6;
  color: var(--opt-body);
}

@media (max-width: 991.98px) {
  .how__break {
    display: none;
  }
}

@media (max-width: 983.98px) {
  .how__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 665.98px) {
  .how__grid {
    grid-template-columns: 1fr;
  }
}

/* The dashed line joins the three steps along the icon row, and is only visible in the gaps
   between the cards. With two columns it showed as one stray dash between cards 1 and 2 and
   joined nothing, so it is only drawn while the steps stand in a row (984px and up). Hidden,
   not removed. */
@media (max-width: 983.98px) {
  .how__line {
    display: none;
  }
}

/* Two columns and three steps left step 3 alone at the left of a second row with an empty
   half beside it. It now sits centred under the pair, the same width as the other two cards
   (half of the row less half the 18px gap), so the text wraps exactly as in the others and
   the reading order stays 1, 2, 3. */
@media (min-width: 666px) and (max-width: 983.98px) {
  .how__grid > .how-card:last-child {
    grid-column: 1 / -1;
    justify-self: center;
    width: calc(50% - 9px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .how-card {
    transition: none;
  }

  .how-card:hover {
    transform: none;
  }
}

/* Phones: same card as on desktop (icon tile above the title and text, one card per row), only
   the inside is tightened so the card is not mostly padding. The icon is smaller, the gaps
   inside the card follow one rhythm (icon 18 title 8 text) and the text uses the whole width
   of the card instead of the 296px column it keeps on desktop. */
@media (max-width: 575.98px) {
  .how__wrap {
    gap: 40px;
  }

  .how__grid {
    gap: 14px;
  }

  .how-card {
    gap: 18px;
    padding: 24px 22px;
    border-radius: 22px;
  }

  .how-card__icon {
    width: 60px;
    height: 60px;
    border-radius: 18px;
  }

  .how-card__copy {
    gap: 8px;
  }

  .how-card__title {
    font-size: 21px;
  }

  .how-card__text {
    max-width: none;
    font-size: 15px;
    line-height: 1.55;
  }
}
