/* v3 section: how_to_start. Figma desktop 11001:2509, mobile 11295:10724. */

.v3-how-to-start {
  --hts-line: repeating-linear-gradient(to bottom, var(--v3-gray-50) 0 3px, transparent 3px 5px);
  --hts-gap: 99px;                 /* space between two steps */
  --hts-circle: 80px;
  background: var(--v3-bg-gray);
  isolation: isolate;
}
.v3-how-to-start::before {         /* paper noise, 4% */
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: url("../../../images/v3/hero/noise.webp") 0 0 / 256px;
  opacity: 0.04;
  pointer-events: none;
}
.v3-how-to-start__vlines {
  position: absolute;
  inset: 0 50%;
  z-index: -1;
  width: min(100%, 1440px);
  transform: translateX(-50%);
  pointer-events: none;
}
.v3-how-to-start__vlines span { position: absolute; top: 0; bottom: 0; width: 1px; background: var(--hts-line); }
.v3-how-to-start__vlines span:nth-child(1) { left: 3.472%; }
.v3-how-to-start__vlines span:nth-child(2) { left: 26.94%; }
.v3-how-to-start__vlines span:nth-child(3) { left: 50%; }
.v3-how-to-start__vlines span:nth-child(4) { left: 73.06%; }
.v3-how-to-start__vlines span:nth-child(5) { left: 96.528%; }

/* ---- header ---- */
.v3-how-to-start__header {
  display: grid;
  grid-template-columns: 320px minmax(0, 652px);
  column-gap: 12px;
  align-items: start;
}
.v3-how-to-start__label {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 28px;
  font-size: var(--v3-fs-caption);
  font-weight: 700;
  line-height: var(--v3-lh-tight);
  text-transform: uppercase;
}
.v3-how-to-start__label::before { content: ""; flex: none; width: 8px; height: 8px; background: var(--v3-primary); }
.v3-how-to-start__title { grid-column: 2; grid-row: 1; color: var(--v3-dark); }
.v3-how-to-start__muted { color: var(--v3-gray-200); }

/* ---- steps ---- */
.v3-how-to-start__track { padding: 80px 0 0 332px; }
.v3-how-to-start__steps { max-width: 652px; }
.v3-how-to-start__step {
  position: relative;
  display: grid;
  grid-template-columns: var(--hts-circle) minmax(0, 1fr);
  column-gap: 40px;
  align-items: start;
  min-height: var(--hts-circle);
  transition: opacity 0.4s ease;
}
.v3-how-to-start__step:not(:last-child) { margin-bottom: var(--hts-gap); }
.v3-how-to-start__num {
  display: grid;
  place-items: center;
  width: var(--hts-circle);
  height: var(--hts-circle);
  border: 1px solid var(--v3-primary);
  border-radius: 50%;
  background: var(--v3-primary);
  color: var(--v3-white);
  font-size: var(--v3-fs-h3);
  font-weight: 700;
  line-height: var(--v3-lh-tight);
  transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}
.v3-how-to-start__body { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.v3-how-to-start__step-title { color: var(--v3-dark); }
.v3-how-to-start__step-text { color: var(--v3-gray-200); }
.v3-how-to-start__step-text--short { display: none; }

/* connector between circles: grey track + teal fill (scaleY via --fill) */
.v3-how-to-start__step:not(:last-child)::before,
.v3-how-to-start__step:not(:last-child)::after {
  content: "";
  position: absolute;
  top: var(--hts-circle);
  left: calc(var(--hts-circle) / 2);
  height: calc(100% - var(--hts-circle) + var(--hts-gap));
}
.v3-how-to-start__step:not(:last-child)::before { width: 1px; background: var(--v3-gray-100); transform: translateX(-50%); }
.v3-how-to-start__step:not(:last-child)::after {
  width: 3px;
  background: var(--v3-primary);
  transform: translateX(-50%) scaleY(var(--fill, 1));
  transform-origin: top;
}

/* ---- animated modes (set by JS on the section: data-mode="pin|reveal") ---- */
.v3-how-to-start[data-mode] .v3-how-to-start__step { --fill: 0; opacity: 0.4; }
.v3-how-to-start[data-mode] .v3-how-to-start__step.is-next { opacity: 0.7; }
.v3-how-to-start[data-mode] .v3-how-to-start__step.is-reached { opacity: 1; }
.v3-how-to-start[data-mode] .v3-how-to-start__num { border-color: var(--v3-gray-100); background: transparent; color: var(--v3-dark); }
.v3-how-to-start[data-mode] .v3-how-to-start__step.is-reached .v3-how-to-start__num { border-color: var(--v3-primary); background: var(--v3-primary); color: var(--v3-white); }
.v3-how-to-start[data-mode="reveal"] .v3-how-to-start__step::after { transition: transform 0.6s ease; }

/* pin: the steps list sticks while the track is scrolled */
.v3-how-to-start[data-mode="pin"] { --hts-gap: clamp(32px, calc((100vh - var(--v3-header-h, 62px) - 48px - 620px) / 3), 99px); }
.v3-how-to-start[data-mode="pin"] .v3-how-to-start__steps {
  position: sticky;
  top: calc(var(--v3-header-h, 62px) + 24px);
}
.v3-how-to-start[data-mode="pin"] .v3-how-to-start__track::after {
  content: "";
  display: block;
  height: calc(var(--hts-n, 4) * 45vh);
}

@media (max-width: 1024px) {
  .v3-how-to-start__header { grid-template-columns: minmax(0, 1fr); row-gap: 12px; }
  .v3-how-to-start__title { grid-column: 1; grid-row: auto; }
  .v3-how-to-start__track { padding: 56px 0 0; }
}

@media (max-width: 768px) {
  .v3-how-to-start { --hts-gap: 52px; --hts-circle: 48px; }
  .v3-how-to-start__vlines span { display: none; }
  .v3-how-to-start__vlines span:nth-child(1) { display: block; left: 16px; }
  .v3-how-to-start__vlines span:nth-child(5) { display: block; left: auto; right: 16px; }
  .v3-how-to-start__vlines { inset: 0; width: auto; transform: none; }
  .v3-how-to-start__label { min-height: 20px; }
  .v3-how-to-start__track { padding-top: 36px; }
  .v3-how-to-start__step { column-gap: 16px; }
  .v3-how-to-start__num { font-size: 16px; line-height: var(--v3-lh-body-m); }
  .v3-how-to-start__body { gap: 16px; }
  .v3-how-to-start__step-text--full { display: none; }
  .v3-how-to-start__step-text--short { display: block; }
}

@media (prefers-reduced-motion: reduce) {
  .v3-how-to-start__step,
  .v3-how-to-start__num,
  .v3-how-to-start__step::after { transition: none !important; }
}
