/* ==========================================================================
   Component — Service index
   --------------------------------------------------------------------------
   Editorial, numbered overview of service groups. One row per service:
   number, name + summary, what is included, and one descriptive link.

   <ol class="service-index" role="list">
     <li class="service-index__item">
       <span class="service-index__number" aria-hidden="true">01</span>
       <div class="service-index__main">
         <h3 class="service-index__title">…</h3>
         <p class="service-index__summary">…</p>
       </div>
       <div class="service-index__detail">
         <ul class="service-index__includes" role="list"><li>…</li></ul>
         <a class="link-action" href="…">Explore …</a>
       </div>
     </li>
   </ol>

   Optional, for the full Services page:
     <p class="service-index__value">One-line value proposition</p>
       (between title and summary)
     <p class="service-index__label type-eyebrow" id="…">Key capabilities</p>
       (before the includes list, which then takes aria-labelledby)
   Give each item an id (the service slug) so it can be linked to.

   The visible number is decorative (the <ol> already conveys order).
   Layout: stacked (mobile) → number + content (md) → three columns (lg).
   WordPress: template-parts/service-index.php, fed by the Services CPT.
   ========================================================================== */

.service-index {
  border-block-end: var(--border-width) solid var(--color-border);
}

.service-index__item {
  display: grid;
  grid-template-areas:
    "number"
    "main"
    "detail";
  gap: var(--space-4);
  padding-block: var(--space-6);
  border-block-start: var(--border-width) solid var(--color-border);
}

@media (min-width: 48em) {
  .service-index__item {
    grid-template-columns: 4rem minmax(0, 1fr);
    grid-template-areas:
      "number main"
      ".      detail";
    column-gap: var(--space-5);
  }
}

@media (min-width: 64em) {
  .service-index__item {
    grid-template-columns: 5rem minmax(0, 1.1fr) minmax(0, 1fr);
    grid-template-areas: "number main detail";
    column-gap: var(--space-7);
    padding-block: var(--space-7);
  }
}

.service-index__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-h3-leading);
}

@media (min-width: 48em) {
  /* Align the number with the first line of the title */
  .service-index__number {
    padding-block-start: 0.4em;
  }
}

.service-index__main {
  grid-area: main;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

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

.service-index__value {
  max-inline-size: 40ch;
  color: var(--color-text-primary);
  font-size: var(--type-body-large-size);
  font-weight: var(--font-weight-medium);
  line-height: var(--type-body-large-leading);
}

.service-index__summary {
  max-inline-size: 48ch;
  color: var(--color-text-secondary);
}

.service-index__detail {
  grid-area: detail;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-4);
}

.service-index__label {
  margin-block-end: calc(var(--space-2) * -1);
}

.service-index__includes {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-4);
  color: var(--color-text-secondary);
  font-size: var(--type-body-small-size);
}

/* Small dot marker drawn with CSS, so screen readers read no punctuation */
.service-index__includes li {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
}

.service-index__includes li::before {
  content: "";
  flex-shrink: 0;
  inline-size: 0.3125rem;
  block-size: 0.3125rem;
  border-radius: var(--radius-pill);
  background-color: var(--color-border-strong);
}
