/* The home page's animated hero, version 2 (13 November 2026): the stage over the still and the rail under it.
   Tokens only (the site's own names); lengths in rem, hairlines in px. assets/hero2/stage.js says how it plays. */

/* the stage: an overlay the still's exact size, inside its rounded frame; it never takes a click, so the still's link opens the screen */
.pg-home .hx2-fig .hx2 { position: absolute; left: 0; top: 0; width: 100%; aspect-ratio: 1440 / 900; z-index: 1; overflow: hidden;
  border-radius: var(--v3-r-win); pointer-events: none; visibility: hidden; contain: layout paint; background: var(--bg); }
.pg-home .hx2-fig.hx2-on .hx2 { visibility: visible; }
.pg-home .hx2-fig.hx2-narrow .hx2 { display: none; }
/* the agent's window on its own, over the app's right edge (timing.js stage.agent 'float'): a layer the window's size that does not
   clip, so the floating window can hang past the edge; the window's shadow and corner are the site's own window tokens */
.pg-home .hx2-fig .hx2-over { position: absolute; left: 0; top: 0; width: 100%; aspect-ratio: 1440 / 900; z-index: 2; pointer-events: none; visibility: hidden; }
.pg-home .hx2-fig.hx2-on .hx2-over { visibility: visible; }
.pg-home .hx2-fig.hx2-narrow .hx2-over { display: none; }
.pg-home .hx2-fig .hx2-float { position: absolute; right: -3%; top: 12%; width: 36%; aspect-ratio: 520 / 655; overflow: hidden;
  border-radius: var(--v3-r-win); box-shadow: var(--shadow-window); visibility: hidden; opacity: 0; }
.pg-home .hx2-fig .hx2-float .hx2-pane { visibility: visible; opacity: 1; }
.pg-home .hx2-fig .hx2-pane { position: absolute; inset: 0; visibility: hidden; opacity: 0; }
.pg-home .hx2-fig .hx2-pane iframe { position: absolute; left: 0; top: 0; display: block; border: 0; margin: 0; padding: 0;
  transform-origin: 0 0; background: transparent; pointer-events: none; }

/* the rail: four items in one row under the window, above the caption; type and colour from the chapter bar; windows under 1024 keep
   the page as it was */
.pg-home .hx2-rail { display: none; }
@media (min-width: 64em) {
  .pg-home .hx2-rail { display: flex; align-items: flex-start; gap: 1.5rem; margin-top: 1.25rem; }
}
.pg-home .hx2-rail ol { flex: 1; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.5rem; margin: 0; padding: 0; list-style: none; }
.pg-home .hx2-fig.hx2-live .hx2-rail li:not([data-has]) { visibility: hidden; }
.pg-home .hx2-rail li button { display: flex; flex-direction: column; align-items: stretch; gap: 0.625rem; width: 100%; margin: 0; padding: 0;
  border: 0; background: none; text-align: left; cursor: pointer; color: var(--ink-3); font: 500 0.8125rem/1.25rem var(--font-sans);
  transition: color 0.1s cubic-bezier(0.25, 0.46, 0.45, 0.94); }
.pg-home .hx2-rail li button:hover, .pg-home .hx2-rail li.on button { color: var(--ink); }
/* the loop's wrap is a cut: for that one frame the labels change without their colour ease (assets/hero2/stage.js) */
.pg-home .hx2-rail.hx2-cut li button { transition: none; }
.pg-home .hx2-rail .hx2-bar { display: block; height: 2px; overflow: hidden; border-radius: 1px; background: color-mix(in oklab, var(--ink) 12%, transparent); }
.pg-home .hx2-rail .hx2-bar i { display: block; height: 100%; background: var(--ink); transform: scaleX(0); transform-origin: 0 50%; }
.pg-home .hx2-rail .hx2-l { display: block; }
.pg-home .hx2-rail .hx2-d { display: block; min-height: 2.5rem; color: var(--ink-3); font-weight: 400; visibility: hidden; text-wrap: pretty; }
.pg-home .hx2-rail li.on .hx2-d { visibility: visible; }

/* pause and play, at the rail's right end: 44 px to tap; the icon drawn with the text colour */
.pg-home .hx2-rail .hx2-pp { flex: none; display: grid; place-items: center; width: 2.75rem; height: 2.75rem; margin: -0.875rem -0.75rem 0 0;
  padding: 0; border: 0; border-radius: 50%; background: none; color: var(--ink-3); cursor: pointer;
  transition: color 0.1s cubic-bezier(0.25, 0.46, 0.45, 0.94), background-color 0.1s cubic-bezier(0.25, 0.46, 0.45, 0.94); }
.pg-home .hx2-rail .hx2-pp:hover { color: var(--ink); background: color-mix(in oklab, var(--ink) 6%, transparent); }
.pg-home .hx2-rail .hx2-ic { position: relative; display: block; width: 0.75rem; height: 0.75rem; }
.pg-home .hx2-rail .hx2-ic::before, .pg-home .hx2-rail .hx2-ic::after { content: ""; position: absolute; top: 0; bottom: 0; width: 0.25rem; border-radius: 1px; background: currentColor; }
.pg-home .hx2-rail .hx2-ic::before { left: 0.0625rem; }
.pg-home .hx2-rail .hx2-ic::after { right: 0.0625rem; }
.pg-home .hx2-fig.hx2-paused .hx2-rail .hx2-ic::before { left: 0.125rem; width: 0.625rem; border-radius: 0; clip-path: polygon(0 0, 100% 50%, 0 100%); }
.pg-home .hx2-fig.hx2-paused .hx2-rail .hx2-ic::after { display: none; }
.pg-home .hx2-fig.hx2-still .hx2-rail .hx2-pp { visibility: hidden; }
