/* "How we run." — steps that scroll sideways while the section is pinned.
   js/how-we-run.js adds .is-hscroll on tablet and desktop. Without it (phones, reduced
   motion, or JS/GSAP not loaded) the steps sit in a normal grid. */

.hwr {
  background: #0A0A2A;
  color: #F5F5FA;
  overflow: hidden;
}

.hwr-inner {
  max-width: 1360px;
  margin: 0 auto;
  padding: 72px 24px;
}

.hwr-head {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-bottom: 56px;
}
.hwr-head h2 {
  margin: 0;
  font-size: clamp(30.6px, 3.91vw, 54.4px);
  line-height: 0.95;
  font-weight: 900;
  letter-spacing: -0.04em;
}
.hwr-head p {
  max-width: 64ch;
  margin: 0;
  font-size: 16.15px;
  line-height: 1.55;
  color: #C4C4DC;
}

.hwr-track {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 48px 32px;
}

.hwr-step {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Dot, then a line with an arrowhead running towards the next step. */
.hwr-rail {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}
.hwr-dot {
  flex: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #D4F76A;
}
.hwr-line {
  position: relative;
  flex: 1;
  height: 3px;
  background: #D4F76A;
}
.hwr-line::after {
  content: "";
  position: absolute;
  right: 0;
  top: 50%;
  width: 10px;
  height: 10px;
  border-top: 3px solid #D4F76A;
  border-right: 3px solid #D4F76A;
  transform: translate(1px, -50%) rotate(45deg);
}
.hwr-step:last-child .hwr-line { display: none; }

.hwr-num {
  font-size: 12.75px;
  font-weight: 800;
  color: #D4F76A;
}
.hwr-step h3 {
  margin: 0;
  font-size: 22.1px;
  line-height: 1.2;
  font-weight: 800;
  letter-spacing: -0.015em;
}
.hwr-step p {
  margin: 0;
  font-size: 15.3px;
  line-height: 1.55;
  color: #C4C4DC;
}

/* Horizontal mode */
.hwr.is-hscroll .hwr-track {
  display: flex;
  flex-wrap: nowrap;
  gap: 0;
  width: max-content;
}
.hwr.is-hscroll .hwr-step {
  width: clamp(300px, 30vw, 400px);
  padding-right: 48px;
  box-sizing: border-box;
}
/* The line runs on through the gap and stops just short of the next dot. */
.hwr.is-hscroll .hwr-rail { margin-right: -38px; }
.hwr.is-hscroll .hwr-step:last-child { padding-right: 0; }
.hwr.is-hscroll .hwr-step:last-child .hwr-rail { margin-right: 0; }

/* Phones: the steps stack vertically, so a right-pointing line would point at nothing.
   Keep the dot, drop the line. */
@media (max-width: 767px) {
  .hwr:not(.is-hscroll) .hwr-line { display: none; }
  .hwr:not(.is-hscroll) .hwr-rail { margin-bottom: 8px; }
}
