/* "How it works:" step boxes — loaded by templates/_components/how-it-works.twig.
   Same hand-drawn boxes as the /referral page, in the site fonts. */

.how-it-works *,
.how-it-works *::before,
.how-it-works *::after {
  box-sizing: border-box;
}

.how-it-works .how-it-works-title {
  margin: 0 0 24px;
  font-family: "Roboto Slab", serif;
  font-size: 20px;
  line-height: 40px;
  font-weight: 700;
  letter-spacing: normal;
  text-align: left;
  text-transform: uppercase;
  color: #000000;
}

.how-it-works-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}

/* Hand-drawn boxes, same shapes as the /referral page */
.hiw-step {
  position: relative;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  border: 4px solid #000000;
  color: #1A1A1A;
  text-align: left;
}

.hiw-step--orange {
  background: #E8A756;
  border-radius: 255px 15px 225px 15px / 15px 225px 15px 255px;
}

.hiw-step--pink {
  background: #F4A0CC;
  border-radius: 15px 225px 15px 255px / 225px 15px 255px 15px;
}

.hiw-step--red {
  background: #E04625;
  border-radius: 225px 15px 15px 255px / 15px 255px 225px 15px;
  color: #ffffff;
}

.hiw-step--blue {
  background: #2E6ABE;
  border-radius: 15px 255px 225px 15px / 255px 15px 15px 225px;
  color: #ffffff;
}

.hiw-step-number {
  flex-shrink: 0;
  font-family: Helvetica, Arial, sans-serif;
  font-size: 64px;
  line-height: 1;
  font-weight: 700;
  color: #ffffff;
  -webkit-text-stroke: 2px #000000;
}

.hiw-step-label {
  flex: 1;
  font-family: "Roboto Slab", serif;
  font-size: 18px;
  line-height: 1.4;
  font-weight: 700;
  letter-spacing: normal;
}

.hiw-step-icon {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  object-fit: contain;
  transition: transform 0.3s ease;
}

/* Each step links to /nonprofits; the label's link covers the whole box */
.how-it-works .hiw-step-label {
  color: inherit;
  text-decoration: none;
}

.how-it-works .hiw-step-label::after {
  content: "";
  position: absolute;
  inset: 0;
}

.how-it-works .hiw-step-label:focus {
  outline: none;
}

.hiw-step:focus-within {
  outline: 3px solid #000000;
  outline-offset: 4px;
}

.hiw-step:hover .hiw-step-icon {
  transform: translateX(4px);
}

/* Phone */
@media (max-width: 640px) {
  .hiw-step {
    padding: 12px 16px;
  }

  .hiw-step-number {
    font-size: 48px;
  }

  .hiw-step-label {
    font-size: 16px;
  }
}
