:root {
  --ink: #171412;
  --muted: #6f675d;
  --paper: #f6f0e6;
  --surface: #fffaf2;
  --surface-strong: #efe3d2;
  --line: rgba(35, 30, 26, .13);
  --accent: #a45f35;
  --accent-2: #2f6f69;
  --deep: #1d2420;
  --deep-soft: #27342f;
  --white: #fffaf0;
  --shadow: 0 22px 60px rgba(36, 29, 22, .13);
  --shadow-soft: 0 12px 32px rgba(36, 29, 22, .09);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.7;
  background:
    radial-gradient(circle at 18% 0, rgba(164, 95, 53, .12), transparent 30rem),
    linear-gradient(180deg, #fbf7ef 0, var(--paper) 42rem);
}

a {
  color: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 18px;
  align-items: center;
  padding: 14px clamp(16px, 4vw, 36px);
  background: rgba(255, 250, 242, .86);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 10px 30px rgba(23, 20, 18, .06);
  backdrop-filter: blur(18px);
}

.brand {
  min-width: 220px;
  display: grid;
  gap: 3px;
  line-height: 1.1;
  text-decoration: none;
}

.brand span {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 26px;
  font-weight: 700;
}

.brand small {
  color: var(--accent-2);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}

nav {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

nav a {
  padding: 8px 10px;
  border-radius: var(--radius);
  color: #312a24;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.15;
  text-decoration: none;
  transition: background .16s ease, color .16s ease, transform .16s ease;
}

nav a:hover,
nav a.active {
  color: #fff7ea;
  background: var(--deep-soft);
}

nav a:hover {
  transform: translateY(-1px);
}

.home-header {
  grid-template-columns: minmax(240px, auto) minmax(0, 1fr);
  padding-top: 12px;
  padding-bottom: 12px;
  color: var(--white);
  background: rgba(29, 36, 32, .88);
  border-bottom-color: rgba(255, 250, 240, .16);
  box-shadow: 0 18px 46px rgba(13, 17, 15, .22);
}

.home-brand {
  min-width: 260px;
  grid-template-columns: 44px minmax(0, auto);
  column-gap: 12px;
  align-items: center;
}

.home-brand .brand-mark {
  grid-row: 1 / span 2;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  color: #1d2420;
  background: #f0bf75;
  border: 1px solid rgba(255, 250, 240, .4);
  border-radius: var(--radius);
  box-shadow: 0 10px 24px rgba(0, 0, 0, .22);
  font-size: 25px;
}

.home-brand small {
  color: #d8cbb7;
}

.home-nav {
  gap: 7px;
}

.home-nav a {
  color: #f3e7d8;
  background: rgba(255, 250, 240, .08);
  border: 1px solid rgba(255, 250, 240, .11);
}

.home-nav a:hover,
.home-nav a.active {
  color: #1d2420;
  background: #f0bf75;
  border-color: #f0bf75;
}

.hero {
  min-height: 82vh;
  display: flex;
  align-items: end;
  color: var(--white);
  padding: clamp(94px, 14vw, 150px) clamp(18px, 4vw, 36px) 64px;
  background:
    linear-gradient(90deg, rgba(13, 17, 15, .92), rgba(13, 17, 15, .58), rgba(13, 17, 15, .12)),
    var(--hero);
  background-position: center;
  background-size: cover;
}

.hero-inner {
  width: min(1160px, 100%);
  margin: 0 auto;
}

.eyebrow {
  margin: 0 0 12px;
  color: #f0bf75;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .15em;
  text-transform: uppercase;
}

.hero h1,
.subhero h1 {
  max-width: 940px;
  margin: 0 0 20px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(42px, 6.4vw, 86px);
  font-weight: 700;
  letter-spacing: 0;
  line-height: .98;
}

.hero-text {
  max-width: 790px;
  color: #f5eadb;
  font-size: clamp(18px, 2vw, 20px);
}

.hero-text p {
  margin: 0 0 13px;
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 30px;
}

.button,
.email-form button {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 11px 17px;
  border: 0;
  border-radius: var(--radius);
  color: #fff8ee;
  background: var(--accent);
  box-shadow: 0 12px 26px rgba(87, 45, 22, .22);
  font: inherit;
  font-weight: 850;
  line-height: 1.1;
  text-decoration: none;
  cursor: pointer;
  transition: transform .16s ease, background .16s ease, box-shadow .16s ease;
}

.button:hover,
.email-form button:hover {
  background: #8e4f2d;
  transform: translateY(-1px);
  box-shadow: 0 16px 32px rgba(87, 45, 22, .25);
}

.button.ghost {
  color: var(--white);
  background: rgba(255, 250, 240, .14);
  border: 1px solid rgba(255, 250, 240, .45);
  box-shadow: none;
}

.button.ghost:hover {
  background: rgba(255, 250, 240, .22);
}

.topics {
  width: min(1160px, calc(100% - 32px));
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(235px, 1fr));
  gap: 16px;
  margin: 38px auto 74px;
}

.page-topics {
  position: relative;
  margin-top: -42px;
}

.topic-card {
  min-height: 172px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 20px;
  overflow: hidden;
  color: var(--ink);
  text-decoration: none;
  background: rgba(255, 250, 242, .95);
  border: 1px solid rgba(35, 30, 26, .1);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.topic-card:hover {
  transform: translateY(-4px);
  border-color: rgba(47, 111, 105, .36);
  box-shadow: var(--shadow);
}

.topic-card span {
  margin: 0 0 10px;
  color: var(--accent-2);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.topic-card strong {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 25px;
  line-height: 1.08;
}

.topic-card small {
  margin-top: 12px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.subhero {
  color: var(--white);
  padding: 82px clamp(18px, 4vw, 36px) 58px;
  background:
    linear-gradient(135deg, rgba(29, 36, 32, .98), rgba(39, 52, 47, .96)),
    linear-gradient(90deg, rgba(164, 95, 53, .22), transparent);
}

.subhero.detail {
  background:
    linear-gradient(135deg, rgba(36, 40, 35, .98), rgba(29, 36, 32, .96)),
    linear-gradient(90deg, rgba(47, 111, 105, .22), transparent);
}

.subhero > div,
.page-gallery {
  width: min(1160px, calc(100% - 32px));
  margin: 0 auto;
}

.article-layout {
  width: min(1760px, calc(100% - 32px));
  margin: 0 auto;
}

.subhero p:not(.eyebrow) {
  max-width: 760px;
  color: #e5d9c8;
  font-size: 18px;
}

.back-link {
  color: #ffd18f;
  font-weight: 850;
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}

.article-layout {
  display: block;
  padding: 52px 0;
}

.article-content {
  padding: clamp(20px, 2.5vw, 36px);
  background: rgba(255, 250, 242, .97);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}

.article-content h2 {
  margin: 36px 0 12px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(27px, 3vw, 42px);
  line-height: 1.08;
}

.article-content h2:first-child {
  margin-top: 0;
}

.article-content p {
  max-width: none;
  margin: 0 0 17px;
  font-size: 18px;
}

.page-gallery h2 {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  margin: 0 0 20px;
  padding: 9px 14px;
  color: #fff8ee;
  background: var(--deep-soft);
  border-left: 5px solid var(--accent);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(24px, 3vw, 36px);
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1.1;
}

.page-gallery {
  padding: 10px 0 76px;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(245px, 1fr));
  gap: 16px;
}

.photo {
  position: relative;
  min-width: 0;
  margin: 0;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}

.photo a,
.photo.linked a,
.kunstenaars-page .photo.linked a {
  height: 100%;
  display: flex;
  flex-direction: column;
  text-decoration: none;
}

.photo img,
.photo.linked img,
.kunstenaars-page .photo img,
.kunstenaars-page .photo.linked img {
  width: 100%;
  height: 252px;
  display: block;
  padding: 12px;
  object-fit: contain;
  background: #efe7dc;
  transition: transform .18s ease, filter .18s ease;
}

.photo.linked:hover img,
.kunstenaars-page .photo.linked:hover img {
  transform: scale(1.015);
  filter: contrast(1.03);
}

.photo figcaption {
  padding: 12px 14px 14px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.photo figcaption span {
  display: block;
  margin-top: 8px;
  color: var(--ink);
}

.open-label {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 6px 9px;
  color: #fff8ee;
  background: var(--accent);
  border-radius: var(--radius);
  box-shadow: 0 8px 18px rgba(87, 45, 22, .22);
  font-size: 12px;
  font-weight: 900;
}

.achtergronden-page .gallery,
.groepsbezoeken-page .gallery {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  align-items: start;
}

.achtergronden-page .photo img,
.achtergronden-page .photo.linked img {
  height: 360px;
}

.groepsbezoeken-page .photo img,
.groepsbezoeken-page .photo.linked img {
  height: 390px;
}

.contact-mail {
  width: min(1160px, calc(100% - 32px));
  margin: 0 auto 76px;
  padding: clamp(24px, 4vw, 34px);
  background: rgba(255, 250, 242, .96);
  border: 1px solid var(--line);
  border-left: 5px solid var(--accent);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}

.contact-mail h2 {
  margin: 0 0 8px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 32px;
  line-height: 1.1;
}

.contact-mail p {
  margin: 0 0 12px;
  color: var(--muted);
}

.contact-mail a {
  color: #6c3a21;
  font-weight: 850;
}

.email-form {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.email-form label {
  display: grid;
  gap: 6px;
  color: #332d25;
  font-weight: 850;
}

.email-form input,
.email-form textarea {
  width: 100%;
  padding: 12px 13px;
  color: var(--ink);
  background: #fffdf8;
  border: 1px solid rgba(32, 39, 34, .18);
  border-radius: var(--radius);
  font: inherit;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .55);
}

.email-form input:focus,
.email-form textarea:focus {
  outline: 3px solid rgba(47, 111, 105, .2);
  border-color: rgba(47, 111, 105, .62);
}

.email-form textarea {
  min-height: 140px;
  resize: vertical;
}

.email-form button {
  justify-self: start;
}

.mail-fallback {
  margin-top: 16px;
}

footer {
  display: flex;
  gap: 10px;
  justify-content: space-between;
  flex-wrap: wrap;
  padding: 30px clamp(18px, 4vw, 36px);
  color: var(--white);
  background: var(--deep);
}

footer span {
  color: #d8cbb7;
}

body.image-viewer-open {
  overflow: hidden;
}

.image-viewer {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 28px clamp(18px, 4vw, 52px);
  background: rgba(21, 18, 15, .88);
  backdrop-filter: blur(10px);
}

.image-viewer-frame {
  width: min(78vw, 1120px);
  height: min(82vh, 820px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
}

.image-viewer-frame img {
  width: 100%;
  min-height: 0;
  flex: 1;
  object-fit: contain;
  background: #efe8de;
  border: 1px solid rgba(255, 250, 240, .24);
  border-radius: var(--radius);
  box-shadow: 0 24px 70px rgba(0, 0, 0, .34);
}

.image-viewer-footer {
  width: 100%;
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  color: #fff4e2;
  background: rgba(29, 36, 32, .92);
  border: 1px solid rgba(255, 250, 240, .16);
  border-radius: var(--radius);
}

.image-viewer-caption {
  margin: 0;
  color: #fff4e2;
  font-size: 17px;
  font-weight: 800;
}

.image-viewer-counter {
  color: #d8cbb7;
  font-size: 14px;
  font-weight: 850;
  white-space: nowrap;
}

.image-viewer-controls {
  position: fixed;
  right: clamp(18px, 4vw, 56px);
  top: 50%;
  width: 180px;
  display: grid;
  gap: 12px;
  align-content: center;
  transform: translateY(-50%);
}

.image-viewer-controls button {
  width: 100%;
  min-height: 48px;
  padding: 10px 16px;
  color: #fff8ee;
  background: var(--accent);
  border: 0;
  border-radius: var(--radius);
  box-shadow: 0 14px 28px rgba(0, 0, 0, .24);
  font: inherit;
  font-size: 16px;
  font-weight: 850;
  cursor: pointer;
}

.image-viewer-controls button:hover {
  background: #8e4f2d;
}

.image-viewer-controls button:disabled {
  opacity: .5;
  cursor: default;
}

@media (max-width: 880px) {
  body {
    font-size: 16px;
  }

  .site-header {
    position: relative;
    grid-template-columns: 1fr;
    align-items: start;
    padding: 16px;
  }

  .brand {
    min-width: 0;
  }

  .home-brand {
    min-width: 0;
    grid-template-columns: 40px minmax(0, auto);
  }

  .home-brand .brand-mark {
    width: 40px;
    height: 40px;
    font-size: 23px;
  }

  nav {
    justify-content: flex-start;
  }

  nav a {
    font-size: 15px;
  }

  .hero {
    min-height: 70vh;
    padding: 74px 16px 38px;
  }

  .topics,
  .subhero > div,
  .page-gallery,
  .contact-mail {
    width: calc(100% - 24px);
  }

  .article-layout {
    width: calc(100% - 24px);
  }

  .article-layout {
    padding: 32px 0;
  }

  .article-content p {
    font-size: 17px;
  }

  .photo img,
  .photo.linked img,
  .kunstenaars-page .photo img,
  .kunstenaars-page .photo.linked img {
    height: 260px;
  }

  .achtergronden-page .photo img,
  .achtergronden-page .photo.linked img,
  .groepsbezoeken-page .photo img,
  .groepsbezoeken-page .photo.linked img {
    height: 335px;
  }

  .image-viewer {
    place-items: center;
    padding: 18px;
  }

  .image-viewer-frame {
    width: 100%;
    height: 62vh;
  }

  .image-viewer-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .image-viewer-controls {
    position: static;
    width: 100%;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    transform: none;
  }

  .image-viewer-controls button {
    min-height: 44px;
    padding: 9px 10px;
    font-size: 14px;
  }
}
