/* ==========================================================================
   Photo portfolio — page head, album nav, masonry grid, lightbox
   ========================================================================== */

.page-head {
  padding: var(--space-section) var(--pad) 0;
}
.eyebrow {
  margin-bottom: 1rem;
  font-size: var(--fs-xs);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
.eyebrow::before {
  content: "";
  display: inline-block;
  width: 2.5rem;
  height: 1px;
  margin-right: 0.9rem;
  background: var(--muted);
  vertical-align: middle;
}
.page-title {
  font-family: var(--font-display);
  font-size: var(--fs-5xl);
  font-weight: 400;
  line-height: 0.88;
  letter-spacing: -0.02em;
}
.page-title em {
  color: var(--accent);
}
.page-intro {
  max-width: 44ch;
  margin-top: 1.5rem;
  font-family: var(--font-display);
  font-size: var(--fs-lg);
  line-height: 1.3;
}

/* ---------- Album nav ---------- */
.album-nav {
  min-height: 3.6rem;
  position: sticky;
  top: var(--header-offset, 0px);
  transition: top var(--t) var(--ease);
  z-index: 5;
  display: flex;
  gap: 0.25rem 1.5rem;
  margin-top: clamp(2rem, 5vw, 4rem);
  padding: 0.9rem var(--pad);
  overflow-x: auto;
  scrollbar-width: none;
  background: rgb(8 8 8 / 0.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-block: 1px solid var(--line);
  white-space: nowrap;
}
.album-nav::-webkit-scrollbar {
  display: none;
}
.album-nav a {
  font-family: var(--font-display);
  font-size: var(--fs-lg);
  color: var(--muted);
  transition: color var(--t-fast);
}
.album-nav a:hover,
.album-nav a.is-active {
  color: var(--ink);
}
.album-nav a.is-active {
  box-shadow: inset 0 -1px 0 var(--accent);
}
.album-nav sup {
  margin-left: 0.25em;
  font-family: var(--font-ui);
  font-size: var(--fs-xs);
  color: var(--muted);
}

[data-gallery] {
  min-height: 100vh;
}

/* ---------- Albums ---------- */
.album {
  padding: clamp(2.5rem, 6vw, 5rem) var(--pad) 0;
  scroll-margin-top: 3.5rem;
}
.album__head {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.album__title {
  font-family: var(--font-display);
  font-size: var(--fs-2xl);
  font-weight: 400;
  font-style: italic;
  line-height: 1;
}
.album__count {
  font-size: var(--fs-xs);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.grid {
  columns: 4;
  column-gap: 0.75rem;
}
@media (max-width: 1100px) {
  .grid {
    columns: 3;
  }
}
@media (max-width: 640px) {
  .grid {
    columns: 2;
    column-gap: 0.5rem;
  }
}

.shot {
  position: relative;
  display: block;
  margin-bottom: 0.75rem;
  overflow: hidden;
  break-inside: avoid;
  background: #111;
}
@media (max-width: 640px) {
  .shot {
    margin-bottom: 0.5rem;
  }
}
.shot img {
  width: 100%;
  height: auto;
  opacity: 0;
  transition: opacity var(--t-slow) var(--ease), scale 0.8s var(--ease);
}
.shot img.is-loaded {
  opacity: 1;
}
.shot:hover img,
.shot:focus-visible img {
  scale: 1.03;
}
.shot__label {
  position: absolute;
  inset: auto 0 0 0;
  padding: 2rem 0.75rem 0.6rem;
  background: linear-gradient(transparent, rgb(0 0 0 / 0.7));
  font-size: var(--fs-xs);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0;
  transition: opacity var(--t);
}
.shot:hover .shot__label,
.shot:focus-visible .shot__label {
  opacity: 1;
}

.gallery-note {
  padding: 3rem var(--pad);
  color: var(--muted);
}
.gallery-note a {
  color: var(--ink);
  box-shadow: inset 0 -1px 0 var(--accent);
}

/* ---------- Lightbox ---------- */
html.has-lightbox {
  overflow: hidden;
}
.lightbox {
  width: 100vw;
  max-width: none;
  height: 100dvh;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: rgb(4 4 4 / 0.97);
  color: var(--ink);
}
.lightbox::backdrop {
  background: #040404;
}
.lightbox[open] {
  display: grid;
  grid-template-rows: auto 1fr auto;
  animation: lightbox-in 0.25s var(--ease);
}
@keyframes lightbox-in {
  from {
    opacity: 0;
  }
}
.lightbox__bar,
.lightbox__caption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem var(--pad);
  font-size: var(--fs-xs);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.lightbox__caption {
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.25rem 1.25rem;
  min-height: 3rem;
  text-align: center;
}
.lightbox__caption strong {
  font-weight: 500;
  color: var(--ink);
}
.lightbox__stage {
  position: relative;
  min-height: 0;
  touch-action: pan-y;
}
.lightbox__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 0 var(--pad);
  object-fit: contain;
  opacity: 0;
  transition: opacity var(--t);
}
.lightbox__img.is-loaded {
  opacity: 1;
}
.lightbox button {
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  color: var(--ink);
  transition: background-color var(--t-fast), color var(--t-fast);
}
.lightbox button:hover {
  background: var(--accent);
  color: var(--accent-ink);
}
.lightbox button svg {
  width: 1.25rem;
  height: 1.25rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
}
.lightbox__prev,
.lightbox__next {
  position: absolute;
  top: 50%;
  z-index: 1;
  translate: 0 -50%;
  background: rgb(8 8 8 / 0.5);
}
.lightbox__prev {
  left: 0.75rem;
}
.lightbox__next {
  right: 0.75rem;
}
@media (max-width: 640px) {
  .lightbox__img {
    padding: 0;
  }
}

/* ==========================================================================
   Richer portfolio: cover slideshow, album index, editorial layouts,
   filmstrip viewer, cursor badge
   ========================================================================== */

/* ---------- Cover ---------- */
.cover {
  position: relative;
  display: flex;
  align-items: flex-end;
  min-height: min(88vh, 60rem);
  margin-top: calc(var(--header-h, 4.6rem) * -1); /* slides under the header */
  padding: 8rem var(--pad) clamp(2.5rem, 6vw, 5rem);
  overflow: hidden;
  isolation: isolate;
}
.cover__slides {
  position: absolute;
  inset: 0;
  z-index: -2;
  background: #0c0c0c;
}
.cover__slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 35%;
  opacity: 0;
  transition: opacity 1.6s ease;
}
.cover__slide.is-active {
  opacity: 1;
}
/* Darkens the photo where the text sits and blends the bottom into the page */
.cover::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(90deg, rgb(8 8 8 / 0.82), rgb(8 8 8 / 0.25) 60%, rgb(8 8 8 / 0.1)),
    linear-gradient(0deg, var(--bg), rgb(8 8 8 / 0) 45%), linear-gradient(180deg, rgb(8 8 8 / 0.75), rgb(8 8 8 / 0) 22%);
}
.cover__content {
  max-width: 60rem;
}
.cover .eyebrow {
  color: var(--ink);
}
.cover__caption {
  position: absolute;
  right: var(--pad);
  bottom: clamp(2.5rem, 6vw, 5rem);
  display: flex;
  gap: 1.25rem;
  font-size: var(--fs-xs);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink);
}
.cover__caption span:last-child {
  color: var(--muted);
}
@media (max-width: 720px) {
  .cover {
    min-height: 78vh;
    padding-top: 7rem;
  }
  .cover__caption {
    position: static;
    margin-top: 1.5rem;
  }
  .cover {
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-end;
  }
}
/* The header sits on top of the cover photo */
.site-header {
  z-index: 15;
}

/* ---------- Album index ---------- */
.index {
  padding: clamp(1.5rem, 4vw, 3rem) var(--pad) 0;
}
.index__grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0.75rem;
}
@media (max-width: 1100px) {
  .index__grid {
    display: flex;
    margin-inline: calc(var(--pad) * -1);
    padding-inline: var(--pad);
    overflow-x: auto;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
  }
  .index__grid::-webkit-scrollbar {
    display: none;
  }
  .index__card {
    flex: 0 0 min(42vw, 13rem);
    scroll-snap-align: start;
  }
}
.index__card {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: #111;
}
.index__card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  filter: grayscale(1) brightness(0.7);
  transition: opacity var(--t-slow) var(--ease), scale 0.9s var(--ease), filter var(--t-slow);
}
.index__card img.is-loaded {
  opacity: 1;
}
.index__card:hover img,
.index__card:focus-visible img {
  scale: 1.06;
  filter: none;
}
.index__meta {
  position: absolute;
  inset: auto 0 0 0;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 0 0.5rem;
  padding: 2.5rem 0.75rem 0.7rem;
  background: linear-gradient(transparent, rgb(0 0 0 / 0.82));
}
.index__num {
  grid-column: 1 / -1;
  font-size: var(--fs-xs);
  letter-spacing: 0.12em;
  color: var(--muted);
}
.index__title {
  font-family: var(--font-display);
  font-size: var(--fs-lg);
  font-style: italic;
  line-height: 1.1;
}
.index__count {
  font-size: var(--fs-xs);
  color: var(--muted);
}

/* ---------- Album header ---------- */
.album {
  padding-top: var(--space-section);
}
.album__head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 22rem);
  align-items: end;
  gap: 0.5rem 2rem;
  margin-bottom: clamp(1.5rem, 3vw, 2.5rem);
}
.album__num {
  grid-column: 1 / -1;
  font-size: var(--fs-xs);
  letter-spacing: 0.14em;
  color: var(--muted);
}
.album__title {
  font-size: var(--fs-5xl);
  line-height: 0.9;
  letter-spacing: -0.02em;
}
.album__intro {
  font-family: var(--font-display);
  font-size: var(--fs-lg);
  line-height: 1.3;
}
.album__count {
  grid-column: 2;
  margin-top: 0.25rem;
}
@media (max-width: 720px) {
  .album__head {
    grid-template-columns: 1fr;
  }
  .album__count {
    grid-column: 1;
  }
}

/* ---------- Lead photo ---------- */
.shot--lead {
  aspect-ratio: 21 / 9;
  margin-bottom: 0.75rem;
}
.shot--lead img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
@media (max-width: 720px) {
  .shot--lead {
    aspect-ratio: 3 / 2;
    margin-bottom: 0.5rem;
  }
}

/* ---------- Strip (small albums) ---------- */
.strip {
  display: flex;
  gap: 0.75rem;
  margin-inline: calc(var(--pad) * -1);
  padding-inline: var(--pad);
  overflow-x: auto;
  scroll-snap-type: x proximity;
  scrollbar-width: thin;
  scrollbar-color: var(--accent) transparent;
  padding-bottom: 1rem;
}
.shot--strip {
  flex: 0 0 auto;
  height: clamp(18rem, 62vh, 38rem);
  margin-bottom: 0;
  scroll-snap-align: center;
}
.shot--strip img {
  width: auto;
  height: 100%;
  max-width: none;
}

/* ---------- Viewer: filmstrip and grow-in ---------- */
.lightbox[open] {
  grid-template-rows: auto 1fr auto auto;
  animation: lightbox-fade 0.35s var(--ease);
}
@keyframes lightbox-fade {
  from {
    background-color: rgb(4 4 4 / 0);
  }
}
.lightbox__img.is-hidden {
  opacity: 0 !important;
  transition: none;
}
.lightbox__ghost {
  position: fixed;
  z-index: 2;
  max-width: none;
  object-fit: cover;
  transform-origin: 0 0;
  pointer-events: none;
}
.lightbox__strip {
  display: flex;
  gap: 0.35rem;
  padding: 0 var(--pad) 0.9rem;
  overflow-x: auto;
  scrollbar-width: none;
}
.lightbox__strip::-webkit-scrollbar {
  display: none;
}
.lightbox .lightbox__thumb {
  flex: 0 0 auto;
  width: 3.25rem;
  height: 3.25rem;
  border-radius: 2px;
  overflow: hidden;
  opacity: 0.4;
  transition: opacity var(--t-fast), outline-color var(--t-fast);
  outline: 1px solid transparent;
  outline-offset: 2px;
}
.lightbox .lightbox__thumb:first-child {
  margin-left: auto;
}
.lightbox .lightbox__thumb:last-child {
  margin-right: auto;
}
.lightbox .lightbox__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.lightbox .lightbox__thumb:hover {
  opacity: 0.8;
  background: none;
}
.lightbox .lightbox__thumb.is-active {
  opacity: 1;
  outline-color: var(--accent);
}
@media (max-width: 640px), (max-height: 560px) {
  .lightbox__strip {
    display: none;
  }
}

/* Menu and language links sit on the cover photo here, so they need full contrast */
.site-nav a,
.lang a {
  color: var(--ink);
  text-shadow: 0 1px 12px rgb(0 0 0 / 0.6);
}
.site-nav a:not([aria-current]),
.lang a:not([aria-current]) {
  opacity: 0.78;
}
.site-nav a:hover,
.lang a:hover {
  opacity: 1;
}

/* On phones a wide photo in a strip must still fit on screen */
@media (max-width: 720px) {
  .shot--strip {
    height: 58vw;
  }
}

/* ---------- "Show all" under a long album ---------- */
.more-row {
  display: flex;
  justify-content: center;
  margin-top: 1.5rem;
}

/* Booking link at the end of the sticky album bar */
.album-nav a.album-nav__book {
  padding: 0 1rem;
  border: 1px solid var(--accent);
  border-radius: var(--radius-control);
  font-family: var(--font-ui);
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--ink);
}
.album-nav a.album-nav__book:hover {
  background: var(--accent);
  color: var(--accent-ink);
}
@media (min-width: 721px) {
  .album-nav a.album-nav__book {
    order: 99;
    margin-left: auto;
  }
}
