/* "Route to funding" scroll section on the home page. Behavior lives in /js/journey.js. */
.journey {
  --journey-progress: 0;
  position: relative;
  height: 420vh;
  background:
    radial-gradient(1200px 700px at 70% 30%, rgba(124, 58, 237, 0.35), transparent 60%),
    radial-gradient(900px 600px at 10% 90%, rgba(236, 72, 153, 0.22), transparent 60%),
    #0b0812;
  color: #fff;
}

.journey-stage {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(300px, 0.85fr) 1.4fr;
  gap: 2rem;
  align-items: center;
  padding: 7.75rem clamp(1.25rem, 4vw, 4rem) 5.5rem;
}

/* Navigation-app style status bar */
.journey-hud {
  position: absolute;
  bottom: 1.25rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.6rem 1rem 0.6rem 0.6rem;
  min-width: min(520px, calc(100vw - 2.5rem));
  border-radius: 999px;
  background: rgba(17, 12, 30, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(12px);
  z-index: 2;
}
.hud-icon {
  width: 38px; height: 38px; flex: 0 0 auto;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: linear-gradient(135deg, #EC4899, #7C3AED);
  font-size: 0.95rem;
}
.hud-text { display: flex; flex-direction: column; line-height: 1.15; min-width: 92px; }
.hud-label { font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.12em; color: rgba(255, 255, 255, 0.6); font-weight: 700; }
.hud-destination { font-size: 1rem; }
.hud-meter { flex: 1; height: 6px; border-radius: 999px; background: rgba(255, 255, 255, 0.12); overflow: hidden; }
.hud-meter-fill {
  height: 100%;
  width: calc(var(--journey-progress) * 100%);
  background: linear-gradient(90deg, #EC4899, #A855F7, #10B981);
  border-radius: inherit;
}
.hud-status { font-size: 0.82rem; font-weight: 700; color: rgba(255, 255, 255, 0.85); white-space: nowrap; min-width: 112px; text-align: right; }

/* Copy column */
.journey-copy { position: relative; z-index: 1; max-width: 460px; }
.journey-kicker {
  color: #34D399; font-weight: 800; text-transform: uppercase; letter-spacing: 0.14em; font-size: 0.82rem; margin-bottom: 0.75rem;
}
.journey-copy h2 {
  font-size: clamp(2rem, 3.6vw, 3.2rem); line-height: 1.05; letter-spacing: -0.04em; margin-bottom: 1.75rem;
}
.journey-copy h2 span {
  background: linear-gradient(90deg, #F472B6, #A78BFA, #34D399);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.journey-steps { list-style: none; display: grid; gap: 0.9rem; margin: 0 0 1.75rem; padding: 0; }
.journey-step {
  display: flex; gap: 0.9rem; align-items: flex-start;
  padding: 1rem 1.1rem;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  opacity: 0.35;
  transform: translateX(-12px);
  transition: opacity 0.45s ease, transform 0.45s ease, background 0.45s ease, border-color 0.45s ease;
}
.journey-step h3 { font-size: 1.05rem; margin-bottom: 0.2rem; }
.journey-step p { font-size: 0.92rem; color: rgba(255, 255, 255, 0.72); margin: 0; }
.step-num {
  width: 32px; height: 32px; flex: 0 0 auto;
  display: flex; align-items: center; justify-content: center;
  border-radius: 10px;
  font-weight: 900; font-size: 0.9rem;
  background: rgba(255, 255, 255, 0.1);
  transition: background 0.45s ease;
}
.journey-step.reached { opacity: 0.75; transform: none; }
.journey-step.reached .step-num { background: #10B981; }
.journey-step.active {
  opacity: 1; transform: none;
  background: rgba(124, 58, 237, 0.18);
  border-color: rgba(168, 85, 247, 0.55);
}
.journey-step.active .step-num { background: linear-gradient(135deg, #EC4899, #7C3AED); }

.journey-cta {
  display: inline-flex; align-items: center; gap: 0.6rem;
  padding: 0.95rem 1.5rem;
  border-radius: 14px;
  background: linear-gradient(135deg, #10B981, #059669);
  color: #fff; font-weight: 800; text-decoration: none;
  box-shadow: 0 12px 30px rgba(16, 185, 129, 0.3);
  opacity: 0.55;
  transition: opacity 0.4s ease, transform 0.25s ease;
}
.journey-cta:hover { transform: translateY(-2px); }
.journey.arrived .journey-cta { opacity: 1; }

/* Map column */
.journey-map { position: relative; width: 100%; height: min(72vh, 640px); }
.journey-svg { width: 100%; height: 100%; overflow: visible; }
.route-glow { transition: none; }
.milestone-ring { fill: #0b0812; stroke: rgba(255, 255, 255, 0.35); stroke-width: 4; transition: stroke 0.4s ease, fill 0.4s ease; }
.milestone-dot { fill: rgba(255, 255, 255, 0.35); transition: fill 0.4s ease; }
.milestone-label { fill: rgba(255, 255, 255, 0.6); font: 800 22px Inter, Arial, sans-serif; letter-spacing: 0.02em; transition: fill 0.4s ease; }
.milestone.reached .milestone-ring { stroke: #10B981; fill: #052e22; }
.milestone.reached .milestone-dot { fill: #34D399; }
.milestone.reached .milestone-label { fill: #fff; }
.pin-pulse { fill: rgba(236, 72, 153, 0.35); transform-box: fill-box; transform-origin: center; animation: journey-pulse 1.8s ease-out infinite; }
.pin-body { filter: drop-shadow(0 10px 18px rgba(236, 72, 153, 0.45)); }
@keyframes journey-pulse {
  0% { transform: scale(0.6); opacity: 0.9; }
  100% { transform: scale(2.4); opacity: 0; }
}

.journey-arrived {
  position: absolute; left: 50%; top: 0;
  transform: translate(-50%, -16px);
  padding: 0.7rem 1.2rem;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.16);
  border: 1px solid rgba(52, 211, 153, 0.6);
  color: #A7F3D0; font-weight: 800;
  opacity: 0;
  transition: opacity 0.5s ease, transform 0.5s ease;
  white-space: nowrap;
}
.journey.arrived .journey-arrived { opacity: 1; transform: translate(-50%, 0); }

/* Hero gently recedes as the visitor scrolls into the journey */
.hero-scroll { will-change: transform, opacity; }

/* Phones and narrow tablets: map on top, steps below, vertical route */
@media (max-width: 900px) {
  .journey { height: 380vh; }
  .journey-stage {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr auto;
    align-items: start;
    gap: 0.5rem;
    padding: 6.75rem 1rem 4.5rem;
  }
  .journey-copy { order: 2; max-width: none; }
  .journey-copy h2 { font-size: 1.6rem; margin-bottom: 0.75rem; }
  .journey-kicker { margin-bottom: 0.35rem; font-size: 0.72rem; }
  .journey-map { order: 1; height: 38vh; }
  .journey-steps { gap: 0; margin-bottom: 0.75rem; position: relative; min-height: 150px; }
  .journey-step p { font-size: 0.88rem; }
  .journey-step { position: absolute; inset: 0 0 auto 0; opacity: 0; transform: translateY(10px); }
  .journey-step.active { opacity: 1; transform: none; }
  .journey-step.reached:not(.active) { opacity: 0; }
  .journey-cta { padding: 0.8rem 1.2rem; }
  .hud-status { display: none; }
  .journey-hud { left: 1rem; transform: none; min-width: 0; width: calc(100vw - 6.5rem); bottom: 0.75rem; padding-right: 0.8rem; }
  .milestone-label { font-size: 26px; }
}

/* Visitors who prefer less motion get the finished route, no pinning */
@media (prefers-reduced-motion: reduce) {
  .journey { height: auto; }
  .journey-stage { position: relative; height: auto; min-height: 100vh; }
  .journey-step, .journey-cta { opacity: 1; transform: none; transition: none; }
  .pin-pulse { animation: none; }
  .journey-steps { position: static; min-height: 0; gap: 0.9rem; }
  .journey-step { position: static; }
}

/* Soft hand-off from the purple hero into the dark map */
.journey::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 160px;
  background: linear-gradient(180deg, #764ba2 0%, rgba(118, 75, 162, 0) 100%);
  pointer-events: none;
  z-index: 0;
}
.journey-stage { z-index: 1; }
