/* ══════════════════════════════════════════════════════════
   PROCESS: the seven steps as a pinned horizontal sequence
   One tall section; inside it a stage sticks for one screen while a
   belt of eight panels travels left under the head. Panel 0 is the
   band photograph, panels 1 to 7 are the steps; a hairline axis runs
   through the belt's midpoint, each number sits on it and the step's
   title and text hang below. A cobalt rule in the bottom band keeps
   the count. Mobile-first: the base is the flat layout (the band,
   then the steps as a list); the pin only exists on wide screens
   that have not asked for reduced motion.
   Everything here is prefixed .prc-; the head reuses the site's
   .head/.kicker/.section-title/.section-sub so it reveals like the
   others.
   ══════════════════════════════════════════════════════════ */

.prc{
  position:relative;
  --prc-band:56vw;                                   /* the photograph's panel */
  --prc-step:46vw;                                   /* one step's panel */
  --prc-tail:calc((100vw - var(--prc-step)) / 2);    /* room after the last step so it too can centre */
  --prc-end:26vw;                                    /* extra travel so the last neighbour fully exits */
  --prc-rate:1.5;                                    /* scroll px per belt px: the pin costs a third less */
  --prc-track:calc(var(--prc-band) + var(--prc-n,7) * var(--prc-step) + var(--prc-tail) + var(--prc-end));
  --prc-top:var(--head-h);                           /* the head sits below the fixed header's band */
}
/* the head is in a .wrap; the belt follows the same column so the list aligns with it */
.prc-belt{position:relative;max-width:var(--maxw);margin-inline:auto;padding-inline:var(--pad)}
/* laid flat, the section keeps the page's own top padding, so its rule sits mid-gap like every other section's */
.prc-top{padding-top:var(--sect)}

/* the band: a still with the one line of copy that sells the process */
.prc-band{margin:0 0 clamp(36px,5vw,64px)}
.prc-fig{position:relative;margin:0;overflow:hidden;border-radius:20px;background:var(--dark);aspect-ratio:4/3}
.prc-img{
  position:absolute;top:0;left:0;width:100%;height:100%;object-fit:cover;
  filter:saturate(.94) contrast(1.04) brightness(.8);
}
.prc-fig.is-missing .prc-img{display:none}
.prc-fig::after{content:"";position:absolute;inset:0;z-index:1;background:linear-gradient(180deg,rgba(11,12,15,0) 40%,rgba(11,12,15,.62))}
.prc-cap{
  position:absolute;left:clamp(20px,2.4vw,40px);right:clamp(20px,2.4vw,40px);bottom:clamp(20px,2.4vw,40px);z-index:2;
  margin:0;color:#fff;font-size:clamp(24px,2.6vw,40px);font-weight:400;letter-spacing:-.03em;line-height:1.08;max-width:24ch;text-wrap:balance;
}

/* the steps */
.prc-list{margin:0;padding:0;list-style:none}
.prc-step{padding:28px 0 32px}
.prc-step + .prc-step{border-top:1px solid var(--rule)}
.prc-no{
  display:block;font-size:clamp(64px,20vw,96px);font-weight:400;letter-spacing:-.04em;line-height:.85;
  color:var(--ink-4);transition:color .5s var(--e-house);
}
.prc-body{padding-top:18px}
.prc-title{font-size:clamp(22px,5vw,28px);font-weight:400;letter-spacing:-.03em;line-height:1.1;text-wrap:balance}
.prc-text{margin-top:12px;font-size:clamp(15px,4vw,17px);line-height:1.5;max-width:46ch;color:var(--ink-2)}
.prc-foot{display:none}

/* flat but wide (reduced motion on a desktop): the steps read as rows */
@media (min-width:901px){
  .prc-fig{aspect-ratio:16/7}
  .prc-step{display:grid;grid-template-columns:minmax(0,4fr) minmax(0,8fr);column-gap:var(--gap);align-items:start}
  .prc-body{padding-top:10px}
}

/* ── the pin ──────────────────────────────────────────────
   Wide screens, motion allowed. The section is as tall as the belt's
   travel plus one screen, so one pixel of scroll moves the belt one
   pixel: height = 100svh + (track − viewport). The stage sticks for
   the whole run; process.js scrubs the belt from the section's
   rect and lights the step nearest the centre.                     */
@media (min-width:901px) and (prefers-reduced-motion:no-preference){
  .prc{height:calc(100svh + (var(--prc-track) - 100vw) / var(--prc-rate))}
  .prc-stage{
    position:sticky;top:0;height:100svh;overflow:hidden;
    display:flex;flex-direction:column;background:var(--paper);
  }
  .prc-top{width:100%;flex:0 0 auto;padding-top:var(--prc-top)}
  .prc-top .head{margin-bottom:0}

  /* the belt fills what the head and the foot leave; the axis at its midpoint */
  .prc-belt{flex:1 1 auto;min-height:0;max-width:none;margin:clamp(16px,3vh,32px) 0 0;padding:0}
  .prc-belt::before{content:"";position:absolute;left:0;right:0;top:50%;height:1px;background:var(--rule)}
  .prc-track{position:absolute;left:0;top:0;bottom:0;width:max-content;display:flex;will-change:transform;backface-visibility:hidden}
  .prc-list{display:flex;flex:0 0 auto;height:100%}
  .prc-list::after{content:"";flex:0 0 calc(var(--prc-tail) + var(--prc-end))}
  .prc-panel{position:relative;height:100%;flex:0 0 var(--prc-step);min-width:0;padding:0 4vw}

  .prc-band{flex-basis:var(--prc-band);margin:0}
  .prc-fig{height:100%;aspect-ratio:auto}
  /* the still is wider than its frame so it can drift as the band leaves */
  .prc-img{left:-12%;width:112%;max-width:none;will-change:transform}

  /* a step: the number stands on the axis, the title and text hang from it */
  .prc-step{display:grid;grid-template-rows:1fr 1fr;grid-template-columns:none;column-gap:0;padding:0 4vw}
  .prc-step + .prc-step{border-top:0}
  /* line-height .85 leaves the digits' feet .075em above the box's foot; pull them to the axis */
  .prc-no{align-self:end;font-size:clamp(96px,14vw,220px);margin-bottom:-.05em}
  .prc-panel.is-live .prc-no{color:var(--ink)}
  .prc-body{padding-top:clamp(20px,2.6vw,36px)}
  .prc-title{font-size:clamp(24px,2.4vw,36px)}
  .prc-text{margin-top:14px;font-size:17px}

  /* the bottom band: one rule for the whole run, the count at its end */
  .prc-foot{
    display:flex;align-items:center;gap:20px;width:100%;flex:0 0 auto;
    padding-top:clamp(16px,3vh,32px);padding-bottom:var(--pad-y);
  }
  .prc-bar{position:relative;flex:1 1 auto;height:1px;background:var(--rule)}
  .prc-fill{position:absolute;left:0;right:0;top:-.5px;height:2px;background:var(--signal);transform:scaleX(0);transform-origin:0 50%}
  .prc-readout{flex:0 0 auto;margin:0;font-size:12px;font-weight:500;letter-spacing:.08em;text-transform:uppercase;line-height:1;color:var(--ink)}
}

/* short screens: the number gives a little so the step stays inside the belt */
@media (min-width:901px) and (max-height:720px) and (prefers-reduced-motion:no-preference){
  .prc-no{font-size:clamp(80px,11vw,160px)}
  .prc-text{font-size:15px}
}

/* ── a phone: the steps as a belt of cards you swipe; the rule and the count keep the place ── */
@media (max-width:900px){
  .prc-band{margin-bottom:22px}
  .prc-fig{aspect-ratio:4 / 3;border-radius:16px}
  .prc-list{
    display:flex;gap:12px;overflow-x:auto;overscroll-behavior-x:contain;scroll-snap-type:x mandatory;
    margin-inline:calc(-1 * var(--pad));padding:4px var(--pad) 8px;scroll-padding-inline:var(--pad);
    scrollbar-width:none;-webkit-overflow-scrolling:touch;
  }
  .prc-list::-webkit-scrollbar{display:none}
  .prc-step{flex:0 0 min(78vw,380px);scroll-snap-align:start;padding:20px 20px 24px;border:1px solid var(--rule);border-radius:16px;background:var(--paper)}
  .prc-step + .prc-step{border-top:1px solid var(--rule)}
  .prc-no{font-size:56px;line-height:.9;color:var(--ink-4);transition:color .4s var(--e-house)}
  .prc-step.is-live .prc-no{color:var(--signal)}
  .prc-body{padding-top:14px}
  .prc-title{font-size:22px}
  .prc-text{font-size:15px}
  .prc-foot{display:flex;align-items:center;gap:18px;margin-top:18px}
  .prc-bar{position:relative;flex:1 1 auto;height:1px;background:var(--rule)}
  .prc-fill{position:absolute;left:0;right:0;top:-.5px;height:2px;background:var(--signal);transform:scaleX(0);transform-origin:0 50%;transition:transform .3s var(--e-out)}
  .prc-readout{flex:0 0 auto;margin:0;font-size:12px;font-weight:500;letter-spacing:.08em;text-transform:uppercase;line-height:1;color:var(--ink)}
}
