/* process.css: the four stages on the home page (js/process.js drives the slide).
   At rest (a phone, a tablet, a touch screen, reduced motion, no script) the stages are cards: a picture, a gold
   stage label, the title in the display serif and a line of text under a hairline; two a row from 640px.
   On a desktop with a mouse the section holds the screen while the page scrolls, and the row of panels slides
   sideways under the heading, one scroll of the page for one stroke of the row; each picture drifts a little
   against the slide, and a gold bar beside the heading fills while the stage number counts up. The pictures open
   from a mask and the words rise as each panel comes in (js/scroll-motion.js). Only transform, scale and opacity
   move. */

#approach.px {
  --px-gold-text: #84612f;                  /* the brand gold deepened for small text on the beige (4.9:1) */
  --px-line: rgb(35 31 26 / 0.16);
}
main > #approach.px { display: block; height: auto; min-height: 0; padding: 0; }
#approach .px__pin { padding: var(--padt) 0 var(--padb); }
#approach .px__wrap { height: auto; }

/* ---- the head: the heading on the left, the progress on the right (shown only while sliding) */
.px__head { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--s-6); margin-bottom: var(--head-gap); }
#approach .px__head > .section-head { margin-bottom: 0; }
.px__progress { display: none; }

/* ---- the stages as cards */
.px__track { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-9) var(--gutter); }
.px__stage { display: grid; gap: var(--s-5); align-content: start; min-width: 0; }
.px__media { position: relative; overflow: clip; border-radius: var(--r-lg); aspect-ratio: 4 / 3; background: var(--p-surface); }
.px__media > img { position: absolute; top: 0; left: 0; width: 100%; height: 100%; max-width: none; object-fit: cover; }
.px__text { position: relative; display: grid; gap: var(--s-3); padding-top: var(--s-5); max-width: 42ch; }
.px__text::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 1px; background: var(--px-line); }
.px__label {
  margin: 0; font-size: var(--t-label); letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--px-gold-text); font-variant-numeric: lining-nums tabular-nums;
}
.px__title {
  margin: 0; font-family: var(--font-display); font-weight: 400; letter-spacing: var(--display-tracking);
  font-size: clamp(26px, 0.9vw + 19px, 34px); line-height: 1.15; color: var(--p-ink);
}
.px__desc { margin: 0; font-size: var(--t-body); line-height: 1.6; color: var(--p-muted); }
/* the end of the row: a fifth panel, a render under a dark fall with one line and the way to the form in white
   (the same shade as the services stage), so the row ends on a picture like every stage before it */
.px__end {
  grid-column: 1 / -1; position: relative; isolation: isolate; overflow: clip; border-radius: var(--r-lg);
  display: flex; flex-direction: column; align-items: flex-start; justify-content: flex-end; gap: var(--s-5);
  min-height: 420px; padding: var(--s-7); box-sizing: border-box; background: #231f1a; color: #fff; --ink: #fff;
}
.px__end-img { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; max-width: none; object-fit: cover; }
.px__end::after {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(to top, rgb(20 16 12 / 0.84), rgb(20 16 12 / 0.5) 50%, rgb(20 16 12 / 0.18));
}
.px__end-line {
  margin: 0; max-width: 16ch; font-family: var(--font-display); font-weight: 400; letter-spacing: var(--display-tracking);
  font-size: clamp(28px, 1.6vw + 16px, 44px); line-height: 1.12; color: #fff;
}
.px__end .link { color: #fff; }
@media (max-width: 639px) {
  .px__track { grid-template-columns: minmax(0, 1fr); row-gap: var(--s-8); }
  .px__media { aspect-ratio: 5 / 4; }
  .px__end { min-height: 380px; padding: var(--s-6); }
}

/* ---- sliding (js/process.js adds .is-sliding and sets --px-shift, the row's travel in px) */
main > #approach.px.is-sliding { height: calc(100vh + var(--px-shift, 0px)); height: calc(100svh + var(--px-shift, 0px)); }
.px.is-sliding .px__pin {
  position: sticky; top: 0; box-sizing: border-box; height: 100vh; height: 100svh; overflow: clip;
  display: flex; flex-direction: column;
  padding: calc(var(--nav) + clamp(28px, 6svh, 64px)) 0 clamp(28px, 6svh, 64px);
}
.px.is-sliding .px__wrap { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; }
.px.is-sliding .px__head { flex: none; margin-bottom: clamp(24px, 5svh, 48px); }
.px.is-sliding .px__head > .section-head { max-width: none; }
.px.is-sliding .px__progress {
  display: flex; align-items: center; gap: var(--s-4); margin: 0 0 6px; flex: none;
  font-size: var(--t-label); letter-spacing: 0.16em; color: var(--p-muted); font-variant-numeric: lining-nums tabular-nums;
}
.px__count { color: var(--p-ink); min-width: 2ch; }
.px__bar { position: relative; display: block; width: clamp(120px, 12vw, 200px); height: 1px; background: var(--px-line); overflow: clip; }
.px__fill { position: absolute; inset: 0; background: var(--p-accent); transform-origin: left center; transform: scaleX(0); }

.px.is-sliding .px__track {
  flex: 1 1 auto; min-height: 0; display: flex; gap: clamp(24px, 2.5vw, 40px); width: max-content; will-change: transform;
}
.px.is-sliding .px__stage { width: clamp(400px, 38vw, 620px); height: 100%; grid-template-rows: minmax(0, 1fr) auto; }
.px.is-sliding .px__media { aspect-ratio: auto; min-height: 0; }
/* the picture is 12% wider than its frame, so its drift never shows an edge */
.px.is-sliding .px__media > img { left: -6%; width: 112%; will-change: transform; }
/* sliding: as wide as a stage and as tall as a whole stage, picture and words */
.px.is-sliding .px__end { width: clamp(400px, 38vw, 620px); height: 100%; min-height: 0; }
/* a short screen: the heading alone over the row, so the pictures keep their size */
@media (max-height: 780px) { .px.is-sliding .px__head > .section-head > p { display: none; } }

@media print {
  main > #approach.px { height: auto !important; }
  .px__pin { position: static !important; height: auto !important; }
  .px__track { transform: none !important; }
}

/* the hairline runs the panel's full width with the text under it held to a reading measure (js/process.js also
   gives the four text blocks one height while sliding, so the four pictures share one height) */
.px__text { max-width: none; }
.px__desc { max-width: 42ch; }
