/* Variant: the panels travel sideways while the page scrolls down.
   Loaded after styles.css, only by horizontal.html. */

.hscroll { position: relative; margin-top: var(--gap); }   /* height is set from the track width */
.hsticky {
  position: sticky; top: 0;
  height: 100vh; height: 100svh;
  overflow: hidden;
}

.htrack {
  position: absolute; left: 0; top: 0; bottom: 0;
  display: flex; align-items: stretch; gap: var(--gap);
  padding: 88px calc(var(--m) + 8vw) 64px var(--m);
  will-change: transform;
}
.hcol { width: 400px; flex: none; display: flex; flex-direction: column; gap: var(--gap); }
.hcol-w { width: 460px; }
.hcol > .panel { flex: 1; min-height: 0; transform-origin: 50% 50%; will-change: transform; }
.hcol > .p-ship, .hcol > .p-fork { flex: 0 0 auto; }

.hcol-title { width: 420px; justify-content: flex-end; padding: 0 24px 24px 8px; }
.hcol-title h2 { font-size: 52px; line-height: 1.02; letter-spacing: -0.05em; }
.hcol-title .lead { margin-top: 18px; max-width: 24ch; }

/* panels follow the track every frame: no transform transition, only the reveal fade */
.htrack .panel.rv { transition: opacity 700ms var(--ease-out) !important; transform: none; }

/* crops sized for a viewport-tall column */
.hcol .crop-lineage { height: auto; flex: 1; min-height: 0; }
.hcol .crop-threads { height: auto; flex: 1; min-height: 0; }
.hcol .p-lineage, .hcol .p-threads { justify-content: flex-start; }

/* small screens: no pinning, the columns simply stack */
@media (max-width: 860px) {
  .hscroll { height: auto !important; }
  .hsticky { position: static; height: auto; overflow: visible; perspective: none; }
  .htrack { position: static; flex-direction: column; padding: 0 var(--m); transform: none !important; }
  .hcol, .hcol-w, .hcol-title { width: auto; }
  .hcol-title { padding: 32px 4px 8px; }
  .hcol-title h2 { font-size: 36px; }
  .hcol-title .lead { display: none; }
  .hcol > .panel { transform: none !important; }
  .hcol .crop-lineage, .hcol .crop-threads { flex: none; height: 400px; }
}

/* posts: four cards, the whole block centered in the column */
.hcol .p-voices { justify-content: center; gap: 28px; }
.hcol .p-voices .stack { --cards: 4; }
@media (max-height: 820px) { .hcol .p-voices .stack { --cards: 3; } }

/* the title column reveals like the panels */
.hcol-title.rv { transition: opacity 700ms var(--ease-out) !important; transform: none; }
.hcol-title.rv .lead { opacity: 0; transform: translateY(10px); transition: opacity 700ms var(--ease-out) 320ms, transform 700ms var(--ease-out) 320ms; }
.hcol-title.rv.in .lead { opacity: 1; transform: none; }
