/* Carbon Confido — Approach page ("How the Service Works")
   Loaded after type.css, site.css and pages.css. Only the timeline lives here. */

/* Section: the design sits a little narrower than .wrap (content starts ~160px in at 1280) */
.engagement { padding: var(--sy) 0; }
.engagement-wrap { width: min(960px, 100% - 2 * var(--gutter)); margin-inline: auto; }

/* ---------- Vertical timeline ----------
   Each step: [blue dot on the rail] [outlined number circle] [title + text].
   The blue rail is drawn per step (from its dot down to the next dot), so it
   grows in step by step as the items reveal. */
.timeline {
  --circle: 72px;        /* number circle diameter (was 90) */
  --rail: 62px;          /* space reserved for the blue line + dots */
  --dot: 12px;
  --step-gap: 90px;      /* vertical space between steps: same as the homepage steps */
  list-style: none; margin: 60px 0 0; padding: 0;   /* space under the heading: same as the homepage Approach section */
}
.tl-step {
  position: relative;
  display: grid; grid-template-columns: var(--circle) 1fr; column-gap: 40px; align-items: start;
  padding-left: var(--rail);
  min-height: var(--circle);
}
.tl-step + .tl-step { margin-top: var(--step-gap); }

/* blue dot, level with the centre of the number circle */
.tl-step::before {
  content: ""; position: absolute; left: 0; top: calc(var(--circle) / 2 - var(--dot) / 2);
  width: var(--dot); height: var(--dot); border-radius: 50%; background: var(--blue);
}
/* blue line from this dot to the next one */
.tl-step:not(:last-child)::after {
  content: ""; position: absolute; left: calc(var(--dot) / 2 - 1px); top: calc(var(--circle) / 2);
  width: 2px; height: calc(100% + var(--step-gap));
  background: var(--blue); transform-origin: top;
}

.tl-num {
  width: var(--circle); height: var(--circle); border-radius: 50%;
  border: 2px solid var(--green); color: var(--green);
  display: grid; place-items: center;
  font-size: 26px; font-weight: 500; line-height: 1; letter-spacing: 0;
  font-variant-numeric: tabular-nums;
}
.tl-body { padding-top: 16px; min-width: 0; }
.tl-body h3 { color: var(--green); font-size: var(--fs-h4); font-weight: 600; line-height: var(--lh-heading); margin-bottom: 8px; }   /* same as the homepage step titles */
.tl-body p { font-size: var(--fs-body-sm); line-height: 1.55; max-width: 41em; }   /* ~655px line, as in the design */

/* Motion: each line segment draws downwards just after its step fades in */
html.motion .tl-step:not(:last-child)::after {
  transform: scaleY(0);
  transition: transform .9s cubic-bezier(.65,0,.35,1) calc(var(--reveal-d, 0s) + .35s);
}
html.motion .tl-step.is-in::after { transform: scaleY(1); }
#engagement-title { font-size: 35px; }   /* desktop 35px, same as the Services and Standards headings */

@media (prefers-reduced-motion: reduce) {
  html.motion .tl-step::after { transform: none !important; transition: none !important; }
}

/* =========================================================
   iPad (768 – 1099)
   ========================================================= */
@media (max-width: 1099px) {
  #engagement-title { font-size: var(--fs-h3); }   /* iPad 28px, mobile 24px */
  .timeline { --circle: 62px; --rail: 44px; --step-gap: 56px; margin-top: 48px; }
  .tl-step { column-gap: 28px; }
  .tl-num { font-size: 23px; }
  .tl-body { padding-top: 12px; }
}

/* =========================================================
   Mobile (< 768) — same timeline, compact: small circles, text beside them
   ========================================================= */
@media (max-width: 767px) {
  .timeline { --circle: 40px; --rail: 24px; --dot: 10px; --step-gap: 48px; margin-top: 40px; }
  .tl-step { column-gap: 16px; }
  .tl-num { font-size: 16px; border-width: 1.5px; }
  .tl-body { padding-top: 5px; }
}
