/* Minimal theme. Colours and fonts come from :root custom properties set by theme settings. */

*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  color: var(--fg);
  background: var(--bg);
  font: 17px/1.6 var(--font-body);
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }
a:hover { color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
img { display: block; max-width: 100%; }
h1, h2, h3 { font-family: var(--font-heading); font-weight: 600; line-height: 1.2; }

.sr-only, .hp { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 1rem; top: 1rem; z-index: 10; padding: .5rem 1rem; background: var(--bg); }

.site-header, main, .site-footer { max-width: 1400px; margin: 0 auto; padding-inline: 1rem; }

.site-header {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem 2rem;
  align-items: baseline;
  justify-content: space-between;
  padding-block: 1.5rem 2rem;
}
.site-title { font: 600 1.25rem/1.2 var(--font-heading); text-decoration: none; letter-spacing: .01em; }
.site-header ul { display: flex; flex-wrap: wrap; gap: .25rem 1.5rem; margin: 0; padding: 0; list-style: none; }
.site-header nav a { text-decoration: none; color: var(--muted); }
.site-header nav a:hover, .site-header nav a[aria-current="page"] { color: var(--fg); }
.site-header nav a[aria-current="page"] { text-decoration: underline; text-underline-offset: .35em; text-decoration-color: var(--accent); }

main { min-height: 60vh; }
.site-footer { padding-block: 3rem 2rem; color: var(--muted); font-size: .85rem; }

.page-head { margin-bottom: 2rem; max-width: 46rem; }
.page-head h1 { margin: 0 0 .5rem; font-size: clamp(1.8rem, 4vw, 2.6rem); }
.lede { margin: 0; color: var(--muted); }
.section-title { margin: 3rem 0 1rem; font-size: 1.25rem; }
.empty { color: var(--muted); }

/* --- Photo grids. Column counts must match SIZES in index.ts. */

.photos-uniform { display: grid; grid-template-columns: 1fr; gap: 1rem; }
.photos-uniform .photo { aspect-ratio: 3 / 2; overflow: hidden; }
.photos-uniform img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.photos-uniform .photo:hover img { transform: scale(1.02); }

.photos-masonry { columns: 1; column-gap: 1rem; }
.photos-masonry .photo { display: block; margin-bottom: 1rem; break-inside: avoid; }
.photos-masonry img { width: 100%; height: auto; }

.photos-single { display: grid; gap: 2.5rem; justify-items: center; }
.photos-single .photo { width: 100%; max-width: 1000px; }
.photos-single img { width: 100%; height: auto; }

.hero { margin: 0; }
.hero img { width: 100%; height: auto; max-height: 80vh; object-fit: cover; }

.cards { display: grid; grid-template-columns: 1fr; gap: 2rem 1rem; margin: 0; padding: 0; list-style: none; }
.cards a { display: block; text-decoration: none; }
.cards img, .no-cover { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.no-cover { display: block; background: var(--surface); }
.card-title { display: block; margin-top: .6rem; font: 600 1.1rem/1.3 var(--font-heading); }
.card-count { color: var(--muted); font-size: .85rem; }

@media (min-width: 600px) {
  .site-header, main, .site-footer { padding-inline: 2rem; }
  .photos-uniform, .cards { grid-template-columns: repeat(2, 1fr); }
  .photos-masonry { columns: 2; }
}
@media (min-width: 1000px) {
  .photos-uniform, .cards { grid-template-columns: repeat(3, 1fr); }
  .photos-masonry { columns: 3; }
}

/* --- Single photo page (the no-JavaScript lightbox). */

.photo-page figure { margin: 0; display: grid; justify-items: center; gap: .75rem; }
.photo-full { width: auto; height: auto; max-height: 82vh; }
.photo-page figcaption { color: var(--muted); font-size: .9rem; text-align: center; }
.photo-nav { display: flex; justify-content: space-between; gap: 1rem; margin-top: 1.5rem; font-size: .9rem; }
.photo-nav a { text-decoration: none; color: var(--muted); }

/* --- Text pages and the contact form. */

.prose { max-width: 40rem; }
.prose h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); margin-top: 0; }
.prose h2 { font-size: 1.4rem; margin-top: 2.2rem; }
.prose h3 { font-size: 1.15rem; }
.prose a { color: var(--accent); }
.page-hero { margin: 0 0 2rem; }
.page-hero img { width: 100%; height: auto; }

.contact { margin-top: 2rem; display: grid; gap: .25rem; }
.field label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: .25rem; }
.field .error { display: block; color: #c0392b; font-size: .85rem; }
.contact input, .contact textarea {
  width: 100%;
  padding: .6rem .7rem;
  font: inherit;
  color: inherit;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 4px;
}
.contact [aria-invalid="true"] { border-color: #c0392b; }
button {
  padding: .65rem 1.4rem;
  font: 600 .95rem var(--font-body);
  color: var(--bg);
  background: var(--fg);
  border: 0;
  border-radius: 4px;
  cursor: pointer;
}
button:hover { background: var(--accent); }
.notice { padding: 1rem; border-left: 3px solid var(--accent); background: var(--surface); }
.not-found { padding-block: 4rem; }

/* --- Lightbox (lightbox.js). */

.lb {
  width: 100vw; height: 100dvh; max-width: none; max-height: none;
  margin: 0; padding: 0; border: 0;
  color: #eee; background: rgb(10 10 10 / .97);
}
.lb::backdrop { background: rgb(0 0 0 / .6); }
.lb-stage { position: absolute; inset: 3.5rem 0 3rem; display: grid; place-items: center; touch-action: pan-y; }
.lb-stage img { max-width: calc(100vw - 2rem); max-height: calc(100dvh - 6.5rem); width: auto; height: auto; object-fit: contain; }
.lb-bar { position: absolute; inset: auto 0 0; display: flex; justify-content: center; align-items: center; height: 3rem; font-size: .85rem; color: #aaa; }
.lb button { position: absolute; padding: .6rem .9rem; color: #eee; background: transparent; font-size: 1.4rem; line-height: 1; }
.lb button:hover { color: #fff; background: rgb(255 255 255 / .08); }
.lb-close { top: .5rem; right: .5rem; }
.lb-prev { left: .5rem; top: 50%; translate: 0 -50%; }
.lb-next { right: .5rem; top: 50%; translate: 0 -50%; }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
.made-with { margin-top: .5rem; font-size: .75rem; }
.made-with a { color: inherit; }
/* Uploaded logo, in place of the title. Height by the logo setting; never wider than the screen allows. */
.site-title.has-logo { display: inline-block; line-height: 0; }
.site-header:has(.has-logo) { align-items: center; }
.logo { display: block; width: auto; max-width: min(70vw, 28rem); height: var(--logo-height); object-fit: contain; }
.logo-small { --logo-height: 2rem; }
.logo-medium { --logo-height: 3rem; }
.logo-large { --logo-height: 4.5rem; }
@media (max-width: 600px) { .logo { height: calc(var(--logo-height) * .75); } }
