/* Ceramics page: one section per piece, masonry of photos, image lightbox.
   Uses tokens from style.css, hero and lede from projects.css, dialog shell from .vmodal. */

.cer-index { list-style: none; margin: 28px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 24px; font: .82rem var(--mono); text-transform: uppercase; letter-spacing: .04em; }
.cer-index a { min-height: 44px; display: inline-flex; align-items: center; text-decoration: none; border-bottom: 1px solid currentColor; }

/* grid: every photo in the same 4:5 frame, read row by row; the lightbox shows it uncropped */
.cer-grid { display: grid; grid-template-columns: 1fr; gap: 28px 20px; }
@media (min-width: 560px) { .cer-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) { .cer-grid { grid-template-columns: repeat(3, 1fr); } }
.cer-shot { margin: 0; min-width: 0; }
.cer-grid .cer-shot img, .cer-grid .cer-shot video { aspect-ratio: 4 / 5; object-fit: cover; }
.cer-shot a { display: block; cursor: zoom-in; }
.cer-shot img, .cer-shot video { display: block; width: 100%; height: auto; background: var(--stage); }
.cer-shot a img { transition: opacity .2s; }
.cer-shot a:hover img { opacity: .88; }
.cer-cap { border-top: 1px solid var(--rule); padding-top: 6px; margin-top: 8px; font-size: .95rem; line-height: 1.35; }
.cer-cap .fig-n { font: .7rem var(--mono); text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-right: 6px; }

/* lightbox */
.lb-box { display: flex; flex-direction: column; align-items: center; max-width: calc(100vw - 32px); }
.lb-box img { display: block; max-width: calc(100vw - 32px); max-height: calc(100vh - 150px); max-height: calc(100dvh - 150px); width: auto; height: auto; background: #000; }
.lb-box .vmodal-cap { align-self: stretch; }
.lb-nav {
  position: absolute; top: 50%; transform: translateY(-50%); width: 48px; height: 48px;
  display: grid; place-items: center; cursor: pointer;
  background: #F2F2EE; color: #121314; border: 0; border-radius: 0; z-index: 1;
}
.lb-nav:hover { background: var(--accent); }
.lb-prev { left: 12px; }
.lb-next { right: 12px; }
@media (max-width: 600px) { .lb-nav { top: auto; bottom: 12px; transform: none; } }
@media (prefers-reduced-motion: reduce) { .cer-shot a img { transition: none; } }

/* minor piece: closes the page, smaller title and thumbnails */
.cer-minor .sec-head h2 { font-size: clamp(1.4rem, 3vw, 2rem); }
.cer-minor .cer-grid { grid-template-columns: repeat(2, 1fr); }
@media (min-width: 900px) { .cer-minor .cer-grid { grid-template-columns: repeat(4, 1fr); } }
.cer-minor .cer-cap { font-size: .85rem; }

/* lead: the piece's best moment, shown first and large, framed to the grid's full width */
.cer-lead { margin: 0 0 32px; }
.cer-lead > a, .cer-lead > video { background: var(--stage); }
.cer-lead img, .cer-lead video { width: 100%; max-height: 72vh; max-height: 72dvh; object-fit: contain; }
@media (min-width: 900px) { .cer-lead img, .cer-lead video { height: min(72vh, 720px); height: min(72dvh, 720px); } }

/* MonsterPots: intro note and per-piece micro story */
.cer-mp { margin-top: 20px; }
.cer-story { margin: 32px 0 0; padding-left: 20px; border-left: 2px solid var(--rule); color: var(--text-2); line-height: 1.65; }
/* long story: below the photos, across the section's width in two columns */
@media (min-width: 900px) { .cer-story-long { columns: 2; column-gap: 48px; } }
.cer-story-long p { break-inside: avoid; }
.cer-story-long .cer-keeps, .cer-story-long .cer-orig { column-span: all; }
.cer-story p { margin: 0 0 .9em; }
.cer-keeps { font-style: italic; color: var(--text); }
.cer-keeps span { font: normal .72rem var(--mono); text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-right: 8px; }
.cer-orig { margin-top: 1.2em; font: .82rem var(--mono); text-transform: uppercase; letter-spacing: .04em; }

/* feature piece: the most important work, larger title */
.cer-feature .sec-head h2 { font-size: clamp(2.6rem, 7vw, 5.5rem); }
