@jonandev/longbeard 0.5.2 → 0.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,8 +1,17 @@
1
1
  #!/usr/bin/env node
2
- // A moodboard of the references that lead. The layout is this file.
2
+ // A moodboard of the references. The layout is this file.
3
3
  // It shows what we saw. It does not paint a brand, a logo, a line, or a stat.
4
4
  //
5
- // node moodboard.mjs .design/board.md --out .design/moodboard.html --leads "North Room" --also "Margin"
5
+ // Before the pick (so they choose by looking):
6
+ // node moodboard.mjs .design/board.md --out .design/moodboard.html
7
+ //
8
+ // After the pick (marks the lead, keeps the rest):
9
+ // node moodboard.mjs .design/board.md --out .design/moodboard.html \
10
+ // --leads "<card name>" --also "<card name>,<card name>" --why "<their reason>"
11
+ //
12
+ // --also takes every card they also liked. --count is how many references
13
+ // they asked to see. --imagery adds the board's imagery tiles; leave it off
14
+ // when the look has no pictures in it.
6
15
  import { execSync } from "node:child_process";
7
16
  import { existsSync, mkdirSync, readFileSync, writeFileSync } from "node:fs";
8
17
  import { dirname, isAbsolute, relative, resolve } from "node:path";
@@ -15,13 +24,24 @@ const flag = (name) => {
15
24
  args.splice(i, 2);
16
25
  return v;
17
26
  };
27
+ const has = (name) => {
28
+ const i = args.indexOf(`--${name}`);
29
+ if (i === -1) return false;
30
+ args.splice(i, 1);
31
+ return true;
32
+ };
18
33
 
19
34
  const outArg = flag("out");
20
35
  const leadsArg = flag("leads");
21
36
  const alsoArg = flag("also");
37
+ const whyArg = flag("why");
38
+ const countArg = flag("count");
39
+ const showImagery = has("imagery");
22
40
  const boardArg = args[0];
23
41
  if (!boardArg || !outArg || args.length !== 1) {
24
- console.error('usage: node moodboard.mjs .design/board.md --out .design/moodboard.html --leads "Name" [--also "Name"]');
42
+ console.error(
43
+ 'usage: node moodboard.mjs .design/board.md --out .design/moodboard.html [--leads "Name"] [--also "A,B"] [--why "their reason"] [--count 12] [--imagery]',
44
+ );
25
45
  process.exit(2);
26
46
  }
27
47
 
@@ -59,7 +79,7 @@ function fieldsOf(text) {
59
79
  const fields = {};
60
80
  let key = null;
61
81
  for (const line of text.split(/\r?\n/)) {
62
- const m = line.match(/^- ([a-z][a-z /]*):\s*(.*)$/i);
82
+ const m = line.match(/^- ([a-z][a-z /-]*):\s*(.*)$/i);
63
83
  if (m) {
64
84
  key = m[1].toLowerCase();
65
85
  fields[key] = m[2].trim();
@@ -101,14 +121,30 @@ function swatches(colour) {
101
121
  return out.slice(0, 8);
102
122
  }
103
123
 
104
- function facesOf(typeLine) {
105
- return typeLine
124
+ // `faces:` is a list of names. `type:` is prose, so it is only a fallback and
125
+ // anything that reads like a sentence is dropped rather than shown as a face.
126
+ function facesOf(card) {
127
+ const listed = (card.faces || "")
128
+ .split(/,|\s+and\s+|\s+&\s+|\s+\+\s+/i)
129
+ .map((s) => s.trim())
130
+ .filter(Boolean);
131
+ if (listed.length) return listed.filter(isFaceName).slice(0, 3);
132
+ return (card.type || "")
106
133
  .split(/,|\s+and\s+|\s+&\s+|\s+\+\s+/i)
107
134
  .map((s) => s.replace(/\s+for\s+.*/i, "").replace(/^(a pairing of|pairing of|the)\s+/i, "").trim())
108
- .filter(Boolean)
135
+ .filter(isFaceName)
109
136
  .slice(0, 2);
110
137
  }
111
138
 
139
+ function isFaceName(name) {
140
+ const words = name.split(/\s+/);
141
+ return (
142
+ /^[\p{L}\p{N}][\p{L}\p{N} .'’&-]*$/u.test(name) &&
143
+ words.length <= 4 &&
144
+ !/^(body|headline|display|serif|sans|sans-serif|mono|monospace|text|titles?|labels?)$/i.test(name)
145
+ );
146
+ }
147
+
112
148
  function isSans(name) {
113
149
  return /sans|grotesk|grotesque|gothic|america|aeonik|inter|helvetica|neue|haas|sohne|söhne|geist|satoshi|switzer|untitled/i.test(
114
150
  name,
@@ -116,12 +152,22 @@ function isSans(name) {
116
152
  }
117
153
 
118
154
  function cssFamily(name) {
119
- if (!name) return '"Iowan Old Style", Palatino, "Palatino Linotype", Georgia, serif';
120
- const safe = name.replace(/["\\<>]/g, "").slice(0, 80);
121
- const fallback = isSans(name)
122
- ? '"Helvetica Neue", Helvetica, Arial, sans-serif'
123
- : '"Iowan Old Style", Palatino, "Palatino Linotype", Georgia, serif';
124
- return `"${safe}", ${fallback}`;
155
+ const serif = "'Iowan Old Style', Palatino, 'Palatino Linotype', Georgia, serif";
156
+ if (!name) return serif;
157
+ // Single quotes, so the value is safe inside a style="" attribute once escaped.
158
+ const safe = name.replace(/['"\\<>;{}]/g, "").slice(0, 80);
159
+ const fallback = isSans(name) ? "'Helvetica Neue', Helvetica, Arial, sans-serif" : serif;
160
+ return `'${safe}', ${fallback}`;
161
+ }
162
+
163
+ // Optimistic: a face that is on Google Fonts renders for real, one that is not
164
+ // falls back. No axes are requested, so a family without 500 still resolves.
165
+ function fontsHref(names) {
166
+ const families = names
167
+ .filter((n) => /^[A-Za-z0-9][A-Za-z0-9 ]*$/.test(n))
168
+ .map((n) => `family=${n.trim().replace(/\s+/g, "+")}`);
169
+ if (!families.length) return "";
170
+ return `https://fonts.googleapis.com/css2?${families.join("&")}&display=swap`;
125
171
  }
126
172
 
127
173
  function webPath(fromFile, absTarget) {
@@ -140,14 +186,14 @@ function shotSrc(shot) {
140
186
  return webPath(outPath, abs);
141
187
  }
142
188
 
189
+ function href(url) {
190
+ const value = (url || "").trim().split(/\s+/)[0] || "";
191
+ return /^https?:\/\//i.test(value) ? value : "";
192
+ }
193
+
143
194
  const md = readFileSync(boardPath, "utf8");
144
195
  const readSlice = md.match(/## Read this\s*\n([\s\S]*?)(?=\n## |\n### |\n- kind:|$)/);
145
196
  const read = readSlice ? fieldsOf(readSlice[1]) : {};
146
- const leadsName = leadsArg || read.leads || read.primary || "";
147
- if (!leadsName) {
148
- console.error("moodboard: name the leading card with --leads");
149
- process.exit(1);
150
- }
151
197
 
152
198
  const cards = [];
153
199
  const chunks = md.split(/^### /m).slice(1);
@@ -159,14 +205,24 @@ for (const chunk of chunks) {
159
205
  cards.push({ name, ...fieldsOf((cut === -1 ? body : body.slice(0, cut)).split(/^## /m)[0]) });
160
206
  }
161
207
 
162
- const primary = cards.find((c) => norm(c.name) === norm(leadsName));
163
- if (!primary) {
208
+ const leadsName = leadsArg || read.leads || read.primary || "";
209
+ const primary = leadsName ? cards.find((c) => norm(c.name) === norm(leadsName)) : null;
210
+ if (leadsName && !primary) {
164
211
  console.error(`moodboard: no card named ${leadsName}`);
165
212
  process.exit(1);
166
213
  }
167
- const alsoName = alsoArg || (read.also && !/^none$/i.test(read.also.trim()) ? read.also : "");
168
- const also = alsoName ? cards.find((c) => norm(c.name) === norm(alsoName)) : null;
169
- if (alsoName && !also) console.error(`moodboard: no card named ${alsoName}`);
214
+ // --also takes every card they said they liked, not only one.
215
+ const alsoNames = (alsoArg || (read.also && !/^none$/i.test(read.also.trim()) ? read.also : ""))
216
+ .split(",")
217
+ .map((s) => s.trim())
218
+ .filter(Boolean);
219
+ const alsoCards = [];
220
+ for (const name of alsoNames) {
221
+ const card = cards.find((c) => norm(c.name) === norm(name));
222
+ if (card) alsoCards.push(card);
223
+ else console.error(`moodboard: no card named ${name}`);
224
+ }
225
+ const also = alsoCards[0] || null;
170
226
 
171
227
  const imagery = [];
172
228
  {
@@ -187,7 +243,7 @@ const imagery = [];
187
243
  push();
188
244
  continue;
189
245
  }
190
- const m = line.match(/^- ([a-z][a-z /]*):\s*(.*)$/i);
246
+ const m = line.match(/^- ([a-z][a-z /-]*):\s*(.*)$/i);
191
247
  if (m && m[1].toLowerCase() === "kind") {
192
248
  inCard = false;
193
249
  push();
@@ -200,63 +256,120 @@ const imagery = [];
200
256
  }
201
257
  push();
202
258
  }
203
- if (imagery.length > 3) console.error(`moodboard: showing 3 of ${imagery.length} imagery`);
204
259
 
205
- const colours = swatches(primary.colour || "").slice(0, 6);
260
+ // Screens and sites close to this subject. A product page cropped into a tile
261
+ // reads as noise, and a `form` card is a layout note, not a picture to feel.
262
+ // --count is how many references they said they wanted to see.
263
+ const MAX_PICTURES = Math.max(2, Math.min(24, Number(countArg) || 12));
264
+ const boardHasSlots = cards.some((c) => c.slot);
265
+ function showable(card) {
266
+ if (!card.shot) return false;
267
+ if (boardHasSlots && /product/i.test(card.slot || "")) return false;
268
+ if (/^form$/i.test((card.fit || "").trim())) return false;
269
+ return true;
270
+ }
271
+
272
+ const chosen = [];
273
+ const add = (card, role) => {
274
+ if (!card || chosen.some((c) => c.card === card)) return;
275
+ chosen.push({ card, role });
276
+ };
277
+ if (primary) add(primary, "leads");
278
+ for (const card of alsoCards) add(card, "also");
279
+ for (const card of cards) {
280
+ if (chosen.length >= MAX_PICTURES) break;
281
+ if (showable(card)) add(card, "");
282
+ }
283
+ const pictures = chosen
284
+ .filter((c) => c.role || showable(c.card))
285
+ .flatMap(({ card, role }) => {
286
+ const src = shotSrc(card.shot);
287
+ if (!src) return [];
288
+ const caption = role === "leads" && whyArg.trim() ? whyArg.trim() : (card.tagline || "").trim();
289
+ return [{ src, role, name: card.name, caption, url: href(card.url) }];
290
+ })
291
+ .slice(0, MAX_PICTURES);
292
+
293
+ if (showImagery && imagery.length > 4) console.error(`moodboard: showing 4 of ${imagery.length} imagery`);
294
+ const picturesOfPlace = showImagery
295
+ ? imagery.slice(0, 4).flatMap((item) => {
296
+ const src = shotSrc(item.shot);
297
+ return src ? [{ src, caption: (item.shows || "").trim(), url: href(item.url) }] : [];
298
+ })
299
+ : [];
300
+
301
+ // Before the pick there is no lead yet, so the type and the colour tiles read
302
+ // the cards on show instead.
303
+ const onShow = pictures.map((pic) => cards.find((c) => c.name === pic.name)).filter(Boolean);
304
+ const colourCards = [];
305
+ if (primary?.colour) colourCards.push({ name: primary.name, colours: swatches(primary.colour).slice(0, 6) });
306
+ else {
307
+ const from = onShow.find((c) => c.colour);
308
+ if (from) colourCards.push({ name: from.name, colours: swatches(from.colour).slice(0, 6), show: true });
309
+ }
310
+ // The night palette often comes from the `also` card. Show it, or the picture
311
+ // and the adaptation disagree.
312
+ if (also?.colour && /^register$/i.test((also.fit || "").trim())) {
313
+ colourCards.push({ name: also.name, colours: swatches(also.colour).slice(0, 4) });
314
+ }
315
+ const colourCount = colourCards.reduce((n, c) => n + c.colours.length, 0);
316
+
206
317
  const seenFaces = [];
207
- for (const line of [primary.type, also && also.fit !== "form" ? also.type : ""]) {
208
- for (const face of facesOf(line || "")) {
318
+ const faceCards = primary ? [primary, also && !/^form$/i.test((also.fit || "").trim()) ? also : null] : onShow;
319
+ for (const card of faceCards) {
320
+ if (!card) continue;
321
+ for (const face of facesOf(card)) {
209
322
  if (!seenFaces.some((f) => norm(f) === norm(face))) seenFaces.push(face);
210
323
  }
211
324
  }
212
325
  const faces = seenFaces.slice(0, 3);
213
326
  const family = cssFamily(faces[0] || "");
327
+ const fonts = fontsHref(faces);
214
328
  const ink = "#1c1c1a";
215
329
 
216
- const principle = (primary["worth taking"] || "").trim();
217
- const primarySrc = shotSrc(primary.shot);
218
- const alsoSrc = also ? shotSrc(also.shot) : "";
219
- const pictures = imagery.slice(0, 3).flatMap((item) => {
220
- const src = shotSrc(item.shot);
221
- return src ? [{ src, caption: (item.shows || "").trim() }] : [];
222
- });
223
-
224
330
  const tiles = [];
225
331
  if (faces.length) {
226
332
  const names = faces
227
- .map((face) => `<p class="face" style="font-family:${cssFamily(face)}">${esc(face)}</p>`)
333
+ .map((face) => `<p class="face" style="font-family:${esc(cssFamily(face))}">${esc(face)}</p>`)
228
334
  .join("");
229
- tiles.push(`<article class="tile type span-${colours.length ? 2 : 6}">
335
+ tiles.push(`<article class="tile type span-${colourCount ? 2 : 6}">
230
336
  <p class="kicker">Type we saw</p>
231
337
  <p class="aa">Aa</p>
232
338
  <div class="faces">${names}</div>
233
339
  </article>`);
234
340
  }
235
- if (colours.length) {
341
+ if (colourCount) {
236
342
  const span = faces.length ? 4 : 6;
237
- const chips = colours
238
- .map((s) => {
239
- const edge = lum(s.hex) > 0.86 ? " chip-edge" : "";
240
- return `<div class="swatch"><div class="chip${edge}" style="background:${s.hex}"></div><p class="hex">${esc(s.hex)}</p>${s.label ? `<p class="role">${esc(s.label)}</p>` : ""}</div>`;
343
+ const rows = colourCards
344
+ .filter((group) => group.colours.length)
345
+ .map((group, i) => {
346
+ const chips = group.colours
347
+ .map((s) => {
348
+ const edge = lum(s.hex) > 0.86 ? " chip-edge" : "";
349
+ return `<div class="swatch"><div class="chip${edge}" style="background:${esc(s.hex)}"></div><p class="hex">${esc(s.hex)}</p>${s.label ? `<p class="role">${esc(s.label)}</p>` : ""}</div>`;
350
+ })
351
+ .join("");
352
+ const label = i === 0 && !group.show ? "" : `<p class="from">${esc(group.name)}</p>`;
353
+ return `${label}<div class="swatches">${chips}</div>`;
241
354
  })
242
355
  .join("");
243
- tiles.push(`<article class="tile colour span-${span}"><p class="kicker">Colour we saw</p><div class="swatches">${chips}</div></article>`);
244
- }
245
- if (primarySrc || principle) {
246
- const span = also && (alsoSrc || also["worth taking"]) ? 3 : 6;
247
- const shot = primarySrc ? `<img src="${esc(primarySrc)}" alt="Leading reference, top of the shot">` : "";
248
- tiles.push(`<article class="tile primary span-${span}${primarySrc ? " shot" : " no-shot"}">${shot}<div class="caption"><p class="kicker">Leads</p>${principle ? `<p class="control">${esc(principle)}</p>` : ""}</div></article>`);
249
- }
250
- if (also && (alsoSrc || also["worth taking"])) {
251
- const span = primarySrc || principle ? 3 : 6;
252
- const shot = alsoSrc ? `<img src="${esc(alsoSrc)}" alt="Also reference, top of the shot">` : "";
253
- const line = (also["worth taking"] || "").trim();
254
- tiles.push(`<article class="tile also span-${span}${alsoSrc ? " shot" : ""}">${shot}<div class="caption"><p class="kicker">Also</p>${line ? `<p class="control">${esc(line)}</p>` : ""}</div></article>`);
356
+ tiles.push(`<article class="tile colour span-${span}"><p class="kicker">Colour we saw</p><div class="rows">${rows}</div></article>`);
255
357
  }
256
- const pictureSpan = pictures.length === 1 ? 6 : pictures.length === 2 ? 3 : 2;
257
358
  for (const pic of pictures) {
258
- const cap = pic.caption ? `<figcaption>${esc(pic.caption)}</figcaption>` : "";
259
- tiles.push(`<figure class="tile picture shot span-${pictureSpan}"><img src="${esc(pic.src)}" alt="${esc(pic.caption || "Imagery")}">${cap}</figure>`);
359
+ const span = pic.role ? 3 : 2;
360
+ const kicker = pic.role === "leads" ? "Leads" : pic.role === "also" ? "Also" : "";
361
+ const img = `<img src="${esc(pic.src)}" alt="${esc(pic.name)}" loading="lazy">`;
362
+ const frame = pic.url
363
+ ? `<a class="frame" href="${esc(pic.url)}" target="_blank" rel="noopener noreferrer">${img}</a>`
364
+ : `<div class="frame">${img}</div>`;
365
+ tiles.push(`<figure class="tile shot span-${span}${pic.role ? " marked" : ""}">${frame}<figcaption>${kicker ? `<p class="kicker">${esc(kicker)}</p>` : ""}<p class="name">${esc(pic.name)}</p>${pic.caption ? `<p class="line">${esc(pic.caption)}</p>` : ""}</figcaption></figure>`);
366
+ }
367
+ for (const pic of picturesOfPlace) {
368
+ const img = `<img src="${esc(pic.src)}" alt="${esc(pic.caption || "Imagery")}" loading="lazy">`;
369
+ const frame = pic.url
370
+ ? `<a class="frame" href="${esc(pic.url)}" target="_blank" rel="noopener noreferrer">${img}</a>`
371
+ : `<div class="frame">${img}</div>`;
372
+ tiles.push(`<figure class="tile shot picture span-2">${frame}<figcaption><p class="kicker">Imagery</p>${pic.caption ? `<p class="line">${esc(pic.caption)}</p>` : ""}</figcaption></figure>`);
260
373
  }
261
374
 
262
375
  if (!tiles.length) {
@@ -270,7 +383,7 @@ const html = `<!DOCTYPE html>
270
383
  <meta charset="utf-8">
271
384
  <meta name="viewport" content="width=device-width, initial-scale=1">
272
385
  <title>Moodboard</title>
273
- <style>
386
+ ${fonts ? `<link rel="stylesheet" href="${esc(fonts)}">\n` : ""}<style>
274
387
  :root {
275
388
  --display: ${family};
276
389
  --ink: ${ink};
@@ -289,9 +402,9 @@ const html = `<!DOCTYPE html>
289
402
  font-family: var(--ui);
290
403
  -webkit-font-smoothing: antialiased;
291
404
  }
292
- .sheet { max-width: 1080px; margin: 0 auto; padding: 52px 28px 80px; }
405
+ .sheet { max-width: 1200px; margin: 0 auto; padding: 52px 28px 80px; }
293
406
  h1 {
294
- margin: 0 0 16px 2px;
407
+ margin: 0 0 20px 2px;
295
408
  font-family: var(--ui);
296
409
  font-size: 11px;
297
410
  font-weight: 600;
@@ -299,7 +412,7 @@ const html = `<!DOCTYPE html>
299
412
  text-transform: uppercase;
300
413
  color: var(--muted);
301
414
  }
302
- .grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; align-items: stretch; }
415
+ .grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 22px; align-items: stretch; }
303
416
  .tile { background: var(--paper); border-radius: 22px; overflow: hidden; min-width: 0; }
304
417
  .span-2 { grid-column: span 2; }
305
418
  .span-3 { grid-column: span 3; }
@@ -313,17 +426,17 @@ const html = `<!DOCTYPE html>
313
426
  text-transform: uppercase;
314
427
  color: var(--muted);
315
428
  }
316
- .type, .colour, .principle, .leave { padding: 22px 24px 20px; }
429
+ .type, .colour { padding: 26px 28px 24px; }
317
430
  .type {
318
431
  display: flex;
319
432
  flex-direction: column;
320
- min-height: 250px;
433
+ min-height: 280px;
321
434
  background: #171717;
322
435
  color: #f6f5f2;
323
436
  }
324
437
  .type .kicker { color: rgba(255, 255, 255, 0.55); }
325
438
  .aa {
326
- margin: 22px 0 0;
439
+ margin: 24px 0 0;
327
440
  font-family: var(--display);
328
441
  font-size: 104px;
329
442
  line-height: 0.78;
@@ -331,23 +444,27 @@ const html = `<!DOCTYPE html>
331
444
  font-weight: 500;
332
445
  color: #f6f5f2;
333
446
  }
334
- .faces { margin-top: 20px; }
447
+ .faces { margin-top: 24px; }
335
448
  .face {
336
449
  margin: 0;
337
- font-family: var(--display);
338
450
  font-size: 22px;
339
- line-height: 1.2;
451
+ line-height: 1.25;
340
452
  letter-spacing: -0.03em;
341
453
  color: #f6f5f2;
342
454
  }
343
- .face + .face { margin-top: 2px; font-size: 16px; color: rgba(255, 255, 255, 0.62); }
344
- .colour { display: flex; flex-direction: column; min-height: 250px; }
455
+ .face + .face { margin-top: 4px; font-size: 17px; color: rgba(255, 255, 255, 0.68); }
456
+ .colour { display: flex; flex-direction: column; min-height: 280px; }
457
+ .rows { margin-top: auto; padding-top: 24px; display: grid; gap: 18px; }
458
+ .from {
459
+ margin: 0 0 8px;
460
+ font-size: 12px;
461
+ letter-spacing: 0.02em;
462
+ color: var(--muted);
463
+ }
345
464
  .swatches {
346
- margin-top: auto;
347
- padding-top: 22px;
348
465
  display: grid;
349
- grid-template-columns: repeat(auto-fit, minmax(88px, 1fr));
350
- gap: 10px 12px;
466
+ grid-template-columns: repeat(auto-fit, minmax(92px, 1fr));
467
+ gap: 12px 14px;
351
468
  }
352
469
  .chip { height: 92px; border-radius: 14px; }
353
470
  .chip-edge { box-shadow: inset 0 0 0 1px rgba(28, 28, 26, 0.14); }
@@ -358,76 +475,32 @@ const html = `<!DOCTYPE html>
358
475
  letter-spacing: 0.02em;
359
476
  color: #3c3c39;
360
477
  }
361
- .role {
362
- margin: 2px 0 0;
363
- font-size: 12px;
364
- line-height: 1.3;
365
- color: var(--muted);
366
- display: -webkit-box;
367
- -webkit-line-clamp: 2;
368
- -webkit-box-orient: vertical;
369
- overflow: hidden;
370
- }
371
- .principle { display: flex; flex-direction: column; min-height: 320px; }
372
- .principle .kicker { color: color-mix(in srgb, currentColor 58%, transparent); }
373
- .statement {
374
- margin: auto 0 0;
375
- max-width: 16ch;
376
- font-family: var(--display);
377
- font-size: 40px;
378
- line-height: 1.05;
379
- letter-spacing: -0.035em;
380
- font-weight: 500;
478
+ .role { margin: 3px 0 0; font-size: 12px; line-height: 1.35; color: var(--muted); }
479
+ .shot { margin: 0; display: flex; flex-direction: column; }
480
+ .frame {
481
+ display: block;
482
+ background: #141414;
483
+ aspect-ratio: 1;
381
484
  }
382
- .statement.long { font-size: 28px; line-height: 1.15; max-width: 22ch; }
383
- .shot { position: relative; background: #1a1a1a; }
384
485
  .shot img {
385
486
  display: block;
386
487
  width: 100%;
387
- height: 320px;
388
- object-fit: cover;
389
- object-position: top center;
390
- background: #eceae6;
391
- }
392
- .picture img { height: 250px; object-position: center; }
393
- .shot .caption, .picture figcaption {
394
- position: absolute;
395
- left: 0;
396
- right: 0;
397
- bottom: 0;
398
- margin: 0;
399
- padding: 64px 18px 16px;
400
- background: linear-gradient(to top, rgba(10, 10, 10, 0.78) 0%, rgba(10, 10, 10, 0.28) 52%, rgba(10, 10, 10, 0) 100%);
401
- color: #fff;
402
- }
403
- .shot .kicker { color: rgba(255, 255, 255, 0.72); }
404
- .shot .control { margin: 4px 0 0; font-size: 16px; line-height: 1.3; color: #fff; }
405
- .picture { margin: 0; }
406
- .picture figcaption {
407
- font-size: 14px;
408
- line-height: 1.3;
409
- display: -webkit-box;
410
- -webkit-line-clamp: 2;
411
- -webkit-box-orient: vertical;
412
- overflow: hidden;
413
- }
414
- .primary.no-shot { min-height: 220px; background: var(--paper); }
415
- .primary.no-shot .caption { position: static; padding: 22px 24px; background: none; color: inherit; }
416
- .primary.no-shot .kicker { color: var(--muted); }
417
- .primary.no-shot .control {
418
- font-family: var(--display);
419
- font-size: 28px;
420
- line-height: 1.15;
421
- letter-spacing: -0.03em;
422
- color: #2a2a28;
488
+ height: 100%;
489
+ object-fit: contain;
490
+ object-position: center;
423
491
  }
424
- .leave { display: flex; flex-direction: column; justify-content: center; gap: 12px; min-height: 180px; }
425
- .quiet { margin: 0; max-width: 28em; font-size: 20px; line-height: 1.35; letter-spacing: -0.02em; color: #3a3a38; }
426
- @media (max-width: 800px) {
492
+ .shot figcaption { flex: 1; padding: 16px 18px 18px; background: var(--paper); color: var(--ink); }
493
+ .shot .name { margin: 6px 0 0; font-size: 15px; line-height: 1.3; letter-spacing: -0.01em; }
494
+ .shot .line { margin: 4px 0 0; font-size: 13px; line-height: 1.4; color: var(--muted); }
495
+ .shot figcaption .kicker + .name { margin-top: 6px; }
496
+ .marked .frame { aspect-ratio: 4 / 3; }
497
+ .marked .name { font-family: var(--display); font-size: 22px; letter-spacing: -0.02em; }
498
+ .marked .line { font-size: 15px; color: #3a3a38; }
499
+ @media (max-width: 900px) {
427
500
  .sheet { padding: 28px 16px 48px; }
501
+ .grid { gap: 16px; }
428
502
  .tile, .span-2, .span-3, .span-4, .span-6 { grid-column: 1 / -1; }
429
503
  .aa { font-size: 84px; }
430
- .statement { font-size: 32px; }
431
504
  }
432
505
  </style>
433
506
  </head>