/* ══ DE MUUR ═══════════════════════════════════════════════════════════
   Eén vrij mozaïek op schaal: 1 gridcel ~ 20 cm doek (spans komen als
   inline style uit gallery.js), collage-offsets en scheefte per doek uit
   het id, elk werk in z'n eigen lijst, digitaal werk in een donkere kamer.
   Laadt NA site.css/rots-funk.css en wint dus op volgorde.
   Herschreven 2026-08-26 uit acht iteratielagen — dit is de eindtoestand. */

/* de foto vloeit door naar de werkpagina (Chrome/Safari; elders een klik) */
@view-transition { navigation: auto; }

/* ── sectie: full-bleed, kop strak bovenaan ─────────────────────────── */
.wallwrap {
  margin-inline: calc(50% - 50vw);
  padding-inline: 0;
  overflow-x: clip;               /* collage-offsets mogen niet uit beeld duwen */
}
#galerie.wallwrap { padding-top: 0; }
.wallhead {
  padding-top: 14px;
  padding-inline: max(var(--edge, 16px), calc(50vw - min(100vw, var(--maxw, 1160px)) / 2));
}
.wallhead h1 {
  font-family: var(--font-heading, sans-serif);
  font-weight: 800;
  font-size: clamp(30px, 5vw, 64px);
  line-height: .95;
  letter-spacing: -0.02em;
  text-wrap: balance;
  margin: 0;
}
.wallhead h1 em { font-style: normal; color: var(--color-accent, #e33); }
.wallhead p {
  max-width: 56ch;
  margin: 12px 0 0;
  font-size: 15px;
  line-height: 1.5;
  color: var(--color-neutral-700, #444);
  text-wrap: pretty;
}
.wallbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 16px; }
.wallbar .count-line { margin-left: auto; }
.kindswitch { display: flex; gap: 4px; }
.chip--kind { font-family: "Permanent Marker", cursive; font-size: 15px; transform: rotate(-1deg); }
.chip--kind:nth-child(2) { transform: rotate(1deg); }
.chip--kind[aria-pressed="false"] { opacity: .55; }

/* ── het mozaïek ────────────────────────────────────────────────────── */
.wall {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  grid-auto-rows: calc((100vw - 20px - 5 * 6px) / 6);   /* vierkante cellen */
  grid-auto-flow: dense;
  gap: 6px;
  padding-inline: 10px;
  margin-top: var(--space-4, 16px);
}
@media (min-width: 720px) {
  .wall {
    grid-template-columns: repeat(16, 1fr);
    grid-auto-rows: calc((100vw - 20px - 15 * 10px) / 16);
    gap: 10px;
  }
}
.wall--klein { grid-auto-rows: 90px; }      /* related-grid op de werkpagina */

/* ── de tegel: collage-offset, eigen laag, scroll-drift ─────────────── */
.tile {
  position: relative;
  margin: 0;
  content-visibility: auto;                 /* offscreen niet renderen */
  contain-intrinsic-size: auto 300px;
  transform: translate(var(--ox, 0%), var(--oy, 0px));
}
.tile:hover { z-index: 30 !important; }     /* moet de inline z-index verslaan */
@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: scroll()) {
    .tile { animation: drift linear both; animation-timeline: scroll(root); }
    @keyframes drift {
      from { transform: translate(var(--ox, 0%), calc(var(--oy, 0px) - var(--par, 0px))); }
      to   { transform: translate(var(--ox, 0%), calc(var(--oy, 0px) + var(--par, 0px))); }
    }
  }
}

/* het werk zelf: hangt aan een punaise, scheef per doek, wiegt op desktop */
.tile__art {
  display: block;
  position: relative;
  height: 100%;
  line-height: 0;
  rotate: var(--tilt, 0deg);
  transform-origin: 50% 6px;                /* de punaise */
  box-shadow: 0 10px 24px rgba(0, 0, 0, .14);
}
.tile__art::before {                        /* de punaise */
  content: "";
  position: absolute;
  top: -5px; left: 50%;
  width: 11px; height: 11px;
  margin-left: -5px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff5, transparent 55%), var(--funk-ink, #111);
  z-index: 3;
}
.tile:nth-child(3n) .tile__art::before { background-color: var(--color-accent, #e33); }
.tile:nth-child(4n) .tile__art::before { background-color: #2456d6; }
.tile:nth-child(5n) .tile__art::before { background-color: #f0a800; }
.tile__art img {
  width: 100%; height: 100%;
  display: block;
  object-fit: cover;
}
@media (hover: hover) {
  .tile__art img { transition: transform .25s ease; }
  .tile__art:hover img { transform: scale(1.03); }
}
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .tile[data-kind="physical"] .tile__art { animation: sway var(--dur, 8s) ease-in-out infinite alternate; }
  .tile[data-kind="physical"] .tile__art:hover { animation: push .9s ease-in-out infinite alternate; }
  .tile[data-kind="digital"]  .tile__art { animation: float calc(var(--dur, 8s) / 2) ease-in-out infinite alternate; rotate: 0deg; }
}
@keyframes sway  { from { rotate: calc(var(--tilt, 0deg) - 0.6deg); } to { rotate: calc(var(--tilt, 0deg) + 0.6deg); } }
@keyframes push  { from { rotate: calc(var(--tilt, 0deg) - 1.6deg); } to { rotate: calc(var(--tilt, 0deg) + 1.6deg); } }
@keyframes float { from { translate: 0 0; } to { translate: 0 -7px; } }

/* ── de lijsten: elk doek z'n eigen omlijsting (klasse uit id-hash) ──── */
.lijst-0 .tile__art {                       /* dikke inktlijst */
  border: 4px solid var(--funk-ink, #111);
  box-shadow: 5px 6px 0 var(--funk-ink, #111), 0 10px 24px rgba(0, 0, 0, .14);
}
.lijst-1 .tile__art {                       /* wit passe-partout */
  border: 2px solid var(--funk-ink, #111);
  padding: clamp(5px, 1.2vw, 14px);
  background: #fdfcf9;
  box-shadow: 0 10px 24px rgba(0, 0, 0, .16);
}
.lijst-2 .tile__art { border: 5px solid var(--color-accent, #e33); }
.lijst-2:nth-child(2n) .tile__art { border-color: #2456d6; }
.lijst-2:nth-child(3n) .tile__art { border-color: #f0a800; }
.lijst-3 .tile__art {                       /* dubbele lijn */
  border: 5px double var(--funk-ink, #111);
  outline: 1.5px solid var(--funk-ink, #111);
  outline-offset: 2px;
}
/* digitaal: geen houten lijst maar een scherm — gradientrand + gloed */
.tile[data-kind="digital"] .tile__art {
  border: 2px solid transparent;
  border-radius: 8px;
  background: linear-gradient(#fff, #fff) padding-box,
              linear-gradient(120deg, #2456d6, var(--color-accent, #e33), #f0a800) border-box;
  box-shadow: 0 6px 22px rgba(36, 86, 214, .25);
}
.tile[data-kind="digital"] .tile__art img { border-radius: 6px; }
.tile[data-kind="digital"] .tile__art::before { display: none; }

/* ── stickers op het doek: titel, claim, stempels ───────────────────── */
.tile__meta {
  position: absolute;
  left: 10px; right: 10px; bottom: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  z-index: 2;
  pointer-events: none;
}
.tile__t, .tile__claim {
  font-family: "Permanent Marker", cursive;
  font-weight: 400;
  font-size: 13px;
  line-height: 1.3;
  color: #fff;
  padding: 3px 8px 4px;
  border: none;
  text-decoration: none;
}
.tile__t {
  background: var(--funk-ink, #111);
  transform: rotate(-1.5deg);
  max-width: 75%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tile__claim {
  pointer-events: auto;
  cursor: pointer;
  background: var(--color-accent, #e33);
  transform: rotate(1.5deg);
  white-space: nowrap;
}
.tile__claim:hover { transform: rotate(1.5deg) scale(1.08); }
@media (pointer: coarse) { .tile__claim { min-height: 38px; display: inline-flex; align-items: center; } }

/* voor-wie-regel: strook die bij hover verschijnt */
.tile__voor {
  position: absolute;
  inset: auto 0 0 0;
  margin: 0;
  padding: 34px 10px 34px;
  background: linear-gradient(transparent, rgba(10, 10, 14, .78));
  color: #fff;
  font-size: 12.5px;
  line-height: 1.4;
  opacity: 0;
  transition: opacity .18s ease;
  pointer-events: none;
}
@media (hover: hover) { .tile__art:hover .tile__voor { opacity: 1; } }

/* geclaimd / digitaal-badge / art-drop */
.tile[data-claimed="true"] .tile__art img { filter: saturate(.55) contrast(.92); }
.tile__stamp {
  position: absolute;
  top: 10px; left: -6px;
  z-index: 2;
  font-family: "Permanent Marker", cursive;
  font-size: 14px;
  line-height: 1;
  color: #fff;
  background: var(--funk-ink, #111);
  padding: 5px 10px 6px;
  transform: rotate(-4deg);
  max-width: 85%;
}
.tile__digi {
  position: absolute;
  top: 8px; right: 8px;
  z-index: 2;
  font-family: "Permanent Marker", cursive;
  font-size: 11px;
  line-height: 1;
  color: #fff;
  background: #2456d6;
  padding: 4px 8px 5px;
  border-radius: 999px;
  transform: rotate(2deg);
}
.tile__drop { top: auto; bottom: 8px; background: #d63a24; transform: rotate(-2deg); }
.dropline {
  margin: 0 0 var(--half);
  padding: 8px 12px;
  border-left: 3px solid #d63a24;
  background: rgba(214, 58, 36, .07);
  font-size: .92em;
}

/* mini-doekjes (1 cel): alleen het werk, dunne lijst, kleine stempel */
.tile--mini .tile__meta, .tile--mini .tile__voor { display: none; }
.tile--mini .tile__art { border-width: 2px; padding: 3px; outline-width: 1px; }
.tile--mini .tile__art::before { width: 8px; height: 8px; top: -4px; }
.tile--mini .tile__stamp { font-size: 9px; padding: 3px 6px; top: 4px; left: -3px; max-width: 96%; }

/* mobiel: compactere stickers, voor-regel pas op de werkpagina */
@media (max-width: 719px) {
  .tile__t, .tile__claim { font-size: 11.5px; padding: 2px 6px 3px; }
  .tile__voor { display: none; }
}

/* ── de digitale kamer: sectie kleurt om bij de Digitaal-schakelaar ──── */
#galerie { transition: background .35s ease, color .35s ease; }
#galerie[data-kind="digital"] {
  background: #101016;
  color: #f2f2f5;
  padding-bottom: calc(1.5 * var(--leading, 28px));
}
#galerie[data-kind="digital"] .wallhead h1 { color: #f2f2f5; }
#galerie[data-kind="digital"] .wallhead h1 em { color: #7aa2ff; }
#galerie[data-kind="digital"] .wallhead p { color: #b9b9c6; }
#galerie[data-kind="digital"] .count-line { color: #8b8b99; }
#galerie[data-kind="digital"] .chip { background: transparent; color: #d5d5e0; border-color: #3a3a48; }
#galerie[data-kind="digital"] .chip[aria-pressed="true"] { background: #7aa2ff; color: #0d0d12; border-color: #7aa2ff; }
#galerie[data-kind="digital"] .tile__art {
  background: none;
  border: none;
  box-shadow: 0 0 0 1px #2c2c3a, 0 14px 40px rgba(122, 162, 255, .22);
}
@media (hover: hover) {
  #galerie[data-kind="digital"] .tile__art:hover { box-shadow: 0 0 0 1px #7aa2ff, 0 20px 55px rgba(122, 162, 255, .4); }
}

/* ── de panelen onder de muur (claimen / over / contact) ────────────── */
.compact-story {
  max-width: var(--maxw, 1160px);
  margin: 0 auto;
  padding: calc(1.5 * var(--leading, 28px)) var(--edge, 16px);
  display: grid;
  gap: calc(1.5 * var(--leading, 28px));
}
.compact-panel > span, .compact-panel__lead > span {
  display: block;
  font: 800 11px/1 var(--font-heading, sans-serif);
  letter-spacing: .14em;
  color: var(--color-accent, #e33);
  margin-bottom: 8px;
}
.compact-panel h2 {
  font-family: var(--font-heading, sans-serif);
  font-weight: 800;
  font-size: clamp(22px, 3vw, 34px);
  line-height: 1.05;
  margin: 0 0 10px;
}
.compact-panel p { max-width: 56ch; margin: 0; line-height: 1.55; }
.compact-steps {
  list-style: none;
  margin: 18px 0 0; padding: 0;
  display: flex; gap: 24px; flex-wrap: wrap;
}
.compact-steps li { display: flex; align-items: baseline; gap: 8px; }
.compact-steps b {
  font-family: "Permanent Marker", cursive;
  font-weight: 400;
  color: var(--color-accent, #e33);
}
.compact-about { display: flex; gap: 28px; align-items: center; flex-wrap: wrap; }
.compact-about figure { margin: 0; flex: 0 0 200px; }
.compact-about figure img {
  width: 200px; height: 200px;
  object-fit: cover;
  border: 3px solid var(--funk-ink, #111);
  box-shadow: 6px 6px 0 var(--funk-ink, #111);
  transform: rotate(-1.5deg);
}
.compact-about > div { flex: 1 1 300px; }
.compact-stats { display: flex; gap: 10px 22px; align-items: baseline; flex-wrap: wrap; margin-top: 14px; }
.compact-stats b { font: 800 26px/1 var(--font-heading, sans-serif); }
.compact-stats span { font-size: 13px; color: var(--color-neutral-600, #666); }
.compact-contact div { display: flex; gap: 20px; flex-wrap: wrap; margin-top: 12px; }
.compact-contact a {
  font-family: "Permanent Marker", cursive;
  color: var(--color-accent-700, #a11);
  text-decoration: underline 2px var(--color-accent, #e33);
  text-underline-offset: 3px;
}
