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

:root {
  --black: #1a1814;
  --white: #f0ede6;
  --orange: #ff5400;
  --gray: #8a8478;
  --light: #e8e4dc;
  --border: 1px solid #c0bbaf;
  --border-strong: 1px solid #1a1814;
  --font: Arial, Helvetica, sans-serif;
  --mono: ui-monospace, 'Courier New', Courier, monospace;
  --sp: 28px;
  --sp-sm: 4px;
}

body {
  font-family: var(--font);
  background: var(--white);
  color: var(--black);
  font-size: 14px;
  line-height: 1.5;
}

a {
  color: inherit;
  text-decoration: none;
}

/* ── Header ── */

header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 28px 56px 22px;
  border-bottom: var(--border);
  position: sticky;
  top: 0;
  background: var(--white);
  z-index: 10;
}

.site-naam {
  font-size: 22px;
  font-weight: normal;
  letter-spacing: 0.04em;
}

.site-subtitle {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--gray);
}

/* ── Filter (in header) ── */

.header-left {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
}

.filter-bar {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  align-self: flex-end;
  gap: 6px;
  position: relative;
}

.filter-controls {
  display: flex;
  align-items: center;
  gap: 20px;
}

.sort-controls {
  display: flex;
  align-items: center;
  gap: 12px;
}

.sort-btn {
  font-family: var(--mono);
  font-size: 10px;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  color: #c0bbaf;
  letter-spacing: 0.04em;
}

.sort-btn.active {
  color: var(--orange);
}

.sort-btn:hover {
  color: var(--gray);
}

.filter-toggle {
  font-family: var(--mono);
  font-size: 10px;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  color: #c0bbaf;
  letter-spacing: 0.04em;
}

.filter-toggle:hover,
.filter-toggle.filter-active {
  color: var(--orange);
}

.tag-bar {
  display: none;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 12px 56px;
  border-bottom: var(--border);
  background: var(--white);
}

.tag-sep {
  display: block;
  width: 1px;
  height: 12px;
  background: #d8d2c8;
  margin: 0 4px;
}

.tag-available {
  color: #b03030 !important;
  border-color: #b03030 !important;
}

.tag-btn {
  font-family: var(--mono);
  font-size: 10px;
  background: none;
  border: 1px solid #d8d2c8;
  padding: 1px 7px;
  cursor: pointer;
  color: var(--gray);
  letter-spacing: 0.04em;
}

.tag-btn.active {
  border-color: var(--orange);
  color: var(--orange);
}

.tag-btn:hover {
  border-color: var(--gray);
  color: var(--black);
}

/* ── Grid ── */

.grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  border-left: var(--border);
  border-top: var(--border);
  margin: 0 56px;
}

@media (max-width: 1200px) {
  .grid { grid-template-columns: repeat(4, 1fr); }
}

@media (max-width: 1024px) {
  .grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 860px) {
  .grid { grid-template-columns: repeat(3, 1fr); margin: 0 32px; }
}

@media (max-width: 560px) {
  .grid { grid-template-columns: repeat(3, 1fr); margin: 0 20px; }
}

/* ── Card ── */

.card {
  border-right: var(--border);
  border-bottom: var(--border);
}

.card > a {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.card-image {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--light);
  flex-shrink: 0;
}

.card-image img,
.card-image video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.card-image img,
.card-image video {
  filter: grayscale(100%);
  transition: filter 0.15s ease;
  will-change: filter;
}

.card:hover .card-image img,
.card:hover .card-image video {
  filter: grayscale(0%);
}

.card-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 14px;
  font-family: var(--mono);
  font-size: 10px;
  color: #a09890;
  line-height: 2;
}

.card-meta {
  padding: 14px 18px 20px;
  flex: 1;
  border-top: var(--border);
}

.card-nummer {
  display: block;
  font-family: var(--mono);
  font-size: 10px;
  color: var(--gray);
  margin-bottom: 4px;
}

.card-titel {
  font-size: 13px;
  font-weight: normal;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.card:hover .card-titel {
  text-decoration: underline;
}

.card:hover .card-nummer {
  color: var(--orange);
}

.card-info {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--gray);
  line-height: 1.9;
}

.beschikbaar-badge {
  display: inline-block;
  font-family: var(--mono);
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border: 1px solid var(--orange);
  color: var(--orange);
  padding: 1px 6px;
  margin-top: 10px;
}

.card-beschikbaar {
  display: block;
  font-family: var(--mono);
  font-size: 9px;
  color: #b03030;
  margin-top: 5px;
  letter-spacing: 0.04em;
}

/* ── Project detail ── */

.breadcrumb {
  padding: 10px 56px;
  font-family: var(--mono);
  font-size: 10px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  border-bottom: var(--border);
}

.bc-identity {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}

.bc-naam {
  font-family: var(--font);
  font-size: 13px;
  font-weight: bold;
  color: var(--black);
}

.bc-sub {
  font-family: var(--mono);
  font-size: 9px;
  color: var(--gray);
}

.bc-prev {
  text-align: left;
}

.bc-next {
  text-align: right;
}

.bc-prev a,
.bc-next a {
  color: var(--gray);
  text-decoration: none;
  font-family: var(--mono);
  font-size: 10px;
}

.bc-prev a:hover,
.bc-next a:hover {
  color: var(--black);
}

/* Project page: no scroll */
body.project-page {
  height: 100vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

body.project-page footer {
  display: none;
}

body.project-page main {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.project-nummer {
  display: block;
  font-family: var(--mono);
  font-size: 10px;
  color: var(--gray);
  margin-bottom: var(--sp-sm);
}

.project-titel {
  font-size: 24px;
  font-weight: normal;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 20px;
}

.project-layout {
  display: grid;
  grid-template-columns: 1.618fr 1fr;
  gap: 56px;
  padding: 44px 56px 0;
  flex: 1;
  overflow: hidden;
  min-height: 0;
}

.project-footer-bar {
  height: 44px;
  flex-shrink: 0;
}

@media (max-width: 800px) {
  .project-layout {
    grid-template-columns: 1fr;
    gap: 32px;
    padding: var(--sp) 28px 0;
    overflow-y: auto;
  }
}

.main-media {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center top;
  display: block;
  cursor: pointer;
}

.img-indicators {
  display: flex;
  gap: 8px;
  margin-top: 14px;
  margin-bottom: var(--sp);
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.img-ind {
  font-family: var(--mono);
  font-size: 10px;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  color: var(--gray);
  letter-spacing: 0.04em;
}

.img-ind.active {
  color: var(--black);
}

.img-ind:hover {
  color: var(--gray);
}

.img-arrow {
  font-family: var(--mono);
  font-size: 11px;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  color: #c0bbaf;
}

.img-arrow:hover {
  color: var(--black);
}

.project-materiaal {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--black);
  margin-bottom: 20px;
}

.project-images {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.img-wrapper {
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.project-info {
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  padding-bottom: 58px;
}

.project-tekst {
  font-size: 14px;
  line-height: 1.85;
  color: var(--black);
  margin-bottom: 28px;
  flex: 1;
}

.project-tekst p + p {
  margin-top: 1em;
}

.project-specs {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--mono);
  font-size: 10px;
  margin-top: 16px;
  opacity: 0.6;
  flex-shrink: 0;
}

.project-specs th,
.project-specs td {
  padding: 4px 0;
  text-align: left;
  vertical-align: top;
}

.project-specs th {
  font-weight: normal;
  color: var(--gray);
  width: 70px;
}

.available-link {
  display: inline-block;
  margin-top: 8px;
  margin-bottom: 20px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--orange);
  text-decoration: none;
}

.av-hover {
  display: none;
}

.available-link:hover .av-default {
  display: none;
}

.available-link:hover .av-hover {
  display: inline;
}

/* ── Lightbox ── */

.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  gap: 24px;
}

.lightbox.active {
  display: flex;
}

.lb-media img,
.lb-media video {
  max-width: 80vw;
  max-height: 88vh;
  object-fit: contain;
  display: block;
}

.lb-btn {
  font-family: var(--mono);
  font-size: 20px;
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.4);
  cursor: pointer;
  padding: 12px;
  flex-shrink: 0;
}

.lb-btn:hover {
  color: #fff;
}

.lb-btn[style*="hidden"] {
  pointer-events: none;
}

/* ── Footer ── */

footer {
  padding: 20px 20px 16px;
  display: flex;
  justify-content: flex-end;
  font-family: var(--mono);
  font-size: 10px;
  color: #b0a898;
}

footer span {
  display: none;
}

footer a {
  color: #b0a898;
}

footer a:hover {
  color: var(--orange);
}

/* ── Dots animatie ── */

.dots span {
  opacity: 0;
  animation: dot-verschijn 2s infinite;
}

.dots span:nth-child(1) { animation-delay: 0.4s; }
.dots span:nth-child(2) { animation-delay: 0.9s; }
.dots span:nth-child(3) { animation-delay: 1.4s; }

@keyframes dot-verschijn {
  0%, 10%   { opacity: 0; }
  25%, 75%  { opacity: 1; }
  90%, 100% { opacity: 0; }
}

/* ── Landingspagina ── */

.landing {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 100vh;
  padding: 28px 56px;
}

.landing-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  flex: 1;
}

.landing-naam {
  display: block;
  font-size: 48px;
  font-weight: normal;
  letter-spacing: 0.02em;
  margin-bottom: 10px;
  text-decoration: none;
  color: var(--black);
}

.naam-hover {
  display: none;
}

.landing-naam:hover .naam-tekst {
  display: none;
}

.landing-naam:hover .naam-hover {
  display: inline;
  color: var(--orange);
}

.landing-subtitle {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--gray);
}

/* ── Ideeën ── */

.password-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 50vh;
  gap: 12px;
}

.pw-input {
  font-family: var(--mono);
  font-size: 13px;
  border: var(--border);
  padding: 8px 12px;
  width: 220px;
  outline: none;
  background: var(--white);
}

.pw-btn {
  font-family: var(--mono);
  font-size: 12px;
  background: var(--orange);
  color: var(--white);
  border: none;
  padding: 8px 20px;
  cursor: pointer;
}

.pw-error {
  font-family: var(--mono);
  font-size: 10px;
  color: #c00;
  display: none;
}

.ideeen-header {
  padding: 16px 20px;
  border-bottom: var(--border);
}

.ideeen-titel {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: normal;
  color: var(--gray);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.ideeen-list {
  list-style: none;
  border-left: var(--border);
  border-top: var(--border);
  margin: 0;
  padding: 0;
}

.idee-item {
  border-right: var(--border);
  border-bottom: var(--border);
  padding: 16px 20px;
}

.idee-nummer {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--gray);
  display: block;
  margin-bottom: 2px;
}

.idee-titel {
  font-size: 13px;
  font-weight: normal;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.idee-info {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--gray);
  margin-bottom: 8px;
}

.idee-tekst {
  font-size: 13px;
  line-height: 1.7;
  color: var(--black);
}

/* ── Mobiel ── */

@media (max-width: 640px) {

  /* Header */
  header {
    padding: 16px 20px 14px;
  }

  .site-naam {
    font-size: 16px;
  }

  /* Landing */
  .landing {
    padding: 20px 20px;
  }

  .landing-naam {
    font-size: 28px;
  }

  /* Archive */
  .grid {
    grid-template-columns: repeat(3, 1fr);
    margin: 0 16px;
  }

  .tag-bar {
    padding: 10px 20px;
  }

  /* Project page: scrollable on mobile */
  body.project-page {
    height: auto;
    overflow: auto;
  }

  body.project-page main {
    flex: unset;
    overflow: visible;
    display: block;
  }

  .breadcrumb {
    padding: 12px 20px;
    position: sticky;
    top: 0;
    background: var(--white);
    z-index: 10;
  }

  .bc-naam {
    font-size: 11px;
  }

  .project-layout {
    grid-template-columns: 1fr;
    padding: 24px 20px 0;
    overflow: visible;
    flex: unset;
    min-height: unset;
    gap: 24px;
  }

  .project-images {
    overflow: visible;
    display: block;
  }

  .img-wrapper {
    flex: unset;
    aspect-ratio: 4 / 3;
    overflow: hidden;
  }

  .main-media {
    height: 100%;
    max-height: none;
    width: 100%;
    object-fit: contain;
    object-position: center center;
  }

  .project-info {
    overflow: visible;
    padding-bottom: 40px;
  }

  .project-footer-bar {
    display: none;
  }

  body.project-page footer {
    display: block;
    padding: 12px 20px;
    border-top: var(--border);
  }

  /* Lightbox op mobiel */
  .lb-media img,
  .lb-media video {
    max-width: 95vw;
    max-height: 80vh;
  }

  .lb-btn {
    padding: 8px;
  }
}
