/* Portfolio-overzicht (archive-project.php) */
.tpl-portfolio {
  /* onderaan --diag ruimte: de footer schuift eroverheen */
  padding: 120px var(--gutter) calc(var(--diag) + 114px);

  .label { font-size: 0.75rem; letter-spacing: 0.16em; color: var(--mute); margin-bottom: 24px; }
  h1 { font-size: clamp(44px, 10.28vw, 148px); margin-bottom: 24px; }
  .intro { font-size: 1.25rem; max-width: 440px; color: var(--mute); margin-bottom: 76px; }

  .filter { display: flex; flex-wrap: wrap; gap: 12px; padding-bottom: 40px; border-bottom: 1px solid var(--line); }
  .filter a { display: flex; gap: 12px; align-items: center; padding: 13px 21px; border: 1px solid rgb(242 240 234 / 0.3); text-decoration: none; }
  .filter a:hover { border-color: var(--paper); }
  .swatch { width: 10px; height: 10px; background: var(--accent); }
  .count { color: var(--mute); margin-left: 12px; }
  .filter a[aria-current='true'] { background: var(--accent, var(--paper)); border-color: var(--accent, var(--paper)); color: var(--ink); font-weight: 500; }
  [aria-current='true'] .swatch { display: none; }
  [aria-current='true'] .count { color: inherit; }

  .grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 56px 24px; margin-top: 72px; }

  .tile { display: block; container-type: inline-size; text-decoration: none; }
  .photo { display: block; position: relative; aspect-ratio: 421 / 420; clip-path: polygon(0 21.26cqw, 100% 0, 100% 100%, 0 100%); transition: clip-path 0.45s var(--ease); }
  .photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: var(--coal); transition: scale 0.9s var(--ease); }
  .cta { position: absolute; z-index: 1; left: 24px; bottom: 24px; padding: 10px 14px; background: var(--ink); color: var(--paper); font-size: 0.75rem; font-weight: 500; opacity: 0; transition: opacity var(--t) var(--ease); }
  .caption { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding-top: 18px; }
  .title { font-size: 1.375rem; line-height: 1; transition: color var(--t-fast) var(--ease); }
  .branche { flex: none; font-size: 0.6875rem; letter-spacing: 0.14em; color: var(--accent); }

  .tile:is(:hover, :focus-visible) .photo { clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%); }
  .tile:is(:hover, :focus-visible) .photo img { scale: 1.04; }
  .tile:is(:hover, :focus-visible) .cta { opacity: 1; }
  .tile:is(:hover, :focus-visible) .title { color: var(--accent); }

  .empty { margin-top: 72px; font-size: 1.25rem; color: var(--mute); }
  .empty .link { margin-left: 12px; color: var(--paper); }

  @media (max-width: 767px) {
    padding: 48px var(--gutter) calc(var(--diag) + 97px);
    .label { font-size: 0.6875rem; margin-bottom: 16px; }
    h1 { margin-bottom: 16px; }
    .intro { font-size: 1rem; line-height: 1.55; margin-bottom: 28px; }
    .filter { gap: 8px; padding-bottom: 28px; }
    .filter a { gap: 8px; padding: 9px 13px; font-size: 0.6875rem; }
    .swatch { width: 8px; height: 8px; }
    .grid { grid-template-columns: 1fr; gap: 40px; margin-top: 40px; }
    .photo { aspect-ratio: 350 / 300; }
    .caption { gap: 12px; padding-top: 14px; }
    .title { font-size: 1.125rem; line-height: 1.05; }
    .branche { font-size: 0.625rem; }
    .empty { margin-top: 40px; font-size: 1rem; }
  }
  @media (prefers-reduced-motion: reduce) {
    .photo, .photo img, .cta, .title { transition: none; }
  }
}
