/* Publieke site.
   Kleuren en maten staan bovenaan als variabelen; de accentkleur is instelbaar in het beheer. */

@font-face {
  font-family: "Instrument Serif";
  src: url("../fonts/instrument-serif.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Instrument Serif";
  src: url("../fonts/instrument-serif-italic.woff2") format("woff2");
  font-weight: 400; font-style: italic; font-display: swap;
}
@font-face {
  font-family: "Instrument Sans";
  src: url("../fonts/instrument-sans.woff2") format("woff2");
  font-weight: 400 700; font-stretch: 75% 100%; font-style: normal; font-display: swap;
}

:root {
  --paper: #f2f3f0;
  --ink: #1b1f1d;
  --muted: #5f6662;
  --line: #d3d7d2;
  --field: #fbfbfa;
  --accent: #2440d8;
  --error: #b3261e;
  --ok: #1e6b43;

  --serif: "Instrument Serif", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --sans: "Instrument Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --gutter: clamp(1.25rem, 4vw, 3.5rem);
  --gap: clamp(1.25rem, 3vw, 2.5rem);
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main { flex: 1; }

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
a:hover { color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

h1, h2, h3 { font-family: var(--serif); font-weight: 400; line-height: 1.05; margin: 0; letter-spacing: -0.01em; }

.skip { position: absolute; left: -999rem; top: 0; background: var(--ink); color: var(--paper); padding: 0.75rem 1rem; z-index: 10; }
.skip:focus { left: 0; }

/* ---------- Kop ---------- */

.site-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem 2rem;
  flex-wrap: wrap;
  padding: 1.5rem var(--gutter);
}
.brand { font-family: var(--serif); font-size: 1.75rem; line-height: 1; text-decoration: none; }
.brand img { max-height: 2.75rem; width: auto; }

.site-nav { display: flex; align-items: baseline; gap: 2.25rem; }
.site-nav ul { display: flex; gap: 1.75rem; list-style: none; margin: 0; padding: 0; flex-wrap: wrap; }
.site-nav a { text-decoration: none; }
.site-nav a[aria-current] { text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 2px; }
.lang-switch { margin: 0; display: flex; gap: 0.4rem; font-size: 0.875rem; color: var(--muted); }
.lang-switch a[aria-current] { color: var(--ink); font-weight: 600; text-decoration: none; }

.nav-toggle {
  font: inherit; color: inherit; background: none; border: 1px solid var(--ink); border-radius: 3px;
  padding: 0.35rem 0.9rem; cursor: pointer;
}

@media (max-width: 46rem) {
  .js .nav-toggle { display: inline-block; }
  .js .site-nav { display: none; flex-basis: 100%; flex-direction: column; gap: 1.25rem; padding: 0.5rem 0 1rem; }
  .js .site-nav.is-open { display: flex; }
  .site-nav ul { flex-direction: column; gap: 0.35rem; }
  .js .site-nav ul a { font-family: var(--serif); font-size: 2rem; line-height: 1.25; }
}
@media (min-width: 46.01rem) { .nav-toggle { display: none !important; } }

/* ---------- Home ---------- */

.hero { padding: clamp(3rem, 9vw, 8rem) var(--gutter) clamp(3rem, 7vw, 6rem); }
.hero h1 {
  font-size: clamp(2.75rem, 8.2vw, 7.5rem);
  line-height: 0.98;
  letter-spacing: -0.02em;
  max-width: 14em;
  text-wrap: balance;
}
.hero-text {
  margin: clamp(2rem, 4vw, 3.5rem) 0 0 auto;
  width: min(100%, 34rem);
  font-size: 1.1875rem;
  color: var(--muted);
}

.work { padding: 0 var(--gutter) clamp(4rem, 8vw, 7rem); }
.section-title {
  font-family: var(--sans); font-size: 1rem; font-weight: 500; letter-spacing: 0;
  padding-bottom: 0.75rem; margin-bottom: var(--gap); border-bottom: 1px solid var(--ink);
}
.work-more { margin: clamp(3rem, 6vw, 5rem) 0 0; text-align: right; font-size: 1.1875rem; }
.empty { color: var(--muted); }

.text-link { text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 2px; }

/* Projecttegel: beeld in eigen verhouding, titel eronder */
.tile a { display: block; text-decoration: none; color: inherit; }
.tile img, .tile-empty { width: 100%; background: var(--line); }
.tile-empty { aspect-ratio: 4 / 3; }
.tile-caption { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; padding-top: 0.75rem; }
.tile-caption h3 { font-size: clamp(1.5rem, 2.4vw, 2rem); }
.tile-caption p { margin: 0; color: var(--muted); font-size: 0.9375rem; white-space: nowrap; }
.tile a:hover h3, .tile a:focus-visible h3 { text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: 0.15em; }

/* Verspringend raster op de homepage: breed en smal wisselen elkaar af */
.stagger { display: grid; grid-template-columns: repeat(12, 1fr); gap: clamp(2.5rem, 6vw, 5.5rem) var(--gap); align-items: start; }
.stagger .tile:nth-child(4n + 1) { grid-column: 1 / span 7; }
.stagger .tile:nth-child(4n + 2) { grid-column: 9 / span 4; margin-top: clamp(3rem, 10vw, 9rem); }
.stagger .tile:nth-child(4n + 3) { grid-column: 2 / span 5; }
.stagger .tile:nth-child(4n + 4) { grid-column: 7 / span 6; margin-top: clamp(2rem, 6vw, 5rem); }

.grid-two { display: grid; grid-template-columns: repeat(2, 1fr); gap: clamp(2.5rem, 5vw, 4.5rem) var(--gap); align-items: start; }

@media (max-width: 46rem) {
  .stagger, .grid-two { grid-template-columns: 1fr; }
  .stagger .tile:nth-child(n) { grid-column: auto; margin-top: 0; }
  .stagger .tile:nth-child(even) { margin-left: 12%; }
}

/* ---------- Paginakop, filter ---------- */

.page-head { padding: clamp(2.5rem, 7vw, 6rem) var(--gutter) clamp(2rem, 4vw, 3.5rem); }
.page-head h1 { font-size: clamp(2.75rem, 7.5vw, 6.5rem); letter-spacing: -0.02em; max-width: 14em; text-wrap: balance; }
.page-head .lead { margin-top: 1.5rem; }

.filter { display: flex; flex-wrap: wrap; gap: 0.5rem 1.75rem; margin-top: clamp(1.5rem, 3vw, 2.5rem); }
.filter a { text-decoration: none; color: var(--muted); }
.filter a:hover { color: var(--accent); }
.filter a[aria-current] { color: var(--ink); text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 2px; }

/* ---------- Project ---------- */

.project-intro {
  display: grid; grid-template-columns: repeat(12, 1fr); gap: 2rem var(--gap);
  padding: 0 var(--gutter) clamp(3rem, 6vw, 5rem);
}
.facts { grid-column: 1 / span 4; margin: 0; display: grid; gap: 1rem; align-content: start; border-top: 1px solid var(--ink); padding-top: 1rem; }
.facts dt { color: var(--muted); font-size: 0.9375rem; }
.facts dd { margin: 0; }
.project-text { grid-column: 6 / span 7; }

.lead { font-family: var(--serif); font-size: clamp(1.5rem, 2.6vw, 2.125rem); line-height: 1.25; margin: 0 0 1.5rem; max-width: 32em; }

.prose { max-width: 40rem; }
.prose > :first-child { margin-top: 0; }
.prose p, .prose ul, .prose ol, .prose blockquote { margin: 0 0 1.15em; }
.prose h2 { font-size: 2rem; margin: 2.25rem 0 0.75rem; }
.prose h3 { font-size: 1.5rem; margin: 1.75rem 0 0.5rem; }
.prose ul, .prose ol { padding-left: 1.25rem; }
.prose li { margin-bottom: 0.35em; }
.prose a { text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 2px; }
.prose blockquote { font-family: var(--serif); font-size: 1.5rem; line-height: 1.3; padding-left: 1.25rem; border-left: 2px solid var(--accent); }

.gallery { display: grid; gap: var(--gap); padding: 0 var(--gutter); }
.gallery-row img { width: 100%; background: var(--line); }
.gallery-row.is-pair { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gap); align-items: start; }

.project-next {
  display: flex; justify-content: space-between; align-items: flex-end; gap: 2rem; flex-wrap: wrap;
  margin: clamp(4rem, 9vw, 8rem) var(--gutter) 0; padding: 1.5rem 0 clamp(3rem, 6vw, 5rem);
  border-top: 1px solid var(--ink);
}
.next-link { text-decoration: none; display: grid; gap: 0.25rem; }
.next-link span { color: var(--muted); font-size: 0.9375rem; }
.next-link strong { font-family: var(--serif); font-weight: 400; font-size: clamp(2rem, 5vw, 4rem); line-height: 1.05; }

@media (max-width: 46rem) {
  .facts, .project-text { grid-column: 1 / -1; }
  .facts { grid-template-columns: 1fr 1fr; }
  .gallery-row.is-pair { grid-template-columns: 1fr; }
}

/* ---------- Pagina en contactformulier ---------- */

.page-body { padding: 0 var(--gutter) clamp(4rem, 8vw, 7rem); display: grid; gap: clamp(2.5rem, 5vw, 4rem); }
@media (min-width: 46.01rem) {
  .page-body { grid-template-columns: repeat(12, 1fr); }
  .page-body > * { grid-column: 6 / span 7; }
}

.contact-form { max-width: 40rem; display: grid; gap: 1.25rem; scroll-margin-top: 2rem; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
@media (max-width: 34rem) { .field-row { grid-template-columns: 1fr; } }
.field { display: grid; gap: 0.35rem; }
.field label { font-size: 0.9375rem; font-weight: 500; }
.field input, .field textarea {
  font: inherit; color: inherit; width: 100%;
  background: var(--field); border: 1px solid #9aa19c; border-radius: 3px; padding: 0.7rem 0.8rem;
}
.field textarea { resize: vertical; min-height: 9rem; }
.field input:focus-visible, .field textarea:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
.field.has-error input, .field.has-error textarea { border-color: var(--error); }
.field-error { margin: 0; color: var(--error); font-size: 0.9375rem; }
.field-error:empty { display: none; }

.form-status { margin: 0; padding: 0.85rem 1rem; border-radius: 3px; font-weight: 500; }
.form-status:empty { display: none; }
.form-status.is-ok { background: #dcebe2; color: var(--ok); }
.form-status.is-error { background: #f6dedc; color: var(--error); }

.hp { position: absolute; left: -999rem; width: 1px; height: 1px; overflow: hidden; }

.button {
  font: inherit; font-weight: 500; justify-self: start; cursor: pointer;
  background: var(--ink); color: var(--paper); border: 1px solid var(--ink); border-radius: 3px; padding: 0.8rem 1.6rem;
}
.button:hover { background: var(--accent); border-color: var(--accent); }
.button[disabled] { opacity: 0.6; cursor: progress; }

/* ---------- Voet ---------- */

.site-footer { border-top: 1px solid var(--line); padding: clamp(2.5rem, 5vw, 4rem) var(--gutter) 2rem; font-size: 0.9375rem; }
.footer-name { font-family: var(--serif); font-size: clamp(2rem, 4vw, 3rem); line-height: 1; margin-bottom: 2rem; }
.footer-cols { display: flex; flex-wrap: wrap; gap: 1.5rem 4rem; align-items: flex-end; }
.site-footer address { font-style: normal; }
.social { list-style: none; margin: 0; padding: 0; }
.footer-note { margin: 0 0 0 auto; color: var(--muted); text-align: right; display: grid; gap: 0.25rem; }
@media (max-width: 46rem) { .footer-note { margin-left: 0; text-align: left; } }

/* Titel uitgezet in het beheer: onzichtbaar, maar nog aanwezig voor zoekmachines en schermlezers */
.page.no-title .page-head { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; padding: 0; }
.page.no-title .page-body { padding-top: clamp(2rem, 5vw, 4rem); }

/* Projectenoverzicht: titel uitgezet in het beheer */
.page-head.no-title h1 { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.page-head.no-title { padding-top: clamp(1.5rem, 4vw, 3rem); }
.page-head.no-title .filter { margin-top: 0; }

/* Groter logo linksboven */
.brand img { max-height: 150px; max-width: 150px; }
.site-header { align-items: center; }
@media (max-width: 46rem) { .brand img { max-height: 90px; max-width: 90px; } }
