/* Scroll route (src/partials/route-scroll.html, markup made by the page generators): a loop of dot-matrix road on the
   right stays in view while the stages scroll past on the left; a minibus drives to each stage's stop and the road it
   has covered turns orange. Behaviour: assets/js/route-scroll.js. Everything reads fine without the script. */
.rs { padding: 110px 0 60px; background: #fff; font-family: "DM Sans", sans-serif; }
.rs__wrap { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.rs__head { max-width: 760px; margin: 0 auto 40px; text-align: center; }
.rs__head .ms-prose p { margin-left: auto; margin-right: auto; }
.rs__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 56px; }
.rs__aside { order: 2; }
.rs__sticky { position: sticky; top: calc(50vh - 220px); }
.rs__track { position: relative; width: 100%; aspect-ratio: 600 / 440; }
.rs__track svg { display: block; width: 100%; height: 100%; overflow: visible; }
.rs__road, .rs__trail { fill: none; stroke-width: 46; stroke-linejoin: round; }
.rs__trail { stroke-dasharray: 0 99999; }
.rs__start { stroke: #1A1A1A; stroke-width: 6; stroke-dasharray: 3 3; }
.rs__bus { filter: drop-shadow(0 4px 6px rgba(0, 0, 0, .25)); }

/* stop labels */
.rs__pill { position: absolute; transform: translate(-50%, -50%); display: inline-flex; align-items: center; gap: 7px; padding: 6px 12px; border-radius: 30px;
  background: #fff; border: 1px solid #e6ddd4; box-shadow: 0 4px 12px rgba(0, 0, 0, .06); white-space: nowrap;
  font: 600 13px/1 "Outfit", sans-serif; color: #9a8f86; transition: background-color .35s ease, color .35s ease, border-color .35s ease, box-shadow .35s ease; }
.rs__pill i { width: 7px; height: 7px; border-radius: 50%; background: #d4c8bc; transition: background-color .35s ease; }
.rs__pill.is-past { color: #1A1A1A; }
.rs__pill.is-past i { background: #1A1A1A; }
.rs__pill.is-on { background: #1A1A1A; border-color: #1A1A1A; color: #fff; box-shadow: 0 8px 20px rgba(0, 0, 0, .2); }
.rs__pill.is-on i { background: #EC7225; box-shadow: 0 0 0 3px rgba(236, 114, 37, .3); }

/* the read-out in the middle of the loop */
.rs__centre { position: absolute; inset: 26% 22%; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; pointer-events: none; }
.rs__centre b { font: 700 clamp(44px, 5vw, 68px)/1 "Outfit", sans-serif; color: #1A1A1A; letter-spacing: -1px; }
.rs__centre b::after { content: attr(data-rs-of); font-size: .34em; color: #b3a79c; margin-left: 4px; letter-spacing: 0; }
.rs__centre span { margin-top: 10px; font: 600 15px/1.35 "Outfit", sans-serif; color: #8D441F; max-width: 220px; }

/* stages */
.rs__stages { order: 1; margin: 0; padding: 0; list-style: none; }
.rs__stage { min-height: 58vh; display: flex; flex-direction: column; justify-content: center; margin: 0; padding: 20px 0; list-style: none; }
.rs__stage::before { content: none; }
.rs__stage:last-child { min-height: 46vh; }
.rs__num { display: block; margin-bottom: 14px; font: 700 15px/1 "Outfit", sans-serif; letter-spacing: 2px; color: #B9531A; }
.rs__title { margin: 0 0 14px; font: 700 clamp(28px, 3.2vw, 44px)/1.15 "Outfit", sans-serif; color: #080A0B; letter-spacing: -.4px; }
.rs__text { margin: 0; max-width: 460px; font-size: 18px; line-height: 1.65; color: #5e5e5e; }
.rs.is-ready .rs__title { color: #8a8a8a; transition: color .45s ease; }
.rs.is-ready .rs__stage.is-active .rs__title { color: #080A0B; }

@media (max-width: 900px) {
  .rs { padding: 76px 0 30px; }
  .rs__grid { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .rs__aside { order: 0; position: sticky; top: var(--rs-top, 0px); z-index: 5; margin: 0 -24px; padding: 14px 34px 10px; background: #fff;
    box-shadow: 0 10px 16px -12px rgba(0, 0, 0, .18); }
  .rs__sticky { position: static; }
  .rs__track { max-width: 340px; margin: 0 auto; }
  .rs__pill { padding: 4px 8px; font-size: 10.5px; gap: 5px; }
  /* phones: only the current stop's label shows on the road (the centre read-out names it too) */
  .rs.is-ready .rs__pill:not(.is-on) { padding: 0; width: 9px; height: 9px; font-size: 0; gap: 0; border: 0; box-shadow: none; background: transparent; }
  .rs.is-ready .rs__pill:not(.is-on) i { width: 7px; height: 7px; }
  .rs__pill i { width: 5px; height: 5px; }
  .rs__centre b { font-size: 36px; }
  .rs__centre span { font-size: 12.5px; margin-top: 6px; }
  .rs__stage { min-height: 44vh; }
  .rs__stage:last-child { min-height: 34vh; }
}
@media (max-width: 575px) {
  .rs__wrap { padding: 0 20px; }
  .rs__aside { margin: 0 -20px; padding: 10px 26px 6px; }
  .rs__title { font-size: 26px; }
  .rs__text { font-size: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  .rs__pill, .rs.is-ready .rs__title { transition: none; }
}
.rs__sub { margin: 18px 0 0; font: 700 13px/1 "DM Sans", sans-serif; letter-spacing: 1.6px; text-transform: uppercase; color: #8D441F; }
.rs__head .ms-prose p { color: #5e5e5e; }
