/* Homepage Features Block */
.homepage-features {
  background: #030213;
  padding: 48px 24px;
  position: relative;

  .container {
    max-width: 1232px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 24px;
  }

  .header {
    display: flex;
    flex-direction: column;
    gap: 16px;
  }

  .headline {
    margin: 0;
    color: #fff;
    font-family: Roboto, sans-serif;
    font-size: 32px;
    font-weight: 700;
    line-height: 1.2;
  }

  .subheadline {
    margin: 0;
    color: #c9d8d8;
    font-family: Roboto, sans-serif;
    font-size: 18px;
    font-weight: 400;
    line-height: 1.5;
  }

  .cards {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
    width: 100%;
  }

  .card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 32px;
    min-height: 400px;
    padding: 24px;
    border: 1px solid #334155;
    border-radius: 0;
    background: linear-gradient(180deg, #0b1120 49.28%, #0b245b 100.08%);
    transition: border-color 0.2s ease-in-out;

    &:hover,
    &:focus-within {
      border-color: #60a5fa;

      .icon-wrap {
        background: #00f3ff33;
      }

      .icon {
        background-color: #00f3ff;
      }

      .card-link {
        text-decoration: underline;
      }
    }
  }

  /* Whole-card clickable link. Sits below interactive media (see .media--interactive). */
  .card-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
  }

  .card-content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    gap: 32px;
    width: 100%;
    /* Let clicks fall through to .card-overlay except where re-enabled below. */
    pointer-events: none;
  }

  .card-body {
    display: flex;
    flex-direction: column;
    gap: 24px;
    width: 100%;
  }

  .icon-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: #1d293d80;
    flex-shrink: 0;
    transition: background-color 0.2s ease-in-out;
  }

  .icon {
    display: inline-block;
    width: 24px;
    height: 24px;
    background-color: #94a3b8;
    mask-size: contain;
    mask-repeat: no-repeat;
    mask-position: center;
    -webkit-mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    -webkit-mask-position: center;
    transition: background-color 0.2s ease-in-out;
  }

  .card-text {
    display: flex;
    flex-direction: column;
    gap: 32px;
  }

  .card-title {
    margin: 0;
    color: #fff;
    font-family: Roboto, sans-serif;
    font-size: 24px;
    font-weight: 700;
    line-height: 36px;
  }

  .card-description {
    color: #94a3b8;
    font-family: Roboto, sans-serif;
    font-size: 18px;
    font-weight: 400;
    line-height: 32px;

    p {
      margin: 0 0 16px;

      &:last-child {
        margin-bottom: 0;
      }
    }
  }

  .card-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #60a5fa;
    font-family: Roboto, sans-serif;
    font-size: 18px;
    font-weight: 700;
    line-height: 24px;

    svg {
      flex-shrink: 0;
      width: 16px;
      height: 16px;

      path,
      g,
      line,
      polyline {
        fill: currentColor;
        stroke: currentColor;
      }
    }
  }

  .media {
    aspect-ratio: 16 / 9;
    width: 100%;
    overflow: hidden;
    background: #ccc;
  }

  /* Video/Wistia need real pointer interaction, so re-enable it above the card-overlay link. */
  .media--interactive {
    pointer-events: auto;
  }

  .media-image,
  .media-video {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  .wistia-responsive-container {
    position: relative;
    width: 100%;
    height: 100%;
    padding-top: 56.25%;
  }

  .wistia-responsive-container .wistia_embed {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
  }
}

@media (min-width: 720px) {
  .homepage-features {
    padding: 80px 24px;

    .headline {
      font-size: 48px;
      line-height: 60px;
    }

    .subheadline {
      font-size: 22px;
      line-height: 32px;
    }
  }
}

@media (min-width: 721px) {
  .homepage-features {
    .cards {
      grid-template-columns: repeat(2, 1fr);
    }
  }
}

@media (min-width: 768px) {
  .homepage-features {
    .container {
      gap: 48px;
    }

    .headline {
      font-size: 40px;
    }

    .cards {
      grid-template-columns: repeat(2, 1fr);
    }
  }
}

@media (min-width: 1024px) {
  .homepage-features {
    padding: 128px 24px;
  }
}
