/* Roadmap page. Builds on site.css (tokens, nav, buttons, footer); everything here is roadmap-only.
   Layout: a timeline down the middle; major features on the left, smaller ones on the right; each card
   pops in from its side as it scrolls into view. Phones: one column with the rail on the left. */

.rm-hero { position: relative; padding: calc(var(--nav-h) + clamp(48px, 8vw, 96px)) 0 clamp(28px, 4vw, 48px); overflow: clip; text-align: center; }
.rm-hero .hero-bg { opacity: .85; }
.rm-hero .wrap { position: relative; }
.rm-hero h1 { font-size: clamp(2.4rem, 6vw, 4.4rem); font-weight: 760; letter-spacing: -0.035em; margin: 14px auto 18px; max-width: 16ch; text-wrap: balance; }
.rm-hero h1 em:not(.shine) { font-style: normal; background: var(--prism-line); -webkit-background-clip: text; background-clip: text; color: transparent; }
.rm-hero .lede { margin: 0 auto; }
.rm-meta { margin-top: 16px; font-size: 0.88rem; color: var(--faint); }

/* Legend: what each mark means */
.legend { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 22px; margin-top: 26px; }
.legend > span { display: inline-flex; align-items: center; gap: 8px; font-size: 0.9rem; color: var(--muted); }

/* Status marks */
.st { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; flex: none; }
.st svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.st.done { background: var(--green-soft); color: var(--green-ink); }
.st.now { background: color-mix(in srgb, var(--info) 14%, var(--surface)); color: var(--info); }
.st.now svg { animation: rm-spin 6s linear infinite; }
.st.next { background: var(--surface-3); color: var(--muted); }
.st.later { background: transparent; color: var(--faint); border: 1.5px dashed var(--border-strong); }
.st.idea { background: color-mix(in srgb, var(--wait) 14%, var(--surface)); color: color-mix(in srgb, var(--wait) 75%, var(--text)); }
@keyframes rm-spin { to { transform: rotate(360deg); } }
.badge-new { display: inline-flex; flex: none; align-items: center; gap: 5px; padding: 3px 9px 3px 7px; border-radius: 999px; font-size: 0.72rem; font-weight: 750; letter-spacing: .06em; text-transform: uppercase; color: white; background: var(--prism-line); }
.badge-new svg { width: 12px; height: 12px; fill: currentColor; }
.badge-major { display: inline-flex; flex: none; align-items: center; gap: 5px; font-size: 0.72rem; font-weight: 750; letter-spacing: .06em; text-transform: uppercase; color: var(--purple); }
.badge-major svg { width: 13px; height: 13px; fill: currentColor; }

/* Tags: every tag its own colour, all derived from the theme tokens */
.tag { --c: var(--muted); font-size: 0.75rem; font-weight: 650; padding: 3px 10px; border-radius: 999px; color: var(--c);
  background: color-mix(in srgb, var(--c) 13%, var(--surface)); border: 1px solid color-mix(in srgb, var(--c) 28%, transparent); }
.tag.t-ai { --c: var(--purple); }
.tag.t-modelling { --c: var(--green-ink); }
.tag.t-data { --c: var(--violet); }
.tag.t-results { --c: var(--info); }
.tag.t-reports { --c: var(--wait); }
.tag.t-platform { --c: var(--navy); }
.tag.t-learning { --c: var(--ok); }

/* Timeline */
.rm-body { position: relative; padding: clamp(32px, 5vw, 56px) 0 var(--sec-y); overflow-x: clip; } /* cards waiting to pop in sit off to the side */
.timeline { position: relative; }
.rail { position: absolute; left: 50%; top: 0; bottom: 0; width: 3px; margin-left: -1.5px; border-radius: 3px; background: var(--border); overflow: hidden; }
.rail i { position: absolute; left: 0; top: 0; width: 100%; height: var(--fill, 0%); background: linear-gradient(to bottom, var(--green), var(--info) 45%, var(--violet) 75%, var(--purple)); border-radius: 3px; }
.lanes-head { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 112px; margin-bottom: 30px; }
.lanes-head span { font-size: 0.8rem; font-weight: 750; letter-spacing: .14em; text-transform: uppercase; color: var(--faint); }
.lanes-head span:first-child { text-align: right; }

.phase { position: relative; margin-bottom: clamp(56px, 8vw, 104px); }
.phase-head { position: relative; display: grid; justify-items: center; gap: 6px; text-align: center; margin: 0 auto 34px; max-width: 520px; padding: 18px 22px; border-radius: 20px; background: var(--bg); }
.phase-dot { width: 30px; height: 30px; border-radius: 50%; background: var(--surface); border: 3px solid var(--border-strong); box-shadow: 0 0 0 7px var(--bg); transition: border-color .4s ease, background .4s ease, transform .4s ease; margin-bottom: 6px; }
.phase.reached .phase-dot { border-color: var(--green); background: var(--green-soft); transform: scale(1.08); }
.phase-head h2 { font-size: clamp(1.8rem, 3.6vw, 2.6rem); font-weight: 760; }
.phase-head p { color: var(--muted); font-size: 1rem; }
.phase-head .when { font-size: 0.82rem; font-weight: 700; color: var(--faint); letter-spacing: .08em; text-transform: uppercase; }

.lanes { display: grid; grid-template-columns: 1fr 1fr; gap: 112px; align-items: start; }
.lane { display: grid; gap: 18px; }
.lane-empty { font-size: 0.9rem; color: var(--faint); text-align: right; padding: 12px 0; }

.item { position: relative; display: flex; flex-direction: column; gap: 10px; padding: 20px 22px; border-radius: 18px; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow); }
.item-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.item-top .status { font-size: 0.8rem; font-weight: 650; color: var(--muted); }
.item-top .right { margin-left: auto; display: inline-flex; gap: 8px; align-items: center; }
.item h3 { font-size: 1.15rem; line-height: 1.25; }
.item p { color: var(--muted); font-size: 0.95rem; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; padding-top: 4px; }
.date { font-size: 0.8rem; color: var(--faint); font-variant-numeric: tabular-nums; }

/* Connector from each card to the rail: a short line and a dot on the rail */
.item::before, .item::after { content: ""; position: absolute; top: 30px; }
.item::before { width: 52px; height: 2px; background: var(--border-strong); }
.item::after { width: 12px; height: 12px; border-radius: 50%; background: var(--surface); border: 2px solid var(--border-strong); margin-top: -5px; }
.lane.major .item::before { right: -53px; }
.lane.major .item::after { right: -63px; }
.lane.minor .item::before { left: -53px; }
.lane.minor .item::after { left: -63px; }
.item.in::after { border-color: var(--green); }

/* Major features: a prism-gradient frame and a soft glow */
.item.major { border: 1.5px solid transparent; padding: 26px 28px;
  background: linear-gradient(var(--surface), var(--surface)) padding-box, var(--prism-line) border-box;
  box-shadow: 0 18px 50px -22px color-mix(in srgb, var(--purple) 45%, transparent); }
.item.major h3 { font-size: 1.42rem; }
.item.major p { font-size: 1rem; }
.item.major::after { width: 16px; height: 16px; margin-top: -7px; border-color: var(--purple); }
.lane.major .item.major::after { right: -65px; }

/* Shipped items read a little quieter */
.phase.shipped .item:not(.major) { background: color-mix(in srgb, var(--surface) 70%, var(--bg)); box-shadow: none; }

/* Pop-in: cards start a little off to their side and spring into place once they scroll into view. */
html:not(.no-js) .item.pop { opacity: 0; transform: translateX(var(--from, 0)) scale(.94); }
.lane.major .item.pop { --from: -48px; }
.lane.minor .item.pop { --from: 48px; }
.item.pop { transition: opacity .55s ease, transform .7s cubic-bezier(.2, 1.35, .35, 1), box-shadow .25s ease; }
html:not(.no-js) .item.pop.in { opacity: 1; transform: none; }
.item.pop.in:hover { transform: translateY(-3px); box-shadow: var(--card-shadow); }

.rm-cta { position: relative; margin: 12px auto 0; max-width: 760px; display: flex; flex-wrap: wrap; gap: 14px; align-items: center; justify-content: space-between; padding: 26px 28px; border-radius: 22px; background: var(--surface); border: 1px solid var(--border); }
.rm-cta h3 { font-size: 1.3rem; }
.rm-cta p { color: var(--muted); }

.nav-links a[aria-current="page"] { color: var(--text); }

@media (max-width: 900px) {
  .rail { left: 14px; margin-left: 0; }
  .lanes-head { display: none; }
  .phase-head { justify-items: start; text-align: left; margin: 0 0 24px; padding: 0 0 0 44px; background: none; max-width: none; }
  .phase-dot { position: absolute; left: 1px; top: 2px; margin: 0; }
  .lanes { grid-template-columns: 1fr; gap: 18px; padding-left: 44px; }
  .lane-empty { display: none; }
  .item::before { display: none; }
  .lane.major .item::after, .lane.minor .item::after, .lane.major .item.major::after { left: -37px; right: auto; }
  .lane.major .item.pop, .lane.minor .item.pop { --from: 32px; }
}
@media (prefers-reduced-motion: reduce) {
  .st.now svg { animation: none; }
  html:not(.no-js) .item.pop { opacity: 1; transform: none; transition: none; }
}
