/* Project Launch Process (roadmap) section (/web-development).
   Sits between #built-solution and #growth-formula. A sticky intro card on the
   left, a vertical list of 8 stages on the right joined by connector lines.
   Decorative glass stage icons float to the right of each stage. */

#roadmap {
  overflow-x: clip;
}

#roadmap .rm-layout {
  display: grid;
  grid-template-columns: minmax(0, 500px) minmax(0, 746px);
  justify-content: center;
  align-items: center;
  gap: 40px;
  max-width: 1300px;
  margin: 0 auto;
  width: 100%;
}

/* ---------- Left: intro card (centred next to the scrolling stages) ---------- */

#roadmap .rm-aside {
  align-self: center;
}

#roadmap .rm-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 694px;
  border-radius: 70px;
  background: rgba(255, 255, 255, 0.03);
  box-shadow: 0 18px 79.5px rgba(0, 0, 0, 0.35);
  overflow: hidden;
}

#roadmap .rm-card__art {
  position: relative;
  flex: 0 0 auto;
  height: 420px;
  /* Keep the artwork strictly inside its own block at the top of the card so
     it can never bleed over the title/copy below it. */
  overflow: hidden;
}

#roadmap .rm-card__art img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center top;
}

/* Abstraction video that replaces the ink-stain artwork. It fills the art
   block, and every edge is feathered to transparency so the rectangular clip
   dissolves into the card — no visible seam where it meets the background or
   the title beneath it. */
#roadmap .rm-card__video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  -webkit-mask-image:
    linear-gradient(to bottom, transparent 0%, #000 16%, #000 60%, transparent 100%),
    linear-gradient(to right, transparent 0%, #000 12%, #000 88%, transparent 100%);
  -webkit-mask-composite: source-in;
  mask-image:
    linear-gradient(to bottom, transparent 0%, #000 16%, #000 60%, transparent 100%),
    linear-gradient(to right, transparent 0%, #000 12%, #000 88%, transparent 100%);
  mask-composite: intersect;
}

#roadmap .rm-card__body {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 0 31px 40px;
  text-align: center;
}

#roadmap .rm-card__title {
  font-weight: 600;
  font-size: 44px;
  line-height: 1.05;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.85), 0 1px 4px rgba(0, 0, 0, 0.7);
}

#roadmap .rm-card__copy {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 458px;
}

#roadmap .rm-card__lead {
  font-weight: 500;
  font-size: 20px;
  line-height: 1.25;
}

#roadmap .rm-card__sub {
  font-weight: 400;
  font-size: 16px;
  line-height: 1.4;
  opacity: 0.5;
}

#roadmap .rm-btn {
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 211px;
  height: 48px;
  padding: 0 24px;
  border-radius: 999px;
  background: #57a6fb;
  color: #fff;
  font-weight: 500;
  font-size: 14px;
  text-transform: uppercase;
  text-decoration: none;
  box-shadow: 0 0 2px rgba(0, 0, 0, 0.1), 0 1px 8px rgba(0, 0, 0, 0.12);
  transition: filter 0.2s ease, transform 0.2s ease;
}

#roadmap .rm-btn:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
}

/* ---------- Right: stages ---------- */

#roadmap .rm-stages {
  position: relative;
  overflow-x: clip;
}

/* Desktop: keep the whole roadmap in one screen-height section — show ~1.5
   stages and scroll the remaining ones inside this panel. */
@media (min-width: 901px) {
  #roadmap .rm-stages {
    height: clamp(560px, 80vh, 860px);
    overflow-y: auto;
    padding-right: 12px;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.28) transparent;
    -webkit-mask-image: linear-gradient(to bottom, #000 88%, transparent 100%);
    mask-image: linear-gradient(to bottom, #000 88%, transparent 100%);
  }

  #roadmap .rm-stages::-webkit-scrollbar {
    width: 6px;
  }

  #roadmap .rm-stages::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.22);
    border-radius: 3px;
  }

  #roadmap .rm-stages::-webkit-scrollbar-track {
    background: transparent;
  }
}

#roadmap .rm-stage {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 40px;
  padding: 24px;
}

#roadmap .rm-stage__head {
  display: flex;
  flex-direction: column;
  color: #fff;
}

#roadmap .rm-stage__label {
  font-weight: 400;
  font-size: 20px;
}

#roadmap .rm-stage__num {
  font-weight: 300;
  font-size: 96px;
  line-height: 1;
}

#roadmap .rm-stage__text {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 653px;
}

#roadmap .rm-stage__text h3 {
  font-weight: 600;
  font-size: 32px;
  line-height: 1.1;
}

#roadmap .rm-stage__text p {
  font-weight: 400;
  font-size: 24px;
  line-height: 1.25;
  opacity: 0.5;
}

/* Decorative glass icon, floats to the right and bleeds off the edge */
#roadmap .rm-stage__icon {
  position: absolute;
  right: -40px;
  top: 30%;
  transform: translateY(-50%);
  width: 460px;
  max-width: 60%;
  pointer-events: none;
  z-index: -1;
}

#roadmap .rm-stage__icon img {
  width: 100%;
  height: auto;
  display: block;
  /* icons render as luminous glass on a black plate — screen drops the black */
  mix-blend-mode: screen;
}

#roadmap .rm-stage__icon .rm-stage__glow {
  position: absolute;
  inset: 0;
  filter: blur(34px);
  opacity: 0.55;
}

/* Connector line between stages */
#roadmap .rm-connector {
  position: relative;
  height: 200px;
}

#roadmap .rm-connector span {
  position: absolute;
  left: 56px;
  top: 0;
  bottom: 0;
  width: 1px;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.3) 22%,
    rgba(255, 255, 255, 0.3) 78%,
    rgba(255, 255, 255, 0) 100%
  );
}

/* ---------- Tablet ---------- */

@media (max-width: 1100px) {
  #roadmap .rm-layout {
    grid-template-columns: minmax(0, 420px) minmax(0, 1fr);
    gap: 24px;
  }
  #roadmap .rm-stage__icon {
    width: 360px;
    opacity: 0.6;
  }
}

/* ---------- Mobile ---------- */

@media (max-width: 900px) {
  #roadmap .rm-layout {
    grid-template-columns: 1fr;
    gap: 48px;
    max-width: 520px;
  }

  #roadmap .rm-aside {
    position: static;
    top: auto;
  }

  #roadmap .rm-card {
    height: auto;
    border-radius: 40px;
  }

  #roadmap .rm-card__art {
    height: 340px;
  }

  #roadmap .rm-card__body {
    padding: 0 24px 32px;
  }

  #roadmap .rm-card__title {
    font-size: 32px;
  }

  #roadmap .rm-card__lead {
    font-size: 18px;
  }

  #roadmap .rm-btn {
    margin-top: 24px;
  }

  #roadmap .rm-stage {
    gap: 24px;
    padding: 16px 8px;
  }

  #roadmap .rm-stage__label {
    font-size: 16px;
  }

  #roadmap .rm-stage__num {
    font-size: 64px;
  }

  #roadmap .rm-stage__text h3 {
    font-size: 24px;
  }

  #roadmap .rm-stage__text p {
    font-size: 16px;
  }

  #roadmap .rm-stage__icon {
    width: 220px;
    right: -20px;
    top: 0%;
    transform: none;
    opacity: 0.45;
  }

  #roadmap .rm-connector {
    height: 120px;
  }

  #roadmap .rm-connector span {
    left: 36px;
  }
}
