:root {
  --bg: #ffffff;
  --tile: #f3f2ef;
  --text: #1a1917;
  --muted: #77746e;
  --radius: 0px;
  --max: 1440px;
  --scrim: rgba(12, 11, 10, 0.38);
}

* { box-sizing: border-box; }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* Squarespace-style load reveal: photo eases in slightly small, expanding up to full size. */
@keyframes revealPhoto {
  from { opacity: 0; transform: scale(0.96); }
  to   { opacity: 1; transform: scale(1); }
}

html, body {
  overscroll-behavior-x: none;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 "Abel", sans-serif;
  -webkit-font-smoothing: antialiased;
}

/* ---------- Header ---------- */
.site-header { max-width: var(--max); margin: 0 auto; padding: 3rem 1.5rem 1.5rem; text-align: left; }
.home-link { text-decoration: none; color: inherit; }
.tagline { color: #77726b; margin: 0; font-size: 1rem; font-weight: 400; }
.tagline a { color: #77726b; text-decoration: none; }
.tagline a:hover { color: var(--text); }

main { max-width: var(--max); margin: 0 auto; padding: 1.25rem 1.5rem 0.5rem; }

/* ---------- Landing: album grid (3-across, tiles fill width) ---------- */
.album-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.35rem;
  animation: fadeIn 0.5s ease;
}
.album-card {
  position: relative;
  display: block;
  text-decoration: none;
  color: inherit;
  aspect-ratio: 3 / 2;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--tile);
}
.album-card img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; display: block;
  animation: revealPhoto 0.7s ease;
  transition: transform 0.5s ease;
}
.album-card:hover img { transform: scale(1.035); }
.album-card .cover-fallback {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  font-size: 2.4rem; background: var(--tile);
}

/* Title overlay — centered over the photo.
   Desktop: fades in on hover. Touch (no hover): always visible. */
.album-overlay {
  position: absolute; inset: 0;
  display: grid; align-content: center; justify-items: center;
  background: var(--scrim);
  opacity: 1;
  transition: opacity 0.3s ease;
  pointer-events: none;
}
.album-overlay h2 { margin: 0; font-family: "Inter", "Avenir Next", Avenir, Helvetica, Arial, sans-serif; font-size: 1.9rem; font-weight: 700; color: #fff; letter-spacing: 0.04em; text-transform: uppercase; }
.album-overlay .album-meta { margin: 0.2rem 0 0; font-size: 0.8rem; color: rgba(255, 255, 255, 0.85); }

@media (hover: hover) {
  .album-overlay { opacity: 0; }
  .album-card:hover .album-overlay { opacity: 1; }
}

@media (max-width: 1024px) {
  .album-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.35rem; }
}
@media (max-width: 640px) {
  .album-list { grid-template-columns: minmax(0, 1fr); gap: 0.35rem; }
  .album-overlay h2 { font-size: 1.3rem; }
  .album-overlay .album-meta { font-size: 0.75rem; }
}

/* ---------- Album page ---------- */
.back-link { display: flex; align-items: center; color: var(--muted); text-decoration: none; margin: 0 0 0.35rem; width: 3rem; height: 3rem; }
.back-link svg { width: 2rem; height: 2rem; fill: none; stroke: currentColor; stroke-width: 1.25; stroke-linecap: round; stroke-linejoin: round; }
.back-link:hover { color: var(--text); }
.album-header h2 { margin: 0 0 1.1rem; font-family: "Inter", "Avenir Next", Avenir, Helvetica, Arial, sans-serif; font-size: 2.3rem; font-weight: 700; color: #77726b; text-transform: uppercase; letter-spacing: 0.04em; }
.album-header .album-meta { color: var(--muted); margin: 0 0 1.5rem; font-size: 0.9rem; }

/* ---------- Album page: justified rows (natural aspect ratios, edge-to-edge) ---------- */
.photo-grid { display: flex; flex-wrap: wrap; gap: 0.5rem; align-content: flex-start; }
@media (max-width: 640px) { .photo-grid { gap: 0.2rem; } }
@keyframes revealGrid { from { opacity: 0; transform: scale(0.96); } to { opacity: 1; transform: scale(1); } }
.photo-grid .item { flex: 0 0 auto; position: relative; cursor: default; overflow: hidden; animation: revealGrid 0.7s ease both; }
.photo-grid img, .photo-grid video { width: 100%; height: 100%; display: block; object-fit: cover; background: var(--tile); animation: none; transition: filter 0.25s ease; }
.photo-grid .item:hover img, .photo-grid .item:hover video { filter: brightness(1.1); }
.item .play-badge {
  position: absolute; inset: 0; display: grid; place-items: center;
  color: #fff; font-size: 2.4rem; text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6); pointer-events: none;
}

/* ---------- Password gate ---------- */
.gate {
  max-width: 380px; margin: 4rem auto; text-align: center;
  background: var(--tile); padding: 2rem; border-radius: var(--radius); border: 1px solid #e4e2de;
}
.gate input {
  width: 100%; padding: 0.7rem 0.9rem; margin: 1rem 0; border-radius: 8px;
  border: 1px solid #d8d6d2; background: #fff; color: var(--text); font-size: 1rem;
}
.gate button {
  padding: 0.7rem 1.6rem; border-radius: 8px; border: 0; cursor: pointer;
  background: #171512; color: #fff; font-weight: 500;
}
.gate .gate-error { color: #b33a2e; font-size: 0.9rem; min-height: 1.2em; }

/* ---------- Lightbox (white, photos viewed on paper) ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 50; background: #fff;
  /* clip (not hidden): hidden boxes stay user-scrollable in Blink/WebKit and
     would swallow trackpad gestures; clip makes the viewer truly non-scrollable */
  overflow: hidden; overflow: clip;
  height: 100dvh;
  display: flex; align-items: center; justify-content: center;
  animation: fadeIn 0.5s ease;
}
.lightbox[hidden] { display: none; }
.lightbox figure { margin: 0; max-width: calc(100vw - 9.5rem); max-height: calc(100dvh - 1rem); display: grid; place-items: center; }
.lightbox img, .lightbox video { width: auto; height: auto; max-width: 100%; max-height: calc(100dvh - 1rem); object-fit: contain; animation: revealPhoto 0.7s ease; }
.lb-close, .lb-prev, .lb-next {
  position: fixed; background: none; border: 0; color: #9b9891; cursor: pointer;
  width: 3.5rem; height: 3.5rem; padding: 0.75rem; z-index: 51;
}
.lb-close svg, .lb-prev svg, .lb-next svg {
  width: 100%; height: 100%; fill: none; stroke: currentColor;
  stroke-width: 1.25; stroke-linecap: round; stroke-linejoin: round;
}
.lb-close { top: 0.6rem; right: 1.2rem; }
.lb-prev { left: 0.8rem; top: 50%; transform: translateY(-50%); }
.lb-next { right: 0.8rem; top: 50%; transform: translateY(-50%); }
.lb-close:hover, .lb-prev:hover, .lb-next:hover { color: var(--text); }
.lb-caption { position: fixed; bottom: 1.1rem; width: 100%; text-align: center; color: var(--muted); font-size: 0.9rem; margin: 0; }

.site-footer { max-width: var(--max); margin: 0.5rem auto 0; padding: 0.5rem 1.5rem 1.5rem; color: var(--muted); font-size: 0.75rem; text-align: left; }
.site-footer a { color: var(--muted); text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }

/* Touch devices: swipe navigates, so hide the redundant arrows */
@media (hover: none) and (pointer: coarse) {
  .lb-prev, .lb-next { display: none; }
  .lightbox { touch-action: none; }
  .lightbox figure { max-width: 94vw; } /* no arrows to avoid on touch */
}

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }