:root {
  --bg: #101110;
  --panel: #171917;
  --text: #f4f1ea;
  --muted: #989b94;
  --line: rgba(255,255,255,.11);
  --warm: #d8c7a2;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--bg);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-height: 100vh; background: var(--bg); color: var(--text); }
button { color: inherit; font: inherit; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }
.skip-link { position: fixed; left: 1rem; top: -5rem; z-index: 100; padding: .7rem 1rem; background: var(--text); color: var(--bg); }
.skip-link:focus { top: 1rem; }

.site-header {
  position: sticky; top: 0; z-index: 20;
  min-height: 4.5rem; display: flex; align-items: center; justify-content: space-between;
  padding: 0 clamp(1.25rem, 4vw, 4.5rem);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  border-bottom: 1px solid var(--line); backdrop-filter: blur(15px);
}
.site-header button { border: 0; background: none; cursor: pointer; }
.wordmark { font-size: 1.15rem; font-weight: 700; letter-spacing: .02em; padding: .7rem 0; }
.site-header nav { display: flex; gap: .7rem; align-items: center; color: var(--muted); }
.site-header nav button { padding: .7rem .15rem; font-size: .95rem; }
.site-header button:hover, .site-header button:focus-visible { color: var(--warm); }

.view { display: none; }
.view.is-active { display: block; animation: arrive .5s ease both; }
@keyframes arrive { from { opacity: 0; transform: translateY(7px); } }

.entrances { min-height: calc(100vh - 4.5rem); display: grid; grid-template-columns: 1fr 1fr; }
.entrance { position: relative; min-height: calc(100vh - 4.5rem); padding: 0; border: 0; overflow: hidden; background: #111; cursor: pointer; text-align: left; }
.entrance::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 35%, rgba(0,0,0,.72)); transition: background .45s ease; }
.entrance img { width: 100%; height: 100%; position: absolute; inset: 0; object-fit: cover; filter: saturate(.86) brightness(.78); transform: scale(1.01); transition: transform .8s ease, filter .5s ease; }
.entrance span { position: absolute; z-index: 1; left: clamp(1.5rem, 4vw, 4.5rem); bottom: clamp(2rem, 6vw, 5rem); display: grid; gap: .35rem; }
.entrance strong { font-family: Georgia, "Times New Roman", serif; font-size: clamp(2.5rem, 7vw, 7rem); font-weight: 400; letter-spacing: -.04em; }
.entrance small { color: rgba(255,255,255,.68); font-size: 1rem; letter-spacing: .12em; text-transform: uppercase; }
.entrance:hover img, .entrance:focus-visible img { transform: scale(1.045); filter: saturate(1) brightness(.93); }
.entrance:hover::after, .entrance:focus-visible::after { background: linear-gradient(180deg, transparent 48%, rgba(0,0,0,.66)); }

.gallery-view { padding: clamp(2rem, 5vw, 5rem) clamp(1rem, 4vw, 4.5rem) 6rem; }
.gallery-heading { display: flex; align-items: end; justify-content: space-between; gap: 2rem; margin: 0 auto 2.6rem; max-width: 1500px; }
.eyebrow { margin: 0 0 .35rem; color: var(--muted); text-transform: uppercase; letter-spacing: .16em; font-size: .76rem; }
.gallery-heading h1 { margin: 0; font: 400 clamp(2.7rem, 6vw, 5.8rem)/.95 Georgia, "Times New Roman", serif; letter-spacing: -.045em; }
.filters { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .4rem .9rem; }
.filters button { border: 0; border-bottom: 1px solid transparent; padding: .5rem 0; background: none; color: var(--muted); cursor: pointer; }
.filters button:hover, .filters button:focus-visible, .filters button.is-active { color: var(--text); border-color: var(--warm); }

.masonry { max-width: 1500px; margin: 0 auto; columns: 3 320px; column-gap: .55rem; }
.photo { position: relative; display: block; width: 100%; margin: 0 0 .55rem; padding: 0; border: 0; background: var(--panel); break-inside: avoid; overflow: hidden; cursor: zoom-in; }
.photo img { display: block; width: 100%; height: auto; opacity: 0; transform: scale(1.012); transition: opacity .45s ease, transform .6s ease, filter .4s ease; }
.photo img.is-loaded { opacity: 1; }
.photo:hover img, .photo:focus-visible img { transform: scale(1.035); filter: brightness(1.07); }
.photo[hidden] { display: none; }

.lightbox { width: 100vw; max-width: none; height: 100vh; max-height: none; margin: 0; border: 0; padding: 0; background: rgba(6,7,6,.96); color: var(--text); }
.lightbox::backdrop { background: rgba(0,0,0,.92); }
.lightbox figure { margin: 0; width: 100%; height: 100%; display: grid; place-items: center; padding: 4rem clamp(1rem, 8vw, 7rem); }
.lightbox img { max-width: 100%; max-height: calc(100vh - 7rem); object-fit: contain; box-shadow: 0 1rem 5rem rgba(0,0,0,.35); }
.lightbox figcaption { position: fixed; left: 1.3rem; bottom: 1.1rem; color: var(--muted); font-size: .85rem; }
.lightbox > button { position: fixed; z-index: 2; border: 0; background: rgba(20,20,20,.38); color: white; cursor: pointer; border-radius: 999px; display: grid; place-items: center; }
.lightbox .close { top: 1rem; right: 1rem; width: 3rem; height: 3rem; font-size: 2rem; }
.lightbox .previous, .lightbox .next { top: 50%; width: 3.2rem; height: 4.5rem; transform: translateY(-50%); font-size: 3rem; }
.lightbox .previous { left: .8rem; }
.lightbox .next { right: .8rem; }

@media (max-width: 760px) {
  .site-header { min-height: 4rem; }
  .entrances { min-height: calc(100vh - 4rem); grid-template-columns: 1fr; }
  .entrance { min-height: calc((100vh - 4rem) / 2); }
  .entrance span { bottom: 1.5rem; }
  .entrance strong { font-size: clamp(2.6rem, 15vw, 5rem); }
  .gallery-heading { align-items: start; flex-direction: column; margin-bottom: 1.5rem; }
  .filters { justify-content: flex-start; }
  .masonry { columns: 2 150px; }
  .lightbox .previous, .lightbox .next { top: auto; bottom: .65rem; transform: none; height: 3rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
