@import "./player.css";

/* A quiet shelf for the work: media, attribution and links occupy separate rows. */
.work-page { max-width: 1600px; margin-inline: auto; padding: clamp(48px, 7vw, 100px) 6vw 96px; }
.work-heading { display: grid; grid-template-columns: 1.4fr 1fr; gap: 48px; align-items: end; padding-bottom: 48px; border-bottom: 1px solid var(--deep); }
.work-heading h1 { font-size: clamp(40px, 6vw, 88px); line-height: 1.06; margin: 0; max-width: 9em; text-wrap: balance; }
.work-heading p { margin: 0; max-width: 28em; color: var(--indigo); font-size: 18px; }
.work-filters { display: flex; flex-wrap: wrap; gap: 8px; padding-block: 28px 0; }
.work-filters button { min-height: 48px; padding: 10px 24px; border: 1px solid var(--deep); border-radius: 0; color: var(--deep); background: var(--paper); font-size: 16px; }
.work-filters button[aria-pressed="true"] { background: var(--deep); color: var(--paper); }
.work-filters button:hover { text-decoration: underline; text-underline-offset: .25em; }
.work-status { min-height: 28px; margin-block: 16px 32px; color: var(--indigo); }
/* The filter row and the status line keep their place before the script shows them, so the
   cards under them (already in the HTML) never jump. Without scripting they take no room. */
:is(.work-filters, .work-status)[hidden] { visibility: hidden; }
/* !important only to answer layout.css ([hidden] { display: none !important }). */
.work-filters[hidden] { display: flex !important; }
.work-status[hidden] { display: block !important; }
@media (scripting: none) {
  :is(.work-filters, .work-status)[hidden] { display: none !important; }
}
.work-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 64px 32px; }
.work-card { min-width: 0; padding-bottom: 24px; }
/* No picture is taller than the screen (QA 24.11.2026: an upright film stood 1066px on a
   900px screen). The frame narrows by the film's own ratio, so the picture inside keeps it
   exactly and nothing is cropped. 18px = the frame's mat and the stage's keyline. */
.work-card .projection-frame { width: min(100%, calc(72svh * var(--card-aspect, 16 / 9) + 18px)); }
/* content-box: the picture area keeps the film's exact ratio; the 1px frame sits outside it. */
.work-stage { position: relative; box-sizing: content-box; aspect-ratio: var(--preview-aspect); overflow: hidden; border: 1px solid transparent; }
.work-stage picture { position: absolute; inset: 0; }
.work-stage picture, .work-stage img { display: block; width: 100%; height: 100%; }
.work-stage img { object-fit: contain; }
.work-stage video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.work-attribution { display: flex; gap: 10px; align-items: baseline; margin: 0 0 16px; font-size: 16px; color: var(--indigo); }
.work-attribution::before { content: ""; flex: 0 0 20px; height: 2px; background: var(--amber); }
.work-card h2 { font-size: clamp(24px, 2.6vw, 36px); line-height: 1.25; margin: 24px 0 10px; }
.work-card-links { display: flex; flex-wrap: wrap; gap: 12px 24px; }
.work-card-links a, .work-preview-link { display: inline-flex; align-items: center; min-height: 44px; }
.work-preview-link { color: var(--indigo); font-size: 16px; }
.work-fallback, .work-bottom { display: flex; flex-wrap: wrap; gap: 24px 40px; padding-top: 40px; }
.work-bottom { margin-top: 40px; border-top: 1px solid var(--deep); }
.work-bottom a, .work-fallback a { min-height: 44px; padding-block: 10px; }
.indigo-nav [aria-current="page"] { text-decoration: underline; }
.indigo-footer [data-consent-open] { min-height: 44px; padding: 8px 0; border: 0; background: transparent; color: inherit; text-decoration: underline; font-size: inherit; }
@media (max-width: 720px), (max-height: 500px) and (orientation: landscape) {
  .work-page { padding: 48px 24px 72px; }
  .work-heading { grid-template-columns: 1fr; gap: 24px; padding-bottom: 32px; }
  .work-heading p { font-size: 16px; }
  .work-filters { gap: 6px; }
  .work-filters button { padding-inline: 16px; }
  /* Upright films two per row, wide pictures across: the page stays about half as long. */
  .work-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-flow: row dense; gap: 32px 16px; }
  .work-card { padding-bottom: 0; }
  .work-card[data-shape="landscape"] { grid-column: 1 / -1; }
  .work-card h2 { font-size: 28px; margin-top: 16px; }
  .work-card[data-shape="portrait"] h2 { font-size: 28px; line-height: 1.08; margin: 12px 0 6px; text-wrap: balance; overflow-wrap: anywhere; }
  .work-card[data-shape="portrait"] .work-attribution { margin-bottom: 4px; }
  .work-card[data-shape="portrait"] .work-card-links { gap: 0 16px; }
  .work-attribution { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .work-attribution::before { display: inline-block; width: 20px; margin-inline-end: 10px; vertical-align: middle; }
}

/* /work loads no mobile.css: the shared footer and wordmarks meet the phone rules here
   (16px text, 44px targets), as on the home page (full pass, 23.11.2026). */
@media (max-width: 720px) {
  .indigo-footer :is(p, a, small), .indigo-footer .footer-bottom button { font-size: 16px; }
  .indigo-footer .footer-bottom :is(a, button) {
    display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; padding-block: 8px;
  }
  :is(.indigo-wordmark, .footer-wordmark) { display: inline-flex; align-items: center; min-height: 44px; }
}
