/* How it works: page parts only. Shared top bar, footer, buttons, band and tokens live in sales.css.
   Sizes are read from the design pictures (phone 390 wide, computer 1440 wide). */

.how {
  position: relative;
  background: var(--ground);
  color: var(--navy);
  overflow: hidden;
}

.how > section { position: relative; }

/* ---------- the dotted route: one path, drawn by the small script at the end of the page ---------- */
.how-route {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 2;
  pointer-events: none;
  overflow: visible;
}
.how-route path {
  fill: none;
  stroke-width: 2.6;
  stroke-dasharray: 4 4.5;
}
@media (min-width: 900px) {
  .how-route path {
    stroke-width: 4.5;
    stroke-linecap: round;
    stroke-dasharray: 6 12;
  }
}

/* place chips sit above the route */
.how .chip { z-index: 3; }
.how .chip svg { width: 1.05em; height: 1.3em; flex: none; }

.how-br { display: none; }

/* ---------- hero ---------- */
.how-hero {
  padding-top: 40px;
  text-align: center;
}
.how-hero h1 {
  font-size: 36px;
  line-height: 1.05;
}
.how-lead {
  margin: 8px auto 0;
  max-width: 250px;
  font-size: 15.3px;
  line-height: 1.1;
  font-weight: 700;
}
.how-hero-art {
  position: relative;
  margin: var(--gap-item) 0 0;
  container-type: inline-size;
}
.how-hero-art img { width: 100%; height: auto; }
.how-chip-home {
  position: absolute;
  left: 6.5%;
  top: 73.4%;
  width: 27.8%;
  height: 18.2%;
  padding: 0;
  gap: 0.35em;
  justify-content: center;
  font-size: 3.2cqw;
}

/* ---------- three steps ---------- */
.how-steps { margin-top: var(--gap-sec); }
.how-steps ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: var(--pad-card);
}
.how-step {
  background: var(--white);
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: var(--pad-card) var(--gap-item) var(--pad-card) var(--pad-card);
  display: grid;
  grid-template-columns: 36px 1fr;
  column-gap: 11px;
  align-items: center;
}
.how-step picture { grid-column: 1 / -1; margin: 0 8px var(--pad-card) 0; }
.how-step img { width: 100%; height: auto; }
.how-num {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 24px;
  font-weight: 900;
  line-height: 1;
  color: var(--navy);
  background: var(--sun);
}
.how-step:nth-child(2) .how-num { background: #8cc63f; }
.how-step:nth-child(3) .how-num { background: #f0584a; }
.how-step h2 {
  font-size: 17.4px;
  line-height: 1.15;
}
.how-step p {
  margin-top: 4px;
  font-size: 11.8px;
  line-height: 1.3;
  font-weight: 700;
}

/* ---------- then you get ---------- */
.how-get {
  margin-top: var(--gap-sec);
  display: flex;
  flex-direction: column;
}
.how-get h2 {
  font-size: 28.3px;
  line-height: 1.05;
  text-align: center;
}
.how-checks {
  list-style: none;
  margin: var(--gap-head) 0 0;
  padding: 0;
  display: grid;
  gap: 4px;
  font-size: 12.8px;
  line-height: 1.25;
  font-weight: 800;
}
.how-checks li { position: relative; padding-left: 20px; }
.how-checks li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.12em;
  width: 0.55em;
  height: 0.95em;
  border: solid var(--leaf);
  border-width: 0 0.26em 0.26em 0;
  transform: rotate(40deg);
  border-radius: 1px;
}
.how-shot {
  position: relative;
  margin: var(--gap-head) calc(var(--edge) * -1) 0 -5px;
}
.how-shot-art {
  position: relative;
  container-type: inline-size;
}
.how-shot-art img { width: 100%; height: auto; }
.how-alert {
  position: absolute;
  left: 9.95%;
  width: 19.3%;
  height: 25.1%;
  margin: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0 0 0 1.3%;
  background: var(--white);
  border-radius: 1.6cqw;
  box-shadow: 0 1px 4px rgba(19, 35, 91, 0.16);
  font-size: 2.45cqw;
  line-height: 1.12;
  font-weight: 800;
  white-space: nowrap;
}
.how-alert-1 { top: 22.6%; }
.how-alert-2 { top: 53%; }
.how-alert b { color: #e8402f; font-weight: 900; }
.how-chip-school {
  position: relative;
  align-self: flex-start;
  margin: 2px 0 0 44px;
  padding: 3px 9px 3px 6px;
  gap: 4px;
  font-size: 12px;
}
.how-note {
  margin-top: var(--gap-head);
  font-size: 12px;
  line-height: 1.3;
  font-weight: 800;
  text-align: center;
}

/* ---------- the band: words on the left, the picture on the right ---------- */
.how-band {
  margin-top: var(--gap-sec);
  min-height: 164px;
  overflow: hidden;
}
.how-band-in { position: relative; z-index: 1; }
.how-band-text {
  padding: 20px 0 var(--pad-card);
  max-width: 170px;
}
.how-band h2 { font-size: 21px; line-height: 1.1; }
.how-band p {
  margin: 10px 0 14px;
  font-size: 12px;
  line-height: 1.3;
  font-weight: 700;
}
.how-band-btn {
  min-height: 30px;
  width: 122px;
  padding: 0 12px;
  font-size: 17px;
}
.how-band-art {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 55%;
  max-width: 428px;
  height: auto;
}

/* ---------- computer ---------- */
@media (min-width: 900px) {
  .how-br { display: inline; }

  .how-hero {
    padding-top: 0;
    text-align: left;
  }
  .how-hero-art {
    margin: 58px -27px 0;
  }
  .how-hero-text {
    position: absolute;
    left: calc(var(--edge) + 1.2%);
    top: 46px;
    z-index: 1;
  }
  .how-hero h1 { font-size: min(80px, 5.56vw); line-height: 1; }
  .how-lead {
    margin: 0.4em 0 0;
    max-width: 14.2em;
    font-size: min(40px, 2.78vw);
    line-height: 1.25;
  }
  .how-chip-home {
    left: 71.2%;
    top: 23.4%;
    width: 24.6%;
    height: 15.2%;
    font-size: 2.85cqw;
    gap: 0.3em;
  }

  .how-steps ol {
    grid-template-columns: repeat(3, 1fr);
    gap: var(--gap-head);
  }
  .how-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    background: #fdfaf4;
    border-radius: 24px;
    padding: var(--pad-card) var(--gap-item) 28px;
  }
  .how-step picture {
    width: calc(100% + 24px);
    margin: -8px -12px 14px;
  }
  .how-num {
    width: min(80px, 5.56vw);
    height: min(80px, 5.56vw);
    font-size: min(50px, 3.5vw);
    margin-bottom: 4px;
  }
  .how-step h2 {
    font-size: min(49px, 3.4vw);
    line-height: 0.96;
  }
  .how-step p {
    margin-top: 6px;
    font-size: min(34px, 2.36vw); /* fix round 4: 2 px up, as the design */
    line-height: 1.2;
  }

  .how-get {
    display: grid;
    grid-template-columns: 43.2% 1fr;
    column-gap: 6%;
    align-items: center;
    padding-bottom: 76px;
  }
  .how-get h2 {
    grid-column: 1 / -1;
    text-align: left;
    font-size: min(72px, 5vw);
    line-height: 1;
  }
  .how-shot {
    grid-column: 1;
    grid-row: 2 / span 2;
    margin: 0 0 0 -4px;
  }
  .how-alert {
    left: 61.5%;
    width: 33.6%;
    height: 21.2%;
    padding-left: 2.6%;
    border-radius: 2.4cqw;
    /* fix round 7: the message words larger, near the painted size (was 4.2cqw); 4.8cqw ran "Mia arrived at" 12 px
       past the box at weight 800 and 3 px at 700, so 4.6cqw at 700 (the painted words are bold, not black) */
    font-size: 4.6cqw;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(19, 35, 91, 0.14);
  }
  .how-alert-1 { top: 28.6%; }
  .how-alert-2 { top: 53.6%; }
  .how-chip-school {
    position: absolute;
    left: 49%;
    top: calc(100% + 9px);
    margin: 0;
    padding: 0 22px 0 18px;
    height: 68px;
    gap: 10px;
    font-size: min(33px, 2.3vw);
  }
  .how-checks {
    grid-column: 2;
    grid-row: 2;
    align-self: end;
    margin: 0;
    gap: 12px;
    font-size: min(35px, 2.43vw);
    line-height: 1.2;
    font-weight: 700;
  }
  .how-checks li { padding-left: 2.03em; }
  /* fix round 5: ticks about 1.3 times larger and bolder, as painted */
  .how-checks li::before {
    left: 0.22em;
    top: -0.12em;
    width: 0.7em;
    height: 1.2em;
    border-width: 0 0.32em 0.32em 0;
  }
  .how-note {
    grid-column: 2;
    grid-row: 3;
    align-self: start;
    margin-top: 22px;
    padding-left: 2.03em;
    text-align: left;
    font-size: min(35px, 2.43vw);
    line-height: 1.2;
    /* fix round 7: the same weight as the tick list above it, as painted (was 800, inherited) */
    font-weight: 700;
  }

  .how-band { min-height: 325px; }
  .how-band-text {
    padding: 24px 0 28px;
    max-width: 520px;
  }
  .how-band h2 { font-size: min(68px, 4.72vw); line-height: 1.05; }
  .how-band p {
    margin: 14px 0 20px;
    font-size: min(37px, 2.57vw);
    line-height: 1.2;
  }
  .how-band-btn {
    min-height: 70px;
    width: min(387px, 26.9vw);
    font-size: min(48px, 3.33vw);
  }
  .how-band-art {
    width: min(840px, 58.4vw);
    max-width: none;
  }
}
