/* "Our Products" cards on the homepage (index.html and ar/index.html). Scoped with hp- so the
   site's compiled styles and these never meet. */

.hp-products {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  margin-top: 1.75rem;
  padding: 0;
  list-style: none;
  /* The homepage section sets a large base size and pads every paragraph; reset both here. */
  font-size: 14px;
  line-height: 1.5;
}

.hp-products .hp-card p {
  padding: 0;
}

/* Product names and web addresses stay in Latin type, so their digits stay Western on the Arabic page too. */
.hp-products .hp-name,
.hp-products .hp-visit {
  font-family: "Poppins", Helvetica, Arial, sans-serif;
}

.hp-card {
  display: flex;
  flex-direction: column;
  padding: 24px;
  border: 1px solid rgba(17, 39, 207, 0.12);
  border-radius: 24px;
  background: #ffffff;
  color: #000000;
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.4s;
}

.hp-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 24px 48px -24px rgba(17, 39, 207, 0.35);
}

.hp-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.hp-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  object-fit: cover;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.08);
}

.hp-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(17, 39, 207, 0.08);
  color: #1127cf;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.hp-status::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}

.hp-status.is-live {
  background: rgba(110, 187, 99, 0.16);
  color: #2f7a24;
}

.hp-name {
  margin: 20px 0 0;
  font-size: 28px;
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: #000000;
  direction: ltr;
  unicode-bidi: isolate;
}

.hp-cursor {
  display: inline-block;
  width: 0.48em;
  height: 3px;
  margin-inline-start: 0.06em;
  background: currentColor;
  vertical-align: -0.1em;
  animation: hp-blink 1.1s steps(1) infinite;
}

@keyframes hp-blink {
  50% {
    opacity: 0;
  }
}

.hp-tagline {
  margin: 8px 0 0;
  font-size: 17px;
  font-weight: 600;
  line-height: 1.35;
  color: #1127cf;
}

.hp-text {
  margin: 10px 0 0;
  font-size: 14px;
  line-height: 1.55;
  color: rgba(0, 0, 0, 0.62);
}

.hp-facts {
  display: flex;
  gap: 20px;
  margin: 18px 0 0;
  padding: 16px 0 0;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  list-style: none;
}

.hp-facts li {
  font-size: 12px;
  line-height: 1.35;
  color: rgba(0, 0, 0, 0.62);
}

.hp-facts strong {
  display: block;
  font-size: 20px;
  font-weight: 600;
  color: #000000;
}

.hp-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 16px;
  margin-top: auto;
  padding-top: 20px;
}

.hp-pitch {
  display: inline-block;
  padding: 10px 18px;
  border-radius: 999px;
  background: #1127cf;
  color: #ffffff;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}

.hp-pitch:hover {
  background: #0c1da3;
  color: #ffffff;
}

.hp-visit {
  font-size: 13px;
  font-weight: 500;
  color: #1127cf;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.hp-pitch:focus-visible,
.hp-visit:focus-visible {
  outline: 3px solid #1127cf;
  outline-offset: 3px;
}

/* Short laptop screens: the whole section has to fit one screen height. */
@media (min-width: 901px) and (max-height: 820px) {
  .hp-products {
    margin-top: 1rem;
    gap: 16px;
  }

  .hp-card {
    padding: 18px 20px;
  }

  .hp-icon {
    width: 44px;
    height: 44px;
    border-radius: 11px;
  }

  .hp-name {
    margin-top: 12px;
    font-size: 24px;
  }

  .hp-tagline {
    font-size: 15px;
  }

  .hp-text {
    font-size: 13px;
  }

  .hp-facts {
    margin-top: 12px;
    padding-top: 12px;
  }

  .hp-actions {
    padding-top: 14px;
  }
}

/* Phones and small tablets: swipeable cards. */
@media (max-width: 900px) {
  .hp-products {
    display: flex;
    gap: 14px;
    margin-inline: -16px;
    padding: 0 16px 12px;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  .hp-products::-webkit-scrollbar {
    display: none;
  }

  .hp-card {
    flex: 0 0 min(82vw, 320px);
    scroll-snap-align: center;
    padding: 20px;
  }

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

  .hp-name {
    margin-top: 16px;
    font-size: 24px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hp-cursor {
    animation: none;
  }

  .hp-card {
    transition: none;
  }
}

/* "How rounds work" link under the section title. */
.hp-learn {
  color: #1127cf;
  text-decoration: underline;
  text-underline-offset: 3px;
  white-space: nowrap;
}
