/* Photo posts. The blog's own type and colours (console.css); the photographs sit flat, without frames,
   and run wider than the text column. Loaded only by posts generated from a post.json. */
.photo-post { --gutter: clamp(16px, 4vw, 64px); --wide: min(1500px, 100vw - 2 * var(--gutter)); --gap: clamp(8px, 1.6vw, 26px); --rhythm: clamp(72px, 16vh, 190px);
  margin-top: clamp(30px, 6vh, 70px); }
body.terminal h1 { margin-bottom: 8px; }
.post-date, .post-summary { color: var(--secondary-color); margin: 0; }
.post-summary { margin-top: 1.6em; max-width: 44em; color: var(--font-color); }

.photo-post .plate { width: var(--wide); margin: var(--rhythm) auto 0; }
.photo-post .plate:first-child { margin-top: 0; }
.photo-post figure, .photo-post .ph { margin: 0; min-width: 0; }
.photo-post img { display: block; width: 100%; height: auto; background: color-mix(in srgb, var(--font-color) 6%, transparent); }
.photo-post .ph a { display: block; cursor: zoom-in; }
.photo-post figcaption { font-size: 12px; line-height: 1.5; color: var(--secondary-color); margin-top: 10px; }
.photo-post h2 { font-size: 12px; font-weight: 400; letter-spacing: .14em; text-transform: uppercase; color: var(--secondary-color); margin: 0 0 22px; padding: 0; }
.photo-post h2::before { content: "## "; opacity: .5; }

.photo-post .plate.full { width: 100%; }
.photo-post .plate.full img { height: min(86vh, 66.67vw); object-fit: cover; }
.photo-post .plate.full figcaption { padding: 0 var(--gutter); }
.photo-post .plate.single { width: min(1120px, 100vw - 2 * var(--gutter)); }
.photo-post .plate.row .photos { display: flex; gap: var(--gap); align-items: flex-start; }
/* auto grid: rows of two or three, every photograph at its own proportions */
.photo-post .plate.grid .r { display: flex; gap: var(--gap); align-items: flex-start; }
.photo-post .plate.grid .r + .r { margin-top: var(--gap); }

/* cluster: one large print, the others beside it at half size */
.photo-post .plate.cluster .photos { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: var(--gap); align-items: start; }
.photo-post .plate.cluster .ph.lead { grid-row: span 2; }
.photo-post .plate.cluster .ph:not(.lead) img { aspect-ratio: 3 / 2; object-fit: cover; }
.photo-post .plate.cluster.n2 .photos, .photo-post .plate.cluster.n3 .photos { grid-template-columns: 2fr 1fr; }
.photo-post .plate.cluster.n2 .ph.lead { grid-row: auto; }

.photo-post .plate.split { display: grid; grid-template-columns: 3fr 2fr; gap: clamp(20px, 5vw, 80px); align-items: center; }
.photo-post .plate.text { width: min(44em, 100vw - 2 * var(--gutter)); }
.photo-post .plate.text p, .photo-post .words p { margin: 0 0 1.4em; }

#look { position: fixed; inset: 0; background: var(--background-color); display: grid; place-items: center; padding: 4vh 3vw 8vh; cursor: zoom-out; z-index: 1000; }
#look[hidden] { display: none; }
#look img { max-width: 100%; max-height: 86vh; width: auto; height: auto; }
#look p { position: absolute; left: 0; right: 0; bottom: 18px; margin: 0; text-align: center; font-size: 12px; color: var(--secondary-color); }

@media (max-width: 700px) {
  .photo-post .plate.row .photos { flex-direction: column; }
  .photo-post .plate.row .ph { flex: none !important; width: 100%; }
  .photo-post .plate.grid .r { flex-direction: column; }
  .photo-post .plate.grid .ph { flex: none !important; width: 100%; }
  .photo-post .plate.cluster .photos, .photo-post .plate.cluster.n2 .photos, .photo-post .plate.cluster.n3 .photos { grid-template-columns: 1fr 1fr; }
  .photo-post .plate.cluster .ph.lead { grid-column: span 2; grid-row: auto; }
  .photo-post .plate.split { grid-template-columns: 1fr; }
}
