/* ── Page base: white content, dark header ── */
body {
  background: #ffffff;
  color: #111111;
}

.logo-wrap,
.site-header {
  background: var(--color-bg);
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   PAGE HEADER
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.gallery-header {
  padding-top: var(--space-3xl);
  padding-bottom: var(--space-xl);
}

.gallery-title {
  font-size: clamp(2.5rem, 6vw, 4rem);
  color: #111;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   ILLUSTRATION GRID
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.gallery {
  padding-bottom: var(--space-3xl);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-md);
}

.gallery-item {
  cursor: pointer;
  border-radius: var(--radius-md);
  overflow: hidden;
  position: relative;
  aspect-ratio: 1 / 1;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform var(--transition-slow), filter var(--transition-slow);
}

.gallery-item:hover img {
  transform: scale(1.03);
  filter: brightness(1.08);
}

/* Empty state */
.gallery-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: var(--space-3xl) 0;
  color: #777;
  font-size: 1rem;
}

/* ── Responsive ── */
@media (max-width: 1023px) { .gallery { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 639px)  { .gallery { grid-template-columns: 1fr; } }

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   LIGHTBOX
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox[hidden] { display: none; }

.lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.88);
  animation: backdrop-in 200ms ease-out both;
}

@keyframes backdrop-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.lightbox.closing .lightbox-backdrop {
  animation: backdrop-out 250ms ease-in both;
}

@keyframes backdrop-out {
  from { opacity: 1; }
  to   { opacity: 0; }
}

/* Image frame */
.lightbox-frame {
  position: relative;
  z-index: 1;
  max-width: 90vw;
  max-height: 90vh;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: img-in 300ms ease-out both;
}

@keyframes img-in {
  from { opacity: 0; transform: scale(0.90); }
  to   { opacity: 1; transform: scale(1); }
}

@keyframes img-out {
  from { opacity: 1; transform: scale(1); }
  to   { opacity: 0; transform: scale(0.85); }
}

.lightbox.closing .lightbox-frame {
  animation: img-out 250ms ease-in both;
}

.lightbox-img {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
  border-radius: var(--radius-sm);
  box-shadow: 0 20px 80px rgba(0, 0, 0, 0.8);
}

/* Close button */
.lightbox-close {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  z-index: 2;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition-fast);
}

.lightbox-close:hover { background: rgba(255, 255, 255, 0.25); }

/* Prev / Next buttons */
.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  font-size: 2rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition-fast);
}

.lightbox-nav:hover   { background: rgba(255, 255, 255, 0.2); }
.lightbox-nav--prev   { left: 1.25rem; }
.lightbox-nav--next   { right: 1.25rem; }
