/* ---- Tokens -------------------------------------------------------------
   Concept: everything the camera would *stamp* (name, data) is monospace and
   grey; the only colour and the only non-mono thing on the page are the
   photographs. The per-photo data strip is styled like the edge-printing on
   a strip of film. Colour is used once, structurally: to mark digital vs film.
------------------------------------------------------------------------- */
:root {
  --paper:  #E9E8E4;   /* gallery plaster, cooler than cream on purpose */
  --ink:    #1A1917;
  --muted:  #8B8880;
  --line:   #D8D6D0;
  --analog: #9E5A3C;   /* rust  — film */
  --digital:#3F5A6B;   /* slate — digital */
  --mono: "Space Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --gap: clamp(10px, 1.6vw, 22px);
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* ---- Masthead ---------------------------------------------------------- */
.masthead {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px 24px;
  padding: clamp(20px, 4vw, 44px) clamp(16px, 4vw, 44px) clamp(16px, 3vw, 28px);
  border-bottom: 1px solid var(--line);
}
.id h1 {
  margin: 0;
  font-size: clamp(19px, 3vw, 28px);
  font-weight: 700;
  letter-spacing: 0.14em;
}
.tagline {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.04em;
}

/* ---- Filters ----------------------------------------------------------- */
.masthead-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
}
.support {
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 12px;
  transition: color .16s, border-color .16s;
}
.support:hover { color: var(--ink); border-color: var(--ink); }
.support:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.filters { display: flex; gap: 6px; }
.filter {
  font: inherit;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 6px 14px;
  cursor: pointer;
  transition: color .18s, border-color .18s, background .18s;
}
.filter:hover { color: var(--ink); }
.filter.is-active {
  color: var(--ink);
  border-color: var(--ink);
}
.filter:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

/* ---- Sub-filters (genre = general, film = only under Analog) ----------- */
.subfilters {
  padding: 14px clamp(16px, 4vw, 44px) 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.fbar {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 4px 10px;
}
.fbar[hidden] { display: none; }
.fbar-label {
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  opacity: .8;
  margin-right: 4px;
  min-width: 44px;
}
.fbar-btns { display: flex; flex-wrap: wrap; gap: 2px 4px; }
.subfilter {
  font: inherit;
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--muted);
  background: transparent;
  border: 0;
  padding: 3px 8px;
  cursor: pointer;
  border-bottom: 1px solid transparent;
  transition: color .16s, border-color .16s;
}
.subfilter:hover { color: var(--ink); }
.subfilter.is-active { color: var(--ink); border-bottom-color: var(--ink); }
.subfilter:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.fbar-film .subfilter.is-active { border-bottom-color: var(--analog); color: var(--ink); }

/* ---- Masonry grid ------------------------------------------------------ */
.grid {
  column-count: 1;
  column-gap: var(--gap);
  padding: var(--gap) clamp(16px, 4vw, 44px) 64px;
}
@media (min-width: 640px)  { .grid { column-count: 2; } }
@media (min-width: 1000px) { .grid { column-count: 3; } }
@media (min-width: 1500px) { .grid { column-count: 4; } }

.tile {
  break-inside: avoid;
  margin: 0 0 var(--gap);
  padding: 0;
  cursor: zoom-in;
  border: 0;
  background: none;
  width: 100%;
  display: block;
  text-align: left;
}
.tile img {
  display: block;
  width: 100%;
  height: auto;
  background: #dedcd6;
  transition: filter .3s ease, transform .4s ease;
  animation: tile-fade .5s ease both;
}
@keyframes tile-fade { from { opacity: 0; } to { opacity: 1; } }
.tile:hover img { filter: brightness(1.03); }
.tile:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }

/* ---- The signature: film-edge data strip ------------------------------- */
.strip {
  margin-top: 7px;
  font-size: 11px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 8px;
  transition: color .18s ease;
}
.tile:hover .strip,
.tile:focus-visible .strip { color: var(--ink); }
.strip .tag {
  flex: 0 0 auto;
  width: 7px; height: 7px;
  border-radius: 1px;
  background: var(--muted);
}
.strip[data-type="analog"]  .tag { background: var(--analog); }
.strip[data-type="digital"] .tag { background: var(--digital); }
.strip .txt { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---- Colophon ---------------------------------------------------------- */
.colophon {
  border-top: 1px solid var(--line);
  padding: 20px clamp(16px, 4vw, 44px);
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  display: flex; gap: 10px;
}
.colophon .sep { opacity: .5; }

/* ---- Lightbox ---------------------------------------------------------- */
.lightbox {
  position: fixed; inset: 0;
  background: rgba(20,19,18,.95);
  display: grid;
  grid-template-columns: 56px 1fr 56px;
  align-items: center;
  z-index: 50;
  padding: 24px;
}
.lightbox[hidden] { display: none; }
.lb-stage {
  margin: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 14px;
  min-width: 0;
}
.lb-stage img {
  max-width: min(92vw, 1400px);
  max-height: 82vh;
  width: auto; height: auto;
  object-fit: contain;
  background: #111;
}
.lb-stage .strip { color: #cfccc4; margin: 0; }
.lb-stage .strip .txt { white-space: normal; text-align: center; }

.lb-nav, .lb-close {
  font: inherit;
  color: #cfccc4;
  background: transparent;
  border: 0;
  cursor: pointer;
}
.lb-nav { font-size: 34px; line-height: 1; padding: 12px; }
.lb-nav:hover { color: #fff; }
.lb-close {
  position: absolute; top: 18px; right: 22px;
  font-size: 12px; letter-spacing: .12em; text-transform: uppercase;
  border: 1px solid #55524c; border-radius: 999px; padding: 5px 12px;
}
.lb-close:hover { color: #fff; border-color: #fff; }
.lb-count {
  position: absolute; top: 20px; left: 24px;
  color: #7c7972; font-size: 12px; letter-spacing: .14em;
}
.lb-nav:focus-visible, .lb-close:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

@media (max-width: 620px) {
  .lightbox { grid-template-columns: 36px 1fr 36px; padding: 12px; }
  .lb-nav { font-size: 26px; padding: 6px; }
}

/* ---- Motion / accessibility floor -------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
