/* Hallmark · shape: Index-First, in four chapters · genre: editorial · theme: brand
 * paper: oklch(98.2% 0.004 85) · accent: oklch(45.2% 0.313 264) · display: Helvetica · body: Helvetica · hero: Ledge, the title left, the index right · nav: kept · footer: kept · signature: the index of all eleven projects on the first screen, each name a door to its chapter
 * axes: bone/helvetica-caps/pure-blue · posture: restrained, one blue · contrast: pass · fold: pass · v2.0.0 */
/* Hallmark · pre-emit critique: P4 H4 E4 S4 R4 V3 · weakest: V, the page wears the site's own grammar on purpose; the chapters vary the composition instead (a lead and three, a dark band, a pair, a full bleed) */
/* Hallmark · answered F3 · text-wrap: balance on every h1 to h3 lives in /bfs.css, which this page loads first */
/* Hallmark · waive 83 · every picture is a capture of Bruno's own published projects, linked to the project itself · a gallery of his work is the page's whole job */
/* Projects gallery of brunoseixas.com (/work/). Built on /bfs.css (tokens, header, footer, links, buttons, sections);
   this file only adds what the gallery needs. Every picture is a capture of the live project it links to. */

/* Head: the title set big with the plus, one sentence, the action; the index of every project beside it. */
.work-head { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); column-gap: 10%; align-items: end; min-height: min(calc(100svh - var(--head)), 720px); padding: 56px var(--pad) 72px; }
.work-title { font-weight: 700; line-height: 1; text-transform: uppercase; overflow-wrap: break-word; min-width: 0; }
.work-title .row { display: block; font-size: clamp(56px, 8.6vw, 128px); letter-spacing: -.07em; }
.work-lead { margin-top: 32px; max-width: 30ch; font-size: clamp(20px, 1.8vw, 28px); font-weight: 700; line-height: 1.22; letter-spacing: -.03em; }
.work-head .actions { margin-top: 32px; }

/* The index: every project, grouped as the chapters below. A list of links, so it is also the page's map. */
.work-index { display: grid; gap: 24px; align-self: end; }
.work-index h2 { margin-bottom: 8px; font-size: 15px; font-weight: 400; line-height: 1.4; letter-spacing: 0; color: var(--muted); text-box: none; }
.work-index ul { border-top: 1px solid var(--ink); }
.work-index li { border-bottom: 1px solid var(--rule); }
.work-index a { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 9px 0; font-size: clamp(18px, 1.5vw, 22px); font-weight: 700; letter-spacing: -.02em; text-decoration: none; }
.work-index a span { flex: none; font-size: 14px; font-weight: 400; letter-spacing: 0; color: var(--muted); }
.work-index a:hover { color: var(--blue); }
.work-index a:hover span { color: var(--blue); }

/* A chapter: the statement and its one sentence, then the projects. */
.chapter-head { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 8%; align-items: start; margin-bottom: 56px; }
.chapter-head h2 { overflow-wrap: break-word; min-width: 0; }
.chapter-head p { max-width: 40ch; font-size: clamp(19px, 1.6vw, 24px); font-weight: 700; line-height: 1.3; letter-spacing: -.02em; }
.chapter-head h2, .chapter-head p { text-box: trim-start cap alphabetic; }

/* A project: the capture, its name, one line. The whole block is the link; the frame takes the hover, never the picture. */
.proj { display: block; min-width: 0; text-decoration: none; }
.proj figure { margin: 0; }
.proj .shot { display: block; overflow: hidden; border: 1px solid var(--ink); background: var(--ground-2); transition: border-color .2s ease-out; }
.proj .shot img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; object-position: top center; }
.proj h3 { margin-top: 18px; font-size: clamp(24px, 2.2vw, 34px); line-height: 1.05; letter-spacing: -.04em; overflow-wrap: break-word; min-width: 0; }
.proj p { margin-top: 8px; max-width: 46ch; font-size: 17px; line-height: 1.5; color: var(--muted); }
.proj .lang { display: block; margin-top: 6px; font-size: 14px; color: var(--muted); }
.proj:hover .shot, .proj:focus-visible .shot { border-color: var(--blue); }
.proj:hover h3 { color: var(--blue); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .18em; }
.proj:focus-visible { outline-offset: 8px; }

/* Chapter 1: one tool leads, three follow. */
.lead-and-three { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 56px 32px; }
.lead-and-three .proj:first-child { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 0 5%; align-items: end; }
.lead-and-three .proj:first-child h3 { margin-top: 0; font-size: clamp(34px, 3.6vw, 58px); }
.lead-and-three .proj:first-child p { font-size: 19px; }

/* Chapter 2: on ink. The game is dark, so the band is too. */
.on-ink { background: var(--ink); color: var(--on-blue); }
.on-ink .chapter-head p, .on-ink .proj p, .on-ink .proj .lang { color: var(--on-blue-2); }
.on-ink .proj .shot { border-color: var(--on-blue-2); background: var(--ink); }
.on-ink .proj:hover .shot, .on-ink .proj:focus-visible .shot { border-color: var(--on-blue); }
.on-ink .proj:hover h3 { color: var(--on-blue); }
.on-ink :focus-visible { outline-color: var(--on-blue); }

/* Chapter 2 and 3: two projects, one wider than the other. */
.pair { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 56px 4%; align-items: end; }
.pair.flip { grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr); }

.on-ground-2 { background: var(--ground-2); }
/* Chapter 4: the cemetery at full width, then the poems and the run side by side. */
.full .shot img { aspect-ratio: 16 / 8; }
.full { margin-bottom: 72px; }
.full .proj-text { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 0 8%; align-items: start; }

/* A project with no capture yet: its sign, large, in the frame the capture will fill. */
.shot[data-slot] { display: grid; place-items: center; aspect-ratio: 16 / 10; background: var(--ground); }
.shot[data-slot] > img { width: 34%; height: auto; aspect-ratio: auto; object-fit: contain; }
.shot[data-slot] > img[src$=".jpg"], .shot[data-slot] > img[src$=".png"], .shot[data-slot] > img[src$=".webp"] { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: top center; }

/* Close: the work behind all of it. */
.work-close .section-head { margin-bottom: 0; }
.work-close .actions { margin-top: 40px; }

@media (max-width: 1100px) {
  .work-head { grid-template-columns: minmax(0, 1fr); row-gap: 56px; min-height: 0; }
  .lead-and-three { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lead-and-three .proj:first-child { grid-template-columns: minmax(0, 1fr); }
  .lead-and-three .proj:first-child h3 { margin-top: 18px; }
}

@media (max-width: 760px) {
  .work-head { padding: 32px var(--pad) 56px; }
  .work-title .row { font-size: 15vw; }
  .chapter-head { grid-template-columns: minmax(0, 1fr); gap: 20px; margin-bottom: 36px; }
  .chapter-head p { font-size: 17px; }
  .lead-and-three, .pair, .pair.flip, .full .proj-text { grid-template-columns: minmax(0, 1fr); gap: 44px; }
  .full .proj-text { gap: 0; }
  .full .shot img { aspect-ratio: 16 / 10; }
  .proj p { font-size: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  .proj .shot { transition: none; }
}
