:root {
  --bg: #ffffff;
  --ink: #161512;
  --mute: #5d5b54;
  --rule: #c9c7bf;
  --card: #d6d4cd;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: var(--bg); color: var(--ink); }
body {
  font-family: "Cormorant Garamond", "EB Garamond", Garamond, "Times New Roman", serif;
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { display: block; }

/* ---- top bar ---- */
.nav {
  display: flex; justify-content: space-between; align-items: center;
  padding: 36px 48px 28px;
}
.brand {
  font-weight: 700;
  font-size: 20px;
  letter-spacing: 0.02em;
  line-height: 1;
}
.brand sup { font-size: 0.5em; vertical-align: super; margin-left: 2px; font-weight: 400; }

/* ---- collection page title ---- */
.page-head {
  padding: 14px 48px 10px;
}
.page-head h1 {
  font-size: clamp(28px, 5vw, 56px);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: -0.02em;
  line-height: 1;
  margin: 0;
  text-wrap: balance;
}
.page-head .count {
  margin-top: 10px;
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.18em;
  color: var(--mute);
}

/* ---- masonry: flex columns filled by JS ---- */
.grid {
  padding: 116px 48px 80px;
  display: flex;
  gap: 16px;
  align-items: flex-start;
}
.col {
  flex: 1 1 0;
  min-width: 0;
  display: flex; flex-direction: column; gap: 16px;
}
.card {
  display: block;
  position: relative;
  overflow: hidden;
  background: var(--card);
  cursor: pointer;
  width: 100%;
}
.card img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 700ms cubic-bezier(.2,.7,.2,1);
}
.card:hover img { transform: scale(1.03); }

.card .name {
  position: absolute; left: 14px; bottom: 12px;
  color: #fff;
  font-size: 10px; letter-spacing: 0.2em; text-transform: uppercase;
  opacity: 0; transform: translateY(6px);
  transition: opacity 250ms ease, transform 320ms cubic-bezier(.2,.7,.2,1);
  text-shadow: 0 1px 8px rgba(0,0,0,0.55);
}
.card:hover .name { opacity: 1; transform: translateY(0); }

/* ---- collection page: single-column large images (Behance-style) ---- */
.stack {
  max-width: 1080px;
  margin: 0 auto;
  padding: 48px 48px 90px;
  display: flex;
  flex-direction: column;
  gap: 26px;
}
.stack .shot {
  width: 100%;
  display: block;
  margin: 0;
  border: 0;
  padding: 0;
  background: var(--card);
  cursor: pointer;
  overflow: hidden;
}
.stack .shot img {
  width: 100%; height: auto; display: block;
  transition: transform 700ms cubic-bezier(.2,.7,.2,1);
}
.stack .shot:hover img { transform: scale(1.02); }

/* ---- empty / loading states ---- */
.state {
  padding: 80px 48px;
  color: var(--mute);
  font-size: 13px;
}

/* ---- lightbox ---- */
.lightbox {
  position: fixed; inset: 0; z-index: 50;
  background: rgba(20, 19, 17, 0.94);
  display: none;
  align-items: center; justify-content: center;
}
.lightbox.open { display: flex; }
.lightbox img {
  max-width: 92vw; max-height: 88vh;
  width: auto; height: auto;
  object-fit: contain;
}
.lightbox .lb-btn {
  position: absolute;
  background: transparent; border: 0; color: #fff;
  cursor: pointer; padding: 16px;
  font-size: 26px; line-height: 1;
  font-family: inherit;
}
.lightbox .lb-close { top: 8px; right: 12px; font-size: 30px; }
.lightbox .lb-prev { left: 4px; top: 50%; transform: translateY(-50%); }
.lightbox .lb-next { right: 4px; top: 50%; transform: translateY(-50%); }
.lightbox .lb-count {
  position: absolute; bottom: 18px; left: 0; right: 0;
  text-align: center; color: #fff;
  font-size: 11px; letter-spacing: 0.2em;
}

/* ---- responsive ---- */
@media (max-width: 760px) {
  .nav { padding: 56px 42px 20px; }
  .page-head { padding: 8px 22px 6px; }
  .grid { padding: 84px 22px 50px; gap: 10px; }
  .col { gap: 10px; }
  .stack { padding: 32px 22px 56px; gap: 12px; }
  .lightbox .lb-btn { font-size: 22px; padding: 12px; }
}
