/* Pagina Website en merk: het tikbare Stadhuis (huis.js). De tekening komt uit {{PAND naam=website}}; daaroverheen ligt een eigen,
   decoratieve laag (.wbh-licht) die het gekozen deel oplicht. De knoppen staan op vaste plekken in procenten van de tekening (viewBox 311 × 299).
   Zonder script: geen knoppen, alle uitleg als lijst. Beweging: alleen opacity en transform, max 220 ms; niets bij reduced motion. */

.wbh { --wbh-grond: 46px; display: grid; gap: clamp(20px, 3vw, 36px); align-items: center; }
.wbh-instructie { font-family: 'IBM Plex Mono', ui-monospace, Consolas, monospace; font-size: .78rem; font-weight: 500; letter-spacing: .09em; text-transform: uppercase; color: var(--creme-zacht); }
.wbh-instructie[hidden], .wbh-punt[hidden], .wbh-uitleg[hidden] { display: none; }
.wbh-sr { position: absolute; inline-size: 1px; block-size: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* de tekening met de grond (fundering) eronder */
.wbh-beeld { position: relative; inline-size: min(100%, 480px); justify-self: center; padding-bottom: var(--wbh-grond); }
.wbh-pand { position: relative; aspect-ratio: 311 / 299; }
.wbh-pand .pandhero-svg, .wbh-licht { position: absolute; inset: 0; inline-size: 100%; block-size: 100%; max-width: none; }
.wbh .pandhero-svg g, .wbh .pandhero-svg .raam-gloed { animation: none; }
.wbh .pandhero-svg g { transition: color var(--duur-snel); }
.wbh-pand .pandhero-svg { z-index: 1; }
.wbh-licht { z-index: 0; pointer-events: none; overflow: visible; }   /* onder de lijnen van de tekening */
.wbh-vlak { fill: var(--goud); fill-opacity: .14; stroke: var(--goud); stroke-width: 2; stroke-linejoin: round; vector-effect: non-scaling-stroke; opacity: 0; transition: opacity 200ms var(--ease-uit); }
.wbh-grond { position: absolute; inset-inline: 0; bottom: 0; block-size: var(--wbh-grond); border-top: 2px solid var(--creme); background: repeating-linear-gradient(-45deg, transparent 0 7px, var(--lijn-groen) 7px 8px); }
.wbh-grond::after { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(-45deg, transparent 0 7px, var(--goud) 7px 8.5px); opacity: 0; transition: opacity 200ms var(--ease-uit); }

/* het gekozen deel licht op */
.wbh[data-actief="gevel"] .wbh-vlak[data-deel="gevel"],
.wbh[data-actief="toren"] .wbh-vlak[data-deel="toren"],
.wbh[data-actief="fundering"] .wbh-grond::after { opacity: 1; }
.wbh[data-actief="fundering"] .wbh-grond { border-top-color: var(--goud); }
.wbh[data-actief="ramen"] .pandhero-svg .pand-ramen { color: var(--goud); }
.wbh[data-actief="ramen"] .pandhero-svg .pand-ramen path { fill: currentColor; fill-opacity: .16; }

/* de tikpunten: het midden van de stip ligt op het ankerpunt; het label staat rechts of (--links) links ervan */
.wbh-punt { position: absolute; z-index: 2; display: inline-flex; align-items: center; gap: 8px; min-block-size: 44px; min-inline-size: 44px; padding: 0 14px 0 0; border: 0; border-radius: 999px; background: none; color: var(--creme); transform: translate(-22px, -50%); -webkit-tap-highlight-color: transparent; }
.wbh-punt--links { flex-direction: row-reverse; padding: 0 0 0 14px; transform: translate(calc(-100% + 22px), -50%); }
.wbh-stip { position: relative; flex: none; display: grid; place-items: center; inline-size: 44px; block-size: 44px; }
.wbh-stip::before { content: ""; inline-size: 18px; block-size: 18px; border: 2px solid var(--goud); border-radius: 50%; background: var(--groen); transition: transform 180ms var(--ease-uit); }
.wbh-stip::after { content: ""; position: absolute; inline-size: 8px; block-size: 8px; border-radius: 50%; background: var(--goud); transform: scale(0); transition: transform 180ms var(--ease-uit); }
.wbh-punt-tekst { padding: 5px 10px; border: 1px solid var(--creme); border-radius: 999px; background: var(--groen); font-family: 'IBM Plex Mono', ui-monospace, Consolas, monospace; font-size: .74rem; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; line-height: 1.2; white-space: nowrap; transition: background-color var(--duur-snel), color var(--duur-snel); }
.wbh-punt[aria-expanded="true"] .wbh-punt-tekst { background: var(--creme); color: var(--groen); }
.wbh-punt[aria-expanded="true"] .wbh-stip::after { transform: scale(1); }
.wbh-punt:focus-visible { outline: none; }
.wbh-punt:focus-visible .wbh-punt-tekst { outline: 2px solid var(--goud); outline-offset: 3px; }
.wbh-punt:focus-visible .wbh-stip::before { box-shadow: 0 0 0 3px var(--groen), 0 0 0 5px var(--goud); }
@media (hover: hover) {
  .wbh-punt:hover .wbh-stip::before { transform: scale(1.18); }
  .wbh-punt:hover .wbh-punt-tekst { border-color: var(--goud); }
}

/* ankerpunten (x / 311, y / 299 van de tekening; de grond ligt onder de tekening) */
.wbh-punt--fundering { left: 50%; top: calc(100% - var(--wbh-grond) / 2); }
.wbh-punt--gevel { left: 81.5%; top: calc((100% - var(--wbh-grond)) * .84); }
.wbh-punt--ramen { left: 23.8%; top: calc((100% - var(--wbh-grond)) * .595); }
.wbh-punt--toren { left: 74.3%; top: calc((100% - var(--wbh-grond)) * .27); }
.wbh-punt--fundering { transform: translate(-50%, -50%); padding-inline: 0; }
.wbh-punt--fundering .wbh-stip { display: none; }
.wbh-punt--fundering .wbh-punt-tekst { padding-block: 12px; }

/* de uitleg: zonder script vier rijen; met script alleen de gekozen rij */
.wbh-lijst { margin: 0; border-top: 1px solid var(--lijn-groen); }
.wbh-uitleg { display: grid; gap: 8px; padding-block: 18px; border-bottom: 1px solid var(--lijn-groen); }
.wbh-uitleg dt { display: grid; gap: 6px; font-size: clamp(1.8rem, 3.6vw, 2.8rem); font-weight: 650; letter-spacing: -.04em; line-height: 1; }
.wbh-deel { font-family: 'IBM Plex Mono', ui-monospace, Consolas, monospace; font-size: .78rem; font-weight: 500; letter-spacing: .09em; text-transform: uppercase; color: var(--goud); }
.wbh-uitleg dd { margin: 0; max-width: 40ch; font-family: 'Newsreader Variable', Georgia, 'Times New Roman', serif; font-size: clamp(1.15rem, 1.5vw, 1.35rem); line-height: 1.4; color: var(--creme-zacht); }
.wbh.is-tikbaar .wbh-lijst { min-block-size: 9.5em; }
@keyframes wbh-in { from { opacity: 0; transform: translateY(8px); } }
.wbh-uitleg.is-nieuw { animation: wbh-in 220ms var(--ease-uit) both; }

@media (min-width: 900px) {
  .wbh { grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); grid-template-areas: "beeld instructie" "beeld lijst"; align-items: end; row-gap: 18px; }
  .wbh-beeld { grid-area: beeld; inline-size: min(100%, 540px); }
  .wbh-instructie { grid-area: instructie; align-self: end; }
  .wbh-lijst { grid-area: lijst; align-self: start; }
}

@media (prefers-reduced-motion: reduce) {
  .wbh-vlak, .wbh-grond::after, .wbh-stip::before, .wbh-stip::after, .wbh-punt-tekst, .wbh .pandhero-svg g { transition: none; }
  .wbh-uitleg.is-nieuw { animation: none; }
}
