/* MBK v1.2 — Museum. Spec §5B, §3. Paper ground, gallery pacing, engraved placards.
   v1.2 elevation pass over the v1 baseline. Extends
   tokens.css / base.css / css/motion.css — never redefines them.

   v1.2: exhibit-grid containers carry [data-reveal-stagger] (museum.html) and each
   exhibit article carries [data-reveal] (museum.js) — motion.css owns the reveal
   transition entirely, nothing duplicated here. Key art gets its own self-hover
   Ken-Burns zoom (NOT motion.css's .kb-preview helper — that helper's base state is
   opacity:0, which is wrong for art that must stay visible at rest; this is a
   deliberate, narrower zoom-only treatment scoped to .exhibit-art). Marquee exhibits
   bleed past the grid gutter on desktop. Placard type is up one step with more air. */

.museum {
  padding-bottom: 40px;
}

/* ---------- intro ---------- */
.museum-intro {
  padding: 88px 24px 64px;
  max-width: 720px;
}
.museum-intro .rule-red {
  margin: 22px 0 34px;
}
.museum-intro-line {
  font-size: clamp(1.35rem, 2.6vw, 1.9rem);
  line-height: 1.32;
  color: var(--ink);
}

/* ---------- rooms ---------- */
.room {
  padding: 56px 0 96px;
}
.room + .room {
  border-top: 1px solid var(--line-on-paper);
}
.room[hidden] {
  display: none;
}
.room-head {
  padding-bottom: 28px;
}
.room-head .eyebrow {
  margin-bottom: 20px;
}
/* "The Songs — Licensed" quiet sublabel (KOVAS correction, post-v1.2) — marks the
   scored/licensed register shift for the SONGS room specifically. Tightens the
   eyebrow's own spacing so the pair reads as one unit ahead of the hairline. */
.room-head .eyebrow:has(+ .room-head-sublabel) {
  margin-bottom: 8px;
}
.room-head-sublabel {
  margin-bottom: 20px;
}

/* ---------- exhibit grid ---------- */
.exhibit-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 64px 44px;
  padding-top: 44px;
}

@media (max-width: 980px) {
  .exhibit-grid { grid-template-columns: repeat(2, 1fr); gap: 52px 30px; }
}

@media (max-width: 640px) {
  .exhibit-grid { grid-template-columns: 1fr; gap: 56px; }
}

/* marquee exhibits get an extra column's worth of room where the grid allows it */
.exhibit--marquee {
  grid-column: span 2;
}
@media (max-width: 640px) {
  .exhibit--marquee { grid-column: span 1; }
}

/* ---------- exhibit ---------- */
.exhibit-link {
  display: block;
}
.exhibit-link:hover .exhibit-title { color: inherit; }
.exhibit-link:hover .exhibit-frame { opacity: 0.92; }
/* item 2: exhibit links are the museum's primary interactive surface (one per
   project card) — currentColor keeps the single-red-accent law intact, and offset
   2px reads clearly against both the paper ground and the marquee bleed frames. */
.exhibit-link:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 4px;
}
.exhibit-link:active .exhibit-frame { opacity: 0.86; }

.exhibit-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: var(--paper);
  transition: opacity var(--dur) var(--ease);
}
.exhibit--marquee .exhibit-frame {
  aspect-ratio: 16 / 10;
}

/* marquee exhibits bleed past their grid cell on desktop — key art runs closer to
   edge-to-edge rather than sitting inset inside the 2-column span. Bounded to half
   the grid's column-gap on each side so neighboring cells never overlap. */
@media (min-width: 981px) {
  .exhibit--marquee .exhibit-frame {
    width: calc(100% + 44px);
    margin-left: -22px;
  }
}

.exhibit-art {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transform: scale(1);
  transition: transform 8s var(--ease);
}

/* key-art Ken-Burns on hover — desktop/fine-pointer only, self-hover (no motion-kit
   dependency: the art must stay visible at rest, so this can't borrow .kb-preview's
   opacity:0 base state). Reduced-motion / touch: transform stays put, inert. */
@media (hover: hover) and (pointer: fine) {
  .exhibit-link:hover .exhibit-art {
    transform: scale(1.07);
  }
}
@media (prefers-reduced-motion: reduce) {
  .exhibit-art {
    transition: none;
  }
}

/* absence, treated as intentional: a typeset plate, not a broken image */
.exhibit-frame--plate {
  border: 1px solid var(--line-on-paper);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px;
  text-align: center;
}
.exhibit-plate {
  max-width: 100%;
}
.exhibit-plate-title {
  font-size: clamp(1.2rem, 2vw, 1.7rem);
  line-height: 1.18;
}
.exhibit-plate-meta {
  margin-top: 14px;
}

/* ---------- placard ---------- */
.exhibit-caption {
  padding-top: 22px;
  border-top: 1px solid var(--line-on-paper);
  margin-top: 22px;
}
.exhibit-title {
  font-size: 1.28rem;
  line-height: 1.26;
}
.exhibit--marquee .exhibit-title {
  font-size: 1.55rem;
}
.exhibit-meta {
  margin-top: 9px;
  text-transform: uppercase;
  letter-spacing: var(--track-wide);
  font-size: var(--size-eyebrow);
}
.exhibit-filenote {
  margin-top: 12px;
}

/* ---------- exit ---------- */
.museum-exit {
  padding: 72px 24px 0;
}
.museum-exit .hairline {
  margin-bottom: 40px;
}
.museum-exit-doors {
  display: flex;
  gap: 48px;
  flex-wrap: wrap;
  padding-bottom: 8px;
}
.museum-exit-door {
  font-family: var(--font-didone);
  font-size: 1.05rem;
  transition: color var(--dur) var(--ease), opacity var(--dur) var(--ease);
}
.museum-exit-door:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 3px;
}
.museum-exit-door:active {
  opacity: 0.72;
}

@media (max-width: 640px) {
  .museum-intro { padding: 64px 20px 48px; }
  .room { padding: 40px 0 64px; }
  .museum-exit { padding: 56px 20px 0; }
  .museum-exit-doors { gap: 28px; }
}

/* QA (2026-07-09): the exhibit "official ↗" link was ~13×21px — below touch size.
   Give it a real 44px hit area and clearer padding. */
.exhibit-official {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 8px 4px;
}
