/* performance.css — the Performance register.
   Composition:
     SHELL:  SH-2RAIL-L — global rail, no local rail
     BODY:   MK-CAPS + intro + NV-FILTER + PERFORMANCE SPREADS ×N

   Unlike Research (a text register) and Aural (a coded contact sheet), this
   index is led by the image: a performance is known by what it looked like.
   Each entry is a spread — one large documentary still (3:2) beside one detail
   still (4:5), bottoms aligned, the record beneath the large still. Spreads
   alternate sides, so the column reads as a hand-laid sequence rather than a
   uniform grid. Intrinsic ratios only; nothing is cropped (C10). No borders. */

.performance { max-width: 100%; }
.marker--page { margin-bottom: var(--u2); }

/* The intro is one line (client); it may wrap only where the screen is too
   narrow to hold it. */
.perf-intro {
  max-width: none;
  margin-bottom: var(--u4);
}
@media (min-width: 801px) { .perf-intro p { white-space: nowrap; } }
.perf-intro p {
  font-size: var(--t-thesis);
  line-height: var(--lh-thesis);
}

.perfs { margin-top: var(--u4); }

.perf {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: var(--u2);
  align-items: end;             /* the two stills share a baseline */
}
.perf + .perf { margin-top: calc(var(--u4) * 2); }

.perf img { width: 100%; }

/* Odd spreads: large still left, detail right, record under the large still. */
.perf__lead  { grid-column: 1 / span 8; grid-row: 1; }
.perf__still { grid-column: 9 / span 4; grid-row: 1; }
.perf__cap   { grid-column: 1 / span 8; grid-row: 2; }

/* Even spreads mirror it. */
.perf:nth-child(even) .perf__lead  { grid-column: 5 / span 8; }
.perf:nth-child(even) .perf__still { grid-column: 1 / span 4; }
.perf:nth-child(even) .perf__cap   { grid-column: 5 / span 8; }

/* The record: form, title, place and date, roles, routes. */
.perf__form {
  font-size: var(--t-caption);
  text-transform: uppercase;
  letter-spacing: var(--track);
  color: var(--ink-soft);
}
.perf__title {
  margin-top: var(--u-half);
  font-family: var(--f-head);
  font-weight: 300;
  font-size: clamp(26px, 2.4vw, 34px);
  line-height: 1.15;
  text-transform: uppercase;
  letter-spacing: .03em;
}
.perf__title .alt {
  display: block;
  font-family: var(--f-sans);
  font-size: var(--t-meta);
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  margin-top: var(--u-half);
}
.perf__meta,
.perf__roles,
.perf__links {
  font-size: var(--t-caption);
  line-height: 1.6;
}
.perf__meta  { margin-top: var(--u1); }
.perf__roles { color: var(--ink-soft); }
.perf__roles strong { color: var(--ink); font-weight: 700; }
.perf__links { margin-top: var(--u-half); }

/* A video performance: the 16:9 frame takes the full width (time-based media
   is 16:9, C10); the record sits under it at the large still's measure. */
.perf--video .perf__lead,
.perf--video:nth-child(even) .perf__lead { grid-column: 1 / -1; }
.perf--video .perf__cap,
.perf--video:nth-child(even) .perf__cap { grid-column: 1 / span 8; }
.perf__desc {
  margin-top: var(--u1);
  max-width: 77ch;   /* 64 + 20% (client) */
  font-size: var(--t-meta);
  line-height: 1.7;
}
.perf__links a { text-decoration: underline; text-underline-offset: .2em; text-decoration-thickness: 1px; }

/* The poster facade and the player that replaces it: primitives.css (shared
   with Research). */

/* ── Collapse ─────────────────────────────────────────────────────────────
   One column: the large still full width, the detail still at 60% set to the
   spread's own side, then the record. The alternation survives as an offset. */
@media (max-width: 800px) {
  .perf { grid-template-columns: minmax(0, 1fr); gap: var(--u1); }
  .perf__lead,
  .perf__still,
  .perf__cap,
  .perf:nth-child(even) .perf__lead,
  .perf:nth-child(even) .perf__still,
  .perf:nth-child(even) .perf__cap { grid-column: 1; grid-row: auto; }
  /* The video entry's desktop spans would add implicit columns here. */
  .perf--video .perf__lead,
  .perf--video .perf__cap,
  .perf--video:nth-child(even) .perf__lead,
  .perf--video:nth-child(even) .perf__cap { grid-column: 1; }
  .perf__still { width: 60%; justify-self: end; }
  .perf:nth-child(even) .perf__still { justify-self: start; }
  .perf + .perf { margin-top: var(--u4); }
}

/* ── Shorts: vertical (9:16) videos in pairs (C75) ─────────────────────────
   The list wraps in rows: a landscape performance takes a whole row; shorts
   stand two to a row, side by side, as a centred pair. Each short is its own
   item: a card drawn by one hairline (no ground, no radius, no shadow), in two
   columns — its record on the left (form, title, "Watch on YouTube"), level
   with the top of the film on the right (at most 85% of the screen tall). A
   short without a partner stands alone, centred. On phones the cards stack,
   one to a row, each keeping its two columns. */
.perfs {
  --pair-gap: var(--u4);               /* between the two cards of a pair */
  --card-pad: var(--u2);               /* inside a card */
  --card-text: 11em;                   /* the record's column, at least */
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: calc(var(--u4) * 2) var(--pair-gap);
}
.perfs > .perf { flex: 0 0 100%; min-width: 0; }
.perfs > .perf + .perf { margin-top: 0; }

.perfs > .perf--short {
  box-sizing: border-box;
  flex: 0 1 calc((100% - var(--pair-gap)) / 2);
  display: grid;
  grid-template-columns: minmax(var(--card-text), 1fr) minmax(0, calc(85vh * 9 / 16));
  grid-template-rows: auto 1fr;
  gap: 0 var(--u2);
  align-items: start;
  padding: var(--card-pad);
  border: var(--hair) solid var(--rule);
}
/* (.perfs > … outranks the still spreads' :nth-child(even) placements.) */
.perfs > .perf--short .perf__cap   { grid-column: 1; grid-row: 1; margin: 0; }
.perfs > .perf--short .perf__links { grid-column: 1; grid-row: 2; margin-top: var(--u1); }
.perfs > .perf--short .perf__lead  { grid-column: 2; grid-row: 1 / span 2; margin: 0; }
.perf--short .yt--short,
.perf--short .yt__frame--short { width: 100%; }
.perf--short .perf__title { font-size: clamp(20px, 1.9vw, 28px); }
.perf--short .perf__form [lang="zh"] { display: block; }   /* 中文 on its own line */

@media (max-width: 800px) {
  .perfs { --card-pad: var(--u1); --card-text: 8em; gap: var(--u4) 0; }
  .perfs > .perf--short { flex-basis: 100%; column-gap: var(--u1); }
  .perf--short .perf__title { font-size: 18px; }
}
