/* ==========================================================================
   Component — Motto
   --------------------------------------------------------------------------
   A short, ordered statement of principle set in large type, each part
   with a one-paragraph explanation (e.g. "Clarity first. Distinction
   second. Decoration last."). Typography-led, no boxes.

   <ol class="motto" role="list">
     <li class="motto__item">
       <span class="motto__number" aria-hidden="true">01</span>
       <h3 class="motto__phrase">Clarity first.</h3>
       <p class="motto__text">…</p>
     </li>
   </ol>

   The phrases step down in emphasis (primary → secondary → muted text),
   so the order of priority is visible as well as written. All three
   colours meet AA on light and inverse surfaces; meaning never depends
   on colour, since the words and the list order carry it.
   Mobile/tablet: one column. Desktop (lg): three columns.
   Phrases use the h1 role on small screens and the h2 role in columns,
   so the longest word ("Distinction") always fits its column.
   WordPress: a repeater field rendered by template-parts/motto.php.
   ========================================================================== */

.motto {
  display: grid;
  gap: var(--space-7);
}

@media (min-width: 64em) {
  .motto {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--space-7);
  }
}

.motto__item {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  padding-block-start: var(--space-5);
  border-block-start: var(--border-width-strong) solid var(--color-text-primary);
}

.motto__number {
  color: var(--color-accent);
  font-size: var(--type-body-small-size);
  font-weight: var(--font-weight-semibold);
  font-variant-numeric: tabular-nums;
}

.motto__phrase {
  font-family: var(--type-h1-family);
  font-size: var(--type-h1-size);
  font-weight: var(--type-h1-weight);
  line-height: var(--type-h1-leading);
  letter-spacing: var(--type-h1-tracking);
}

@media (min-width: 64em) {
  .motto__phrase {
    font-size: var(--type-h2-size);
  }
}

/* Emphasis steps down with priority. Positional on purpose: the order of
   the list is the order of priority. */
.motto__item:nth-child(2) {
  border-block-start-color: var(--color-border-strong);
}

.motto__item:nth-child(2) .motto__phrase {
  color: var(--color-text-secondary);
}

.motto__item:nth-child(n + 3) {
  border-block-start-color: var(--color-border);
}

.motto__item:nth-child(n + 3) .motto__phrase {
  color: var(--color-text-muted);
}

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