/* ─── Werken page header ─────────────────────────────────────────────── */
.werken-hero {
  min-height: 50svh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: calc(var(--nav-h) + 4rem) var(--container-pad) clamp(3rem, 5vw, 5rem);
  border-bottom: 1px solid var(--color-border);
  position: relative;
  overflow: hidden;
}

.werken-hero__bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 50% 60% at 80% 20%, rgba(125, 195, 27, 0.03) 0%, transparent 60%),
    var(--color-bg);
}

.werken-hero__content {
  position: relative;
  z-index: 1;
  max-width: 800px;
}

.werken-hero__title {
  font-family: var(--font-display);
  font-size: clamp(3rem, 7.5vw, 6rem);  /* impeccable: max ~6rem */
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 1.0;
  color: var(--color-text);
  margin-bottom: 1.5rem;
}

.werken-hero__sub {
  font-size: clamp(0.9rem, 1.5vw, 1.1rem);
  color: var(--color-text-muted);
  max-width: 480px;
  line-height: 1.6;
}

.werken-hero__count {
  position: absolute;
  bottom: clamp(3rem, 5vw, 5rem);
  right: var(--container-pad);
  font-family: var(--font-display);
  font-size: clamp(3rem, 8vw, 7rem);
  font-weight: 300;
  color: var(--color-text-dim);
  letter-spacing: -0.03em;
  line-height: 1;
  z-index: 1;
}

/* ─── Gallery grid ──────────────────────────────────────────────────── */
.gallery-section {
  padding: clamp(2rem, 4vw, 4rem) var(--container-pad);
}

.gallery-grid {
  columns: 3;
  column-gap: 6px;
}

.gallery-item {
  break-inside: avoid;
  margin-bottom: 6px;
  overflow: hidden;
  position: relative;
  cursor: pointer;
  opacity: 0;
  transform: translateY(20px);
}

.gallery-item img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.7s var(--ease-expo);
}

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

.gallery-item__caption {
  position: absolute;
  inset: 0;
  background: rgba(10, 10, 10, 0.65);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1.25rem;
  opacity: 0;
  transition: opacity 0.4s var(--ease-expo);
  backdrop-filter: blur(2px);
}

.gallery-item:hover .gallery-item__caption {
  opacity: 1;
}

.gallery-item__tag {
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  color: var(--color-accent);
  text-transform: uppercase;
  margin-bottom: 0.25rem;
}

.gallery-item__label {
  font-family: var(--font-display);
  font-size: clamp(0.9rem, 1.5vw, 1.1rem);
  font-weight: 300;
  color: var(--color-text);
  line-height: 1.2;
}

/* Large images (portrait) get a different treatment */
.gallery-item--tall {
  break-inside: avoid;
}

/* ─── Lightbox ──────────────────────────────────────────────────────── */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(5, 5, 5, 0.97);
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s var(--ease-expo);
  backdrop-filter: blur(8px);
}

.lightbox.is-open {
  opacity: 1;
  pointer-events: all;
}

.lightbox__img-wrap {
  max-width: 90vw;
  max-height: 90vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox__img {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
  display: block;
  transition: opacity 0.3s ease;
}

.lightbox__close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: 1px solid var(--color-border);
  color: var(--color-text-muted);
  font-size: 1.2rem;
  cursor: pointer;
  transition: border-color 0.3s ease, color 0.3s ease;
}

.lightbox__close:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
}

.lightbox__prev,
.lightbox__next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(10, 10, 10, 0.6);
  border: 1px solid var(--color-border);
  color: var(--color-text);
  font-size: 1.4rem;
  cursor: pointer;
  transition: border-color 0.3s ease, background 0.3s ease;
}

.lightbox__prev { left: 1.5rem; }
.lightbox__next { right: 1.5rem; }

.lightbox__prev:hover,
.lightbox__next:hover {
  border-color: var(--color-accent);
  background: rgba(125, 195, 27, 0.08);
}

.lightbox__counter {
  position: absolute;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  color: var(--color-text-muted);
}

/* ─── Werken footer CTA ─────────────────────────────────────────────── */
.werken-cta {
  border-top: 1px solid var(--color-border);
  padding: clamp(4rem, 8vw, 8rem) var(--container-pad);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
}

.werken-cta__text {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3.5vw, 3rem);
  font-weight: 300;
  letter-spacing: -0.02em;
  color: var(--color-text);
}

.werken-cta__text em {
  font-style: italic;
  color: var(--color-accent);
}

.werken-cta__link {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--color-text);
  border: 1px solid var(--color-border);
  padding: 0.9rem 1.75rem;
  transition: border-color 0.3s ease, background 0.3s ease;
  white-space: nowrap;
}

.werken-cta__link:hover {
  border-color: var(--color-accent);
  background: var(--color-accent-glow);
  color: var(--color-accent);
}

/* ─── Responsive ────────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .gallery-grid {
    columns: 2;
  }

  .werken-cta {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 520px) {
  .gallery-grid {
    columns: 1;
  }

  .lightbox__prev { left: 0.75rem; }
  .lightbox__next { right: 0.75rem; }
}
