/* 04 work as a curved strip (21 Oct 2026, Joe: "run with what you think is best to display work").
   With motion: a run of scroll with a sticky stage; the sites sit on the outside of a gentle curve and turn past as you scroll (or
   drag, or press the arrows). The one facing you plays its recording; its name rises underneath. js/carousel.js.
   Without it: a row of framed stills you can swipe, each with its own caption. */
.h-work { padding-bottom: 0; overflow: clip; }
.h-work .h-giant { margin-bottom: clamp(20px, 3vh, 40px); }
.cx { position: relative; z-index: 2; }
.cx-stage { position: relative; }
.cx-ring { display: flex; gap: 18px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 0 var(--h-gut) clamp(80px, 12vh, 140px); }
.cx-card { position: relative; flex: 0 0 min(78vw, 720px); scroll-snap-align: center; display: block; color: inherit; text-decoration: none;
  background: var(--h-black); outline: 1px solid var(--h-ink); outline-offset: 6px; }
.cx-card::before, .cx-card::after { content: ""; position: absolute; z-index: 2; width: 14px; height: 14px; border: solid var(--h-red); }
.cx-card::before { left: -7px; top: -7px; border-width: 2px 0 0 2px; } .cx-card::after { right: -7px; bottom: -7px; border-width: 0 2px 2px 0; }
.cx-film { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: 50% 0; background: var(--h-black); }
.cx-info { padding: 16px 4px 0; color: var(--h-ink); background: var(--h-paper); }
.cx-tag { font: 800 11px/1 var(--head); letter-spacing: .16em; text-transform: uppercase; color: var(--h-red); }
.cx-info h3 { margin: 10px 0 6px; font: 400 clamp(36px, 4vw, 60px)/.88 var(--big); text-transform: uppercase; }
.cx-info p { margin: 0; font: 600 15px/1.45 var(--head); max-width: 46ch; }
.cx-cap, .cx-nav { display: none; }

/* with motion: the strip on a curve */
html.motion .cx { height: calc((var(--n, 7) - 1) * 62vh + 100vh); height: calc((var(--n, 7) - 1) * 62svh + 100svh); }
html.motion .cx-stage { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; cursor: grab; touch-action: pan-y; }
html.motion .cx-stage.is-drag { cursor: grabbing; }
html.motion .cx-ring { position: absolute; left: 50%; top: 40%; width: 0; height: 0; padding: 0; overflow: visible; display: block;
  perspective: 1800px; perspective-origin: 50% 50%; transform-style: preserve-3d; }
html.motion .cx-card { --w: min(58vw, 64vh * 1.6, 980px); position: absolute; left: calc(var(--w) / -2); top: calc(var(--w) * -0.3125); width: var(--w);
  will-change: transform, opacity; transform-origin: 50% 50%; backface-visibility: hidden; }
html.motion .cx-card .cx-info { display: none; }
/* a paper veil over the sites to the sides, thicker the further they are from you */
html.motion .cx-card .cx-veil { position: absolute; inset: 0; z-index: 1; background: var(--h-paper); opacity: var(--veil, 0); pointer-events: none; }
html.motion .cx-card.is-on { outline-color: var(--h-red); }

/* the caption under the site facing you: each line rises through its own mask */
html.motion .cx-cap { display: grid; position: absolute; left: var(--h-gut); right: var(--h-gut); bottom: clamp(64px, 9vh, 96px);
  grid-template-columns: auto 1fr minmax(0, 36ch); align-items: end; column-gap: clamp(20px, 3vw, 48px); color: var(--h-ink); pointer-events: none; }
.cx-cap > * { overflow: hidden; margin: 0; }
.cx-cap .cx-m { display: block; padding-top: .06em; transition: transform .7s cubic-bezier(.16,.8,.2,1), opacity .4s; }
.cx-cap.is-swap .cx-m { transform: translateY(105%); opacity: 0; transition-duration: .25s; }
.cx-num { font: 400 clamp(40px, 4.4vw, 72px)/.84 var(--big); color: var(--h-red); }
.cx-name { font: 400 clamp(46px, 6.4vw, 112px)/.84 var(--big); text-transform: uppercase; letter-spacing: -.01em; white-space: nowrap; }
.cx-name small { display: block; margin-bottom: 10px; font: 800 11px/1 var(--head); letter-spacing: .16em; color: var(--h-red); }
.cx-line { font: 600 clamp(15px, 1.2vw, 18px)/1.45 var(--head); }
.cx-line a { color: var(--h-red); pointer-events: auto; }

/* arrows and one tick per site along the foot */
html.motion .cx-nav { display: flex; position: absolute; left: var(--h-gut); right: var(--h-gut); bottom: clamp(18px, 3vh, 32px); align-items: center; gap: 18px; }
.cx-btn { width: 40px; height: 40px; border: 1px solid var(--h-ink); border-radius: 50%; background: none; color: var(--h-ink); font: 700 18px/1 var(--head); cursor: pointer; }
.cx-btn:hover { background: var(--h-red); border-color: var(--h-red); color: var(--h-paper); }
.cx-ticks { flex: 1; display: flex; gap: 6px; }
.cx-tick { flex: 1; height: 26px; border: 0; padding: 0; background: none; cursor: pointer; position: relative; }
.cx-tick::before { content: ""; position: absolute; left: 0; right: 0; top: 12px; height: 2px; background: var(--h-ink); opacity: .22; transition: opacity .3s, background .3s; }
.cx-tick.is-on::before { background: var(--h-red); opacity: 1; height: 3px; top: 11px; }

@media (max-width: 760px) {
  .cx-card { flex-basis: 74vw; }
  .cx-film { aspect-ratio: 9 / 16; }
  html.motion .cx { height: calc((var(--n, 7) - 1) * 52svh + 100svh); }
  html.motion .cx-ring { top: 36%; perspective: 900px; }
  html.motion .cx-card { --w: min(62vw, 46vh * .5625); top: calc(var(--w) * -0.8889); }
  html.motion .cx-cap { grid-template-columns: auto 1fr; grid-template-areas: "num name" "line line"; row-gap: 10px; bottom: 76px; }
  .cx-num { grid-area: num; } .cx-name { grid-area: name; white-space: normal; font-size: clamp(36px, 11vw, 56px); } .cx-line { grid-area: line; font-size: 14px; }
}
@media (prefers-reduced-motion: reduce) { .cx-cap .cx-m { transition: none; } }
