/*
  Adapted from /preview/assets/css/components/cards.css. Only
  .journey-card__link changed: it held editable link text next to an
  inline arrow <svg> in the static build. That text is now a Paragraph
  block's rich text, so the arrow moved to a CSS mask on ::after (same
  approach and same reasoning as buttons.css) rather than risk the
  editor flagging embedded markup as invalid content. Everything else —
  including the five real, non-editable feature icons rendered via
  Custom HTML `<use>` — is untouched.
*/

.journey {
  position: relative;
}

.journey__head {
  position: relative;
  max-width: 56ch;
  margin-bottom: var(--wp--preset--spacing--60);
}

.journey__title {
  font-size: var(--wp--preset--font-size--xl);
}

/* Sparing brand motif: a faint ring echoing the logo's rounded "8"
   counters, sitting behind the section heading. Only shown from tablet
   up — on narrow viewports the offset needed to clear the heading text
   would push it off-canvas. */
@media (min-width: 768px) {
  .journey__head::before {
    content: "";
    position: absolute;
    top: -2.5rem;
    left: -2.5rem;
    width: 7rem;
    height: 7rem;
    border-radius: 50%;
    border: 10px solid var(--wp--preset--color--soft-grey);
    z-index: -1;
  }
}

/* Mobile: a deliberate horizontal snap-scroll carousel (not a plain
   stack) so five options stay scannable at a glance and the next card
   peeks in as a scroll affordance. */
.journey__track {
  display: flex;
  gap: var(--wp--preset--spacing--40);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: var(--container-pad);
  margin-inline: calc(var(--container-pad) * -1);
  padding-inline: var(--container-pad);
  padding-bottom: var(--wp--preset--spacing--30);
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.journey__track::-webkit-scrollbar {
  display: none;
}

.journey-card {
  scroll-snap-align: start;
  flex: 0 0 78%;
  display: flex;
  flex-direction: column;
  gap: var(--wp--preset--spacing--30);
  padding: var(--wp--preset--spacing--50) var(--wp--preset--spacing--40);
  background: var(--wp--preset--color--white);
  border: 1px solid var(--wp--preset--color--soft-grey);
  border-radius: var(--radius-md);
  box-shadow: inset 0 3px 0 0 transparent;
  transition: box-shadow var(--dur-fast) var(--ease-standard),
    border-color var(--dur-fast) var(--ease-standard),
    transform var(--dur-fast) var(--ease-standard);
}

.journey-card:hover {
  border-color: var(--wp--preset--color--graphite);
  transform: translateY(-3px);
  box-shadow: inset 0 3px 0 0 var(--c-red-solid), 0 14px 26px -18px rgba(11, 11, 12, 0.16);
}

.journey-card__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  color: var(--c-red-solid);
}

.journey-card__icon svg {
  width: 100%;
  height: 100%;
  stroke-width: 1.6;
}

.journey-card__title {
  font-size: var(--wp--preset--font-size--base);
  font-weight: 800;
  letter-spacing: -0.01em;
}

.journey-card__desc {
  color: var(--wp--preset--color--graphite);
  font-size: var(--wp--preset--font-size--sm);
  line-height: 1.55;
  flex-grow: 1;
}

.journey-card__link {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  font-size: var(--wp--preset--font-size--sm);
  font-weight: 700;
  color: var(--c-red-solid);
  padding-top: var(--wp--preset--spacing--20);
  border-top: 1px solid var(--wp--preset--color--soft-grey);
}

.journey-card__link::after {
  content: "";
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  background-color: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='4' y1='12' x2='19' y2='12'%3E%3C/line%3E%3Cpolyline points='13 6 19 12 13 18'%3E%3C/polyline%3E%3C/svg%3E") no-repeat center / contain;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='4' y1='12' x2='19' y2='12'%3E%3C/line%3E%3Cpolyline points='13 6 19 12 13 18'%3E%3C/polyline%3E%3C/svg%3E") no-repeat center / contain;
  transition: transform var(--dur-fast) var(--ease-standard);
}

.journey-card:hover .journey-card__link::after {
  transform: translateX(3px);
}

.journey__hint {
  display: flex;
  align-items: center;
  gap: 0.5em;
  margin-top: var(--wp--preset--spacing--30);
  font-size: var(--wp--preset--font-size--sm);
  color: var(--wp--preset--color--graphite);
}

@media (min-width: 768px) {
  .journey-card {
    flex: 0 0 46%;
  }
}

@media (min-width: 1024px) {
  .journey__track {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: var(--wp--preset--spacing--30);
    overflow: visible;
    margin-inline: 0;
    padding-inline: 0;
  }

  .journey-card {
    flex: initial;
    padding: var(--wp--preset--spacing--40) var(--wp--preset--spacing--30);
  }

  .journey__hint {
    display: none;
  }
}
