/* Services: the journey in four stages on a stem the sprout climbs, what each stage includes, how we work, then the FAQ.
   Still by default (stem drawn, every leaf open, seeds vivid, no guide); under html.anim (services.js) the stem draws itself as you scroll and each stage arrives as it reaches its seed. */

/* ---------- Hero ---------- */
.svc-hero { padding-block: calc(var(--nav-h) + clamp(56px, 8vw, 120px)) clamp(56px, 7vw, 96px); }
.svc-hero h1 { max-width: 16ch; }
.svc-hero .lead { max-width: 52ch; margin-top: 32px; }
@media (min-width: 981px) { /* centred like the Why hero (the owner's call), nothing beside it */
  .svc-hero h1, .svc-hero .lead { margin-inline: auto; text-align: center; }
}

/* ---------- The journey: a stem on the left (services.js draws its path through the stage seeds), one seed per stage on it ---------- */
.journey > .wrap { padding-bottom: clamp(96px, 12vw, 160px); }
/* --line: where the stem runs; --pad: where the stages start (both from the track's left edge) */
/* --start: the first seed's centre, where the line and the guide begin */
/* read by services.js, in px: --leaf-len a leaf's length; --sway the stem's bend between stages; --bow how far it may bow left of the track (into the gutter); --fruit the apple's width */
.journey-track { --line: 10px; --pad: 56px; --leaf-len: 36; --sway: 32; --bow: 16; --fruit: 28; --h2: clamp(2rem, 4vw, 3.5rem); --start: calc(var(--h2) * .51); position: relative; padding-left: var(--pad); }
/* the stem: a faint track and the grown stem over it, deepening down its length; leaves (n + 1 at stage n) grow from their base on the stem; the fruit hangs from its end */
.stem { width: var(--pad); } /* site.css places it over the track */
.stem-track { stroke: var(--hair); stroke-width: 1; }
.stem-grown { stroke: url(#stem-grad); stroke-width: 2; stroke-linecap: round; }
.stem .stop-top { stop-color: var(--leaf); }
.stem .stop-end { stop-color: var(--leaf-deep); }
/* the leaves' look and their unfolding are site.css's (shared with the Why page's stem) */
/* the fruit's look (the seed apple) and its unfolding are site.css's, shared with the Why page's hero */
/* the guide: the Why page's walking seed; only under html.anim */
.journey .guide {
  /* the walker is the logo's sprout: the seed that has already grown, travelling down the stages */
  /* services.js moves it along the stem (x, y = its centre's point on the path) */
  position: absolute; left: 0; top: 0; z-index: 2; display: none; width: 32px; height: 32px; margin: -16px 0 0 -16px;
  background: url(assets/logo-mark.svg) center / contain no-repeat; filter: drop-shadow(0 6px 10px color-mix(in srgb, var(--seed-deep) 40%, transparent));
}
html.anim .journey .guide { display: block; }

/* stages: offsetTop is measured against .journey-track, which must stay their nearest positioned ancestor */
.stage {
  --sp: clamp(64px, 8vw, 112px);
  position: relative; display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 0 clamp(40px, 6vw, 96px); align-items: start;
  --top: var(--sp); padding-block: var(--sp); scroll-margin-top: calc(var(--nav-h) + 24px);
}
.guide + .stage { padding-top: 0; --top: 0px; }
.stage:last-child { padding-bottom: 0; }
.stage + .stage { border-top: 1px solid var(--hair); }
/* the stage's seed sits on the track, level with the first line of its heading */
.stage .seed {
  position: absolute; left: calc(var(--line) + .5px - 5px - var(--pad)); top: calc(var(--top) + var(--h2) * .51 - 5px);
  width: 10px; height: 10px; border-radius: 50%; background: var(--seed); box-shadow: 0 0 0 4px color-mix(in srgb, var(--seed) 18%, transparent);
}
.stage-head { grid-column: 1; grid-row: 1; display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 16px; }
.stage-head h2 { font-size: var(--h2); }
/* a touch deeper than --seed-ink: on phones it can sit over the background's green light, where plain seed-ink is 4.47:1 */
.stage-num { font: 700 .75rem/1 var(--sans); letter-spacing: .1em; color: color-mix(in srgb, var(--seed-ink) 88%, var(--ink)); white-space: nowrap; }
.stage > .lead { grid-column: 1; grid-row: 2; max-width: 44ch; margin-top: 24px; }
.stage .incl-title { grid-column: 2; grid-row: 1; align-self: end; font: 700 .9375rem/1.4 var(--sans); letter-spacing: 0; color: var(--ink); }
.stage .incl { grid-column: 2; grid-row: 2; }
.stage .covers { grid-column: 2; grid-row: 3; margin-top: 20px; font-size: .9375rem; color: var(--muted); }
.covers a { font-weight: 600; scroll-margin-top: calc(var(--nav-h) + 24px); } /* each service is a way into the form with it preselected (contact?service=) */

/* what's included: hairline rows with 5px seed bullets, two columns */
.incl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 32px; margin-top: 12px; }
.incl li { position: relative; padding: 12px 0 12px 20px; border-bottom: 1px solid var(--hair); color: var(--ink); }
.incl li::before { content: ""; position: absolute; left: 2px; top: calc(12px + .825em - 2.5px); width: 5px; height: 5px; border-radius: 50%; background: var(--seed); }

/* ---------- How we work: four seeds on one hairline, a number, h3 and paragraph under each (the AI page's pipeline, no guide) ---------- */
.how .wrap { padding-block: clamp(96px, 12vw, 160px) clamp(72px, 9vw, 128px); border-top: 1px solid var(--hair); }
.how .lead { max-width: 52ch; }
.how .num { font: 700 .75rem/1 var(--sans); letter-spacing: .1em; color: var(--seed-ink); }
.steps { position: relative; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px; margin-top: clamp(48px, 6vw, 80px); }
.steps::before { content: ""; position: absolute; left: 0; right: 0; top: 6px; height: 1px; background: var(--hair); }
.step .seed { position: relative; display: block; width: 12px; height: 12px; border-radius: 50%; background: var(--leaf); }
.step .num { display: block; margin-top: 28px; }
.step h3 { margin-top: 10px; font-size: 1.5rem; line-height: 1.15; letter-spacing: -.01em; }
.step p { font-size: .9375rem; text-wrap: pretty; }

/* ---------- FAQ (site.js runs the accordion; site.css styles the items) ---------- */
.svc-faq .wrap {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 80px; align-items: start;
  padding-top: clamp(96px, 12vw, 160px); border-top: 1px solid var(--hair);
}
.faq-intro .lead { max-width: 34ch; margin-top: 24px; }
.faq-list { border-top: 1px solid var(--hair); }

/* ---------- Motion (html.anim only) ---------- */
/* a stage waits with a leaf seed and its words 24px low until the guide reaches its seed (services.js adds .arrived), then rises;
   it moves, it never fades (DESIGN: text keeps full contrast at every frame); the seed stays on the track */
html.anim .stage > :not(.seed) { transition: translate .6s var(--ease); }
html.anim .stage .seed { transition: background-color .3s var(--ease), box-shadow .3s var(--ease); }
html.anim .stage:not(.arrived) > :not(.seed) { translate: 0 24px; }
html.anim .stage:not(.arrived) .seed { background: var(--leaf); box-shadow: 0 0 0 4px transparent; }
/* the steps rise one after another, once, at full contrast */
html.anim .step[data-reveal] { translate: 0 32px; transition: translate 1.2s var(--ease); }
html.anim .step[data-reveal].in { translate: none; }
.step:nth-child(2) { transition-delay: .1s; }
.step:nth-child(3) { transition-delay: .2s; }
.step:nth-child(4) { transition-delay: .3s; }

/* ---------- Platforms our clients use: the owner's list from the old site, one quiet centred line, seed dots between the names ---------- */
.platforms .wrap { padding-block: clamp(40px, 5vw, 64px); border-top: 1px solid var(--hair); text-align: center; }
.platforms-label { margin: 0; font: 600 .75rem/1.5 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); font-variation-settings: normal; }
.platforms-flow { display: flex; justify-content: center; margin-top: 16px; }
.platforms-list { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 0; margin: 0; padding: 0; list-style: none; font: 600 1rem/1.5 var(--sans); color: var(--ink); }
.platforms-list li { display: inline-flex; align-items: center; }
.platforms-list li + li::before { content: ""; width: 5px; height: 5px; margin: 0 16px; border-radius: 50%; background: var(--seed); }
/* a logo in place of a name (assets/platforms/*): grey until the pointer rests on it, then its own colours */
.platforms-list img { display: block; height: 28px; width: auto; filter: grayscale(1); opacity: .7; transition: filter .3s, opacity .3s; }
.platforms-list li:hover img { filter: none; opacity: 1; }
/* flowing (services.js adds five copies under html.anim): one long row drifting left by one copy per cycle, so it never shows a seam; the edges fade; a hover holds it */
.platforms-flow.is-flowing { justify-content: flex-start; overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); }
.is-flowing .platforms-list { flex: none; flex-wrap: nowrap; animation: platforms-flow 28s linear infinite; }
.is-flowing .platforms-list li::before { content: ""; width: 5px; height: 5px; margin: 0 16px; border-radius: 50%; background: var(--seed); } /* every name, so the copies join with the same dot */
.platforms-flow.is-flowing:hover .platforms-list { animation-play-state: paused; }
@keyframes platforms-flow { to { transform: translateX(-100%); } }
.platforms-note { max-width: 60ch; margin: 22px auto 0; font-size: .6875rem; line-height: 1.5; color: var(--muted); text-wrap: balance; }

/* ---------- Tablets and phones ---------- */
@media (max-width: 980px) {
  .stage { display: block; }
  .stage .incl-title { margin-top: 40px; }
  .svc-faq .wrap { grid-template-columns: 1fr; gap: 40px; }
  .step h3 { font-size: clamp(1.125rem, 2.4vw, 1.5rem); } /* four columns still: "Implementation" must fit one */
}
@media (max-width: 760px) {
  .platforms-flow:not(.is-flowing) .platforms-list { gap: 10px 28px; }
  .platforms-flow:not(.is-flowing) .platforms-list li + li::before { display: none; } /* wrapped lines would start with a dot */
  /* the track runs 20px from the screen's edge, on the gutter line */
  /* phones: a smaller sway, inward only (no bow past the track's edge) */
  .journey-track { --line: 0px; --pad: 28px; --leaf-len: 24; --sway: 12; --bow: 0; --fruit: 22; } /* leaves and sway sized so no leaf tip reaches the stage text */
  .incl { grid-template-columns: 1fr; }
  .steps::before { left: 5.5px; right: auto; top: 6px; bottom: 0; width: 1px; height: auto; }
  .steps { grid-template-columns: 1fr; gap: 40px; }
  .step { position: relative; padding-left: 36px; }
  .step .seed { position: absolute; left: 0; top: 0; }
  .step .num { margin-top: 0; }
}
