/* ============================================
   PORTFOLIO MOSAIC — Irregular masonry grid
   ============================================ */

.mosaic {
  padding: var(--section-pad-mobile) var(--side-pad);
  background: var(--soft-cream);
}

.mosaic__header {
  text-align: center;
  margin-bottom: 48px;
}

.mosaic__eyebrow {
  margin-bottom: 16px;
}

.mosaic__title {
  font-family: var(--font-display);
  font-size: 36px;
  font-weight: 300;
  line-height: 1.1;
  color: var(--charcoal);
}

.mosaic__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  max-width: var(--container-max);
  margin: 0 auto;
}

.mosaic__item {
  position: relative;
  overflow: hidden;
  cursor: pointer;
}

.mosaic__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.5s ease;
}

.mosaic__item:hover img {
  opacity: 0.88;
}

.mosaic__item-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 20px;
  background: linear-gradient(to top, rgba(26, 24, 22, 0.6), transparent);
  clip-path: inset(100% 0 0 0);
  transition: clip-path 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.mosaic__item:hover .mosaic__item-overlay {
  clip-path: inset(0% 0 0 0);
}

.mosaic__item-name {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 300;
  color: var(--warm-ivory);
  transform: translateY(12px);
  opacity: 0;
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1),
              opacity 0.4s ease;
}

.mosaic__item:hover .mosaic__item-name {
  transform: translateY(0);
  opacity: 1;
}

.mosaic__item-meta {
  font-family: var(--font-body);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transform: translateY(12px);
  opacity: 0;
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1) 0.06s,
              opacity 0.4s ease 0.06s;
  color: rgba(245, 240, 235, 0.7);
  margin-top: 4px;
}

.mosaic__item:hover .mosaic__item-meta {
  transform: translateY(0);
  opacity: 1;
}

/* Mobile: simple stacked */
.mosaic__item--tall { height: 400px; }
.mosaic__item--wide { height: 260px; }
.mosaic__item--square { height: 320px; }
.mosaic__item--short { height: 240px; }

/* Tablet: 2-col masonry */
@media (min-width: 768px) {
  .mosaic {
    padding: var(--section-pad-desktop) 40px;
  }

  .mosaic__header {
    margin-bottom: 64px;
  }

  .mosaic__title {
    font-size: 56px;
  }

  .mosaic__grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }

  .mosaic__item--tall { height: 520px; }
  .mosaic__item--wide {
    grid-column: span 2;
    height: 420px;
  }
  .mosaic__item--square { height: 400px; }
  .mosaic__item--short { height: 320px; }
}

/* Desktop: 3-col irregular */
@media (min-width: 1024px) {
  .mosaic__grid {
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: 200px;
    gap: 16px;
  }

  .mosaic__item--tall {
    grid-row: span 3;
    height: auto;
  }

  .mosaic__item--wide {
    grid-column: span 2;
    grid-row: span 2;
    height: auto;
  }

  .mosaic__item--square {
    grid-row: span 2;
    height: auto;
  }

  .mosaic__item--short {
    grid-row: span 1;
    height: auto;
  }
}

/* ============================================
   LIGHTBOX
   ============================================ */

.lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  z-index: 200;
  background: var(--overlay-lightbox);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.5s ease, visibility 0.5s ease;
  cursor: pointer;
}

.lightbox.is-open {
  opacity: 1;
  visibility: visible;
}

.lightbox__image {
  max-width: 90%;
  max-height: 85vh;
  object-fit: contain;
  transform: scale(0.95);
  transition: transform 0.5s var(--ease-smooth);
}

.lightbox.is-open .lightbox__image {
  transform: scale(1);
}

.lightbox__close {
  position: absolute;
  top: 24px;
  right: 24px;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.lightbox__close svg {
  width: 20px;
  height: 20px;
  stroke: var(--warm-ivory);
  transition: stroke 0.3s ease;
}

.lightbox__close:hover svg {
  stroke: var(--gold);
}

.lightbox__caption {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
}

.lightbox__caption-name {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 300;
  color: var(--warm-ivory);
}

.lightbox__caption-meta {
  font-family: var(--font-body);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(245, 240, 235, 0.5);
  margin-top: 4px;
}

.lightbox__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: opacity 0.3s ease;
}

.lightbox__nav:hover { opacity: 0.7; }

.lightbox__nav svg {
  width: 24px;
  height: 24px;
  stroke: var(--warm-ivory);
}

.lightbox__nav--prev { left: 20px; }
.lightbox__nav--next { right: 20px; }
