:root {
  --paper: #faf5ec;
  --ink: #231f1c;
  --saffron: #e08a1e;
  --saffron-ink: #a05c0e;
  --ink-soft: #5c534b;
  --line: #e6dccb;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  font-size: 18px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--saffron-ink); }

.skip {
  position: absolute; left: -9999px; top: 0;
  background: var(--ink); color: var(--paper);
  padding: 10px 16px; z-index: 100; text-decoration: none; font-weight: 600;
}
.skip:focus { left: 0; }

header.site {
  border-bottom: 1px solid var(--line);
  padding: 18px 22px;
}
.home {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 700; font-size: 19px;
  color: var(--ink); text-decoration: none;
}

main { max-width: 780px; margin: 0 auto; padding: 0 22px; }

.eyebrow {
  font-size: 13px; letter-spacing: .08em; text-transform: uppercase;
  color: var(--saffron-ink); font-weight: 600; margin: 40px 0 10px;
}
.eyebrow a { text-decoration: none; }

h1 {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 700; font-size: clamp(30px, 6vw, 44px);
  line-height: 1.12; margin: 0 0 18px; letter-spacing: -0.01em;
}
.album-index h1 { margin-top: 46px; }

.standfirst { font-size: 20px; color: var(--ink-soft); margin: 0 0 10px; max-width: 34em; }
.count { font-size: 14px; color: var(--ink-soft); margin: 0 0 44px; }

/* --- Tier 1: the anchor set. One per row, each with a caption. --- */
.anchors { display: grid; gap: 72px; }

figure { margin: 0; }

.zoom {
  display: block; width: 100%; padding: 0; border: 0; background: none;
  cursor: zoom-in; border-radius: 3px; overflow: hidden;
}
.zoom:focus-visible { outline: 3px solid var(--saffron); outline-offset: 3px; }

.anchor picture img { width: 100%; border-radius: 3px; }

.anchor figcaption { padding-top: 16px; }

/* The caption is the voice. */
.cap {
  font-family: "Fraunces", Georgia, serif;
  font-size: 21px; line-height: 1.4; margin: 0 0 8px; max-width: 30em;
}

/* The facts line is the record. Deliberately quieter than the caption. */
.facts {
  font-family: "Inter", system-ui, sans-serif;
  font-size: 13px; color: var(--ink-soft); margin: 0;
  letter-spacing: .01em;
}

/* The two notes. Collapsed by default; the picture comes first. */
.note { margin-top: 12px; }
.note summary {
  font-size: 13px; font-weight: 600; color: var(--saffron-ink);
  cursor: pointer; list-style: none; display: inline-block;
  border-bottom: 1px dotted currentColor; padding-bottom: 1px;
}
.note summary::-webkit-details-marker { display: none; }
.note p {
  font-size: 14px; color: var(--ink-soft); margin: 10px 0 0;
  max-width: 34em; padding-left: 12px; border-left: 2px solid var(--line);
}

/* --- Tier 2: the grid. Uncaptioned at rest, lazy, lightbox on click. --- */
.rest { margin-top: 86px; }
.rest h2 {
  font-family: "Fraunces", Georgia, serif; font-size: 22px; font-weight: 600;
  margin: 0 0 20px; padding-bottom: 10px; border-bottom: 1px solid var(--line);
}

.grid {
  display: grid; gap: 12px;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
}
.tile picture img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 2px; }
.tile figcaption { padding-top: 6px; }
.tile-cap { display: block; font-size: 13px; line-height: 1.35; color: var(--ink); }
.tile .facts { display: none; }
/* ...except where a photograph deliberately carries no caption. Then the facts line
   is all there is, and it is the only thing that should be there. */
.tile figcaption:not(:has(.tile-cap)) .facts { display: block; font-size: 12px; }

/* --- Other albums --- */
.album-nav {
  display: grid; gap: 10px; margin: 90px 0 40px;
  padding-top: 26px; border-top: 1px solid var(--line);
}
.album-nav a {
  font-family: "Fraunces", Georgia, serif; font-size: 18px;
  text-decoration: none; color: var(--ink);
}
.album-nav a:hover { color: var(--saffron-ink); }

/* --- The index --- */
.covers { display: grid; gap: 34px; margin: 40px 0 60px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.cover { text-decoration: none; color: var(--ink); }
.cover img { aspect-ratio: 3 / 2; object-fit: cover; border-radius: 3px; }
.cover-t { display: block; font-family: "Fraunces", Georgia, serif; font-size: 19px; margin-top: 12px; }
.cover-n { display: block; font-size: 13px; color: var(--ink-soft); }

/* --- The memorial. Not an album, and it should not look like one. --------- */
/* Narrower measure, no grid, a rule above each photograph, and the biography
   set as running prose rather than a caption. Quiet on purpose. */
.memorial { max-width: 640px; margin: 0 auto; }
.inmem {
  font-size: 12px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--ink-soft); font-weight: 600; margin: 0 0 10px;
}
.memorial h1 { font-weight: 400; font-style: italic; }
.memorial .standfirst { margin-bottom: 56px; }

.mem-figure {
  margin: 0 0 60px;
  padding-top: 34px;
  border-top: 1px solid var(--line);
}
.mem-figure picture img { width: 100%; border-radius: 3px; }
.mem-figure figcaption { padding-top: 18px; }
.mem-figure .cap { font-size: 20px; margin-bottom: 10px; }
.mem-body { font-size: 17px; color: var(--ink); margin: 0 0 12px; max-width: 34em; }

.mem-card {
  margin: 20px 0 60px; padding-top: 26px;
  border-top: 1px solid var(--line);
}
.mem-card a { text-decoration: none; color: var(--ink); display: block; }
.mem-card-t {
  display: block; font-family: "Fraunces", Georgia, serif;
  font-size: 19px; font-style: italic;
}
.mem-card-d { display: block; font-size: 14px; color: var(--ink-soft); margin-top: 4px; }
.mem-card a:hover .mem-card-t { color: var(--saffron-ink); }

footer {
  border-top: 1px solid var(--line); margin-top: 40px;
  padding: 26px 22px; font-size: 14px; color: var(--ink-soft);
}
footer p { max-width: 780px; margin: 0 auto; }

/* --- Lightbox --- */
.lightbox[hidden] { display: none; }
.lightbox {
  position: fixed; inset: 0; z-index: 60;
  background: rgba(20, 17, 14, .985);
  display: flex; align-items: center; justify-content: center;
  padding: 60px 64px 28px;
}
.lb-figure {
  display: flex; flex-direction: column; align-items: center; gap: 14px;
  max-height: 100%; max-width: 100%; min-height: 0;
}
.lb-figure img {
  flex: 0 1 auto; min-height: 0;
  max-height: 100%; max-width: 100%; width: auto;
  object-fit: contain; border-radius: 2px;
}
.lb-figure figcaption { flex: 0 0 auto; overflow-y: auto; }
.lb-figure figcaption { color: #f3ece1; max-width: 44em; text-align: center; }
.lb-figure .cap { font-family: "Fraunces", Georgia, serif; font-size: 18px; margin: 0 0 6px; max-width: none; }
.lb-figure .facts { color: #b9ada0; }
.lb-figure .note summary { color: #e6a75a; }
.lb-figure .note p { color: #c9beb1; border-left-color: #4a423a; text-align: left; }
.lb-figure .note { text-align: center; }

.lightbox button {
  position: absolute; background: none; border: 0; cursor: pointer;
  color: #f3ece1; font-size: 26px; line-height: 1;
  padding: 12px 16px; border-radius: 4px;
}
.lightbox button:hover { background: rgba(255,255,255,.1); }
.lightbox button:focus-visible { outline: 2px solid var(--saffron); }
.lb-close { top: 10px; right: 12px; }
.lb-prev { left: 6px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 6px; top: 50%; transform: translateY(-50%); }

@media (max-width: 560px) {
  .anchors { gap: 54px; }
  .cap { font-size: 19px; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
