/* Art Cross Cultures: project page (Light on Paper).
   Extends site.css with the bands this page needs. No new colours, type steps or line weights. */

.night .data:not(.state) { color: var(--on-night-2); }

/* ---------- 1. opening: the project, one photograph for the first act, the two acts ahead as spines ---------- */
.project.lantern { min-height: clamp(46rem, 100vh, 62.5rem); min-height: clamp(46rem, 100svh, 62.5rem); }
.project .say h1 { margin-top: var(--h1-top); }
.project .say .lede { margin-top: 2.25rem; max-width: 36ch; }
.project .say .facts { margin-top: 2.25rem; }
.project .say .foot { margin-top: auto; padding-bottom: 1.75rem; }

.lantern > .actf { flex: 1.15 1 0; }
.actf img { object-position: 50% 50%; }   /* every width has a crop of its own: both heads and the ring they hold */
.actf .cap { gap: .375rem; padding-bottom: 1.25rem; }
.actf .cap a { text-decoration: none; }
.actf .cap a::after { content: ""; position: absolute; inset: 0; }
.actf:hover .cap a { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .375rem; }

/* the two acts ahead stand beside it as spines at every desktop width, like the announced cycles on the home page:
   year and name. What they hold is told once, in the band further down, where a spine leads */
.actu { flex: 0 0 3rem; display: flex; flex-direction: column; align-items: center; justify-content: space-between; padding: 1.75rem 0 1.5rem; color: var(--ink); text-decoration: none; transition: background-color .5s var(--calm), color .5s var(--calm); }
.actu > span { writing-mode: vertical-rl; white-space: nowrap; }
.actu .t { font-family: var(--display); font-weight: 380; font-size: var(--fs-sub); line-height: 1; font-variation-settings: "opsz" 48; letter-spacing: -0.005em; }
.actu .y { order: -1; transition: color .5s var(--calm); }
.actu:focus-visible { outline: 2px solid var(--on-night); outline-offset: -5px; background: var(--ink); color: var(--on-night); }
.actu:focus-visible .y { color: var(--on-night-2); }
@media (hover: hover) {
  .actu:hover { background: var(--ink); color: var(--on-night); }
  .actu:hover .y { color: var(--on-night-2); }
}
@media (prefers-reduced-motion: reduce) { .actu, .actu span { transition: none; } }

/* ---------- the bands: one heading and one photograph to a band, two people side by side in the studio ---------- */
/* 2. overview */
.overview .face:not(.lit) { padding-block: var(--head); }
.overview .prose { color: var(--ink-2); }
.overview .lit img { object-position: 58% 50%; }   /* the sign over the market street stands in the middle */

/* 3 to 6. the first act: every photograph keeps its own proportions and sets the least height of its band;
   where the heading beside it is taller, the photograph fills its face down to the caption */
.studio > .lit, .lanterns > .lit, .talks > .lit { grid-template-rows: 1fr auto; }
.moments > .lit { grid-template-rows: auto 1fr; }   /* the two stand level, whatever their captions */
.studio > .lit img, .lanterns > .lit img { aspect-ratio: 16 / 9; height: auto; }
.talks > .lit img { aspect-ratio: 9 / 4; height: auto; object-position: 50% 42%; }   /* eight people in a row */
.acts .intro > h2 + .data, .ahead .act > h2 + .data { margin-top: .75rem; }

/* 4. two people in the studio */
.moments > .lit { border-right: 0; }
.moments > .lit:not(:last-child)::after { content: ""; position: absolute; top: 0; bottom: 0; right: 0; width: 1px; background: var(--hair); }
.moments img { aspect-ratio: 4 / 3; height: auto; object-position: 50% 26%; }
.moments .cap, .lanterns .cap { min-height: 0; }

/* 5. the palace lanterns: night is the one face where the lantern glows, its photograph and its caption (class night
   on the figure). The heading stands on white paper like every other, so the one line runs on down the page */

/* 7. the acts ahead: on white paper and on the grid. The second act in the first column, the third on the text edge */
.ahead .face { padding-block: var(--head); }
.ahead .act { display: flex; flex-direction: column; }

/* 8. partners and the ask */
.hands .lit img { object-position: 50% 50%; }
.hands .lacquer { justify-content: space-between; }

/* ---------- 760 to 1279 ---------- */
@media (width < 80em) {
  .project { --say: clamp(20rem, 40vw, 27rem); }
  body:has(.project) { --say: clamp(20rem, 40vw, 27rem); }
  .project.lantern { min-height: clamp(33.5rem, calc(100vh - var(--top-h)), 62.5rem); min-height: clamp(33.5rem, calc(100svh - var(--top-h)), 62.5rem); }
  .project .say h1 { margin-top: 0; }
  .project .say .lede, .project .say .facts { margin-top: 1.5rem; }
  .project .say .foot { padding-bottom: 0; }
  .actu { flex-basis: 2.75rem; }
}

/* ---------- from 1000px the bands stand on the grid of the home page ----------
   The first column is as wide as the first face of the opening and carries each band's heading; the rest is four
   equal parts. A photograph fills whole parts: all four, or two where two stand side by side. Text begins the same
   short step after a part's edge. */
@media (width >= 62.5em) {
  .band.overview, .band.studio, .band.moments, .band.lanterns, .band.talks { grid-template-columns: var(--say) repeat(4, minmax(0, 1fr)); grid-template-rows: auto; }
  .overview > .lead, .overview > .prose, .studio > .intro, .moments > .intro, .lanterns > .intro, .talks > .intro { padding-block: var(--head); }
  .overview > .lead, .studio > .intro, .moments > .intro, .lanterns > .intro, .talks > .intro { border-right: var(--line); }   /* the one line down the page */

  .overview > .prose { grid-column: 2 / span 2; padding-inline: var(--in); }
  .band.overview .prose > p:first-child { margin-top: var(--drop); }   /* on the baseline of the heading beside it */
  .overview > .lit { grid-column: 4 / span 2; grid-template-rows: 1fr auto; }
  .overview > .lit img { aspect-ratio: 3 / 2; height: auto; }   /* at least its own proportions; taller where the text beside it is */

  .studio > .lit, .lanterns > .lit, .talks > .lit { grid-column: 2 / -1; border-right: 0; }
  .moments > .lit { grid-column: span 2; }

  .ahead > .act + .act { grid-column: 2 / -1; padding-inline: var(--in); }
}
/* 1000 to 1279: the closing photograph is as wide as the first column, so its caption begins on that column's edge
   and the words beside it on the text edge */
@media (width >= 62.5em) and (width < 80em) {
  .band.hands { grid-template-columns: var(--say) 1fr .9fr; }
  .hands .lit img { object-position: 55% 50%; }
  .hands > .lit .cap { padding-inline: var(--pad); }
  .hands > .partner, .hands > .lacquer { padding-inline: var(--in); }
}
/* 1000 to 1439, the overview: its text across the four parts in two columns, the photograph under it on all four at
   its own proportions. On two parts the face would be taller than wide and cut the sign over the street */
@media (width >= 62.5em) and (width < 90em) {
  .overview > .lead { grid-row: 1 / span 2; }
  .overview > .prose { grid-column: 2 / -1; display: grid; grid-template-columns: 1fr 1fr; column-gap: calc(var(--in) * 2); align-content: start; border-right: 0; }
  .band.overview .prose > p { margin-top: var(--drop); }
  .overview > .lit { grid-column: 2 / -1; grid-row: 2; }
}
/* from 1280px the closing band too: the words in the first column, the photograph on two parts, the ask on the other two
   (one part is too narrow for its sentence and its button) */
@media (width >= 80em) {
  .band.hands { grid-template-columns: var(--say) repeat(4, minmax(0, 1fr)); }
  .hands > .partner, .hands > .lit, .hands > .lacquer { grid-row: 1; }
  .hands > .partner { grid-column: 1; padding-block: var(--head); }
  .hands > .lit { grid-column: 2 / span 2; }
  .hands > .lit img { object-position: 55% 50%; }   /* the one who looks, and the one behind him */
  .hands > .lacquer { grid-column: 4 / span 2; padding: var(--head) var(--in); }
  .actf img { object-position: 50% 20%; }   /* a wide face cuts the square crop above and below: the two heads keep their room */
}

/* ---------- below 1000: bands stack ---------- */
@media (width < 62.5em) {
  .overview, .studio, .moments, .lanterns, .talks, .ahead, .hands { grid-template-columns: 1fr 1fr; }
  .project .say .facts dl { display: block; }
  .project .say .facts dl > div { padding: .5rem 0 .625rem; }
  .project .say .facts dl > div:first-child { padding-top: 0; }
  .project .say .facts dl > div:nth-child(2) { border-top: 1px solid var(--hair); padding-top: .5rem; }
  .overview .face:not(.lit) { padding-block: var(--pad); }
  .overview .lead { padding-top: clamp(3rem, 9vw, 4.75rem); padding-bottom: 0; border-bottom: 0; }
  .overview .lit img, .hands .lit img, .studio > .lit img, .lanterns > .lit img, .talks > .lit img { aspect-ratio: 3 / 2; }

  /* the two people stand side by side at every width */
  .moments > .lit { grid-column: auto; border-bottom: 0; }
  .moments img { aspect-ratio: 1 / 1; object-position: 50% 30%; }

  /* the two acts ahead side by side, each under the same space */
  .ahead > .face { grid-column: auto; border-bottom: 0; padding-block: clamp(3rem, 9vw, 4.75rem); }
  .ahead > .face:first-child { border-right: var(--rib); }
}

/* ---------- phone ---------- */
@media (width < 47.5em) {
  .project.lantern { min-height: 0; }
  .project > .lit { grid-column: 1 / -1; border-right: 0; }   /* the one photograph runs from edge to edge */
  .moments img { aspect-ratio: 3 / 4; }
  .actu { grid-column: 1 / -1; order: 3; flex: none; flex-direction: row; flex-wrap: wrap; align-items: baseline; justify-content: flex-start; gap: .125rem .875rem; min-height: 4rem; padding: .875rem 1rem 1rem; border-right: 0 !important; }
  .actu > span { writing-mode: horizontal-tb; white-space: normal; }
  .actu .t { flex: 0 0 100%; order: -1; line-height: 1.2; }
  .actu .y { order: 0; }
  .actu:last-child { border-bottom: 0; }
  .ahead > .face { grid-column: 1 / -1; }
  .ahead > .face:first-child { border-right: 0; border-bottom: var(--rib); }
}

@media print { .project.lantern { min-height: 0; } }
