/* ==========================================================================
   How it works: the five-step story on the home page
   ========================================================================== */

.hiw figure { margin: 0; }
.hiw .center .lede { margin-inline: auto; max-width: 40ch; }
.hiw-lede { margin-top: 1.25rem; }

/* the site's photo treatment: square corners, a soft lift */
.hiw-shot {
  position: relative;
  overflow: hidden;
  background: var(--light-30);
  box-shadow: 0 1px 2px rgba(38,34,32,.04), 0 12px 32px -18px rgba(38,34,32,.22);
}
.hiw-shot img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ==========================================================================
   B — a story, one big step at a time
   ========================================================================== */

.hiw-rows {
  margin-top: clamp(2.5rem, 6vw, 4rem);
  display: grid;
  gap: clamp(2.75rem, 6vw, 4.5rem);
}
.hiw-row {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}
.hiw-row:nth-child(even) { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
.hiw-row:nth-child(even) .hiw-shot { order: 2; }
.hiw-row .hiw-shot { aspect-ratio: 3 / 2; }
/* a portrait in a 7fr column would run a screen and a half tall */
.hiw-row.hiw-row--portrait { grid-template-columns: minmax(0, 4fr) minmax(0, 6fr); }
.hiw-row--portrait .hiw-shot { aspect-ratio: 4 / 5; }
.hiw-row .big {
  display: block;
  margin-bottom: .9rem;
  font-family: var(--serif);
  font-size: clamp(2.75rem, 6vw, 4.25rem);
  line-height: 1;
  color: var(--green);
}
.hiw-row h3 { font-size: clamp(1.5rem, 3vw, 2.125rem); margin-bottom: .75rem; }
.hiw-row p { font-size: 1.0625rem; color: var(--ink-muted); max-width: 40ch; }
.hiw-row blockquote {
  margin: 1.75rem 0 0;
  padding-left: 1.25rem;
  border-left: 2px solid var(--green);
  font-family: var(--serif);
  font-size: 1.125rem;
  line-height: 1.55;
  color: var(--ink);
  max-width: 38ch;
}
.hiw-row blockquote cite {
  display: block;
  margin-top: .6rem;
  font-family: var(--sans);
  font-style: normal;
  font-size: .6875rem;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: var(--ink-label);
}

/* step 4: each staple as a bar out of 30, so the number explains itself */
.hiw-uses { margin-top: 1.75rem; max-width: 26rem; }
/* .hiw-row p would otherwise size this like body copy */
.hiw-row .hiw-uses .label { font-size: .6875rem; color: var(--ink-label); max-width: none; }
.hiw-uses ul { list-style: none; margin: .9rem 0 0; padding: 0; display: grid; gap: .7rem; }
.hiw-uses li {
  display: grid;
  grid-template-columns: 1fr auto;
  column-gap: 1rem;
  row-gap: .3rem;
  font-size: .875rem;
  line-height: 1.3;
}
.hiw-uses li b { font-weight: 500; color: var(--green); white-space: nowrap; }
.hiw-uses li::after {
  content: "";
  grid-column: 1 / -1;
  height: 5px;
  background: linear-gradient(var(--green), var(--green)) 0 0 / var(--p) 100% no-repeat, var(--rule);
}

@media (max-width: 860px) {
  .hiw-row,
  .hiw-row:nth-child(even),
  .hiw-row.hiw-row--portrait { grid-template-columns: 1fr; text-align: center; }
  .hiw-row:nth-child(even) .hiw-shot { order: 0; }
  .hiw-row--portrait .hiw-shot { aspect-ratio: 4 / 5; max-width: 26rem; margin-inline: auto; width: 100%; }
  .hiw-row p,
  .hiw-row blockquote { margin-inline: auto; }
  .hiw-row blockquote { border-left: 0; padding-left: 0; }
  .hiw-uses { margin-inline: auto; text-align: left; }
  .hiw-uses .label { text-align: center; }
}
