*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --black: #000; --surface: #0a0a0a; --border: #1e1e1e; --border2: #2a2a2a;
  --dim: #444; --mid: #666; --light: #999; --text: #d4d0c8; --bright: #f0ece0;
  --red: #c0392b; --plate: #c8a25a; --mono: 'Space Mono', monospace;
}
body {
  background: #000; color: var(--text); font-family: var(--mono); font-size: 13px;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: #000; }
::-webkit-scrollbar-thumb { background: #222; }

/* Nav layout lives in assets/nav.css. Only per-page accent override kept here. */
.dropdown-menu a.active { color: var(--plate); }
nav .nav-link.dropdown.active,
nav .nav-link.dropdown.active .bracket,
nav .nav-link.dropdown.active .caret { color: var(--plate); }


/* ─── BACKDROP — quiet film-grain shimmer ─── */
#backdrop {
  position: fixed; inset: 44px 0 0 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(ellipse at 30% 15%, rgba(200,162,90,0.04), transparent 55%),
    radial-gradient(ellipse at 75% 85%, rgba(192,57,43,0.035), transparent 60%),
    #000;
}
#backdrop::after {
  content: ''; position: absolute; inset: 0;
  background-image: repeating-linear-gradient(0deg, rgba(255,255,255,0.012) 0 1px, transparent 1px 3px);
  mix-blend-mode: overlay;
  pointer-events: none;
}

main { position: relative; z-index: 1; }

/* ─── STICKY FRAME COUNTER ─── */
.frame-counter {
  position: fixed;
  top: 60px; left: 18px;
  z-index: 90;
  font-family: 'Space Mono', monospace;
  font-size: 9px;
  letter-spacing: 3px;
  color: var(--mid);
  background: rgba(0,0,0,0.7);
  border: 1px solid var(--border2);
  padding: 6px 10px 7px;
  pointer-events: none;
  font-variant-numeric: tabular-nums;
  display: flex; align-items: center; gap: 8px;
  backdrop-filter: blur(6px);
  opacity: 0;
  transition: opacity 0.4s;
}
.frame-counter.visible { opacity: 1; }
.frame-counter .br { color: var(--dim); }
.frame-counter .now { color: var(--plate); }
.frame-counter .of { color: var(--dim); }
.frame-counter .total { color: var(--light); }
.frame-counter .label { color: var(--dim); letter-spacing: 2px; }
.frame-counter .dot { width: 4px; height: 4px; border-radius: 50%; background: var(--plate); box-shadow: 0 0 6px var(--plate); }

/* ─── HEADER ─── */
.gallery-header {
  /* Padding matched to Aetherz / Assemblage gallery-header so the title
     sits in the same vertical position relative to the nav on every
     gallery page (was 56px top / 40px bottom — too tall, made Plates
     look out of step with its siblings).
     Flex split so cross-ref pills on the right anchor to the top of
     the header at the same y as the title row, regardless of how much
     subtitle/blurb content stacks below on the left. align-items:
     flex-start is the key — flex-end would push pills to the bottom
     of the tall left column. Wrap on narrow viewports lets the right
     column drop below the left. Pattern matches assemblage /
     aetherz / cult-of-the-null. Banked 2026-05-15. */
  margin-top: 44px;
  padding: 32px 32px;
  border-bottom: 1px solid var(--border);
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  flex-wrap: wrap;
  background:
    linear-gradient(180deg, rgba(200,162,90,0.04), transparent 70%),
    rgba(0,0,0,0.4);
}
.gallery-header::after {
  /* horizontal hairline beneath the title — museum placard */
  content: ''; position: absolute;
  left: 0; right: 0; bottom: -1px; height: 1px;
  background: linear-gradient(90deg, transparent 0%, var(--red) 12%, var(--red) 88%, transparent 100%);
  opacity: 0.55;
}
/* Sibling of cr-pills inside .gh-right — mirrors the .gallery-meta
   styling on assemblage / aetherz / cult-of-the-null so the meta
   line reads consistent across galleries and pushes the pills
   down to the same y. */
.gallery-meta {
  font-size: 11px;
  letter-spacing: 2px;
  color: var(--light);
  text-align: right;
}
.gh-tag {
  font-size: 10px; letter-spacing: 4px; color: var(--plate);
  margin-bottom: 14px;
}
.gh-tag .br { color: var(--dim); }
.gh-title-row {
  display: flex; align-items: baseline; gap: 24px; flex-wrap: wrap;
}
.gallery-title {
  /* Sized to match the standard gallery-title across all galleries
     (Assemblage, Aetherz, etc.): 36px / letter-spacing 4px on desktop,
     24px / 3px on mobile. Earlier scale (clamp 56–132px / spacing 8px)
     was outsized for the rest of the page hierarchy and inconsistent
     with sibling galleries. */
  font-family: 'Chakra Petch', sans-serif;
  font-size: 36px;
  font-weight: 700;
  letter-spacing: 4px;
  color: var(--bright);
  text-transform: uppercase;
  line-height: 1;
  position: relative;
}
.gallery-title .accent {
  display: inline-block;
  color: var(--red);
  margin-left: 14px;
  font-size: 0.32em;
  vertical-align: super;
  letter-spacing: 2px;
  font-family: 'Space Mono', monospace;
}
.gallery-subtitle {
  font-size: 11px;
  letter-spacing: 4px;
  color: var(--light);
  margin-top: 18px;
  text-transform: uppercase;
}
.gallery-blurb {
  max-width: 580px;
  font-size: 12px;
  color: var(--light);
  line-height: 1.7;
  margin-top: 22px;
  letter-spacing: 0.4px;
}
.gallery-blurb .br { color: var(--dim); }
.gallery-blurb em {
  font-style: normal;
  color: var(--bright);
}

/* ─── COORDS / MUSEUM STRIP ─── */
.coords-strip {
  display: flex; align-items: center; gap: 22px;
  padding: 11px 32px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(90deg, rgba(200,162,90,0.06), transparent 70%);
  font-size: 9px; letter-spacing: 3px; color: var(--mid);
  text-transform: uppercase;
  flex-wrap: wrap;
}
.coords-strip .label { color: var(--plate); letter-spacing: 4px; }
.coords-strip .spacer { flex: 1; }
.coords-strip .ping {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--plate); box-shadow: 0 0 8px var(--plate);
  animation: ping 2.4s infinite;
}
@keyframes ping { 0%,100% { opacity: 1; } 50% { opacity: 0.4; } }

.section-divider {
  padding: 16px 32px;
  border-bottom: 1px solid var(--border);
  display: flex; justify-content: space-between; align-items: center;
  background: #050505;
}
.section-divider .name { font-size: 11px; letter-spacing: 3px; color: var(--dim); }
.section-divider .name span.acc { color: var(--plate); }
.section-divider .count { font-size: 10px; color: var(--dim); border: 1px solid var(--border); padding: 3px 9px; }

/* ─── EVOCATION — adaptive shared-height rows, no cropping ───
   Each row holds 1–3 plates. Plate widths are computed from each
   image's actual aspect ratio (passed as `--ratio` inline), so a
   wide piece takes more horizontal space than a portrait one and
   every plate in a row shares the same height. No images are ever
   cropped — `object-fit: contain` everywhere as belts+suspenders
   on top of the aspect-matched frame.

   Row heights are per-kind via `--row-h`:
     hero   = 600px (solo big piece, anchor)
     trip   = 380px (3-up, sized so portraits + squares both fit)
     duet   = 480px (2-up)
     solo   = 540px (1-up non-hero)
*/
.plates {
  padding: 56px 32px 80px;
  display: flex;
  flex-direction: column;
  gap: 88px;
}

.row {
  position: relative;
  display: flex;
  gap: 24px;
  justify-content: center;
  align-items: flex-start;
}
.row.hero      { --row-h: 600px; }
.row.solo      { --row-h: 540px; }
.row.duet      { --row-h: 480px; }
.row.triptych  { --row-h: 380px; }

/* Plate width = ratio × row-height. Caption flows under the frame. */
.plate {
  position: relative;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  flex: 0 0 auto;
  width: calc(var(--ratio, 1) * var(--row-h));
  max-width: 100%;
}
.plate-frame {
  position: relative;
  overflow: hidden;
  background: #050507;
  width: 100%;
  height: var(--row-h);
}
.plate-frame img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: brightness(0.92) saturate(0.95) contrast(1.04);
  transition: filter 0.5s;
}
.plate:hover .plate-frame img {
  filter: brightness(1) saturate(1.05) contrast(1);
}

/* corner brackets — broadcast vocab */
.plate-frame::after {
  content: ''; position: absolute; inset: 14px;
  pointer-events: none;
  background:
    linear-gradient(var(--plate),var(--plate)) top left/22px 1px no-repeat,
    linear-gradient(var(--plate),var(--plate)) top left/1px 22px no-repeat,
    linear-gradient(var(--plate),var(--plate)) top right/22px 1px no-repeat,
    linear-gradient(var(--plate),var(--plate)) top right/1px 22px no-repeat,
    linear-gradient(var(--plate),var(--plate)) bottom left/22px 1px no-repeat,
    linear-gradient(var(--plate),var(--plate)) bottom left/1px 22px no-repeat,
    linear-gradient(var(--plate),var(--plate)) bottom right/22px 1px no-repeat,
    linear-gradient(var(--plate),var(--plate)) bottom right/1px 22px no-repeat;
  opacity: 0;
  transition: opacity 0.35s, inset 0.35s cubic-bezier(.22,.61,.36,1);
}
.plate:hover .plate-frame::after { opacity: 0.85; inset: 8px; }

/* EXPAND chip — fades in on hover, top-right of frame */
.plate-expand {
  position: absolute; top: 14px; right: 14px;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 9px;
  background: rgba(0,0,0,0.75);
  border: 1px solid var(--border2);
  font-family: 'Space Mono', monospace;
  font-size: 9px; letter-spacing: 3px;
  color: var(--bright);
  pointer-events: none;
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 0.3s, transform 0.3s;
  z-index: 3;
  backdrop-filter: blur(6px);
}
.plate-expand .br { color: var(--dim); }
.plate-expand .dot {
  width: 4px; height: 4px; border-radius: 50%;
  background: var(--plate); box-shadow: 0 0 6px var(--plate);
}
.plate:hover .plate-expand { opacity: 1; transform: translateY(0); }

/* CATALOG TAG below each plate */
.plate-caption {
  margin-top: 14px;
  display: flex;
  align-items: baseline;
  gap: 14px;
  font-family: 'Space Mono', monospace;
  font-size: 10px;
  letter-spacing: 2px;
  color: var(--mid);
  text-transform: uppercase;
}
.plate-caption .num {
  color: var(--plate); font-weight: 700;
  letter-spacing: 3px;
  font-variant-numeric: tabular-nums;
}
.plate-caption .title {
  color: var(--light);
  letter-spacing: 1.5px;
  flex: 1;
}
.plate-caption .meta {
  color: var(--dim);
  letter-spacing: 2.5px;
  white-space: nowrap;
}
.plate:hover .plate-caption .title { color: var(--bright); }
.plate:hover .plate-caption .num { color: var(--bright); }

/* row meta — small label introducing each row */
.row-label {
  display: flex; align-items: center; gap: 14px;
  font-family: 'Space Mono', monospace;
  font-size: 9px;
  letter-spacing: 4px;
  color: var(--dim);
  margin-bottom: 22px;
  text-transform: uppercase;
}
.row-label .acc { color: var(--plate); }
.row-label::before {
  content: ''; width: 18px; height: 1px; background: var(--border2);
}
.row-label::after {
  content: ''; flex: 1; height: 1px; background: var(--border);
}

/* end marker */
.end-marker {
  padding: 60px 32px 80px;
  text-align: center;
  border-top: 1px solid var(--border);
  background: linear-gradient(180deg, transparent 0%, rgba(0,0,0,0.6) 100%);
  position: relative;
}
.end-marker::before {
  content: ''; position: absolute; left: 50%; top: 0;
  width: 60px; height: 1px; background: var(--plate);
  transform: translateX(-50%);
  box-shadow: 0 0 12px rgba(200,162,90,0.5);
}
.end-marker .label {
  font-family: 'Space Mono', monospace;
  font-size: 10px;
  letter-spacing: 6px;
  color: var(--mid);
  text-transform: uppercase;
}
.end-marker .label .acc { color: var(--plate); }
.end-marker .sub {
  font-size: 9px; letter-spacing: 3px; color: var(--dim);
  margin-top: 12px;
}

/* status bar (matches site) */
.status-bar {
  display: flex; align-items: center; gap: 20px;
  padding: 8px 20px;
  border-top: 1px solid var(--border);
  background: rgba(0,0,0,0.95);
  font-size: 9px; letter-spacing: 2px; color: var(--dim); text-transform: uppercase;
}
.status-item { display: flex; align-items: center; gap: 6px; }
.status-dot { width: 4px; height: 4px; border-radius: 50%; background: var(--dim); }
.status-dot.active { background: var(--red); animation: stpulse 2s infinite; }
@keyframes stpulse { 0%,100% { opacity: 1; } 50% { opacity: 0.35; box-shadow: 0 0 2px var(--red); } }
.status-spacer { flex: 1; }

/* responsive — stack columns, drop row-height in favor of width-driven aspect */
@media (max-width: 900px) {
  .plates { gap: 72px; padding: 44px 22px 64px; }
  .row { flex-direction: column; align-items: stretch; gap: 56px; }
  .plate { width: 100%; }
  .plate-frame {
    width: 100%;
    height: auto;
    aspect-ratio: var(--ratio);
  }
  .gallery-header { padding: 40px 22px 32px; }
  .gh-title-row { flex-direction: column; gap: 14px; }
  .frame-counter { top: 54px; left: 12px; padding: 5px 8px; font-size: 8px; }
}
@media (max-width: 600px) {
  .plates { gap: 56px; padding: 36px 16px 48px; }
  .plate-frame::after { inset: 8px; }
  .plate-frame::after { background-size: 14px 1px, 1px 14px, 14px 1px, 1px 14px, 14px 1px, 1px 14px, 14px 1px, 1px 14px; }
  .gallery-title { font-size: 24px; letter-spacing: 3px; }
  .coords-strip { padding: 10px 16px; }
  .section-divider { padding: 14px 16px; }
  .nav-links { display: none; }
}
