/* Hero right column: three film excerpts laid out as an archive sheet. Every picture is 16:9 and the
   same width; what changes from one to the next is where it hangs and the notes round it (a column of
   catalogue lines, words with leader lines, a hairline console drawing). All three covers
   are dark, so the column reads as one sheet while nothing plays. Red is used once as a shape (a small square
   in the drawing beside 夜班) and otherwise only to say "playing". */
/* equal space inside both frame lines, so 幻·长安's left edge and 木兰's right edge sit the same distance in */
.hero-side.film-side { justify-content: stretch; padding: 0 clamp(16px, 1.5vw, 28px); min-width: 0; }
.film-side .card[hidden] { display: none; }

/* The column's full height, the films spread with equal space above, between and below them (space-evenly).
   Every picture is --fw of the column's width (76%, raised from 70% on 2026-10-06 so the films read larger);
   the rest holds the notes. Width capped by the screen's height so that space never runs out: the three
   pictures add up to about 1.28 × this width, the notes to about 130px, and the four gaps keep at least 30px each. */
.archive { --fw-n: 76; --fw: calc(var(--fw-n) * 1%); --rest: calc(100% - var(--fw)); flex: 1; position: relative; width: min(100%, calc(78svh - 207px)); margin: 0 auto; display: flex; flex-direction: column; justify-content: space-evenly; font-size: 11px; color: var(--muted); }
/* Type, as chosen in the film workbench on 2026-10-06: notes in Departure Mono, their Chinese falling
   through to Fusion Pixel; Chinese titles in Jetson Titles (our subset of Smiley Sans, renamed as its licence asks); the English film names in Cabinet Grotesk italic. */
.archive .mono { font-family: "Departure Mono", "Fusion Pixel 12px", var(--f-zh), monospace; letter-spacing: 0.02em; text-transform: none; }
.archive .f-title b { font-family: "Jetson Titles", var(--f-zh), sans-serif; }
.archive .f-title [lang="en"] { font-family: "Cabinet Grotesk", var(--f-zh), sans-serif; font-size: 12px; font-style: italic; }

.film { position: relative; margin: 0; display: grid; column-gap: 14px; row-gap: 6px; }
.f-win { position: relative; width: 100%; min-width: 0; aspect-ratio: 16 / 9; background: #111; }
.f-win video, .f-cover { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: cover; }
/* the cover lies over the picture whenever it isn't playing, and lifts once frames are running */
.f-cover { transition: opacity 0.35s ease; }
.film.is-playing .f-cover { opacity: 0; }
.f-btn { position: absolute; inset: 0; z-index: 2; padding: 0; border: 0; background: none; cursor: pointer; }
.f-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.f-title { display: flex; align-items: baseline; gap: 12px; min-width: 0; color: var(--fg); }
.f-title b { font-weight: 550; font-size: 15px; white-space: nowrap; }
.f-title .mono { font-size: 10.5px; color: var(--muted); white-space: nowrap; }
.f-rec { position: absolute; font-size: 10px; color: var(--accent); opacity: 0; transition: opacity 0.2s; pointer-events: none; }
.film.is-playing .f-rec { opacity: 1; }

/* 01: hangs from the left; title above, a column of catalogue lines to its right */
.f1 { grid-template-columns: var(--fw) auto; column-gap: 10px; grid-template-areas: "win meta"; }
.f1 .f-title b, .f2 .f-title b, .f3 .f-title b { font-size: 15px; letter-spacing: 0.06em; }
/* the title rows sit close to the picture's edge: a tight line box, 4px off it (see the hanging rules below) */
.f1 .f-title, .f2 .f-title, .f3 .f-title { line-height: 1; }
.f1 .f-win { grid-area: win; }
.f1 .f-meta { grid-area: meta; display: flex; flex-direction: column; font-size: 10.5px; line-height: 1.35; }
/* grouped like a field card: label over value on the picture's top edge; the genre set upright in the
   bottom left corner, resting on a faint dash that sits on the picture's bottom edge */
.f1 .f-meta p { margin: 0; display: flex; flex-direction: column; white-space: nowrap; }
.f1 .f-meta p + p { margin-top: 0.9em; }
.f1 .f-meta .k { color: var(--faint); }
.f1 .f-meta .down { display: block; margin-top: auto; padding-top: 0.6em; align-self: flex-start; writing-mode: vertical-rl; text-orientation: upright; letter-spacing: 0.04em; }
.f1 .f-meta .end { margin-top: 0.2em; }
:root[lang="en"] .f1 .f-meta .down { text-orientation: mixed; letter-spacing: 0.02em; }

/* 02: hangs from the right; words scattered to its left run leader lines towards it (folded, short level, long slant), stopping short; title below */
.f2 { grid-template-columns: var(--rest) var(--fw); column-gap: 0; grid-template-areas: "labels win"; }
.f2 .f-labels { grid-area: 1 / 1 / 2 / 3; position: relative; z-index: 3; pointer-events: none; font-size: 10.5px; }
.f2 .f-labels svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.f2 .f-labels polyline { fill: none; stroke: var(--muted); stroke-width: 1; vector-effect: non-scaling-stroke; }
.f2 .f-labels > span { position: absolute; left: calc(var(--x) * 1%); top: calc(var(--y) * 1%); transform: translate(calc(-100% - 5px), -50%); white-space: nowrap; }
.f2 .f-labels > span[data-flush] { left: 0; transform: translateY(-50%); }
/* the far end of each line, a little way off the picture's edge */
.f2 .f-labels i { position: absolute; left: calc(var(--x) * 1%); top: calc(var(--y) * 1%); width: 3px; height: 3px; border-radius: 50%; background: var(--fg); transform: translate(-50%, -50%); }
.f2 .f-win { grid-area: win; }
.f2 .f-title .note { margin-left: auto; }
.f2 .f-rec { left: var(--rest); top: -16px; }

/* 03: hangs from the left like 01; title above, a note below left; a construction drawing to its right */
/* the one column is set outright: left to auto, Safari kept the picture's old width after a resize */
.f3 { width: var(--fw); grid-template-columns: minmax(0, 1fr); grid-template-areas: "win"; }
.f3 .f-note { margin: 0; font-size: 10.5px; line-height: 1.5; position: relative; z-index: 1; }
.f3 .f-win { grid-area: win; }
/* The open space right of 夜班 holds one grey hairline instrument (a scope that is radar and oscilloscope at once). The box
   spans the whole space, from the picture's edge to the column's, picture-high; the drawing sits in its
   middle, so it is centred between the two edges. --room is that space as a share of the figure's width
   (the column is 100 / --fw of it). */
.f3 { --room: calc((100 - var(--fw-n)) / var(--fw-n) * 100%); }
/* The column's one red shape: a square in the space right of 夜班, its right edge on the column's (and so
   on 木兰's), standing on 夜班's base line. Chosen from a bar, a half disc and this square on 2026-10-06. */
.f3 .f-mark { position: absolute; bottom: 0; left: calc(100% + var(--room)); width: calc(var(--room) * 0.46); aspect-ratio: 1; transform: translateX(-100%); background: var(--accent); }
/* The square's one slow motion, in the spirit of FIG_JC.01's turning ring: a night-shift clock in white on the
   red, showing the local time with its colons blinking each second; while 夜班 plays it counts the film's own
   time and the colons hold. Chosen from a turning tick ring, a scan line, this clock and a standby light on 2026-10-06. */
.f3 .f-mark { container-type: inline-size; overflow: hidden; color: #fff; }
.m-clock { position: absolute; right: 9cqw; bottom: 8cqw; font: 13cqw/1 "Departure Mono", monospace; letter-spacing: 0.02em; }
.m-clock b { font-weight: inherit; }
.m-clock i { font-style: normal; animation: f-colon 1s steps(1) infinite; }
.f3.is-playing .m-clock i { animation: none; }
@keyframes f-colon { 50% { opacity: 0.2; } }
@media (prefers-reduced-motion: reduce) { .m-clock i { animation: none; } }
.f3 .f-vector[hidden] { display: none; }
.f3 .f-vector { position: absolute; left: 100%; top: 0; bottom: 0; width: var(--room); height: 100%; overflow: visible; pointer-events: none; }
.f-vector g { fill: none; stroke: var(--muted); stroke-width: 1; vector-effect: non-scaling-stroke; }
.f-vector .hl { opacity: 0.42; }
.f-vector .lo { opacity: 0.24; }
.f-vector .dash { stroke-dasharray: 2 3; }
/* the one red mark, a target on the radar: square, so it never reads as the round "● play" dot */
.f-vector .seal { fill: var(--accent); }
.f-vector .wedge { fill: var(--muted); opacity: 0.1; stroke: none; }
/* slow running: the sweep turns once in 8s about the scope's centre; the trace slides one period in 4s */
.f-vector .sweep { transform-box: view-box; transform-origin: 75px 50px; animation: f-sweep 8s linear infinite; }
.f-vector .trace { animation: f-trace 4s linear infinite; }
@keyframes f-sweep { to { transform: rotate(360deg); } }
@keyframes f-trace { to { transform: translateX(25.3333px); } }
@media (prefers-reduced-motion: reduce) { .f-vector .sweep, .f-vector .trace { animation: none; } }
.f-vector .blip { fill: var(--muted); opacity: 0.5; }

/* The pictures keep the rhythm. Title rows and the bottom note hang off their picture, out of the flow,
   so the gaps are measured picture to picture; each title sits in the gap beside it (between 木兰 and 夜班,
   both titles share one gap). */
.f1 .f-title, .f3 .f-title { position: absolute; left: 0; bottom: calc(100% + 4px); }
.f1 .f-title { width: var(--fw); }
.f2 .f-title { position: absolute; left: var(--rest); right: 0; top: calc(100% + 4px); }
.f3 .f-note { position: absolute; left: 0; top: calc(100% + 4px); }
.f1 .f-rec { right: var(--rest); bottom: calc(100% + 6px); }
.f3 .f-rec { right: 0; bottom: calc(100% + 6px); }

@media (max-width: 860px) {
  .hero-side.film-side { padding: 8px 0 40px; }
  /* fixed gaps that hold two hanging title rows; room above and below for the first title and the last note */
  .archive { --fw-n: 70; width: 100%; gap: 64px; padding: 26px 0 24px; }
  .f1 { grid-template-columns: 66% auto; }
  .f1 .f-meta .end { display: none; }
  .f3 { width: 78%; --room: 28.205%; }
}
@media (prefers-reduced-motion: reduce) { .f-rec, .f-cover { transition: none; } }
@media (min-width: 861px) and (max-height: 700px) { .f1 .f-meta .end { display: none; } }

/* The film workbench borrows the page font workbench's panel styles and sits just left of it. */
.filmbench .fw-trio { display: grid; grid-template-columns: 1fr 1fr auto; gap: 10px; margin: 4px 0 6px; color: var(--muted); font-size: 11px; }
.filmbench .fw-trio label { display: flex; align-items: center; gap: 4px; }
.filmbench .fw-trio select { min-width: 0; flex: 1; font: inherit; color: var(--fg); background: var(--bg); border: 1px solid var(--line); padding: 3px; }
.filmbench .fw-it input { accent-color: var(--accent); margin: 0; }
