/* suzannedolanart.com : p-work.css
   The single work page: the sticky photograph column, the stills strip, the text column.
   The lightbox (lightbox.css) and the walk-around viewer (walk.css) have their own files.
   Tokens and shared components come from site.css; nothing here overrides them. */

/* round 13: the page opens straight on the photograph column, no hero, no colour field, no turntable stage. */
.work__body { padding-top: var(--s-4); }
@media (min-width: 900px) {
  .work__body { padding-top: var(--s-6); }
}
/* round 13, council pass 2: the label (the h1, the credit) is its own grid item so that on a phone it comes BEFORE the
   photograph (the work is named on the first screen) while from 900px it heads the text column beside the sticky
   photograph column: columns 7fr 5fr from site.css .split, the media column spanning both rows. */
.work__split { align-items: start; row-gap: var(--s-2); }
.work__head { min-width: 0; }
.work__text { margin-top: var(--s-2); }
@media (min-width: 900px) {
  .work__split { grid-template-rows: auto 1fr; row-gap: var(--s-3); }
  .work__head { grid-column: 2; grid-row: 1; }
  .work__media { grid-column: 1; grid-row: 1 / span 2; }
  .work__text { grid-column: 2; grid-row: 2; margin-top: 0; }
}

/* photograph column: cover, walk button, stills strip, all centred under one another */
.work__media {
  display: grid;
  gap: var(--s-3);
  justify-items: center;
  --walk-max: 82vh;
}
@supports (height: 1dvh) {
  .work__media { --walk-max: 82dvh; }
}
/* phones (< 760px): the photograph no taller than 70vh (round 13: the hero above it is gone, so the photograph may
   take more of the first screen; the title still follows within the first scroll) */
@media (max-width: 759.98px) {
  .work__media { --walk-max: 70vh; }
  @supports (height: 1svh) {
    .work__media { --walk-max: 70svh; }
  }
}
@media (min-width: 900px) {
  /* header height + 16px. site.css sets no --site-head-h because the header is not sticky, so this resolves to 16px;
     should the header ever stick, set --site-head-h on :root and this column follows it. */
  .work__media.split__sticky { top: calc(var(--site-head-h, 0px) + var(--s-2)); }
  /* with a button or a strip under it, the cover leaves room so the whole column fits the viewport while stuck */
  .work__media--extras { --walk-max: min(82vh, calc(100vh - 14rem)); }
  .work__media { gap: var(--s-3); }
}

.work__figure {
  display: grid;
  justify-items: center;
  gap: var(--s-1);
  width: 100%;
}
.work__figure[hidden] { display: none; }
.work__cover { display: block; max-width: 100%; }
.work__cover:focus-visible { outline-offset: 4px; }
/* the cover: complete, uncropped, at most 82vh tall (70vh on a phone), centred on the paper ground */
.work__cover .photo {
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: var(--walk-max);
  object-fit: contain;
  cursor: zoom-in;
}
.work__figure .credit { margin-top: 0; text-align: center; }
/* no photograph yet: the paper plate from site.css, 4:5, no taller than a cover would be */
.work__figure--missing .paper-plate { aspect-ratio: 4 / 5; width: 100%; max-width: calc(var(--walk-max, 82vh) * 0.8); }

.work__walk { display: grid; gap: var(--s-3); width: 100%; justify-items: center; }

/* stills strip: every photograph, the current one carries the same 1.5px underline as the active nav link */
.stills {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--s-1) var(--s-2);
}
.stills__item { margin: 0; }
.stills__link {
  display: block;
  width: 64px;
  padding-bottom: 5px;
  border-bottom: 1.5px solid transparent;
}
.stills__link[aria-current="true"] { border-bottom-color: var(--ink); }
.stills__link:hover { border-bottom-color: var(--ink-soft); }
.stills__link[aria-current="true"]:hover { border-bottom-color: var(--ink); }
.stills__link:focus-visible { outline-offset: 3px; }
.stills__thumb {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 5;
  height: auto;
  object-fit: contain;
  background: var(--paper);
}
@media (min-width: 900px) {
  .stills__link { width: 72px; }
}

/* the label: the h1 in Inter Tight 500, the facts and the status under it, the credit when there is one */
.work__text { display: flex; flex-direction: column; gap: var(--s-4); min-width: 0; }
.work__head .label--lg { margin-top: 0; }
.work__head .label--lg .label__title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(2rem, 1.5rem + 2.2vw, 3rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
}
.work__head .label--lg .label__title cite { font-style: normal; font-weight: 500; }
.work__rule { margin: 0; border-top: 1px solid var(--rule); }
.work__actions { margin-top: var(--s-1); }
@media (max-width: 479.98px) {
  .work__actions .btn { width: 100%; }
}

/* previous / next by curated order, then the archive */
.work__nav {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: var(--s-3);
  margin-top: var(--s-3);
  padding-top: var(--s-3);
  border-top: 1px solid var(--rule);
}
.work__nav-link {
  display: grid;
  gap: 4px;
  color: var(--ink);
  text-decoration: none;
  min-width: 0;
}
.work__nav-link--next { text-align: right; }
.work__nav-link.is-empty { visibility: hidden; }
.work__nav-dir {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.work__nav-link cite {
  font-family: var(--font-display);
  font-size: var(--t-1);
  line-height: 1.25;
  letter-spacing: -0.004em;
  text-wrap: balance;
}
.work__nav-link:hover cite {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.12em;
  text-decoration-color: var(--ink-soft);
}
.work__nav-all { grid-column: 1 / -1; font-size: var(--t-sm); }

@media print {
  .work__walk, .stills, .work__nav { display: none; }
  .work__cover .photo { max-height: none; }
}
