/* ==========================================================================
   naseno, werkwijze-animatie (proces) v2
   The stage holds flat shapes positioned in whole pixels by proces.js.
   Colours are computed from the shared tokens (bg, text, one grey, accent).
   ========================================================================== */

.pv { position: relative; container: pv / inline-size; }
.pv-probe { position: absolute; width: 0; height: 0; overflow: hidden; }

/* ---------- layout ---------- */
.pv-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gutter); align-items: start; }
.pv-steps { grid-column: 1 / span 4; display: grid; gap: 2px; margin: 0; padding: 0; list-style: none; }
.pv-stage { grid-column: 5 / -1; }
.pv-cap { display: none; }

/* scroll: a tall track, the stage stays put just under the header */
.pv[data-mode="scroll"] .pv-track { height: calc((var(--pv-n, 6) + 1) * 65vh); }
.pv[data-mode="scroll"] .pv-sticky { position: sticky; top: 0; height: 100svh; display: grid; align-content: center; padding-top: 56px; }

/* ---------- step names ---------- */
.pv-steps button { display: grid; justify-items: start; text-align: left; width: 100%; padding: 6px 0; color: var(--muted); transition: color .18s linear; }
.pv-steps .pv-n { font-family: var(--font-display); font-weight: var(--d-weight); letter-spacing: calc(var(--d-track) * .6); line-height: 1.05; font-size: var(--d-s); text-transform: var(--d-case); }
.pv-steps .pv-l { display: block; overflow: hidden; max-height: 0; opacity: 0; color: var(--fg); font-size: var(--t1); line-height: 1.3;
  transition: max-height .32s var(--ease), opacity .22s linear, margin .32s var(--ease); }
.pv-steps li.on button { color: var(--head); }
.pv-steps li.on .pv-l { max-height: 4em; opacity: 1; margin-top: 8px; margin-bottom: 6px; }
.pv-steps li:not(.on) button:hover { color: var(--fg); }

/* ---------- stage ---------- */
.pv-frame { position: relative; aspect-ratio: 16 / 10; max-height: calc(100svh - 120px); width: 100%; overflow: hidden; }
.ps { position: absolute; display: block; left: 0; top: 0; width: 0; height: 0; }

/* ---------- static: no motion ---------- */
@media (prefers-reduced-motion: reduce) { .pv * { transition: none !important; } }

/* ---------- narrow ---------- */
@container pv (max-width: 760px) {
  .pv-grid { grid-template-columns: minmax(0, 1fr); row-gap: 14px; }
  .pv-steps, .pv-stage, .pv-cap { grid-column: 1 / -1 !important; }
  .pv-steps { display: flex; gap: 18px; overflow-x: auto; scrollbar-width: none; margin-inline: calc(var(--pad, var(--margin)) * -1); padding-inline: var(--pad, var(--margin)); }
  .pv-steps::-webkit-scrollbar { display: none; }
  .pv-steps li { flex: none; }
  .pv-steps .pv-n { font-family: var(--font-body); font-weight: var(--w-medium); letter-spacing: 0; font-size: var(--t0); }
  .pv-steps .pv-l { display: none; }
  .pv-cap { display: block; margin: -2px 0 0; font-size: var(--t1); line-height: 1.3; min-height: 2.6em; }
  .pv[data-mode="scroll"] .pv-sticky { padding-top: 56px; height: 100svh; display: grid; align-content: center; }
  .pv-frame { aspect-ratio: 4 / 5; max-height: calc(100svh - 72px - 48px - 14px - 14px - 3.4em - 24px); height: auto; width: 100%; }
}
