:root {
  --bg: #0d0d10;
  --ink: #eae3d3;
  --muted: #9a917e;
  --faint: #6d6656;
  --brass: #b39554;
  --brass-dim: #57503f;
  --frame-edge: #3f3830;
  --serif: "Cormorant Garamond", "Iowan Old Style", Georgia, serif;
  --sans: "Inter", -apple-system, "Segoe UI", sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 19px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ---------- header ---------- */

.hero {
  min-height: 72vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 18vh 6vw 6vh;
}

.overline {
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.55em;
  text-indent: 0.55em;
  color: var(--brass);
  margin-bottom: 26px;
}

h1 {
  font-weight: 500;
  font-size: clamp(46px, 7.5vw, 92px);
  letter-spacing: 0.02em;
  line-height: 1.05;
  margin-bottom: 30px;
}

.lede {
  font-size: clamp(19px, 2vw, 23px);
  font-style: italic;
  color: var(--muted);
  max-width: 46ch;
}

.note {
  font-family: var(--sans);
  font-size: 12.5px;
  color: var(--faint);
  margin-top: 26px;
  max-width: 52ch;
}

.rule {
  color: var(--brass-dim);
  font-size: 13px;
  margin-top: 48px;
  display: flex;
  align-items: center;
  gap: 18px;
}
.rule::before, .rule::after {
  content: "";
  display: block;
  width: clamp(40px, 9vw, 120px);
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--brass-dim));
}
.rule::after { background: linear-gradient(90deg, var(--brass-dim), transparent); }

/* ---------- gallery ---------- */

#gallery {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 clamp(14px, 3vw, 40px);
}

.piece {
  margin: 0 0 17vh;
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 1.1s ease, transform 1.1s ease;
}
.piece.in { opacity: 1; transform: none; }

.frame {
  padding: clamp(10px, 1.5vw, 18px);
  background: linear-gradient(160deg, #17171c, #0f0f13);
  border: 1px solid var(--frame-edge);
  box-shadow:
    0 40px 90px -30px rgba(0, 0, 0, 0.8),
    0 8px 28px rgba(0, 0, 0, 0.5),
    inset 0 0 0 1px #08080a;
  cursor: zoom-in;
}

/* ---------- fullscreen lightbox ---------- */

html.lightbox { overflow: hidden; }

.piece.expanded { transform: none !important; transition: none; }

.piece.expanded .frame {
  cursor: zoom-out;
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(16px, 4vmin, 56px);
  background: rgba(10, 10, 13, 0.97);
  border: 0;
  box-shadow: none;
  animation: lightbox-in 0.35s ease;
}

.piece.expanded .stack {
  width: min(100%, calc((100vh - 2 * clamp(16px, 4vmin, 56px)) * var(--ar)));
}

.piece.expanded .frame::after {
  content: "✕";
  position: fixed;
  top: 20px;
  right: 28px;
  font-family: var(--sans);
  font-size: 19px;
  color: var(--muted);
}

@keyframes lightbox-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

.stack {
  position: relative;
  width: 100%;
  border: 1px solid var(--brass-dim);
  overflow: hidden;
  background: #000;
}

.stack .poster,
.stack canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.stack canvas.gl {
  opacity: 0;
  transition: opacity 1.4s ease;
}
.stack.ready canvas.gl { opacity: 1; }

.stack canvas.fx { pointer-events: none; }

/* ---------- captions ---------- */

figcaption {
  text-align: center;
  margin-top: 34px;
}

.plaque {
  display: inline-block;
  padding: 14px 34px 16px;
  background: linear-gradient(175deg, #241f16, #191510);
  border: 1px solid #4d4433;
  box-shadow: inset 0 1px 0 rgba(255, 235, 190, 0.07), 0 6px 18px rgba(0, 0, 0, 0.45);
}

.plaque .num {
  display: block;
  font-family: var(--sans);
  font-size: 10.5px;
  letter-spacing: 0.34em;
  text-indent: 0.34em;
  text-transform: uppercase;
  color: var(--brass);
  margin-bottom: 7px;
}

.plaque h2 {
  font-weight: 600;
  font-size: clamp(26px, 3vw, 34px);
  letter-spacing: 0.06em;
  line-height: 1.1;
}

.plaque .sub {
  display: block;
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 0.14em;
  color: var(--muted);
  margin-top: 8px;
}

.blurb {
  font-style: italic;
  color: var(--muted);
  max-width: 58ch;
  margin: 20px auto 0;
}

/* ---------- footer ---------- */

footer {
  text-align: center;
  padding: 4vh 6vw 9vh;
}
footer .rule { justify-content: center; margin: 0 auto 40px; width: fit-content; }

.colophon {
  font-family: var(--sans);
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 22px;
}

.credits {
  list-style: none;
  font-family: var(--sans);
  font-size: 12px;
  color: var(--faint);
  line-height: 2.1;
}
.credits a {
  color: var(--muted);
  text-decoration: none;
  border-bottom: 1px solid #3a352b;
}
.credits a:hover { color: var(--brass); border-bottom-color: var(--brass); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .piece { opacity: 1; transform: none; transition: none; }
}
