/* Ronn Beams Photography. Dark gallery theme; no web fonts (system fonts only).
   Contrast on --bg #121212: --text #ecebe8 = 16.6:1, --muted #b4b2ad = 9.3:1, --link #f2d38a = 13.0:1,
   focus ring #f2d38a = 13.0:1 (WCAG 2.1 AA needs 4.5:1 for text, 3:1 for the focus ring). */
:root {
  --bg: #121212;
  --surface: #1c1c1c;
  --line: #3a3a3a;
  --text: #ecebe8;
  --muted: #b4b2ad;
  --link: #f2d38a;
  --focus: #f2d38a;
  --gutter: clamp(1rem, 4vw, 2.5rem);
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --serif: Georgia, "Times New Roman", serif;
  color-scheme: dark;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 1.0625rem/1.6 var(--sans);
  overflow-wrap: break-word;
}
img { display: block; max-width: 100%; height: auto; }
a { color: var(--link); text-underline-offset: 0.2em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
main:focus { outline: none; }
h1, h2 { font-family: var(--serif); font-weight: normal; line-height: 1.2; margin: 0 0 0.5em; }
h1 { font-size: clamp(1.9rem, 5vw, 2.8rem); }
h2 { font-size: clamp(1.4rem, 3.5vw, 1.9rem); }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip {
  position: absolute; left: 1rem; top: -4rem; z-index: 10;
  background: var(--link); color: #121212; padding: 0.6rem 1rem; font-weight: 600;
}
.skip:focus { top: 1rem; }

/* Header */
.site-header {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 0.75rem 2rem; padding: 1.1rem var(--gutter); border-bottom: 1px solid var(--line);
}
.wordmark {
  color: var(--text); text-decoration: none; text-transform: uppercase;
  letter-spacing: 0.32em; font-weight: 600; font-size: 1.05rem; white-space: nowrap;
}
.site-header ul { display: flex; flex-wrap: wrap; gap: 0.25rem 1.4rem; margin: 0; padding: 0; list-style: none; }
.site-header nav a { color: var(--muted); text-decoration: none; padding: 0.3rem 0; display: inline-block; }
.site-header nav a:hover, .site-header nav a[aria-current="page"] { color: var(--text); }
.site-header nav a[aria-current="page"] { text-decoration: underline; text-underline-offset: 0.45em; }

main { padding: 0 var(--gutter) 3rem; max-width: 90rem; margin: 0 auto; }
section { margin-top: 3rem; }
.lede { color: var(--muted); font-size: 1.15rem; max-width: 40rem; }
.count { color: var(--muted); }

/* Home hero */
.hero { margin: 0 calc(var(--gutter) * -1); position: relative; }
.hero-photo img { width: 100%; max-height: 78vh; object-fit: cover; }
.hero-text { padding: 1.5rem var(--gutter) 0; }

/* Gallery cards */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 16rem), 1fr)); gap: 1.25rem;
  margin: 0; padding: 0; list-style: none; }
.cards a { display: block; color: var(--text); text-decoration: none; }
.cards img { aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }
.cards .title { display: block; font-family: var(--serif); font-size: 1.35rem; margin-top: 0.6rem; }
.cards .count { display: block; font-size: 0.95rem; }
.cards a:hover .title { text-decoration: underline; text-underline-offset: 0.2em; }

/* Photo grid: full frames, never cropped */
.page-head { padding-top: 2.25rem; margin-bottom: 1.75rem; }
.grid { columns: 3 18rem; column-gap: 1.25rem; margin: 0; padding: 0; list-style: none; }
.grid li { break-inside: avoid; margin-bottom: 1.5rem; }
.grid a { display: block; color: var(--muted); text-decoration: none; }
.grid img { width: 100%; background: var(--surface); }
.grid .title { display: block; margin-top: 0.45rem; font-size: 0.95rem; }
.grid a:hover .title { color: var(--text); text-decoration: underline; }
.grid a:hover img { filter: brightness(1.08); }

/* Single photo */
.photo-page { padding-top: 1.5rem; }
.photo-page figure { margin: 0; }
.photo-page .photo { width: auto; max-width: 100%; max-height: 82vh; margin: 0 auto; }
.photo-page figcaption { max-width: 76rem; margin: 1.1rem auto 0; text-align: center; }
.photo-page h1 { font-size: clamp(1.6rem, 4vw, 2.2rem); margin-bottom: 0.2rem; }
.meta { color: var(--muted); margin: 0; }
.pager { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.75rem 1.5rem;
  max-width: 76rem; margin: 2rem auto 0; padding-top: 1.25rem; border-top: 1px solid var(--line); }
.pager a { padding: 0.35rem 0; }

/* Text pages */
.prose { max-width: 42rem; padding-top: 2.25rem; }
.prose h2 { margin-top: 2rem; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 1.5rem var(--gutter) 2.5rem; color: var(--muted);
  font-size: 0.95rem; }
.site-footer p { margin: 0.3rem 0; max-width: 60rem; }

@media (prefers-reduced-motion: no-preference) {
  .grid img, .cards img { transition: filter 0.2s ease; }
}
