@font-face {
  font-family: "Newsreader";
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url("fonts/newsreader.woff2") format("woff2");
}
:root {
  --bg: #E7EBEB;
  --ink: #1E2B33;
  --muted: #56646B;
  --accent: #6B58A6;
  --wash: #D8DEDE;
  --gap: clamp(16px, 2.2vw, 32px);
  --paper: #F6F8F7;
  --endpaper: #D3DBDA;
}
* { box-sizing: border-box; }
html { background: var(--bg); color: var(--ink); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: "Newsreader", Georgia, "Times New Roman", serif;
  font-optical-sizing: auto;
  font-size: 1.125rem;
  line-height: 1.6;
}
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.wrap { max-width: 1240px; margin: 0 auto; padding: 0 clamp(20px, 5vw, 64px); }
@media (min-width: 1600px) { .wrap { max-width: 1560px; } }

/* header */
.top { padding-top: clamp(28px, 6vh, 64px); }
.top .home { margin: 0 0 clamp(40px, 8vh, 96px); font-size: .9375rem; }
.top .home a { text-decoration: none; border-bottom: 1px solid rgba(30, 43, 51, .3); }
.top .home a:hover { border-bottom-color: var(--ink); }
.top h1 { margin: 0; font-size: 2.25rem; line-height: 1.1; font-weight: 500; letter-spacing: -0.01em; }
.top .sub { margin: .35em 0 0; font-size: 1.3125rem; color: var(--muted); }
.top .intro { margin: 1.6em 0 0; max-width: 34em; }

/* series */
.series { scroll-margin-top: 24px; }
.series-head { margin-top: clamp(96px, 16vh, 200px); }
.series:first-child .series-head { margin-top: clamp(56px, 10vh, 120px); }
.series-head h2 { margin: 0; font-size: 1.5rem; line-height: 1.2; font-weight: 500; }
.series-head p { margin: .3em 0 0; font-size: .9375rem; color: var(--muted); }

/* photographs */
.ph { margin: 0; }
.open { display: block; width: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; }
.ph img { display: block; width: 100%; height: auto; background: var(--wash); }
figcaption { font-size: .9375rem; line-height: 1.45; color: var(--muted); }
figcaption span { display: block; }
figcaption .place { color: var(--ink); font-size: 1.0625rem; }
figcaption .when { margin-bottom: .55em; }
figcaption .gear { font-size: .875rem; }

.row { margin: clamp(72px, 12vh, 150px) 0; }
.series-head + .row { margin-top: clamp(32px, 5vh, 56px); }

.plate .ph {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--gap);
  align-items: end;
}
.plate .open, .plate figcaption { grid-row: 1; }
.plate.wide .open { grid-column: 1 / span 8; }
.plate.wide figcaption { grid-column: 9 / span 4; }
.plate.wide.flip .open { grid-column: 5 / span 8; }
.plate.wide.flip figcaption { grid-column: 1 / span 4; text-align: right; }
.plate.narrow .open { grid-column: 3 / span 5; }
.plate.narrow figcaption { grid-column: 8 / span 3; }
.plate.narrow.flip .open { grid-column: 6 / span 5; }
.plate.narrow.flip figcaption { grid-column: 3 / span 3; text-align: right; }

.pair {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--gap);
  align-items: start;
}
.pair .ph:first-child { grid-column: 1 / span 5; }
.pair .ph:last-child { grid-column: 7 / span 5; margin-top: clamp(48px, 16vh, 200px); }
.pair.alt .ph:first-child { grid-column: 2 / span 5; }
.pair.alt .ph:last-child { grid-column: 8 / span 5; }
.pair figcaption { margin-top: 14px; }

.foot { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap;
  padding-top: 40px; padding-bottom: 56px; font-size: .9375rem; color: var(--muted); }
.foot p { margin: 0; }

@media (max-width: 760px) {
  body { font-size: 1.0625rem; }
  .top h1 { font-size: 1.875rem; }
  .top .sub { font-size: 1.125rem; }
  .row { margin: 64px 0; }
  .plate .ph, .pair { display: block; }
  .plate figcaption, .pair figcaption { margin-top: 12px; text-align: left !important; }
  .pair .ph:last-child { margin-top: 56px; }
}

/* viewer */
#viewer {
  width: 100vw; height: 100vh; height: 100dvh; max-width: none; max-height: none;
  margin: 0; padding: clamp(12px, 3vw, 32px); border: 0;
  background: var(--bg); color: var(--ink);
}
#viewer::backdrop { background: var(--bg); }
#viewer[open] { display: flex; flex-direction: column; gap: 16px; }
.v-stage { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; }
.v-stage img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; }
.v-bar { display: flex; justify-content: space-between; align-items: end; gap: 24px; flex-wrap: wrap; }
.v-cap { font-size: .9375rem; line-height: 1.45; color: var(--muted); }
.v-cap span { display: block; }
.v-cap .place { color: var(--ink); font-size: 1.0625rem; }
.v-nav { display: flex; gap: 6px; }
.v-count { margin: 0 0 0 auto; font-size: .9375rem; color: var(--muted); align-self: end; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.btn {
  font: inherit; font-size: 1rem; color: var(--ink); background: none;
  border: 1px solid rgba(30, 43, 51, .28); border-radius: 999px; padding: .3em 1em; cursor: pointer;
}
.btn:hover:not(:disabled) { border-color: var(--ink); }
.btn:disabled { opacity: .35; cursor: default; }

/* albums: the shelf */
.sh { margin: clamp(64px, 11vh, 120px) 0 clamp(28px, 4vh, 44px); font-size: 1.5rem; line-height: 1.2; font-weight: 500; }
.albums { list-style: none; margin: 0; padding: 0; display: grid;
  grid-template-columns: repeat(auto-fill, minmax(232px, 1fr)); gap: clamp(44px, 7vh, 72px) clamp(28px, 3.4vw, 56px); }
.album { display: block; text-decoration: none; perspective: 1400px; }
.cover {
  display: block; position: relative; aspect-ratio: 4 / 5; background: var(--wash);
  transform-origin: left center; transition: transform .6s cubic-bezier(.3, .1, .2, 1);
  box-shadow: 3px 3px 0 -1px var(--paper), 3px 3px 0 0 rgba(30, 43, 51, .2),
              6px 6px 0 -1px var(--paper), 6px 6px 0 0 rgba(30, 43, 51, .15),
              0 22px 34px -22px rgba(30, 43, 51, .55);
}
.cover img { display: block; width: 100%; height: 100%; object-fit: cover; }
.cover::after { content: ""; position: absolute; top: 0; bottom: 0; left: 0; width: 7%;
  background: linear-gradient(to right, rgba(30, 43, 51, .32), rgba(255, 255, 255, .1) 60%, transparent); }
.album:hover .cover, .album:focus-visible .cover { transform: rotateY(-16deg); }
.a-title { display: block; margin-top: 20px; font-size: 1.25rem; line-height: 1.25; font-weight: 500; }
.a-meta { display: block; margin-top: .2em; font-size: .9375rem; color: var(--muted); }

/* browse by type */
.types { display: none; }
.js-book .types { display: block; }
.typelist { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .55em 1.9em; font-size: 1.375rem; line-height: 1.35; }
.typelist a { text-decoration: none; border-bottom: 1px solid rgba(30, 43, 51, .3); }
.typelist a:hover { border-bottom-color: var(--ink); }
.typelist .n { margin-left: .2em; font-size: .8125rem; color: var(--muted); vertical-align: super; }
.js-book .archive { display: none; }
.archive .series:first-child .series-head { margin-top: clamp(96px, 16vh, 200px); }

/* the book */
#book {
  width: 100vw; height: 100vh; height: 100dvh; max-width: none; max-height: none;
  margin: 0; padding: clamp(10px, 2.4vw, 28px); border: 0; background: var(--bg); color: var(--ink);
}
#book::backdrop { background: var(--bg); }
#book[open] { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; grid-template-rows: auto minmax(0, 1fr) auto;
  grid-template-areas: "top top top" "prev stage next" ". bar ."; column-gap: clamp(8px, 2vw, 28px); row-gap: clamp(6px, 1.4vh, 14px); }
.b-top { grid-area: top; }
.b-stage { grid-area: stage; }
.b-bar { grid-area: bar; }
.arrow-prev { grid-area: prev; align-self: center; }
.arrow-next { grid-area: next; align-self: center; }
.arrow { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 0; border: 0; background: none; color: var(--ink); cursor: pointer; font: inherit; }
.arrow svg { width: 26px; height: 26px; box-sizing: content-box; padding: 15px; border: 1px solid rgba(30, 43, 51, .3); border-radius: 50%;
  fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; background: var(--paper); transition: border-color .2s, transform .2s; }
.arrow:hover:not(:disabled) svg { border-color: var(--ink); }
.arrow-prev:hover:not(:disabled) svg { transform: translateX(-3px); }
.arrow-next:hover:not(:disabled) svg { transform: translateX(3px); }
.arrow-label { font-size: .875rem; color: var(--muted); }
.arrow:disabled { opacity: .25; cursor: default; }
.b-hint { margin: 2px 0 0; text-align: center; font-size: .875rem; color: var(--muted); min-height: 1.3em; }
#book.single[open] { grid-template-areas: "top top top" "stage stage stage" "prev bar next"; }
#book.single .arrow { align-self: end; }
#book.single .arrow svg { padding: 12px; width: 22px; height: 22px; }
.b-top { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.b-title { margin: 0; font-size: 1.25rem; font-weight: 500; }
.b-stage { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; overflow: hidden; container-type: size; padding: 4px 10px 44px; }
.book { position: relative; width: min(100cqw, 100cqh * 1.6); aspect-ratio: 8 / 5; perspective: 2800px; }
.book::before { content: ""; position: absolute; inset: 0; box-shadow: 0 34px 60px -34px rgba(30, 43, 51, .55), 0 2px 8px rgba(30, 43, 51, .1); }
.book::after { content: ""; position: absolute; top: 0; bottom: 0; left: 50%; width: 5%; transform: translateX(-50%); z-index: 2; pointer-events: none;
  background: linear-gradient(to right, transparent, rgba(30, 43, 51, .08) 40%, rgba(30, 43, 51, .16) 50%, rgba(30, 43, 51, .08) 60%, transparent); }
.pg, .face { position: absolute; top: 0; bottom: 0; width: 50%; background: var(--paper); container-type: inline-size; }
.pg { z-index: 1; }
.pg-l { cursor: w-resize; }
.pg-r { cursor: e-resize; }
#book.single .pg-r { cursor: e-resize; }
.pg-l { left: 0; }
.pg-r { right: 0; }
.leaf { position: absolute; top: 0; bottom: 0; width: 50%; z-index: 4; transform-style: preserve-3d; }
.leaf[hidden] { display: none; }
.leaf.fwd { right: 0; transform-origin: left center; }
.leaf.bwd { left: 0; transform-origin: right center; }
.face { width: 100%; backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.face.back { transform: rotateY(180deg); }
[data-side="l"]::after, [data-side="r"]::after { content: ""; position: absolute; top: 0; bottom: 0; width: 9%; pointer-events: none; }
[data-side="l"]::after { right: 0; background: linear-gradient(to left, rgba(30, 43, 51, .1), transparent); }
[data-side="r"]::after { left: 0; background: linear-gradient(to right, rgba(30, 43, 51, .1), transparent); }

#book.single .book { width: min(100cqw, 100cqh * .8); aspect-ratio: 4 / 5; }
#book.single .book::after, #book.single .pg-l { display: none; }
#book.single .pg-r, #book.single .leaf { left: 0; right: auto; width: 100%; transform-origin: left center; }

.pc { position: absolute; inset: 0; display: flex; flex-direction: column; padding: 8% 7.5% 6.5%; }
.pc.cover-in { background: var(--endpaper); }
.pc.photo .zoom { position: relative; flex: 1; min-height: 0; width: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; }
.pc.photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.pc .cap { margin: 5cqi 0 0; font-size: clamp(11px, 2.7cqi, 15px); line-height: 1.45; color: var(--muted); }
.pc .cap span { display: block; }
.pc .cap .first { color: var(--ink); }
.pc.title { padding: 11% 11% 12%; }
.t-by { margin: 0 0 auto; font-size: clamp(12px, 3cqi, 16px); color: var(--muted); }
.t-name { margin: 0; font-size: clamp(26px, 10cqi, 52px); line-height: 1.04; font-weight: 500; letter-spacing: -.01em; }
.t-meta { margin: .7em 0 0; font-size: clamp(13px, 3.3cqi, 18px); color: var(--muted); }
.pc.end { justify-content: center; gap: .7em; padding: 11%; }
.e-line { margin: 0 0 .6em; font-size: clamp(16px, 4.4cqi, 24px); }
.linkbtn { align-self: flex-start; font: inherit; font-size: clamp(14px, 3.4cqi, 18px); color: var(--ink); background: none; border: 0; padding: 0;
  border-bottom: 1px solid rgba(30, 43, 51, .3); cursor: pointer; text-align: left; }
.linkbtn:hover { border-bottom-color: var(--ink); }
.b-bar { display: flex; flex-direction: column; justify-content: center; align-items: center; }
.b-count { margin: 0; text-align: center; font-size: .9375rem; color: var(--ink); }
html.book-open { overflow: hidden; }

@media (prefers-reduced-motion: reduce) {
  .cover { transition: none; }
  .album:hover .cover, .album:focus-visible .cover { transform: none; }
}
@media (max-width: 760px) {
  .typelist { font-size: 1.1875rem; gap: .5em 1.4em; }
  .albums { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px 22px; }
  .a-title { font-size: 1.0625rem; margin-top: 14px; }
  .a-meta { font-size: .8125rem; }
}
@media (max-height: 560px) {
  #book { padding: 8px 12px; }
  #book[open] { gap: 4px; }
  .b-stage { padding-bottom: 18px; }
  .b-title { font-size: 1rem; }
  .btn { font-size: .875rem; padding: .15em .8em; }
  .arrow svg { padding: 9px; width: 20px; height: 20px; }
  .arrow-label, .b-hint { display: none; }
  .b-count { font-size: .8125rem; }
}
