/* Project journey */

.process-steps.process-journey {
  position: relative;
  gap: 1.25rem 4rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: repeat(2, minmax(0, 1fr));
}

.process-journey li {
  position: relative;
  z-index: 1;
  min-height: 10.75rem;
  padding: 1.5rem;
  display: grid;
  grid-template-columns: 2.75rem minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
  border-color: #d8e0e7;
  border-radius: 1.1rem;
  box-shadow: 0 10px 28px rgb(7 23 38 / 7%);
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.process-journey li:nth-child(1) {
  grid-column: 1;
  grid-row: 1;
}

.process-journey li:nth-child(2) {
  grid-column: 2;
  grid-row: 1;
}

.process-journey li:nth-child(3) {
  grid-column: 2;
  grid-row: 2;
}

.process-journey li:nth-child(4) {
  grid-column: 1;
  grid-row: 2;
  border-color: rgb(227 34 45 / 34%);
  background: linear-gradient(135deg, #ffffff 0%, #fff7f7 100%);
}

.process-journey li::after {
  content: "";
  position: absolute;
  z-index: -1;
  background: #cbd5de;
}

.process-journey li:nth-child(1)::after,
.process-journey li:nth-child(3)::after {
  top: 50%;
  width: 4rem;
  height: 1px;
}

.process-journey li:nth-child(1)::after {
  left: 100%;
}

.process-journey li:nth-child(2)::after {
  top: 100%;
  left: 50%;
  width: 1px;
  height: 1.25rem;
}

.process-journey li:nth-child(3)::after {
  right: 100%;
}

.process-journey li:nth-child(4)::after {
  display: none;
}

.process-journey li > span {
  width: 2.75rem;
  height: 2.75rem;
  margin: 0;
  border: 1px solid rgb(227 34 45 / 22%);
  background: #fff4f5;
  font-family: Inter, sans-serif;
  font-size: 0;
  line-height: 1;
  transition: transform 180ms ease, background-color 180ms ease, color 180ms ease;
}

.process-journey li > span::before {
  width: 100%;
  height: 100%;
  content: "↓";
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  line-height: 1;
  text-align: center;
  transform: translateY(-0.04em);
}

.process-journey li:nth-child(4) > span {
  background: var(--red);
  color: #ffffff;
}

.process-journey li:nth-child(4) > span::before {
  content: "→";
}

.process-journey h3 {
  font-size: 1.15rem;
  line-height: 1.25;
}

.process-journey p {
  margin-top: 0.65rem;
  line-height: 1.55;
}

.journey-result {
  width: fit-content;
  margin-top: 0.9rem;
  padding: 0.35rem 0.55rem;
  display: block;
  border-radius: 999px;
  background: var(--red-soft);
  color: var(--red);
  font-family: "Roboto Mono", monospace;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

@media (hover: hover) {
  .process-journey li:hover {
    border-color: #b7c4cf;
    box-shadow: 0 16px 34px rgb(7 23 38 / 10%);
    transform: translateY(-2px);
  }

  .process-journey li:nth-child(1):hover > span,
  .process-journey li:nth-child(4):hover > span {
    transform: translateX(3px);
  }

  .process-journey li:nth-child(2):hover > span {
    transform: translateY(3px);
  }

  .process-journey li:nth-child(3):hover > span {
    transform: translateX(-3px);
  }
}

/* Evidence CTA: reliable contrast on light background */
.map-pair .image-button img {
  transform: scale(1.05);
  transform-origin: center;
}

.map-pair .image-button:hover img,
.map-pair .image-button:focus-visible img {
  transform: scale(1.075);
}

.evidence-section .evidence-copy .button-light {
  border-color: var(--navy-950);
  background: var(--navy-950);
  color: #ffffff;
  box-shadow: 0 8px 20px rgb(7 23 38 / 14%);
}

.evidence-section .evidence-copy .button-light:hover,
.evidence-section .evidence-copy .button-light:focus-visible {
  border-color: var(--red);
  background: var(--red);
  color: #ffffff;
  box-shadow: 0 12px 26px rgb(227 34 45 / 24%);
}

@media (max-width: 720px) {
  .process-steps.process-journey {
    gap: 1rem;
    grid-template-columns: 1fr;
    grid-template-rows: none;
  }

  .process-journey li,
  .process-journey li:nth-child(n) {
    min-height: 0;
    grid-column: 1;
    grid-row: auto;
  }

  .process-journey li:nth-child(n)::after {
    top: 100%;
    left: 2.875rem;
    right: auto;
    width: 1px;
    height: 1rem;
    display: block;
  }

  .process-journey li:nth-child(4)::after {
    display: none;
  }

}

@media (prefers-reduced-motion: reduce) {
  .process-journey li,
  .process-journey li > span {
    transition: none;
  }
}

/* Compact continuous route */
.process-steps.process-journey {
  gap: 0.85rem;
  grid-template-columns: 1fr;
  grid-template-rows: none;
}

.process-journey li,
.process-journey li:nth-child(n) {
  min-height: 0;
  padding: 1.2rem 1.3rem;
  grid-column: 1;
  grid-row: auto;
}

.process-journey li:nth-child(n)::after {
  top: 100%;
  left: 2.675rem;
  right: auto;
  width: 1px;
  height: 0.85rem;
  display: block;
  background: linear-gradient(180deg, #cbd5de, rgb(227 34 45 / 45%));
}

.process-journey li:nth-child(4)::after {
  display: none;
}

@media (hover: hover) {
  .process-journey li:nth-child(-n + 3):hover > span {
    transform: translateY(3px);
  }

  .process-journey li:nth-child(4):hover > span {
    transform: translateX(3px);
  }
}
