/* ==========================================================================
   Component — Process
   --------------------------------------------------------------------------
   Ordered stages of a way of working.

   <ol class="process" role="list">
     <li class="process__step">
       <span class="process__number" aria-hidden="true">01</span>
       <h3 class="process__title">Discover</h3>
       <p class="process__text">…</p>
     </li>
   </ol>

   Mobile/tablet: a vertical sequence, one rule per stage.
   Desktop (lg): one row; the rules join into a single line with an accent
   tick at the start of each stage. Follows the writing direction, so the
   sequence reads right-to-left in Arabic.
   WordPress: template-parts/process.php or a repeater field.
   ========================================================================== */

.process {
  display: grid;
}

.process__step {
  position: relative;
  display: grid;
  grid-template-columns: 3rem minmax(0, 1fr);
  grid-template-areas:
    "number title"
    ".      text";
  gap: var(--space-2) var(--space-4);
  padding-block: var(--space-5);
  border-block-start: var(--border-width) solid var(--color-border-strong);
}

.process__step::before {
  content: "";
  position: absolute;
  inset-block-start: calc(var(--border-width) * -1);
  inset-inline-start: 0;
  inline-size: var(--space-6);
  block-size: var(--border-width-strong);
  background-color: var(--color-accent);
}

@media (min-width: 64em) {
  .process {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .process__step {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "number"
      "title"
      "text";
    align-content: start;
    gap: var(--space-3);
    padding-block: var(--space-6) 0;
    padding-inline-end: var(--space-6);
  }
}

.process__number {
  grid-area: number;
  color: var(--color-accent);
  font-size: var(--type-body-small-size);
  font-weight: var(--font-weight-semibold);
  font-variant-numeric: tabular-nums;
  line-height: var(--type-h4-leading);
}

@media (width < 64em) {
  /* Align the number with the first line of the title */
  .process__number {
    padding-block-start: 0.2em;
  }
}

.process__title {
  grid-area: title;
  font-family: var(--type-h4-family);
  font-size: var(--type-h4-size);
  font-weight: var(--type-h4-weight);
  line-height: var(--type-h4-leading);
  letter-spacing: var(--type-h4-tracking);
}

.process__text {
  grid-area: text;
  max-inline-size: var(--measure);
  color: var(--color-text-secondary);
}
