/* ============================================================
   Journey — horizontal auto-moving glassmorphism timeline track
   Renders from window.roadmapData via assets/journey.js
   ============================================================ */
.jr-section {
  position: relative;
  overflow: hidden;
  padding: 46px 0 50px;
  margin: 44px 0;
  /* light strip above (hero) and below (footer) */
  --jr-cyan: #21d4fd;
}

/* ---------- complex mesh-gradient background (brand palette) ---------- */
.jr-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  background-color: #081226;
  background-image:
    radial-gradient(58% 55% at 16% 18%, rgba(42, 98, 188, .60), transparent 70%),
    radial-gradient(50% 50% at 84% 10%, rgba(33, 212, 253, .40), transparent 70%),
    radial-gradient(55% 60% at 80% 84%, rgba(253, 126, 20, .32), transparent 72%),
    radial-gradient(62% 66% at 26% 90%, rgba(18, 65, 126, .68), transparent 72%),
    radial-gradient(46% 52% at 54% 46%, rgba(67, 56, 202, .34), transparent 76%),
    radial-gradient(40% 46% at 97% 56%, rgba(33, 255, 192, .18), transparent 70%),
    linear-gradient(180deg, #0a1730 0%, #0b1b38 50%, #081226 100%);
}

/* slow living drift over the mesh, in the same palette */
.jr-bg::before {
  content: "";
  position: absolute;
  inset: -15%;
  pointer-events: none;
  background-image:
    radial-gradient(38% 42% at 30% 30%, rgba(33, 212, 253, .22), transparent 70%),
    radial-gradient(42% 46% at 72% 64%, rgba(91, 63, 176, .26), transparent 72%),
    radial-gradient(36% 40% at 60% 22%, rgba(253, 126, 20, .16), transparent 72%);
  mix-blend-mode: screen;
  animation: jrMesh 24s ease-in-out infinite alternate;
}

@keyframes jrMesh {
  0% {
    transform: translate(0, 0) scale(1);
  }

  50% {
    transform: translate(3%, -2.5%) scale(1.08);
  }

  100% {
    transform: translate(-2.5%, 2%) scale(1.04);
  }
}

/* merged illustration — faint line-art sitting along the bottom edge */
.jr-bg__art {
  position: absolute;
  inset: 0;
  z-index: 1;
  background-image: url("../static/icmr/dist/images/journey-art.png");
  background-repeat: no-repeat;
  background-position: center bottom;
  background-size: 100% auto;
  opacity: .06;
  mix-blend-mode: screen;
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 55%, #000 100%);
  mask-image: linear-gradient(180deg, transparent 0%, #000 55%, #000 100%);
}

.jr-bg__glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: .32;
  animation: jrDrift 26s ease-in-out infinite;
}

.jr-bg__glow--1 {
  width: 480px;
  height: 480px;
  top: -140px;
  left: -120px;
  background: radial-gradient(circle, rgba(33, 212, 253, .30), transparent 70%);
}

.jr-bg__glow--2 {
  width: 420px;
  height: 420px;
  bottom: -160px;
  right: -100px;
  background: radial-gradient(circle, rgba(253, 126, 20, .22), transparent 70%);
  animation-delay: -12s;
}

@keyframes jrDrift {

  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }

  50% {
    transform: translate(40px, -26px) scale(1.07);
  }
}

.jr-section .st-wrap {
  position: relative;
  z-index: 3;
}

.jr-section .st-eyebrow {
  color: var(--jr-cyan);
}

.jr-section .st-h2 {
  color: #fff;
}

.jr-section .st-lead {
  color: rgba(255, 255, 255, .7);
  text-align: center;
  margin-left: auto;
  margin-right: auto;
}

.jr-heading {
  text-align: center;
  margin: 0 auto 14px;
}

/* ---------- viewport + track ---------- */
.jr-viewport {
  position: relative;
  z-index: 3;
  width: 100%;
  overflow: hidden;
  padding: 32px 0 20px;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}

.jr-track {
  position: relative;
  display: flex;
  align-items: center;
  gap: 84px;
  width: max-content;
  padding: 30px 60px;
  will-change: transform;
  /* Offset fed at runtime via the --jr-x custom property (set by journey.js). */
  transform: translate3d(var(--jr-x, 0), 0, 0);
}

/* ---------- glassmorphism placards ---------- */
.jr-card {
  position: relative;
  z-index: 1;
  flex: 0 0 auto;
  width: 300px;
  height: 320px;
  display: flex;
  flex-direction: column;
  padding: 24px 24px 22px;
  border-radius: 20px;
  background: rgba(20, 35, 65, .28);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  border: 1px solid rgba(255, 255, 255, .18);
  box-shadow: 0 20px 50px rgba(0, 0, 0, .2);
  opacity: .6;
  scroll-snap-align: center;
  transition: opacity .5s var(--st-ease, ease), transform .5s var(--st-ease, ease),
    box-shadow .5s var(--st-ease, ease), border-color .5s var(--st-ease, ease);
}

.jr-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 20px;
  pointer-events: none;
  background: linear-gradient(160deg, rgba(255, 255, 255, .10), rgba(255, 255, 255, 0) 40%);
}

.jr-card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.jr-card__icon {
  width: 46px;
  height: 46px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, rgba(33, 212, 253, .35), rgba(18, 65, 126, .5));
  border: 1px solid rgba(255, 255, 255, .2);
  transition: transform .5s var(--st-ease, ease);
}

.jr-card__icon [data-lucide] {
  width: 22px;
  height: 22px;
}

.jr-card__phase {
  font-family: "Poppins", sans-serif;
  font-size: .68rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--jr-cyan);
  padding: 5px 11px;
  border-radius: 999px;
  background: rgba(33, 212, 253, .12);
  border: 1px solid rgba(33, 212, 253, .3);
}

.jr-section .jr-card__title {
  font-family: "Poppins", sans-serif;
  font-size: 1.18rem;
  font-weight: 700;
  color: #fff;
  margin: 0 0 8px;
  line-height: 1.2;
  letter-spacing: -.01em;
}

.jr-card__subtitle {
  font-size: .82rem;
  font-weight: 600;
  color: var(--jr-cyan);
  margin: 0 0 12px;
  line-height: 1.35;
}

.jr-card__desc {
  font-size: .85rem;
  line-height: 1.55;
  color: rgba(255, 255, 255, .72);
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.jr-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: auto;
  padding-top: 14px;
}

.jr-card__tag {
  font-size: .68rem;
  font-weight: 600;
  color: rgba(255, 255, 255, .78);
  padding: 4px 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(255, 255, 255, .12);
}

.jr-card__dot {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.jr-card[data-status="completed"] .jr-card__dot {
  background: #21ffc0;
  box-shadow: 0 0 8px #21ffc0;
}

.jr-card[data-status="in-progress"] .jr-card__dot {
  background: #fd7e14;
  box-shadow: 0 0 8px #fd7e14;
}

.jr-card[data-status="upcoming"] .jr-card__dot {
  background: rgba(255, 255, 255, .4);
}

/* active (nearest viewport centre) — premium lift + glow */
.jr-card.is-active {
  opacity: 1;
  transform: translateY(-12px) scale(1.04) perspective(900px) rotateX(2deg);
  border-color: rgba(33, 212, 253, .55);
  box-shadow: 0 26px 60px rgba(0, 0, 0, .35), 0 0 0 1px rgba(33, 212, 253, .25), 0 0 40px rgba(33, 212, 253, .25);
}

.jr-card.is-active .jr-card__icon {
  transform: rotate(-8deg) scale(1.08);
}

/* hover */
.jr-card:hover {
  opacity: 1;
  transform: translateY(-12px) scale(1.04) perspective(900px) rotateX(2deg);
  border-color: rgba(33, 212, 253, .6);
  box-shadow: 0 28px 64px rgba(0, 0, 0, .4), 0 0 44px rgba(33, 212, 253, .3);
}

.jr-card:hover .jr-card__icon {
  transform: rotate(-8deg) scale(1.1);
}

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .jr-track {
    gap: 60px;
    padding: 30px 40px;
  }

  .jr-card {
    width: 268px;
    height: 320px;
  }
}

@media (max-width: 700px) {

  /* mobile: no autoplay — natural swipe with scroll-snap */
  .jr-viewport {
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    -webkit-mask-image: none;
    mask-image: none;
    -ms-overflow-style: none;
    scrollbar-width: none;
  }

  .jr-viewport::-webkit-scrollbar {
    display: none;
  }

  .jr-track {
    gap: 44px;
    padding: 30px 24px;
    transform: none !important;
  }

  .jr-card {
    width: 80vw;
    max-width: 320px;
    opacity: 1;
  }
}

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