/* Canonical flow; both densities share the same icons, palette and order. */
.journey-steps {
  --step-gap: 24px;
  --step-title-size: clamp(18px, 2.4vw, 24px);
  --step-connector-size: 16px;
  container-type: inline-size;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--step-gap);
  width: 100%;
  max-width: 780px;
  padding: 18px 0 8px;
  margin: 0 auto;
  list-style: none;
}

.journey-step {
  --step-orb-size: clamp(60px, 19cqi, 132px);
  --step-accent: var(--roamie-pink);
  --step-secondary: var(--roamie-violet);
  --step-bloom: #ed79c8;
  --step-light: color-mix(in srgb, var(--step-accent) 65%, white);
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  min-width: 0;
  text-align: center;
}

.journey-step:nth-child(2) {
  --step-accent: var(--roamie-cyan);
  --step-bloom: #64dae9;
}

.journey-step:nth-child(3) {
  --step-accent: var(--roamie-violet);
  --step-secondary: var(--roamie-pink);
  --step-bloom: #aa83ef;
}

.journey-step-orb {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: var(--step-orb-size);
  height: var(--step-orb-size);
  border: 2px solid var(--step-light);
  border-radius: 50%;
  color: var(--step-light);
  background: radial-gradient(circle at 50% 85%, color-mix(in srgb, var(--step-secondary) 20%, transparent), transparent 72%), #090e22ed;
  box-shadow: 0 0 5px color-mix(in srgb, var(--step-accent) 85%, transparent),
              0 0 18px color-mix(in srgb, var(--step-bloom) 48%, transparent),
              0 0 38px color-mix(in srgb, var(--step-bloom) 22%, transparent),
              inset 0 0 6px color-mix(in srgb, var(--step-accent) 32%, transparent),
              inset 0 0 22px color-mix(in srgb, var(--step-bloom) 18%, transparent);
}

.journey-step-icon {
  width: 62%;
  height: 62%;
  stroke-width: 2.2;
  filter: drop-shadow(0 0 3px var(--step-bloom))
          drop-shadow(0 0 8px color-mix(in srgb, var(--step-bloom) 45%, transparent));
}

.journey-step:not(:last-child)::after {
  content: '';
  position: absolute;
  left: calc(100% + var(--step-gap) / 2);
  top: calc(var(--step-orb-size) / 2);
  width: var(--step-connector-size);
  height: var(--step-connector-size);
  border-top: 3px solid #eedbff;
  border-right: 3px solid #eedbff;
  border-radius: 1px;
  transform: translate(-50%, -50%) rotate(45deg);
  filter: drop-shadow(0 0 3px var(--roamie-violet))
          drop-shadow(0 0 8px color-mix(in srgb, var(--step-bloom) 65%, transparent));
}

.journey-step-title {
  margin: 0;
  color: var(--roamie-ink);
  font: 650 var(--step-title-size)/1.25 var(--roamie-display);
  text-shadow: 0 2px 8px #090e22, 0 0 16px color-mix(in srgb, var(--step-bloom) 24%, transparent);
  text-wrap: balance;
}

.journey-step-copy {
  margin: 0;
  max-width: 18ch;
  color: color-mix(in srgb, var(--roamie-muted) 85%, white);
  font-size: max(.95rem, 16px);
  line-height: 1.5;
  text-wrap: balance;
}

.journey-steps--compact {
  --step-title-size: clamp(16px, 2vw, 18px);
  --step-connector-size: 13px;
  max-width: 560px;
  margin: var(--compact-steps-margin, 24px auto);
  padding: var(--compact-steps-padding, 12px 0 8px);
}

.journey-steps--compact .journey-step {
  --step-orb-size: clamp(48px, 17cqi, 72px);
  gap: 10px;
}

/* Respond to the component's available space, including narrow screens and zoom. */
@container (max-width: 360px) {
  .journey-step {
    --step-connector-size: 12px;
  }
}

@container (max-width: 260px) {
  .journey-step, .journey-steps--compact .journey-step {
    --step-orb-size: 72px;
    --step-connector-size: 10px;
    grid-column: 1 / -1;
  }

  .journey-step:not(:last-child)::after {
    left: 50%;
    top: calc(100% + var(--step-gap) / 2);
    transform: translate(-50%, -50%) rotate(135deg);
  }
}

@media (forced-colors: active) {
  .journey-step-orb {
    border-color: CanvasText;
    color: CanvasText;
    box-shadow: none;
  }

  .journey-step-title {
    text-shadow: none;
  }

  .journey-step-icon, .journey-step:not(:last-child)::after {
    filter: none;
  }

  .journey-step:not(:last-child)::after {
    border-color: CanvasText;
  }
}
