/* ==========================================================================
   Services pages: /services/ and Advise, Implement, Migrate, Test, Run.
   Blue Dial, closed-dial variant. Rules: docs/brand/blue-dial.md.
   Colours come only from the --rd-* tokens in redesign.css. Spacing is in multiples of 8px.
   ========================================================================== */

/* Running text beside a heading: paragraphs and link rows, evenly spaced. */
.rd-svc-copy > * + * { margin-top: 24px; }
.rd-svc-copy .rd-h2 + * { margin-top: 32px; }

/* Isometric diagram: one per section, drawn in assets/images/diagrams/services/. */
.rd-svc-diagram { margin: 0 0 56px; }
.rd-split > .rd-svc-diagram, .rd-svc-diagram--last { margin: 0; }

/* Steps and stages: a numbered hairline grid. The numbers are added automatically.
   <ol class="rd-svc-steps"> [--5] with <li class="rd-svc-step"><h3>…</h3><p>…</p></li> */
.rd-svc-steps {
    display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
    list-style: none; margin: 0; padding: 0; counter-reset: rd-svc-step;
    border-top: 1px solid var(--rd-line); border-left: 1px solid var(--rd-line);
}
.rd-svc-steps--5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.rd-svc-step {
    padding: 32px; counter-increment: rd-svc-step;
    border-right: 1px solid var(--rd-line); border-bottom: 1px solid var(--rd-line);
}
.rd-svc-step::before {
    content: counter(rd-svc-step, decimal-leading-zero); display: block; margin-bottom: 16px;
    font: 600 40px/48px var(--rd-font-num); font-variant-numeric: lining-nums tabular-nums; color: var(--rd-ink);
}
.rd-svc-step h3 { margin-bottom: 8px; }
.rd-svc-step p { color: var(--rd-muted); }
.rd-svc-steps--5 .rd-svc-step { padding: 24px; }

/* One figure with its label beneath: the section's number. */
.rd-svc-stat { display: block; }
.rd-svc-stat .rd-figure { margin-bottom: 16px; }
.rd-svc-stat .rd-kpi__label { max-width: 320px; }

/* Case study cell: figure, label, title (the link), client line. Used inside rd-grid. */
.rd-svc-case { display: flex; flex-direction: column; gap: 16px; padding: 32px; }
.rd-svc-case p { color: var(--rd-muted); }
.rd-svc-case--solo { border: 1px solid var(--rd-line); }

/* Row of related links under a section's text. */
.rd-svc-links { display: flex; flex-wrap: wrap; gap: 8px 24px; list-style: none; margin: 0; padding: 0; font-weight: 600; }
.rd-grid + .rd-svc-links, .rd-svc-case--solo + .rd-svc-links { margin-top: 32px; }

/* Labelled rows: a label on the left, a line of text on the right, closed by hairlines. */
.rd-svc-rows { margin: 0; border-top: 1px solid var(--rd-line); }
.rd-svc-rows > div { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 32px; padding: 32px 0; border-bottom: 1px solid var(--rd-line); }
.rd-svc-rows dt { font: 400 12px/16px var(--rd-font-display); letter-spacing: .12em; text-transform: uppercase; color: var(--rd-muted); padding-top: 8px; }
.rd-svc-rows dd { margin: 0; }

@media (max-width: 1080px) {
    .rd-svc-steps, .rd-svc-steps--5 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .rd-svc-steps--5 .rd-svc-step { padding: 32px; }
}

@media (max-width: 860px) {
    .rd-svc-steps, .rd-svc-steps--5 { grid-template-columns: minmax(0, 1fr); }
    .rd-svc-step, .rd-svc-steps--5 .rd-svc-step, .rd-svc-case { padding: 24px; }
    .rd-svc-step::before { font-size: 28px; line-height: 36px; }
    .rd-svc-diagram { margin-bottom: 32px; }
    .rd-svc-rows > div { grid-template-columns: minmax(0, 1fr); gap: 8px; padding: 24px 0; }
    .rd-svc-rows dt { padding-top: 0; }
}
