/* Cascadia Precision — homepage exhibit + full-resolution zoom
   Loaded only on pages carrying `exhibit: true` in their front matter.
   Zero dependencies; the lightbox is a <dialog> driven by
   assets/js/exhibit-zoom.js (which fetches the -full.jpg on first open). */

.exhibit { margin: 2.5rem 0 1rem; }
.exhibit-fig { margin: 0; }

/* The plate is the first thing on the page and spans the full content
   column — sized by WIDTH, no height cap, so it reads as a document you
   scroll rather than a framed illustration. */
.exhibit-zoom {
  display: block; position: relative; line-height: 0;
  cursor: zoom-in; text-decoration: none;
}
.exhibit-zoom img {
  display: block;
  width: 100%; height: auto;
  background: #fff;
  border: 1px solid color-mix(in srgb, var(--gold) 50%, transparent);
  box-shadow: 0 2px 20px rgba(34, 28, 25, 0.18);
}
.exhibit-zoom:focus-visible { outline: 2px solid var(--gold); outline-offset: 4px; }

.exhibit-hint {
  position: absolute; right: 0.65rem; bottom: 0.65rem;
  font-family: var(--mono); font-size: 0.68rem; line-height: 1;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--paper); background: color-mix(in srgb, var(--oxblood) 90%, transparent);
  padding: 0.45rem 0.6rem 0.4rem; border-radius: 2px;
  opacity: 0.78; transition: opacity 0.15s ease;
}
.exhibit-zoom:hover .exhibit-hint,
.exhibit-zoom:focus-visible .exhibit-hint { opacity: 1; }

.exhibit-fig figcaption { max-width: var(--measure); margin: 1.1rem 0 0; }
.exhibit-cap {
  display: block; font-family: var(--mono); font-size: 0.78rem;
  line-height: 1.55; letter-spacing: 0.03em; color: var(--ink-soft);
}

/* ---------- lightbox ---------- */
.exhibit-lb {
  width: 100vw; max-width: 100vw; height: 100vh; max-height: 100vh;
  margin: 0; padding: 0; border: 0;
  background: #141110; color: var(--paper);
  overflow: auto; overscroll-behavior: contain;
}
.exhibit-lb::backdrop { background: rgba(20, 16, 14, 0.92); }

.exhibit-lb-bar {
  position: fixed; top: 0; right: 0; z-index: 2;
  display: flex; gap: 0.5rem; padding: 0.7rem 0.8rem;
}
.exhibit-lb-btn {
  font-family: var(--disp); font-weight: 600; font-size: 0.85rem;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--gold); background: var(--oxblood);
  border: 1px solid color-mix(in srgb, var(--gold) 45%, transparent);
  border-radius: 2px; padding: 0.5rem 0.9rem 0.42rem; cursor: pointer;
}
.exhibit-lb-btn:hover { background: var(--oxblood-deep); }
.exhibit-lb-btn:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

.exhibit-lb-note {
  position: fixed; top: 50%; left: 0; right: 0; margin: 0; z-index: 1;
  text-align: center; font-family: var(--mono); font-size: 0.8rem;
  letter-spacing: 0.1em; color: var(--gold);
}
.exhibit-lb.is-loaded .exhibit-lb-note { display: none; }

/* width:max-content + min-width:100% keeps an oversized image centred while
   still leaving its left edge reachable by scroll (text-align:center would
   clip it). */
.exhibit-lb-inner {
  display: flex; justify-content: center; align-items: flex-start;
  width: max-content; min-width: 100%; min-height: 100%;
}
.exhibit-lb-inner img { display: block; width: auto; height: auto; max-width: none; }

.exhibit-lb.is-fit .exhibit-lb-inner { width: auto; align-items: center; }
.exhibit-lb.is-fit .exhibit-lb-inner img { max-width: 100%; max-height: 100vh; }

@media (max-width: 40rem) {
  .exhibit-lb-btn { font-size: 0.78rem; padding: 0.45rem 0.7rem 0.38rem; }
}

/* ---------- transcription (live text behind a disclosure) ---------- */
.exhibit-text { max-width: var(--measure); margin: 1.6rem 0 0; }

.exhibit-text summary {
  display: flex; align-items: baseline; gap: 0.6rem; width: fit-content;
  font-family: var(--disp); font-weight: 600; font-size: 0.85rem;
  letter-spacing: 0.22em; text-transform: uppercase; color: var(--oxblood);
  padding: 0.35rem 0; cursor: pointer; list-style: none;
}
.exhibit-text summary::-webkit-details-marker { display: none; }
.exhibit-text summary::before {
  content: ""; flex: none; align-self: center;
  border-left: 0.42em solid currentColor;
  border-top: 0.3em solid transparent;
  border-bottom: 0.3em solid transparent;
  transition: transform 0.15s ease;
}
.exhibit-text[open] summary::before { transform: rotate(90deg); }
.exhibit-text summary:hover { color: var(--oxblood-deep); }
.exhibit-text summary:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

.exhibit-text-body {
  background: var(--paper-panel);
  border-left: 3px solid var(--gold);
  padding: 1.2rem 1.5rem; margin-top: 0.4rem;
}
.exhibit-text-body p { margin: 0 0 1rem; }
.exhibit-text-body p:last-child { margin-bottom: 0; }
.exhibit-text-body .sc { font-variant-caps: all-small-caps; letter-spacing: 0.06em; }

.exhibit-text-body .exhibit-sig {
  font-family: var(--disp); font-weight: 600; font-size: 0.95rem;
  letter-spacing: 0.14em; text-transform: uppercase;
  text-align: right; margin: 1.4rem 0 0;
}
.exhibit-text-body .exhibit-sig + .exhibit-sig { margin-top: 0.9rem; }
.exhibit-text-body .exhibit-sig span {
  display: block; font-family: var(--mono); font-weight: 400;
  font-size: 0.78rem; letter-spacing: 0.06em; text-transform: none;
  color: var(--ink-soft);
}
