/* ============================================================
   UNFOLD: the About page's scroll animation (paper ball unfolds into a face).
   Built on tokens.css only. Driven by shared/unfold.js.
   Without JS or with reduced motion: no pin, the face and all quotes are listed.
   ============================================================ */
.page--unfold{background:var(--black-deep)} /* dark behind the floating nav: the page opens straight on the stage */
.unfold-band{background:var(--black-deep);color:var(--on-ink)}
.unfold-band :focus-visible{outline-color:var(--on-ink)}
.unfold-band .btn{--fill:var(--ground);--fill-fg:var(--ink)} /* ink on ink would vanish: the grow fill is white here */

.unfold{position:relative}
.unfold.is-live{height:380vh} /* 100vh stage + 3.5 steps of 80vh: 3 photo changes, then a short hold (HOLD in unfold.js) */
.unfold__stage{position:relative;display:grid;gap:var(--s-6);justify-items:center;padding:var(--s-7) var(--gutter)}
.unfold.is-live .unfold__stage{position:sticky;top:0;height:100svh;place-items:center end;overflow:hidden;padding-block:0} /* head on the right */

.unfold__frame{position:relative;width:min(100%,30rem);aspect-ratio:4/5}
.unfold.is-live .unfold__frame{width:auto;height:min(80svh,118vw);max-width:100%}
.unfold__canvas,.unfold__frame noscript img{display:block;width:100%;height:100%}
.unfold__cue{position:absolute;left:50%;bottom:calc(var(--s-5) * -1);transform:translate(-50%,100%);display:none;font:var(--fw-medium) var(--fs-xs)/1 var(--font-text);text-transform:uppercase;letter-spacing:var(--track-label);opacity:var(--cue,1);transition:opacity var(--t-slow) var(--ease-soft)}
.unfold.is-live .unfold__cue{display:block}

/* quotes: one per step while pinned, a plain list otherwise */
.unfold__quotes{display:grid;gap:var(--s-6);width:min(100%,36rem);margin:0;padding:0;list-style:none}
.unfold__quotes li{display:grid;gap:var(--s-3);justify-items:start;align-content:start}
.unfold__no{margin:0;font:var(--fw-bold) var(--fs-xs)/1 var(--font-text);letter-spacing:var(--track-label);color:var(--hot)} /* number = heat */
.unfold__quotes q{quotes:none;font-size:var(--fs-quote);font-weight:var(--fw-bold);line-height:var(--lh-tight);text-wrap:balance}
.unfold__ask{margin:0;font:var(--fw-bold) var(--fs-lg)/var(--lh-snug) var(--font-text)}

/* picker wheel (like the iPhone time picker): the current quote big in the middle, the one before and
   after as a single line in a light grey box above and below, as wide as the column.
   unfold.js wraps each li's content in .unfold__full, adds a one-line .unfold__line, and sets every
   frame from the scroll: --y (centre, px), --h (box height, px), --k (size of the full quote),
   --fa / --la (opacity of full quote / line), --box (0 no box .. 1 full box), --a (whole item). */
.unfold.is-live .unfold__quotes{
  --pad:var(--s-4);
  position:absolute;z-index:2;left:var(--gutter);top:0;bottom:0;display:block;
  width:min(46rem,calc(100vw - var(--gutter) * 2 - min(80svh,118vw) * .8 - var(--s-6))) /* up to the face */
}
.unfold.is-live .unfold__quotes li{
  --y:0;--h:0;--k:1;--fa:1;--la:0;--a:1;--box:0;
  position:absolute;left:calc(var(--pad) * -1);top:50%;margin:0;box-sizing:border-box;
  width:calc(100% + var(--pad) * 2);height:calc(var(--h) * 1px);overflow:hidden;
  padding:var(--pad);border-radius:calc(var(--r) * 2);
  background:rgb(255 255 255 / calc(var(--box) * .1));
  box-shadow:inset 0 0 0 1px rgb(255 255 255 / calc(var(--box) * .16));
  opacity:var(--a);
  transform:translateY(calc(var(--y) * 1px - 50%));will-change:transform,opacity,height
}
.unfold.is-live .unfold__quotes q{text-wrap:pretty} /* fill the column instead of balancing short lines */
.unfold__full{display:grid;gap:var(--s-3);justify-items:start;transform-origin:0 0;transform:scale(var(--k,1));opacity:var(--fa,1)}
.unfold__line{display:none}
.unfold.is-live .unfold__line{
  display:block;position:absolute;left:var(--pad);right:var(--pad);top:var(--pad);margin:0;opacity:var(--la);
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
  font:var(--fw-medium) var(--fs-lg)/var(--lh-snug) var(--font-text);color:rgb(255 255 255 / .72) /* light grey */
}
.unfold__line b{margin-right:var(--s-3);font-size:var(--fs-xs);font-weight:var(--fw-bold);letter-spacing:var(--track-label);color:var(--hot)}
.unfold.is-live .unfold__quotes li.is-side{cursor:pointer}
.unfold.is-live .unfold__quotes li.is-side:hover{--box:1.4}
.unfold.is-live .unfold__quotes li.is-side *{pointer-events:none}
.unfold.is-live .unfold__quotes li.is-gone{visibility:hidden}

.unfold__progress{display:none}
.unfold.is-live .unfold__progress{display:block;position:absolute;z-index:2;left:0;right:0;bottom:0;height:var(--s-2);background:var(--ink-muted)}
.unfold__prog{position:absolute;inset:0;background:var(--on-ink);transform:scaleX(0);transform-origin:0 50%}

@media (max-width:720px){
  /* phone: head up high, quotes big and heavy across the lower half */
  .unfold.is-live .unfold__stage{place-items:start center;padding-top:calc(var(--s-9) - var(--s-2))}
  .unfold.is-live .unfold__frame{height:min(42svh,86vw);margin-top:0}
  .unfold.is-live .unfold__quotes{--pad:var(--s-3);top:calc(var(--s-9) + min(42svh,86vw));bottom:var(--s-6);left:var(--gutter);right:var(--gutter);width:auto}
  .unfold.is-live .unfold__quotes li{left:calc(var(--s-2) * -1);width:calc(100% + var(--s-2) * 2);padding:var(--s-3) var(--s-2)} /* boxes keep clear of the screen edge */
  .unfold.is-live .unfold__line{left:var(--s-2);right:var(--s-2);font-size:var(--fs-sm)}
}
@media (prefers-reduced-motion:reduce){
  .unfold__cue{transition:none}
}

/* ?debug panel (see unfold.js) */
.unfold__debug{position:fixed;z-index:200;right:var(--s-3);bottom:var(--s-3);margin:0;padding:var(--s-3) var(--s-4);background:var(--ink);color:var(--on-ink);border:var(--bw) solid var(--on-ink);border-radius:var(--r);font:var(--fw-medium) var(--fs-xs)/var(--lh-snug) var(--font-mono);pointer-events:none}
