body {
  background-color: #252120;
}

.splash {
  background-color: #252120;
}

.topbar__logo-img,
.nav-insta__icon,
.topbar__insta-mobile img,
#logo-base {
  filter: invert(1);
}

/* The media grid needs full width, overriding the shared max-width */
.main {
  padding-left: 0;
  padding-right: 0;
  max-width: none;
}

/* Scrolls with the page instead of staying fixed */
.topbar {
  position: relative;
  background-color: #252120;
}

.page {
  padding-top: 0;
}

/* Nav colour overrides for dark background */
.nav-item:hover, .nav-item:focus-visible { color: var(--white); outline: none; }
.nav__lang:hover, .nav__lang:focus-visible { color: var(--white); }
.nav-item.is-active { color: var(--white); pointer-events: none; }

.nav-insta { color: var(--white); }

/* ── Media page ──────────────────────────────────────────────── */

.media-main {
  padding: 2rem;
}

/* Irregular mosaic grid */
.media-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  grid-auto-rows: 160px;
  grid-auto-flow: dense;
  gap: 6px;
  width: 100%;
  opacity: 0;
  transition: opacity 0.6s ease;
}

.media-grid.is-visible {
  opacity: 1;
}

.media-item {
  overflow: hidden;
  cursor: zoom-in;
  display: block;
  min-width: 0;
  min-height: 0;
  background-color: #1a1817;
}

.media-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.35s ease;
}

.media-item:hover img {
  transform: scale(1.04);
}

/* Empty state */
.media-empty {
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--grey);
  text-align: center;
  padding: 6rem 0;
  grid-column: 1 / -1;
}

/* ── White lightbox ─────────────────────────────────────────── */
.media-lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.media-lightbox.active {
  opacity: 1;
  pointer-events: all;
}

.media-lightbox__backdrop {
  position: absolute;
  inset: 0;
  backdrop-filter: blur(12px) brightness(0.45);
  -webkit-backdrop-filter: blur(12px) brightness(0.45);
}

.media-lightbox__img {
  position: relative;
  z-index: 1;
  max-width: 88vw;
  max-height: 85vh;
  object-fit: contain;
  box-shadow: 0 6px 40px rgba(0, 0, 0, 0.18);
  transform: scale(0.93);
  transition: transform 0.25s ease;
}

.media-lightbox.active .media-lightbox__img {
  transform: scale(1);
}

.media-lightbox__close {
  position: absolute;
  top: 20px;
  right: 24px;
  z-index: 2;
  background: none;
  border: none;
  color: #fff;
  font-size: 1.8rem;
  line-height: 1;
  cursor: pointer;
  opacity: 0.8;
  transition: opacity 0.15s;
}

.media-lightbox__close:hover { opacity: 1; }

.media-lightbox__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  background: none;
  border: none;
  color: #fff;
  font-size: 3rem;
  line-height: 1;
  cursor: pointer;
  opacity: 0.7;
  transition: opacity 0.15s;
  padding: 0 1rem;
  user-select: none;
}

.media-lightbox__prev { left: 1rem; }
.media-lightbox__next { right: 1rem; }

.media-lightbox__nav:hover { opacity: 1; }

.media-lightbox__download {
  position: absolute;
  bottom: 20px;
  right: 24px;
  z-index: 2;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  opacity: 0.7;
  transition: opacity 0.15s;
}

.media-lightbox__download img {
  display: block;
  width: 1.6rem;
  height: 1.6rem;
}

.media-lightbox__download:hover { opacity: 1; }

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 768px) {
  .hamburger span {
    background-color: var(--white);
  }

  .mobile-nav {
    background-color: #252120;
  }

  .mobile-nav__item.is-active {
    color: var(--white);
  }

  .media-lightbox__nav {
    width: 20vw;
    height: 70%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    font-size: 2.2rem;
    top: 50%;
    transform: translateY(-50%);
    color: transparent;
  }

  .media-lightbox__prev { left: 0; }
  .media-lightbox__next { right: 0; }
}

@media (max-width: 900px) {
  .media-grid {
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: 140px;
  }
}

@media (max-width: 600px) {
  .media-main { padding-top: 5rem; }
  .media-grid {
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: 120px;
    gap: 4px;
  }
}
