/* SMTHG - styles (exhibition-catalog) */

:root {
  --bg: #ffffff;
  --ink: #0e0e0e;
  --muted: #8a8a8a;
  --rule: #111111;
  --line: #e4e4e4;
  --col: 760px;          /* fixed centered column */
  --gap: 14px;           /* grid gap */
  --pad-y: 64px;         /* vertical breathing room */
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.55 -apple-system, BlinkMacSystemFont, "Inter", "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration: none; }
a:hover { opacity: 0.65; }

button {
  background: none; border: 0; color: inherit;
  font: inherit; cursor: pointer; padding: 0;
}

/* ---------- Typographic primitives ---------- */

.kicker {
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
}

/* ---------- Column ---------- */

.page {
  width: var(--col);
  margin: 0 auto;
  padding: var(--pad-y) 0 var(--pad-y);
}

.masthead {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding-bottom: 14px;
  border-bottom: 2px solid var(--rule);
  margin-bottom: 40px;
}

.masthead .wordmark {
  font-weight: 800;
  letter-spacing: -0.01em;
  font-size: 22px;
  color: var(--ink);
}

.masthead .masthead-right {
  text-align: right;
  line-height: 1.35;
}

.masthead .masthead-right .edition {
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
}

.masthead .masthead-right .edition-no {
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  display: block;
}

/* ---------- Hero (home) ---------- */

.hero-label {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 10px;
}

.hero-label .kicker { color: var(--ink); }

.hero {
  display: block;
  width: 100%;
  cursor: pointer;
  background: #f4f4f4;
  overflow: hidden;
}

.hero img {
  width: 100%; height: auto;
  display: block;
  transition: opacity 200ms ease;
}

.hero-meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-top: 12px;
  font-size: 13px;
  color: var(--muted);
}

.hero-meta .album-link {
  color: var(--ink);
  font-weight: 600;
  letter-spacing: 0.04em;
}

/* ---------- Album list (home) ---------- */

.albums {
  margin-top: 80px;
  border-top: 2px solid var(--rule);
}

.albums-head {
  display: flex;
  justify-content: space-between;
  padding: 12px 0 22px;
}

.album-row {
  display: grid;
  grid-template-columns: 56px 1fr auto;
  align-items: start;
  gap: 18px;
  padding: 22px 0;
  border-top: 1px solid var(--line);
  color: var(--ink);
}

.album-row:last-child { border-bottom: 1px solid var(--line); }

.album-row .catalog {
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  padding-top: 4px;
}

.album-row .title {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: 0.02em;
  line-height: 1.1;
  text-transform: uppercase;
}

.album-row .count {
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  padding-top: 6px;
  white-space: nowrap;
}

.album-row:hover .title { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 6px; }

/* ---------- Album view ---------- */

.album-header {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 18px;
  padding-bottom: 18px;
  border-bottom: 2px solid var(--rule);
  margin-bottom: 24px;
}

.album-header .album-eyebrow {
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
  margin-bottom: 8px;
  display: block;
}

.album-header h1 {
  font-size: 34px;
  font-weight: 800;
  letter-spacing: 0.02em;
  margin: 0;
  text-transform: uppercase;
  line-height: 1;
}

.album-header .back {
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
}

.album-header .back:hover { color: var(--ink); }

.album-description {
  max-width: 560px;
  margin: 0 0 32px;
  font-size: 15px;
  line-height: 1.6;
  color: #3a3a3a;
}

.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--gap);
  align-items: start;   /* rows align at the top; taller photos set row height, shorter ones leave white space below */
}

.grid .cell {
  display: block;
  background: #f4f4f4;
  cursor: pointer;
  border: 1px solid #000;
}

.grid .cell img {
  width: 100%;
  height: auto;
  display: block;
  transition: opacity 200ms ease;
}

.grid .cell:hover img { opacity: 0.82; }

/* ---------- Footer ---------- */

.footer {
  margin-top: 120px;
  padding-top: 18px;
  border-top: 2px solid var(--rule);
  font-size: 13px;
  color: var(--muted);
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  letter-spacing: 0.02em;
}

.footer .colophon { color: var(--ink); font-weight: 600; }
.footer a { color: var(--ink); }

.footer .footer-right {
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
}

/* ---------- Fullscreen viewer ---------- */

.viewer {
  position: fixed; inset: 0;
  background: var(--bg);
  display: none;
  z-index: 50;
  flex-direction: column;
}

.viewer.open { display: flex; }

.viewer-top {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 24px 28px 10px 28px;
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
  position: relative;   /* anchor for absolutely-positioned close button */
}

.viewer-top .crumbs a { color: var(--ink); }
.viewer-top .crumbs .sep { margin: 0 10px; color: var(--line); }

.viewer-top .tools {
  display: flex;
  gap: 22px;
  align-items: center;
  position: absolute;
  right: 28px;
  top: 50%;
  transform: translateY(-50%);
}

.viewer-top .tools button {
  font-size: 11px; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--muted); font-weight: 600;
}
.viewer-top .tools button:hover { color: var(--ink); }
.viewer-top .close {
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color:var(--muted);
  padding: 4px 2px;
}
.viewer-top .close .x { font-size: 24px; font-weight: 400; }
.viewer-top .close:hover { color: var(--muted); }

.viewer-stage {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 28px;
  position: relative;
  min-height: 0;
}

.viewer-stage img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  user-select: none;
  -webkit-user-drag: none;
  border: 1px solid #000;
}

.nav-btn {
  position: absolute;
  top: 0; bottom: 0;
  width: 72px;
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  opacity: 0;
  transition: opacity 160ms ease;
}

.viewer-stage:hover .nav-btn { opacity: 1; }
.nav-btn:hover { color: var(--ink); }
.nav-btn.prev { left: 0; }
.nav-btn.next { right: 0; }

.viewer-caption {
  padding: 0px 28px 14px;
  color: var(--ink);
  font-size: 14px;
  text-align: center;
  max-width: 720px;
  margin: 0 auto;
}

.viewer-bottom {
  padding: 12px 28px 24px;
  font-size: 13px;
  color: var(--muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
}

.exif {
  display: flex;
  justify-content: center;
  gap: 22px;
  flex-wrap: wrap;
  font-variant-numeric: tabular-nums;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.exif span b { font-weight: 600; color: var(--muted); margin-right: 6px; }
.exif span { color: var(--ink); }

