/*
 * gf-layout.css — deliberate changes to the Webflow design. Loaded last.
 */

/* Home works index: one Work per line, at every width (phones included).
 * The index is sized from its own column (container query units), not the
 * screen, so the longest item, "Moonlight Film Festival [case study],", fills
 * ~97% of the column at every width. Tags scale with the names (14px at the
 * 46px design size) but never drop below 9px; where they would, the names
 * shrink a little more to make room:
 *   name width ≈ 9.789 × size, tag width ≈ 5.907 × tag size (longest item)
 *   size = min( 0.97W / (9.789 + 5.907 × 0.3043),  (0.97W − 5.907 × 9px) / 9.789 )
 * If a much longer Work name is added, lower both cqi numbers until it fits.
 */
.gf-intro-right { container-type: inline-size; }
.gf-intro-wlink { white-space: nowrap; }
.gf-intro-works { font-size: min(8.37cqi, calc(9.909cqi - 5.431px)); }
.gf-intro-wtag { font-size: max(9px, 0.3043em); }

/* Footer works list: one Work per line, tag right after the name.
 * Every column is as wide as the longest item (--gf-fw-ch, counted in the
 * footer template, + the two 10px gaps), so nothing wraps. Up to 4 columns
 * as in Webflow; when 4 of those don't fit, it drops to 3, 2, then 1.
 */
.gf-nw-link { white-space: nowrap; font-size: inherit; }
.gf-fworks-list {
	/* The list carries the links' font so its ch unit is a DM Mono character. */
	font-family: "DM Mono", sans-serif;
	font-weight: 300;
	font-size: 12px;
	--gf-fw-w: calc(var(--gf-fw-ch, 36ch) + 20px);
	grid-template-columns: repeat(auto-fill, minmax(min(100%, max(var(--gf-fw-w), (100% - 60px) / 4)), 1fr));
}
@media screen and (min-width: 768px) {
	.gf-fworks-list { font-size: clamp(11px, 0.833vw, 12px); }
}
@media screen and (max-width: 767px) {
	.gf-fworks-list {
		font-size: 11px;
		--gf-fw-w: calc(var(--gf-fw-ch, 36ch) + 16px);
		grid-template-columns: repeat(auto-fill, minmax(min(100%, max(var(--gf-fw-w), (100% - 12px) / 2)), 1fr));
	}
}

/* Case-study thumbnail grids on phones: each screen keeps its own shape
 * (3 per row) and the grid grows to fit, instead of squeezing every screen
 * into a short fixed-height box.
 */
@media screen and (max-width: 767px) {
	.gf-pr-thumbs-6, .gf-pr-thumbs-5, .gf-pr-thumbs-4, .gf-pr-thumbs-3 { flex: none; }
	button.gf-pr-shotbtn { height: auto; }
}
