/* =====================================================================
   Le Collectif — Beeldbank
   Donker, clean, luxe. Satoshi + JetBrains Mono. Accent #1430ed.
   Design-tokens + componenten. Geen build nodig.
   ===================================================================== */

@import url('https://api.fontshare.com/v2/css?f[]=satoshi@400,500,700,900&display=swap');
@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;600&display=swap');

/* ---------- Tokens ---------- */
:root {
  /* Achtergronden — diep, koel bijna-zwart, licht naar het merkblauw getint */
  --bg:            #0a0b10;
  --bg-2:          #0d0f15;
  --surface:       #14161f;
  --surface-2:     #1a1d28;
  --surface-hover: #1f2330;

  /* Lijnen */
  --line:          rgba(255, 255, 255, 0.08);
  --line-soft:     rgba(255, 255, 255, 0.05);
  --line-strong:   rgba(255, 255, 255, 0.14);

  /* Tekst */
  --ink:           #f6f7f9;   /* koppen */
  --body:          #c8ccd6;   /* lopende tekst — contrast ~13:1 op --bg */
  --muted:         #8b909e;   /* secundair — labels, meta */
  --faint:         #5b606d;   /* tertiair */

  /* Accent — elektrisch blauw */
  --accent:        #1430ed;   /* fills, actieve staat */
  --accent-bright: #5c78ff;   /* tekst/links op donker (contrast-veilig) */
  --accent-glow:   rgba(20, 48, 237, 0.35);
  --accent-soft:   rgba(92, 120, 255, 0.12);

  /* Type */
  --font-sans: 'Satoshi', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'SFMono-Regular', monospace;

  /* Ruimte — royaal ademend */
  --space-1: 0.5rem;
  --space-2: 1rem;
  --space-3: 1.5rem;
  --space-4: 2.5rem;
  --space-5: 4rem;
  --space-6: 6.5rem;
  --space-7: 9rem;

  /* Radii — ingetogen */
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --r-pill: 999px;

  /* Motion */
  --ease: cubic-bezier(0.16, 1, 0.3, 1);        /* ease-out-expo achtig */
  --ease-soft: cubic-bezier(0.33, 1, 0.68, 1);
  --dur: 0.5s;

  /* Z-schaal */
  --z-header: 100;
  --z-overlay: 200;
  --z-lightbox: 300;
  --z-toast: 400;

  --wrap: 1360px;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* Zachte lichtgloed bovenin voor diepte, subtiel */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(1100px 600px at 78% -10%, rgba(20, 48, 237, 0.10), transparent 60%),
    radial-gradient(900px 500px at 12% -5%, rgba(92, 120, 255, 0.06), transparent 55%);
  pointer-events: none;
  z-index: 0;
}

img { max-width: 100%; display: block; }
button { font: inherit; color: inherit; cursor: pointer; background: none; border: none; }
a { color: inherit; text-decoration: none; }
input { font: inherit; }

::selection { background: var(--accent); color: #fff; }

/* ---------- Type ---------- */
h1, h2, h3 { color: var(--ink); font-weight: 700; line-height: 1.05; letter-spacing: -0.02em; text-wrap: balance; }

.display {
  font-size: clamp(2.6rem, 6vw, 5rem);
  font-weight: 900;
  letter-spacing: -0.03em;
}

.mono {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 500;
}

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--space-3); position: relative; z-index: 1; }

/* =====================================================================
   Header
   ===================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: var(--z-header);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(16px) saturate(140%);
  border-bottom: 1px solid var(--line-soft);
}
.site-header__inner {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: var(--space-2) var(--space-3);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
}
.brand { display: flex; align-items: center; gap: 0.7rem; }
.brand__logo { height: 26px; width: auto; }
.brand__name { font-weight: 700; color: var(--ink); letter-spacing: -0.01em; font-size: 1.02rem; }
.brand__name span { color: var(--muted); font-weight: 500; }

.header__link {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  transition: color 0.25s var(--ease);
}
.header__link:hover { color: var(--ink); }
.header__link { white-space: nowrap; }
@media (max-width: 560px) {
  .brand__name span { display: none; }
  .header__link { font-size: 0.62rem; }
  .site-header__inner { padding: var(--space-2); }
}

/* =====================================================================
   Hero
   ===================================================================== */
.hero { padding: var(--space-6) 0 var(--space-4); }
.hero__eyebrow { color: var(--accent-bright); margin-bottom: var(--space-2); }
.hero h1 { max-width: 16ch; margin-bottom: var(--space-3); }
.hero__lead {
  font-size: clamp(1.05rem, 1.6vw, 1.3rem);
  color: var(--body);
  max-width: 62ch;
  line-height: 1.6;
}
.hero__meta {
  margin-top: var(--space-4);
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  padding-top: var(--space-3);
  border-top: 1px solid var(--line-soft);
}
.hero__stat { display: flex; flex-direction: column; gap: 0.25rem; }
.hero__stat b { color: var(--ink); font-size: 1.5rem; font-weight: 700; letter-spacing: -0.02em; }
.hero__stat span { color: var(--faint); }

/* =====================================================================
   Filterbalk
   ===================================================================== */
.controls {
  position: sticky;
  top: 61px;
  z-index: calc(var(--z-header) - 1);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(14px);
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
  padding: var(--space-2) 0;
}
.controls__inner {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 var(--space-3);
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-wrap: wrap;
}

.search {
  position: relative;
  flex: 1 1 240px;
  min-width: 200px;
}
.search input {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  padding: 0.7rem 1rem 0.7rem 2.6rem;
  color: var(--ink);
  transition: border-color 0.25s var(--ease), background 0.25s var(--ease);
}
.search input::placeholder { color: var(--faint); }
.search input:focus { outline: none; border-color: var(--accent-bright); background: var(--surface-2); }
.search__icon { position: absolute; left: 0.95rem; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }

.filter-group { position: relative; }
.filter-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 0.95rem;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  background: var(--surface);
  color: var(--body);
  font-size: 0.85rem;
  transition: border-color 0.25s var(--ease), color 0.25s var(--ease), background 0.25s var(--ease);
  white-space: nowrap;
}
.filter-toggle:hover { border-color: var(--line-strong); color: var(--ink); }
.filter-toggle[aria-expanded="true"] { border-color: var(--accent-bright); color: var(--ink); background: var(--surface-2); }
.filter-toggle.is-active { border-color: var(--accent-bright); color: var(--ink); }
.filter-toggle .count {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  background: var(--accent);
  color: #fff;
  border-radius: var(--r-pill);
  min-width: 18px;
  height: 18px;
  display: inline-grid;
  place-items: center;
  padding: 0 5px;
}
.filter-toggle .count[hidden] { display: none; }
.filter-toggle .chev { transition: transform 0.3s var(--ease); color: var(--muted); }
.filter-toggle[aria-expanded="true"] .chev { transform: rotate(180deg); }

.filter-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 200px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 0.5rem;
  box-shadow: 0 24px 60px -20px rgba(0, 0, 0, 0.7);
  display: none;
  flex-direction: column;
  gap: 2px;
  z-index: var(--z-overlay);
}
.filter-menu.open { display: flex; animation: menuIn 0.25s var(--ease); }
@keyframes menuIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

.filter-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.55rem 0.7rem;
  border-radius: var(--r-sm);
  color: var(--body);
  font-size: 0.88rem;
  text-align: left;
  transition: background 0.2s var(--ease), color 0.2s var(--ease);
}
.filter-option:hover { background: var(--surface-hover); color: var(--ink); }
.filter-option .dot { width: 7px; height: 7px; border-radius: 50%; background: transparent; border: 1px solid var(--line-strong); transition: all 0.2s var(--ease); }
.filter-option.checked { color: var(--ink); }
.filter-option.checked .dot { background: var(--accent-bright); border-color: var(--accent-bright); box-shadow: 0 0 10px var(--accent-glow); }
.filter-option small { color: var(--faint); font-family: var(--font-mono); font-size: 0.68rem; }

.controls__clear {
  color: var(--muted);
  font-size: 0.8rem;
  padding: 0.5rem 0.4rem;
  transition: color 0.2s var(--ease);
  margin-left: auto;
}
.controls__clear:hover { color: var(--accent-bright); }
.controls__clear[hidden] { display: none; }

/* Actieve filter-chips onder de balk */
.active-chips {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 var(--space-3);
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.active-chips:not(:empty) { margin-top: var(--space-2); }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.4rem 0.35rem 0.8rem;
  background: var(--accent-soft);
  border: 1px solid rgba(92, 120, 255, 0.25);
  color: var(--ink);
  border-radius: var(--r-pill);
  font-size: 0.8rem;
}
.chip button { color: var(--muted); display: grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; transition: color 0.2s, background 0.2s; }
.chip button:hover { color: var(--ink); background: rgba(255, 255, 255, 0.1); }

/* =====================================================================
   Galerij — masonry via columns
   ===================================================================== */
.gallery-head {
  max-width: var(--wrap);
  margin: var(--space-4) auto var(--space-3);
  padding: 0 var(--space-3);
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-2);
}
.gallery-head .result-count { color: var(--muted); }
.gallery-head .result-count b { color: var(--ink); font-weight: 700; }

.gallery {
  max-width: var(--wrap);
  margin: 0 auto var(--space-6);
  padding: 0 var(--space-3);
  column-count: 4;
  column-gap: var(--space-2);
}
@media (max-width: 1100px) { .gallery { column-count: 3; } }
@media (max-width: 760px)  { .gallery { column-count: 2; } }
@media (max-width: 460px)  { .gallery { column-count: 1; } }

.tile {
  position: relative;
  break-inside: avoid;
  margin-bottom: var(--space-2);
  border-radius: var(--r-md);
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line-soft);
  cursor: zoom-in;
  /* start zichtbaar; reveal is enkel een enhancement via .in */
  transform: translateY(14px);
  opacity: 0;
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease), border-color 0.3s var(--ease);
}
.tile.in { transform: none; opacity: 1; }
.no-js .tile { opacity: 1; transform: none; }
.tile:hover { border-color: var(--line-strong); }
.tile img { width: 100%; height: auto; display: block; transition: transform 0.7s var(--ease); background: var(--surface-2); }
.tile:hover img { transform: scale(1.04); }

.tile__overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: var(--space-2);
  background: linear-gradient(to top, rgba(5, 6, 10, 0.85) 0%, rgba(5, 6, 10, 0.15) 45%, transparent 70%);
  opacity: 0;
  transition: opacity 0.4s var(--ease);
}
.tile:hover .tile__overlay, .tile:focus-within .tile__overlay { opacity: 1; }
.tile__title { color: #fff; font-weight: 600; font-size: 0.95rem; letter-spacing: -0.01em; line-height: 1.25; }
.tile__tags { display: flex; gap: 0.4rem; margin-top: 0.5rem; flex-wrap: wrap; }
.tag-model {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.18);
  padding: 0.2rem 0.5rem;
  border-radius: var(--r-pill);
  backdrop-filter: blur(4px);
}

/* Leeg-resultaat */
.empty {
  max-width: 40ch;
  margin: var(--space-6) auto;
  text-align: center;
  color: var(--muted);
}
.empty h3 { color: var(--ink); margin-bottom: 0.6rem; font-size: 1.3rem; }
.empty[hidden] { display: none; }

/* =====================================================================
   Lightbox
   ===================================================================== */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: var(--z-lightbox);
  background: rgba(5, 6, 10, 0.9);
  backdrop-filter: blur(10px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: var(--space-3);
}
.lightbox.open { display: flex; animation: fade 0.3s var(--ease); }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

.lb {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(300px, 0.9fr);
  gap: 0;
  width: 100%;
  max-width: 1120px;
  max-height: 88vh;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: 0 40px 120px -30px rgba(0, 0, 0, 0.8);
  animation: lbIn 0.4s var(--ease);
}
@keyframes lbIn { from { opacity: 0; transform: scale(0.97) translateY(8px); } to { opacity: 1; transform: none; } }

.lb__stage { background: var(--bg-2); display: grid; place-items: center; padding: var(--space-3); min-height: 0; }
.lb__stage img { max-width: 100%; max-height: 80vh; width: auto; height: auto; border-radius: var(--r-sm); object-fit: contain; }

.lb__panel { padding: var(--space-4); display: flex; flex-direction: column; overflow-y: auto; border-left: 1px solid var(--line-soft); }
.lb__title { color: var(--ink); font-size: 1.5rem; font-weight: 700; letter-spacing: -0.02em; line-height: 1.1; margin-bottom: var(--space-2); }
.lb__meta { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: var(--space-3); }
.meta-pill {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--body);
  background: var(--surface-2);
  border: 1px solid var(--line);
  padding: 0.3rem 0.6rem;
  border-radius: var(--r-pill);
}
.meta-pill.model { color: var(--accent-bright); border-color: rgba(92, 120, 255, 0.3); }

.lb__promptlabel { display: flex; align-items: center; justify-content: space-between; margin-bottom: 0.5rem; }
.lb__prompt {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  line-height: 1.65;
  color: var(--body);
  background: var(--bg-2);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-sm);
  padding: var(--space-2);
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 220px;
  overflow-y: auto;
}
.copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  transition: color 0.2s var(--ease);
}
.copy-btn:hover { color: var(--accent-bright); }
.copy-btn.done { color: #34d399; }

.lb__actions { margin-top: auto; padding-top: var(--space-3); display: flex; gap: 0.6rem; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.8rem 1.2rem;
  border-radius: var(--r-sm);
  font-weight: 600;
  font-size: 0.9rem;
  transition: transform 0.2s var(--ease), background 0.2s var(--ease), border-color 0.2s var(--ease);
}
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--accent); color: #fff; box-shadow: 0 8px 24px -8px var(--accent-glow); flex: 1; }
.btn--primary:hover { background: #1b39ff; }
.btn--ghost { border: 1px solid var(--line); color: var(--body); }
.btn--ghost:hover { border-color: var(--line-strong); color: var(--ink); }

.lb__close {
  position: absolute;
  top: var(--space-3);
  right: var(--space-3);
  width: 42px; height: 42px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--body);
  display: grid;
  place-items: center;
  transition: all 0.2s var(--ease);
  z-index: 2;
}
.lb__close:hover { color: var(--ink); border-color: var(--line-strong); transform: rotate(90deg); }

@media (max-width: 820px) {
  .lb { grid-template-columns: 1fr; max-height: 92vh; }
  .lb__stage { padding: var(--space-2); }
  .lb__stage img { max-height: 45vh; }
  .lb__panel { border-left: none; border-top: 1px solid var(--line-soft); padding: var(--space-3); }
}

/* =====================================================================
   Mail-modal
   ===================================================================== */
.modal { position: fixed; inset: 0; z-index: var(--z-lightbox); background: rgba(5,6,10,0.88); backdrop-filter: blur(10px); display: none; align-items: center; justify-content: center; padding: var(--space-3); }
.modal.open { display: flex; animation: fade 0.3s var(--ease); }
.modal__card {
  width: 100%; max-width: 440px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: var(--space-4);
  animation: lbIn 0.4s var(--ease);
}
.modal__card h3 { font-size: 1.5rem; margin-bottom: 0.6rem; }
.modal__card p { color: var(--body); margin-bottom: var(--space-3); }
.field { display: flex; flex-direction: column; gap: 0.5rem; margin-bottom: var(--space-2); }
.field label { font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.field input {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: 0.85rem 1rem;
  color: var(--ink);
  transition: border-color 0.25s var(--ease);
}
.field input:focus { outline: none; border-color: var(--accent-bright); }
.modal__note { color: var(--faint); font-size: 0.78rem; margin-top: var(--space-2); }
.modal__note a { color: var(--accent-bright); }

/* =====================================================================
   Footer
   ===================================================================== */
.site-footer { border-top: 1px solid var(--line-soft); padding: var(--space-5) 0 var(--space-4); }
.site-footer__inner {
  max-width: var(--wrap); margin: 0 auto; padding: 0 var(--space-3);
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-3);
}
.site-footer p { color: var(--muted); font-size: 0.9rem; }
.site-footer a { color: var(--accent-bright); }
.site-footer .mono { color: var(--faint); }

/* =====================================================================
   Toast
   ===================================================================== */
.toast {
  position: fixed;
  bottom: var(--space-3);
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--surface-2);
  border: 1px solid var(--line);
  color: var(--ink);
  padding: 0.8rem 1.3rem;
  border-radius: var(--r-pill);
  font-size: 0.88rem;
  box-shadow: 0 20px 50px -15px rgba(0,0,0,0.7);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s var(--ease), transform 0.3s var(--ease);
  z-index: var(--z-toast);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* =====================================================================
   Reduced motion
   ===================================================================== */
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
  .tile { opacity: 1; transform: none; }
  .tile:hover img { transform: none; }
}
