/* Shared styles for the pages of the site. Colours and type come from the kit in assets/. */
:root {
  --p-bg: #333333; --p-surface: #404040; --p-ink: #f3f1ec; --p-muted: #bcb9b2;
  --p-accent: #d3a95c; --p-accent-ink: #1f1f1f; --p-action: #d3a95c; --p-action-ink: #1f1f1f;
  --p-inv-bg: #1c1c1c; --p-inv-surface: #2b2b2b; --p-inv-ink: #f3f1ec; --p-inv-muted: #a9a6a0;
  --p-inv-accent: #f3f1ec; --p-inv-accent-ink: #1c1c1c; --p-inv-action: #f3f1ec; --p-inv-action-ink: #1c1c1c;
  --font-display: "Red Hat Display", system-ui, sans-serif;
  --font-text: "Red Hat Text", system-ui, sans-serif;
  --display-weight: 400;
  --display-tracking: -0.025em;
  --display-tracking-xl: -0.035em;
  color-scheme: dark;
}
/* the logo: the lettering is a cut-out, so it takes the colour of the text around it */
.logo { display: block; height: 28px; aspect-ratio: 508 / 56; background: currentColor;
  -webkit-mask: url("../logo.png") center / contain no-repeat; mask: url("../logo.png") center / contain no-repeat; }
@media (max-width: 639px) { .logo { height: 20px; } }
body { min-height: 100vh; display: flex; flex-direction: column; }
main { flex: 1 0 auto; }

/* ---------- home: one screen, only the photograph ---------- */
.home { position: relative; height: 100vh; height: 100svh; overflow: hidden; background: var(--p-bg); padding-top: var(--nav); }
.home__bg { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 60%; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
@media (max-width: 639px) { .home__bg { object-position: 42% 50%; } }

/* ---------- inner pages ---------- */
.sheet { padding-block: calc(var(--nav) + var(--s-8)) var(--s-9); }
.sheet__head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: var(--s-5); margin-bottom: var(--s-7); }
.sheet__head h1 { font-size: var(--t-h2); margin: var(--s-4) 0 0; }
.sheet__head h1:first-child { margin-top: 0; }
.sheet__more { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--s-5); margin-top: var(--s-8); }
.site-foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--s-4) var(--s-6); padding-block: var(--s-6); color: var(--muted); font-size: var(--t-small); border-top: 1px solid var(--line); }
.site-foot nav { display: flex; flex-wrap: wrap; gap: var(--s-5); }
.site-foot a:hover { color: var(--ink); }

/* photographs of one series, uncropped */
.sheet__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-5); align-items: start; }
.sheet__grid figure { margin: 0; }
.sheet__grid button { display: block; width: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; border-radius: var(--r-lg); overflow: clip; }
.sheet__grid img { display: block; width: 100%; height: auto; background: var(--surface); }
.sheet__grid figcaption { margin-top: var(--s-3); font-size: var(--t-small); color: var(--muted); }

/* gallery: one tile for each series */
.shelf { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-7) var(--s-5); }
.shelf__tile { display: block; }
.shelf__tile .shelf__img { display: block; aspect-ratio: 4 / 5; border-radius: var(--r-lg); overflow: clip; background: var(--surface); }
.shelf__tile img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .5s cubic-bezier(.2, .7, .2, 1); }
.shelf__tile:hover img, .shelf__tile:focus-visible img { transform: scale(1.03); }
.shelf__tile h2 { font-size: var(--t-h3); margin-top: var(--s-4); }
.shelf__tile p { color: var(--muted); font-size: var(--t-small); margin-top: var(--s-1); }
@media (prefers-reduced-motion: reduce) { .shelf__tile img { transition: none; } }

/* about and contact */
.duo { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: var(--s-8); align-items: start; }
.duo__text { display: grid; gap: var(--s-5); justify-items: start; }
.duo__text h1 { font-size: var(--t-h2); }
.duo__text p { max-width: 52ch; }
.duo__img { display: block; width: 100%; height: auto; border-radius: var(--r-lg); background: var(--surface); }
.contact-mail { font-size: var(--t-lead); overflow-wrap: anywhere; }
/* the Contact page button: white with dark lettering */
.duo__text .btn--primary { --action: #ffffff; --action-ink: #1f1f1f; background: #ffffff; color: #1f1f1f; border-color: #ffffff; }
.duo__text .btn--primary:hover { background: #e6e4df; border-color: #e6e4df; }

@media (max-width: 1023px) {
  .sheet__grid, .shelf { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .duo { grid-template-columns: minmax(0, 1fr); gap: var(--s-7); }
}
@media (max-width: 639px) {
  .sheet__grid { grid-template-columns: minmax(0, 1fr); gap: var(--s-4); }
  .shelf { gap: var(--s-6) var(--s-4); }
  .sheet { padding-top: calc(var(--nav) + var(--s-6)); }
}

/* full-screen viewer */
.viewer { width: 100vw; height: 100vh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: var(--p-inv-bg); color: var(--p-inv-ink); }
.viewer::backdrop { background: var(--p-inv-bg); }
.viewer__inner { height: 100%; display: grid; place-items: center; padding: 64px 72px 64px; }
.viewer img { max-width: 100%; max-height: calc(100vh - 128px); object-fit: contain; }
.viewer button { position: absolute; width: 48px; height: 48px; display: grid; place-items: center; border: 0; border-radius: var(--r-sm); background: none; color: inherit; cursor: pointer; }
.viewer button:hover { background: var(--p-inv-surface); }
.viewer [data-close] { top: 12px; right: 16px; }
.viewer [data-prev] { left: 12px; top: 50%; transform: translateY(-50%); }
.viewer [data-next] { right: 12px; top: 50%; transform: translateY(-50%); }
.viewer__count { position: absolute; left: 72px; right: 72px; bottom: 20px; text-align: center; font-size: var(--t-small); color: var(--p-inv-muted); }
.viewer__count b { font-weight: 500; color: var(--p-inv-ink); }
@media (max-width: 639px) { .viewer__inner { padding: 64px 12px 80px; } .viewer [data-prev], .viewer [data-next] { top: auto; bottom: 8px; transform: none; } }
