/* ===== Process (light screen before "Selected projects") =====
   Soft Plaster, charcoal ink, clay accents. A heading block, then the six stages as a
   horizontal strip of panels (photo + one big figure + title + text) that process.js pins
   and moves sideways with the scroll; a step scale along the bottom tracks progress. */
.process {
  position: relative; z-index: 61;
  --ink: #191814; --ink-2: rgba(25,24,20,.56); --rule: rgba(25,24,20,.14);
  background: var(--plaster); color: var(--ink);
}
.process ::selection { background: var(--clay); color: var(--plaster); }
.process h2, .process h3 { color: var(--ink); } /* site-wide heading colour is plaster (dark pages) */

.pc-head {
  max-width: 1600px; margin: 0 auto; padding: 140px var(--margin) 72px;
  display: grid; gap: 22px;
}
.pc-label { margin: 0; font: 500 11px/1.4 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--clay); }
.pc-h2 { margin: 0; font: 600 clamp(44px, 8vw, 132px)/.92 var(--display); letter-spacing: -.015em; text-transform: uppercase; }
.pc-lead { margin: 0; max-width: 40ch; font: 400 clamp(17px, 1.5vw, 22px)/1.35 var(--sans); color: var(--ink-2); }

/* panels (phones: a plain vertical list) */
.pc-pin { position: relative; }
.pc-track { display: grid; gap: 56px; padding: 0 var(--margin) 96px; }
.pc-panel { display: grid; gap: 24px; }
.pc-photo { position: relative; margin: 0; overflow: hidden; aspect-ratio: 4 / 3; background: #e2ddd1; } /* phones: landscape keeps the list short */
.pc-photo img { position: absolute; left: -6%; top: 0; width: 112%; height: 100%; object-fit: cover; } /* wider: drifts sideways (parallax) */
.pc-copy { display: grid; align-content: start; gap: 18px; }
/* duration: "Up to  2  days" on one baseline — the figure large, the words around it small */
.pc-figure {
  margin: 0; display: flex; flex-wrap: wrap; align-items: baseline; column-gap: .09em;
  font: 500 clamp(76px, 9vw, 150px)/.9 var(--display); letter-spacing: -.045em; color: var(--ink);
}
.pc-figure b { font-weight: 500; font-variant-numeric: tabular-nums; }
.pc-figure small, .pc-figure em {
  font: 400 clamp(17px, 1.5vw, 24px)/1 var(--display); letter-spacing: -.005em; font-style: normal; color: var(--ink-2);
}
.pc-figure small { margin-right: .35em; }
.pc-figure--word { font-size: clamp(52px, 5.6vw, 96px); letter-spacing: -.03em; }
.pc-title { margin: 8px 0 0; max-width: 16ch; padding-top: 18px; border-top: 1px solid var(--rule); font: 600 clamp(24px, 2.4vw, 38px)/1.04 var(--display); letter-spacing: -.01em; }
.pc-text { margin: 0; max-width: 36ch; font: 400 clamp(16px, 1.25vw, 19px)/1.42 var(--sans); color: var(--ink-2); }
/* closing card: charcoal, plaster type, the total + the CTA + the footnote */
.pc-card {
  display: grid; align-content: end; justify-items: start; gap: 28px;
  padding: 40px 32px; background: var(--ink); color: var(--plaster); min-height: 420px;
}
.pc-card-label { margin: 0; font: 500 11px/1.4 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: rgba(239,235,225,.55); }
.pc-card .pc-figure { color: var(--plaster); }
.pc-card .pc-figure small, .pc-card .pc-figure em { color: rgba(239,235,225,.6); }
.pc-foot { margin: 8px 0 0; padding-top: 18px; border-top: 1px solid rgba(239,235,225,.16); max-width: 46ch; font: 400 13px/1.45 var(--sans); color: rgba(239,235,225,.55); }

.pc-scale { display: none; }

/* desktop: pinned horizontal strip */
@media (min-width: 1000px) {
  .pc-head { grid-template-columns: 1.2fr 1fr; align-items: end; padding: 200px var(--margin) 110px; }
  .pc-head .pc-label { grid-column: 1 / -1; }
  .pc-head .pc-lead { justify-self: end; }
  .pc-pin { height: 100vh; overflow: hidden; display: flex; flex-direction: column; justify-content: center; }
  .pc-track {
    display: flex; gap: 0; width: max-content; padding: 0 0 0 var(--margin);
    height: min(68vh, 720px);
  }
  .pc-panel {
    flex: none; height: 100%; width: min(76vw, 1240px);
    grid-template-columns: minmax(0, .95fr) minmax(0, 1fr); gap: 56px; padding-right: 7vw;
  }
  .pc-photo { aspect-ratio: auto; height: 100%; }
  .pc-copy { align-content: end; padding-bottom: 6px; }
  .pc-panel--end { width: min(48vw, 760px); grid-template-columns: 1fr; padding-right: var(--margin); }
  .pc-card { height: 100%; min-height: 0; padding: 56px; }

  /* engineer's rule along the bottom: graduations (minor every 8px, mid every 40px, a long
     tick at each stage), the passed part inked, a clay cursor reading the current stage */
  .pc-pin { justify-content: flex-start; padding-top: 11vh; }
  .pc-track { height: min(58vh, 660px); }
  .pc-scale { position: absolute; left: var(--margin); right: var(--margin); bottom: 4vh; display: block; max-width: calc(100% - 2 * var(--margin)); } /* width snapped to the tick step by process.js */
  .pc-ruler { position: relative; height: 24px; border-top: 1px solid var(--ink); }
  /* ticks: drawn by process.js on whole pixels from the ruler's width — 30 equal divisions
     per stage; the inked copy is clipped to the scrolled part */
  .pc-ticks { position: absolute; left: 0; top: 0; height: 24px; overflow: visible; shape-rendering: crispEdges; }
  .pc-ticks path { stroke: rgba(25,24,20,.24); stroke-width: 1; }
  .pc-ticks--on { clip-path: inset(0 calc(100% - var(--p, 0) * 100%) 0 0); }
  .pc-ticks--on path { stroke: var(--ink); }
  .pc-cursor {
    position: absolute; top: -1px; left: calc(var(--p, 0) * 100%); width: 1px; height: 30px; background: var(--clay);
  }
  .pc-cursor::before { /* small triangle riding on the rule */
    content: ""; position: absolute; left: -5px; top: -7px; border: 5px solid transparent; border-top: 6px solid var(--clay); border-bottom: 0;
  }
  .pc-cursor span {
    position: absolute; left: 8px; top: -26px; white-space: nowrap;
    font: 500 11px/1 var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--clay);
  }
  .pc-cursor span { transition: opacity .4s ease; }
  .pc-scale.is-end .pc-cursor span { opacity: 0; } /* near the end the readout just fades out */
  .pc-stages { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(6, 1fr); }
  .pc-stages li { position: relative; display: grid; grid-template-columns: auto 1fr; column-gap: 8px; row-gap: 4px; padding: 14px 16px 0 0; color: rgba(25,24,20,.32); transition: color .5s ease; }
  .pc-stages span { font: 500 11px/1.3 var(--sans); letter-spacing: .1em; }
  .pc-stages b { font: 500 11px/1.3 var(--sans); letter-spacing: .1em; text-transform: uppercase; }
  .pc-stages em { grid-column: 2; font: 400 13px/1.3 var(--sans); font-style: normal; letter-spacing: 0; }
  .pc-stages li.is-on { color: var(--ink); }
  .pc-stages li.is-on span { color: var(--clay); }
  .pc-stages li.is-on em { color: var(--ink-2); }
  .pc-note-wrap { margin-top: 96px; margin-left: calc(100% / 6 * 2); }
}
