/* ─── Reset + base ──────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
img, picture, video { display: block; max-width: 100%; height: auto; }

:root {
  --bg: #000000;
  --fg: #f0ede8;
  --muted: #8a8580;
  --accent: #b08456;
  --max-width: 1200px;
  --space: 1.5rem;
  --serif: Georgia, 'Iowan Old Style', 'Apple Garamond', serif;
  --sans: -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Arial, sans-serif;
}

html { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--fg);
  line-height: 1.6;
}

a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
a:hover { color: var(--accent); }

h1, h2, h3 { font-family: var(--serif); font-weight: 400; letter-spacing: -0.01em; }
h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); margin-top: 2rem; }

/* ─── Header / footer ───────────────────────────────────────────────── */
.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space) calc(var(--space) * 1.5);
  max-width: var(--max-width);
  margin: 0 auto;
}
.site-title {
  font-family: var(--serif);
  font-size: 1.25rem;
  text-decoration: none;
  letter-spacing: 0.02em;
}
.site-nav { display: flex; gap: 1.5rem; }
.site-nav a { text-decoration: none; font-size: 0.95rem; }
.site-nav a[aria-current="page"] { color: var(--accent); }

.site-footer {
  padding: 3rem var(--space) 2rem;
  text-align: center;
  font-size: 0.85rem;
  color: var(--muted);
}

/* ─── Hero ──────────────────────────────────────────────────────────── */
.hero {
  display: flex;
  justify-content: center;
  padding: 2rem var(--space) 1rem;
}
.hero-mark {
  display: block;
  width: 100%;
  max-width: 900px;
}
.hero-mark img {
  width: 100%;
  height: auto;
  display: block;
}

.intro {
  max-width: 680px;
  margin: 2rem auto 4rem;
  padding: 0 var(--space);
  text-align: center;
  font-size: 1.1rem;
}

/* Visually hidden, available to screen readers */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ─── Gallery ───────────────────────────────────────────────────────── */
.gallery-intro {
  max-width: var(--max-width);
  margin: 2rem auto;
  padding: 0 var(--space);
}
.gallery {
  max-width: var(--max-width);
  margin: 0 auto 4rem;
  padding: 0 var(--space);
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}
.gallery figure {
  margin: 0;
  cursor: zoom-in;
  overflow: hidden;
}
.gallery figure:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}
/* The <picture> is the clipping frame for the hover zoom: the image scales
   inside it, but anything past the photo's own edges is clipped — so the zoom
   can't bleed down over the caption (which sits below, outside the picture). */
.gallery figure picture {
  display: block;
  overflow: hidden;
}
.gallery figure img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  aspect-ratio: 3 / 2;
  transition: transform 0.4s ease;
}
.gallery figure:hover img,
.gallery figure:focus-visible img { transform: scale(1.03); }
.gallery figcaption {
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: 0.5rem;
}
.gallery-empty {
  grid-column: 1 / -1;
  text-align: center;
  color: var(--muted);
  padding: 4rem 0;
}

/* Homepage bootstrap gallery: only a few photos for now, so show them in a
   single centered column at their natural aspect ratio (no 3:2 crop) — a lone
   portrait reads as framed, not stranded. Temporary: once there are enough
   photos for a standalone gallery page, that page uses the 3:2 grid above and
   this modifier goes away. See STYLE.md / CLAUDE.md. */
.gallery--home {
  max-width: 760px;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  margin-top: 1rem;
}
.gallery--home figure img {
  aspect-ratio: auto;
  height: auto;
}

/* ─── About ─────────────────────────────────────────────────────────── */
.about {
  max-width: 680px;
  margin: 3rem auto;
  padding: 0 var(--space);
}
.about p { margin: 1rem 0; }

/* ─── Lightbox ──────────────────────────────────────────────────────── */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  z-index: 100;
  padding: 2rem;
  cursor: zoom-out;
}
.lightbox[hidden] { display: none; }
.lightbox-image {
  max-width: 100%;
  max-height: 85vh;
  object-fit: contain;
}
.lightbox-caption {
  color: rgba(255, 255, 255, 0.85);
  margin-top: 1rem;
  font-size: 0.95rem;
  text-align: center;
}
.lightbox-close {
  position: absolute;
  top: 1rem;
  right: 1.5rem;
  background: none;
  border: none;
  color: white;
  font-size: 2.5rem;
  cursor: pointer;
  line-height: 1;
}

/* ─── 404 ───────────────────────────────────────────────────────────── */
.not-found {
  max-width: 680px;
  margin: 8rem auto;
  padding: 0 var(--space);
  text-align: center;
}

/* ─── Responsive ────────────────────────────────────────────────────── */
@media (max-width: 600px) {
  .site-header { padding: 1rem; }
  .gallery { grid-template-columns: 1fr; }
}
