/* ==========================================================================
   Hans Bartelet — stylesheet
   Statische site, geen build-stap. Alle ontwerpwaarden staan in :root.
   ========================================================================== */

/* ---------- Fonts ---------- */
@font-face {
  font-family: "Aeonik Pro";
  src: url("../fonts/AeonikPro-Light.woff") format("woff");
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Aeonik Pro";
  src: url("../fonts/AeonikPro-Regular.woff") format("woff");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Aeonik Pro";
  src: url("../fonts/AeonikPro-Bold.woff") format("woff");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* ---------- Tokens ---------- */
:root {
  --font: "Aeonik Pro", "Helvetica Neue", Arial, sans-serif;

  --c-text: #000;
  --c-muted: #3a3a3a;
  --c-bg: #fff;
  --c-blue: #d0dee7;        /* footerband */
  --c-blue-light: #e3eaf2;  /* achtergrond boekspreads */

  --gutter: 16px;           /* marge rond de hero */
  --container: 1000px;      /* breedte grids en tegels */
  --text-col: 640px;        /* breedte tekstkolom */

  --fs-caption: 12px;
  --fs-body: 15px;
  --fs-nav: 15px;
  --fs-h1: 30px;
  --fs-display: clamp(30px, 4.3vw, 52px);
}

/* ---------- Reset / basis ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: var(--fs-body);
  line-height: 1.4;
  color: var(--c-text);
  background: var(--c-bg);
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }
h1, h2, h3, p, figure { margin: 0; }

.container { width: min(100% - 2 * var(--gutter), var(--container)); margin-inline: auto; }
.text-col  { width: min(100% - 2 * var(--gutter), var(--text-col)); margin-inline: auto; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

/* ---------- Header ---------- */
.site-header {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1rem;
  padding: 22px clamp(var(--gutter), 7vw, 88px) 16px;
  font-size: var(--fs-nav);
  line-height: 1.1;
}
.site-logo { justify-self: start; }
.site-logo strong { display: block; font-weight: 700; }
.site-logo span   { display: block; font-weight: 300; }
.site-logo:hover  { text-decoration: none; }

.site-nav ul {
  display: flex; gap: 32px;
  list-style: none; margin: 0; padding: 0;
}
.site-nav a, .site-book { font-weight: 700; }
.site-book { justify-self: end; }

/* Actieve pagina */
.site-nav a[aria-current="page"],
.site-book[aria-current="page"] {
  text-decoration: underline; text-underline-offset: 4px;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  margin-inline: var(--gutter);
  aspect-ratio: 1165 / 499;
  max-height: 72vh;
  width: calc(100% - 2 * var(--gutter));
  overflow: hidden;
  background: #eee;
}
.hero img { width: 100%; height: 100%; object-fit: cover; }
.hero figcaption {
  position: absolute; left: 0; right: 0; bottom: 18px;
  text-align: center;
  font-size: var(--fs-caption);
  line-height: 1.3;
}
.hero--light figcaption { color: #fff; }

.position-right {
  object-position: right;
}

.position-top {
  object-position: top;
}

/* ---------- Bijschriften (hero + werken) ---------- */
.caption strong { font-weight: 700; }
.caption span   { font-weight: 300; }

/* ---------- Intro (homepage, boekpagina) ---------- */
.intro {
  text-align: center;
  padding: 28px var(--gutter) 0;
}
.intro__kicker { font-size: 13px; font-weight: 300; margin-bottom: 8px; }
.intro__kicker strong { font-weight: 700; }
.intro__title {
  font-size: var(--fs-display);
  font-weight: 300;
  line-height: 1.12;
  letter-spacing: -0.01em;
}

/* ---------- Tegels (homepage) ---------- */
.tiles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  margin-block: 56px 72px;
}
.tile { position: relative; display: block; aspect-ratio: 314 / 343; overflow: hidden; }
.tile img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.tile span {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  font-size: 26px; font-weight: 700;
}
.tile:hover { text-decoration: none; }
.tile:hover img { transform: scale(1.03); }

/* ---------- Paginatitel ---------- */
.page-title {
  text-align: center;
  font-size: var(--fs-h1);
  font-weight: 700;
  margin-block: 56px 48px;
}

/* ---------- Werken-grid (beelden + schilderijen) ---------- */
.works {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  column-gap: 56px;
  row-gap: 40px;
  align-items: start;
  list-style: none;
  padding: 0;
  margin-block: 0 120px;
}
.work img { width: 100%; }
.work--wide { grid-column: span 2; }   /* brede werken, zoals een drieluik */
.work figcaption {
  margin-top: 10px;
  font-size: var(--fs-caption);
  line-height: 1.3;
}

/* ---------- Lopende tekst ---------- */
.prose {
  text-align: justify;
}

.prose p.no-indent { text-indent: 0; }
.prose strong { font-weight: 700; }
.prose a { text-decoration: underline; text-underline-offset: 3px; }

p {
  margin-bottom: 20px;
}

/* ---------- Over Hans: fotoduo ---------- */
.photo-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: start;
  margin-block: 72px;
}
.photo-pair figcaption { margin-top: 10px; font-size: var(--fs-caption); line-height: 1.3; }

/* ---------- Boek ---------- */
.book-intro .intro__title { margin-bottom: 40px; }
.book-contact { margin-top: 28px; font-size: 18px; }
.book-contact a { text-decoration: none; }
.book-contact a:hover { text-decoration: underline; }

.book-spreads {
  background: var(--c-blue-light);
  margin: 80px var(--gutter) 0;
  padding: 56px var(--gutter) 48px;
}

/* Slider: horizontaal scrollen met snap; knoppen via assets/js/slider.js */
.book-slider__track {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
  list-style: none;
  margin: 0;
  padding: 0;
}
.book-slider__track::-webkit-scrollbar { display: none; }
.book-slider__track:focus-visible { outline: 1px solid var(--c-text); outline-offset: 8px; }
.book-slider__slide {
  flex: 0 0 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  padding-bottom: 12px;          /* ruimte voor de schaduw */
  scroll-snap-align: center;
}
.book-slider__slide img {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: min(560px, 70vh);
  box-shadow: 4px 6px 10px rgba(0, 0, 0, .12);
}
.book-slider__controls {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 24px;
  margin-top: 28px;
}
.book-slider__controls[hidden] { display: none; }
.book-slider__count { margin: 0; font-size: var(--fs-body); font-variant-numeric: tabular-nums; }
.book-slider__btn {
  width: 44px;
  height: 44px;
  border: 1px solid var(--c-text);
  border-radius: 50%;
  background: transparent;
  color: var(--c-text);
  font: inherit;
  font-size: 18px;
  cursor: pointer;
}
.book-slider__btn:hover:not(:disabled) { background: var(--c-text); color: var(--c-bg); }
.book-slider__btn:disabled { opacity: .3; cursor: default; }

/* ---------- Beelden & schilderijen: vergrootglas (assets/js/lightbox.js) ---------- */
.work__zoom {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  cursor: zoom-in;
}
/* Vergrootglas-icoon in de hoek bij hover/focus */
.work__zoom::after {
  content: "";
  position: absolute;
  right: 8px;
  bottom: 8px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--c-bg) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.6' stroke-linecap='round'%3E%3Ccircle cx='10.5' cy='10.5' r='6'/%3E%3Cpath d='M15 15l5 5M10.5 8v5M8 10.5h5'/%3E%3C/svg%3E") center / 18px no-repeat;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .15);
  opacity: 0;
  transition: opacity .2s;
}
.work__zoom:hover::after,
.work__zoom:focus-visible::after { opacity: 1; }
.work__zoom:focus-visible { outline: 1px solid var(--c-text); outline-offset: 4px; }

.lightbox {
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: var(--c-bg);
  color: var(--c-text);
}
.lightbox[open] {
  display: grid;
  grid-template-columns: 72px 1fr 72px;
  align-items: center;
}
.lightbox::backdrop { background: var(--c-bg); }
html:has(.lightbox[open]) { overflow: hidden; }   /* pagina erachter niet laten scrollen */
.lightbox__figure {
  grid-column: 2;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 56px 0 32px;
  min-width: 0;
}
.lightbox__figure img {
  max-width: 100%;
  max-height: calc(100vh - 160px);
  max-height: calc(100dvh - 160px);
  width: auto;
  height: auto;
  object-fit: contain;
}
.lightbox__figure figcaption { text-align: center; }
.lightbox__btn {
  width: 44px;
  height: 44px;
  justify-self: center;
  border: 1px solid var(--c-text);
  border-radius: 50%;
  background: var(--c-bg);
  color: var(--c-text);
  font: inherit;
  font-size: 18px;
  cursor: pointer;
}
.lightbox__btn:hover { background: var(--c-text); color: var(--c-bg); }
.lightbox__btn:focus-visible { outline: 1px solid var(--c-text); outline-offset: 3px; }
.lightbox__prev { grid-column: 1; grid-row: 1; }
.lightbox__next { grid-column: 3; grid-row: 1; }
.lightbox__close {
  position: absolute;
  top: var(--gutter);
  right: var(--gutter);
  display: grid;
  place-items: center;
  padding: 0;
}
.lightbox__close svg { display: block; }

/* ---------- Footer ---------- */
.site-footer {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 32px;
  min-height: 340px;
  margin: 0 var(--gutter);
  padding: 40px clamp(var(--gutter), 8vw, 110px) 60px;
  background: var(--c-blue-light);
}
.site-footer img { flex-shrink: 0; width: 100px; height: auto; }
.site-footer__address {
  font-style: normal;
  font-size: var(--fs-caption);
  line-height: 1.5;
}
.site-footer__address strong { font-weight: 700; }
.site-footer__address a { text-decoration: underline; text-underline-offset: 3px; overflow-wrap: anywhere; }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 900px) {
  .works { grid-template-columns: repeat(3, 1fr); column-gap: 32px; }
}

@media (max-width: 720px) {
  :root { --fs-h1: 24px; }

  /* Header: logo + boek boven, navigatie eronder */
  .site-header {
    grid-template-columns: 1fr auto;
    row-gap: 14px;
  }
  .site-nav { grid-column: 1 / -1; grid-row: 2; }
  .site-nav ul { gap: 22px; }

  .hero { aspect-ratio: 4 / 3; }
  .intro__title br { display: none; }  /* laat de regels vrij afbreken */

  .tiles { grid-template-columns: 1fr; gap: 16px; margin-block: 40px 56px; }
  .tile { aspect-ratio: 16 / 10; }

  .works { grid-template-columns: repeat(2, 1fr); column-gap: 16px; row-gap: 28px; }

  .photo-pair { grid-template-columns: 1fr; gap: 32px; }

  .prose { text-align: left; }

  .book-spreads { padding: 32px var(--gutter) 32px; }

  .lightbox[open] { grid-template-columns: 1fr; grid-template-rows: 1fr auto; }
  .lightbox__figure { grid-column: 1; padding: 64px var(--gutter) 0; }
  .lightbox__figure img { max-height: calc(100dvh - 220px); }
  .lightbox__prev, .lightbox__next { grid-row: 2; margin-bottom: 24px; }
  .lightbox__prev { grid-column: 1; justify-self: start; margin-left: calc(50% - 60px); }
  .lightbox__next { grid-column: 1; justify-self: end; margin-right: calc(50% - 60px); }

  /* Footer: logo boven, adres eronder */
  .site-footer {
    flex-direction: column-reverse;
    justify-content: flex-end;
    gap: 28px;
    min-height: 0;
    padding: 32px var(--gutter) 40px;
  }
  .site-footer img { width: 80px; }
}

@media (prefers-reduced-motion: reduce) {
  .tile img { transition: none; }
  .book-slider__track { scroll-behavior: auto; }
  .work__zoom::after { transition: none; }
}

/* ---------- Over Hans: tentoonstellingen ---------- */
.exhibitions-section { margin-bottom: 120px; }
.exhibitions-section h2 { text-align: center; }
.exhibitions {
  width: 100%;
  margin-top: 24px;
  border-collapse: collapse;
  font-size: var(--fs-body);
  line-height: 1.4;
}
.exhibitions th {
  text-align: left;
  font-weight: 700;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--c-text);
}
.exhibitions td {
  padding-block: 4px;
  vertical-align: top;
}
.exhibitions th,
.exhibitions td { padding-right: 16px; }
.exhibitions th:last-child,
.exhibitions td:last-child { padding-right: 0; }
.exhibitions th:first-child,
.exhibitions td:first-child { width: 4.5em; white-space: nowrap; }
.exhibitions tbody + tbody tr:first-child td { padding-top: 20px; }
.exhibitions td:last-child { color: var(--c-muted); }
.exhibitions abbr { text-decoration: none; }
.exhibitions-note {
  margin-top: 16px;
  font-size: var(--fs-caption);
  color: var(--c-muted);
}

@media (max-width: 720px) {
  .exhibitions thead { display: none; }
  .exhibitions tr { display: grid; grid-template-columns: 4.5em 1fr; }
  .exhibitions td:last-child { grid-column: 2; padding-top: 0; }
}
