@font-face {
  font-family: "Montserrat";
  src: url("/fonts/montserrat-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --tekst: #1b1b1b;
  --zacht: #6b6862;
  --lijn: #e7e4de;
  --vlak: #f6f4f0;
  --accent: #8c8370;
  --rand: clamp(16px, 4vw, 48px);
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: #fff;
  color: var(--tekst);
  font: 400 15px/1.7 "Montserrat", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.kop { display: flex; justify-content: center; padding: 28px var(--rand) 0; }
.logo img { width: 44px; height: 44px; transition: transform .3s ease; }
.logo:hover img { transform: rotate(-12deg); }

h1 {
  margin: 18px 0 0;
  text-align: center;
  font-weight: 600;
  font-size: clamp(20px, 2.4vw, 26px);
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--accent);
}

/* Homepage */
.intro {
  max-width: 34em;
  margin: 18px auto 0;
  padding: 0 var(--rand);
  text-align: center;
  color: var(--zacht);
}
.intro p { margin: 0 0 .8em; }
.intro a { color: var(--tekst); text-underline-offset: 3px; text-decoration-color: var(--accent); }

.tegels {
  list-style: none;
  margin: clamp(32px, 5vw, 56px) auto 0;
  padding: 0 var(--rand);
  max-width: 1400px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(14px, 2vw, 28px);
}
.tegels a { display: block; text-decoration: none; }
.tegels img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  background: var(--vlak);
  transition: opacity .4s ease, transform .6s cubic-bezier(.2, .7, .2, 1);
}
.tegels a:hover img { opacity: .88; transform: scale(1.012); }
.tegels span {
  display: block;
  margin-top: 10px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .16em;
  text-transform: uppercase;
}
@media (max-width: 899px) { .tegels { grid-template-columns: repeat(2, 1fr); } }

/* Projectpagina */
.galerij {
  max-width: 1400px;
  margin: clamp(28px, 4vw, 48px) auto 0;
  padding: 0 var(--rand);
  columns: 2;
  column-gap: clamp(12px, 1.6vw, 22px);
}
.galerij .foto {
  display: block;
  margin-bottom: clamp(12px, 1.6vw, 22px);
  break-inside: avoid;
  cursor: zoom-in;
  background: var(--vlak);
}
@media (max-width: 559px) { .galerij { columns: 1; } }

.bladeren {
  max-width: 1400px;
  margin: 48px auto 0;
  padding: 24px var(--rand) 0;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  border-top: 1px solid var(--lijn);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.bladeren a { text-decoration: none; padding: 8px 0; }
.bladeren a:hover { color: var(--accent); }
.bladeren small { display: block; font-size: 11px; color: var(--zacht); letter-spacing: .1em; }
.bladeren [rel="next"] { text-align: right; }
.bladeren .alle { color: var(--zacht); }
@media (max-width: 559px) {
  .bladeren { grid-template-columns: 1fr 1fr; }
  .bladeren .alle { grid-column: 1 / -1; grid-row: 2; text-align: center; }
}

/* Lichtbak */
.lichtbak {
  border: 0;
  padding: 0;
  margin: 0;
  width: 100vw;
  height: 100dvh;
  max-width: none;
  max-height: none;
  background: #fff;
}
.lichtbak::backdrop { background: #fff; }
.lichtbak[open] { display: grid; place-items: center; animation: in .2s ease; }
@keyframes in { from { opacity: 0; } }
.lichtbak img {
  max-width: calc(100vw - 2 * var(--rand));
  max-height: calc(100dvh - 120px);
  width: auto;
  height: auto;
  object-fit: contain;
}
.lichtbak button {
  position: absolute;
  border: 0;
  background: none;
  color: var(--tekst);
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  cursor: pointer;
  border-radius: 50%;
}
.lichtbak button:hover { background: var(--vlak); }
.lichtbak button svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.5; }
.lichtbak .sluit { top: 12px; right: 12px; }
.lichtbak .vorige { left: 8px; top: 50%; translate: 0 -50%; }
.lichtbak .volgende { right: 8px; top: 50%; translate: 0 -50%; }
.lichtbak .teller { position: absolute; bottom: 20px; left: 0; right: 0; text-align: center; font-size: 12px; letter-spacing: .12em; color: var(--zacht); }
@media (max-width: 559px) { .lichtbak .vorige, .lichtbak .volgende { top: auto; bottom: 6px; translate: none; } }

/* Tekstpagina's */
.tekst {
  max-width: 42em;
  margin: 0 auto;
  padding: 0 var(--rand);
  color: #333;
  font-size: 14px;
  overflow-wrap: anywhere;
}
.tekst h1 { margin-bottom: 32px; }
.tekst h2, .tekst h3 { font-size: 15px; font-weight: 600; margin: 2em 0 .4em; }
.tekst p { margin: 0 0 1em; }
.tekst.leeg { text-align: center; padding-top: 40px; }

/* Voet */
.voet {
  margin-top: clamp(56px, 8vw, 96px);
  padding: 28px var(--rand) 36px;
  background: var(--vlak);
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: var(--zacht);
}
.voet p { margin: 0; }
.voet a { text-underline-offset: 3px; }
.sociaal { display: flex; gap: 4px; }
.sociaal a { width: 40px; height: 40px; display: grid; place-items: center; color: var(--tekst); border-radius: 50%; }
.sociaal a:hover { background: #fff; }
.sociaal svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
