/* Jelle Creëert — werk detail pagina & lightbox */

/* ── Back link ───────────────────────────────────────────────── */
.werk-back {
  padding: 20px 28px;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--teal);
  text-decoration: none;
  transition: gap 0.15s;
}

.back-link:hover {
  gap: 11px;
  color: var(--teal-dark);
}

.back-link svg {
  flex-shrink: 0;
  transition: transform 0.15s;
}

.back-link:hover svg {
  transform: translateX(-3px);
}

/* ── Hero ────────────────────────────────────────────────────── */
.werk-hero {
  display: none;
}

/* ── Meta block ──────────────────────────────────────────────── */
.werk-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px 64px;
  padding: 56px 28px 64px;
}

.werk-meta-inner {
  display: flex;
  flex-direction: column;
}

.werk-meta-inner h1 {
  margin: 10px 0 28px;
}

.werk-specs {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 5px 20px;
  font-size: 0.84rem;
}

.werk-specs dt {
  font-weight: 500;
  color: var(--ink);
  white-space: nowrap;
}

.werk-specs dd {
  font-weight: 300;
  color: var(--ink-soft);
}

.werk-description {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.werk-description p {
  font-size: 0.95rem;
  font-weight: 300;
  line-height: 1.85;
  color: var(--ink-soft);
  max-width: 500px;
}

/* ── Process grid ────────────────────────────────────────────── */
.werk-process {
  padding: 64px 0 80px;
}

.werk-process .container {
  display: none;
}

.werk-process-grid {
  display: grid;
  /* fluid columns: min 260px, as many as fit */
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 3px;
  padding: 0 3px;
}

.process-tile {
  aspect-ratio: 4/3;
  overflow: hidden;
  background: var(--off-white);
  cursor: zoom-in;
  position: relative;
}

.process-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
  display: block;
}

.process-tile::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(10, 30, 24, 0);
  transition: background 0.25s;
  pointer-events: none;
}

.process-tile:hover img {
  transform: scale(1.04);
}

.process-tile:hover::after {
  background: rgba(10, 30, 24, 0.12);
}

/* zoom icon on hover */
.process-tile::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.7);
  width: 40px;
  height: 40px;
  background: rgba(255,255,255,0.9) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%231e736a' stroke-width='1.5' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m21 21-4.35-4.35'/%3E%3Cpath d='M11 8v6M8 11h6'/%3E%3C/svg%3E") center/20px no-repeat;
  border-radius: 50%;
  opacity: 0;
  transition: opacity 0.2s, transform 0.2s;
  z-index: 1;
  pointer-events: none;
}

.process-tile:hover::before {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

/* ── Lightbox ────────────────────────────────────────────────── */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(10, 20, 16, 0.96);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: lbFadeIn 0.2s ease both;
}

.lightbox[hidden] {
  display: none;
}

@keyframes lbFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.lightbox-img-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 72px 80px;
  min-width: 0;
  min-height: 0;
  height: 100%;
}

.lightbox-img-wrap img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 1px;
  animation: lbImgIn 0.18s ease both;
}

@keyframes lbImgIn {
  from { opacity: 0; transform: scale(0.97); }
  to   { opacity: 1; transform: scale(1); }
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
  position: fixed;
  background: none;
  border: none;
  color: rgba(255,255,255,0.65);
  cursor: pointer;
  padding: 12px;
  transition: color 0.15s, background 0.15s;
  border-radius: 2px;
  line-height: 0;
}

.lightbox-close {
  top: 20px;
  right: 20px;
}

.lightbox-prev {
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
}

.lightbox-next {
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
}

.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
  color: #fff;
  background: rgba(255,255,255,0.1);
}

.lightbox-counter {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.2em;
  color: rgba(255,255,255,0.35);
}

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 760px) {
  .werk-meta {
    grid-template-columns: 1fr;
    gap: 32px;
    padding: 40px 28px 48px;
  }

  .werk-process-grid {
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  }

  .lightbox-img-wrap {
    padding: 56px 56px;
  }
}

@media (max-width: 480px) {
  .werk-process-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .lightbox-img-wrap {
    padding: 64px 16px;
  }
}
