/* ── Werkpagina v3 (16 nov 2026): podium over het hele scherm, informatie eronder, één detail, één strook verwant werk.
      Geladen na theme.css, alleen op werkpagina's (inc/werk2.php). Gebruikt alleen de basisvariabelen van theme.css. ── */
.werk { display: block; padding: 0 0 96px; gap: 0; }

/* 1. Podium: the painting alone, as large as the screen allows. Phone: full width, no fixed height. */
.werk__podium { position: relative; display: flex; flex-direction: column; background: var(--plinth); }
.werk__back {
  position: absolute; left: var(--gutter); top: 14px; z-index: 2; padding: 6px 10px; margin-left: -10px; border-radius: 999px;
  font-size: 14px; font-weight: 500; color: var(--muted); background: color-mix(in srgb, var(--plinth) 86%, transparent);
}
.werk__back:hover { color: var(--ink); text-decoration: none; }
.werk__beeld { --h: 78svh; display: grid; place-items: center; padding: 56px 16px 12px; min-height: 0; }
.werk__schilderij { margin: 0; width: min(100%, calc(var(--h) * var(--ratio, .7))); }
.werk__schilderij[hidden], .werk__beeld .interieur[hidden] { display: none; }
.werk__beeld .interieur { margin: 0; width: min(100%, calc((var(--h) - 34px) * .9098)); }
.werk__beeld .interieur__kamer { border-radius: 0; }
.werk__link { display: block; cursor: zoom-in; }
.werk__link:focus-visible { outline-offset: 6px; }
.werk__img {
  display: block; width: 100%; height: auto; aspect-ratio: var(--ratio);
  background: color-mix(in srgb, var(--ink) 6%, var(--plinth));
  box-shadow: 0 1px 2px rgba(0, 0, 0, .10), 0 18px 36px -22px rgba(0, 0, 0, .40);
}
/* The bar at the foot of the podium: what you are looking at, how to look at it. */
.werk__balk {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0 20px;
  min-height: 52px; padding: 4px var(--gutter); font-size: 14px;
}
html:not(.js) .werk__weergave, html:not(.js) .werk__tool--zoom { display: none; }
.werk__bijschrift { font-weight: 600; color: var(--ink); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.werk__bijschrift span { font-weight: 400; color: var(--muted); margin-left: 6px; }
.werk__weergave { display: flex; gap: 2px; }
.werk__tool {
  display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 10px;
  background: none; border: 0; border-radius: 999px; color: var(--muted); font-size: 14px; font-weight: 500;
}
.werk__tool:hover { color: var(--ink); }
.werk__tool[aria-pressed="true"] { color: var(--ink); text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 6px; }
.werk__tool--zoom { margin-right: -10px; }
.werk__tool:focus-visible, .werk__uitsnede:focus-visible, .kijker :focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }
@media (max-width: 759px) {
  .werk__bijschrift { flex-basis: 100%; padding-top: 8px; }
  .werk__weergave .werk__tool:first-child { margin-left: -10px; }
}
@media (min-width: 1000px) {
  /* header 77 px; bar 52 px; 14 px above and below the painting */
  .werk__podium { height: calc(100svh - 77px); min-height: 440px; }
  .werk__beeld { --h: max(300px, calc(100svh - 157px)); flex: 1 1 auto; padding: 14px var(--gutter); }
  .werk__balk { display: grid; grid-template-columns: 1fr auto 1fr; flex: none; }
  .werk__tool--zoom { justify-self: end; }
}

/* 2. Information: the words on the left, the practical side on the right. */
.werk__info { display: grid; grid-template-columns: minmax(0, 1fr); gap: 40px; padding-block: clamp(40px, 6vw, 80px) 0; }
@media (min-width: 900px) { .werk__info { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(48px, 7vw, 112px); } }
.werk__label { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; max-width: none; margin: 0; padding: 0; text-align: left; }
.werk__cat { font-family: var(--f-mono); font-size: var(--t-meta, 12.5px); color: var(--muted); }
.werk__titel {
  font-family: var(--f-display); font-weight: 600; font-size: clamp(32px, 4vw, 52px);
  line-height: 1.05; letter-spacing: -.025em; overflow-wrap: anywhere; hyphens: auto; text-wrap: balance;
}
.werk__jaar { color: var(--muted); font-size: 17px; }
.werk__tekst { margin-top: 18px; max-width: 58ch; font-size: 19px; line-height: 1.6; text-wrap: pretty; }
.werk__zij { display: flex; flex-direction: column; gap: 28px; min-width: 0; }
.werk__interesse { display: flex; flex-direction: column; gap: 14px; }
.werk__interesse .enquiry { scroll-margin-top: 24px; }
.werk__status { font-size: 15px; }
.werk__uitleg { order: 2; color: var(--muted); font-size: 14px; max-width: 46ch; }
.werk__gegevens { padding-top: 24px; border-top: 1px solid var(--rule); }
.werk__facts { border: 0; padding: 0; gap: 10px 24px; font-size: 15px; }
.werk__facts .facts__link { color: inherit; }
.werk__extra { justify-content: flex-start; margin-top: 40px; }
.werk__kop { font-family: var(--f-text); font-weight: 600; font-size: 17px; line-height: 1.3; }

/* 3. Van dichtbij: one wide crop of the painting's own photo. The image is --k times the band's width and is moved
      so that the chosen spot (--cx, --cy as fractions of the image) lies in the middle. */
.werk__detail { margin-top: clamp(56px, 7vw, 96px); display: flex; flex-direction: column; gap: 16px; }
.werk__uitsnede {
  position: relative; display: block; overflow: hidden; aspect-ratio: 4 / 3; cursor: zoom-in;
  background: color-mix(in srgb, var(--ink) 6%, var(--wall));
}
@media (min-width: 760px) { .werk__uitsnede { aspect-ratio: 21 / 9; } }
.werk__uitsnede img {
  position: absolute; left: 50%; top: 50%; width: calc(var(--k) * 100%); max-width: none; height: auto;
  transform: translate(calc(var(--cx) * -100%), calc(var(--cy) * -100%));
}
.werk__uitsnede-hint {
  position: absolute; right: 12px; bottom: 12px; display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 999px;
  font-size: 14px; font-weight: 500; color: var(--ink); background: color-mix(in srgb, var(--wall) 90%, transparent);
}

/* Hand-picked close-ups: one large (2/3) and two stacked beside it; all 16:9. Phones: swipe row. */
.werk__close { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; grid-template-columns: 2fr 1fr; grid-template-rows: 1fr 1fr; }
.werk__close-item.is-groot { grid-row: 1 / span 2; }
.werk__close a { position: relative; display: block; height: 100%; overflow: hidden; cursor: zoom-in; background: color-mix(in srgb, var(--ink) 6%, var(--wall)); }
.werk__close img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .4s cubic-bezier(.2, .7, .2, 1); }
.werk__close a:hover img { transform: scale(1.03); }
.werk__close a:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
@media (max-width: 759px) {
  .werk__close { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 10px; margin-inline: calc(var(--gutter) * -1); padding-inline: var(--gutter); scrollbar-width: none; }
  .werk__close::-webkit-scrollbar { display: none; }
  .werk__close-item { flex: 0 0 86%; aspect-ratio: 16 / 9; scroll-snap-align: center; }
}
@media (prefers-reduced-motion: reduce) { .werk__close img { transition: none; } .werk__close a:hover img { transform: none; } }

/* 4. Related works: clearly secondary. One quiet row of small works. */
.werk > .meer { margin-top: clamp(48px, 6vw, 80px); padding-top: 28px; border-top: 1px solid var(--rule); display: flex; flex-direction: column; gap: 16px; }
.werk .meer .more-link { font-size: 14px; }
.werk .meer .strip { padding-block: 4px 12px; }
.werk .meer .strip__list { gap: 20px; }
.werk .meer .strip__img { height: clamp(120px, 12vw, 168px); margin-bottom: 8px; }
.werk .meer .strip__title { font-size: 13px; font-weight: 500; max-width: 22ch; }
.werk .meer .strip__meta { display: none; }

/* ── Kijker: schermvullend, slepen/knijpen/scrollen, groot bestand pas bij openen ── */
html:has(dialog.kijker[open]) { overflow: hidden; }
.kijker {
  width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0;
  background: #121212; color: #F1F0EC; overflow: hidden;
}
.kijker::backdrop { background: #121212; }
.kijker[open] { display: flex; flex-direction: column; }
.kijker__bar {
  display: flex; align-items: center; gap: 8px 16px; padding: 6px 8px 6px 20px; min-height: 56px;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}
.kijker__titel { font-weight: 600; font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; flex: 0 1 auto; }
.kijker__titel span { font-weight: 400; color: #B5B4AE; margin-left: 6px; }
.kijker__uitleg { flex: 1 1 auto; min-width: 0; font-size: 13px; color: #B5B4AE; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kijker__uitleg-touch { display: none; }
@media (pointer: coarse) { .kijker__uitleg-muis { display: none; } .kijker__uitleg-touch { display: inline; } }
@media (max-width: 760px) { .kijker__uitleg { display: none; } .kijker__bar { padding-left: 16px; } .kijker__titel { flex: 1 1 auto; } }
.kijker__tools { display: flex; align-items: center; gap: 2px; margin-left: auto; flex: none; }
.kijker__btn {
  width: 44px; height: 44px; display: inline-grid; place-items: center; padding: 0;
  background: transparent; border: 0; border-radius: 999px; color: inherit;
}
.kijker__btn:hover { background: rgba(255, 255, 255, .12); }
.kijker__btn[disabled] { opacity: .35; cursor: default; background: transparent; }
.kijker__pct { min-width: 4.2ch; text-align: center; font-family: var(--f-mono); font-size: 12px; color: #B5B4AE; }
@media (max-width: 420px) { .kijker__pct { display: none; } .kijker__btn { width: 40px; } }
.kijker__stage {
  position: relative; flex: 1; min-height: 0; overflow: hidden; touch-action: none; user-select: none; -webkit-user-select: none;
  cursor: grab;
}
.kijker__stage.is-dragging { cursor: grabbing; }
.kijker__stage:focus-visible { outline: 2px solid #F1F0EC; outline-offset: -4px; }
.kijker__img {
  position: absolute; left: 0; top: 0; max-width: none; transform-origin: 0 0; will-change: transform;
  -webkit-user-drag: none; pointer-events: none;
}
.kijker.is-anim .kijker__img { transition: transform .28s cubic-bezier(.2, .7, .2, 1); }
.kijker__laden {
  position: absolute; left: 50%; bottom: 16px; transform: translateX(-50%);
  padding: 6px 12px; border-radius: 999px; background: rgba(0, 0, 0, .6); font-size: 13px; color: #F1F0EC;
}
@media (prefers-reduced-motion: reduce) { .kijker.is-anim .kijker__img { transition: none; } }
