/* Plan een gesprek (contact.html), 13 okt 2026. Eigen laag met prefix .w5-talk-, gebouwd door
   scripts/v5/build_contact.py + talk.py. Stijlt ook de gespreksflow uit main.js (#contact-flow), maar
   enkel binnen .w5-talk-card. Accent: --talk, volgt het site-accent. */

.w5-talk-hero, .w5-talk-stage, .w5-talk-direct {
  /* volgt het accent van de site (v5.css: --pink is sinds 13 okt het Wisto-blauw) */
  --talk: var(--pink, #0071e3);
  --talk-deep: var(--pink-deep, #0062c4);
  --talk-text: var(--pink-text, #0066cc);
  --talk-tint: var(--pink-tint, #e8f2fd);
  --spring: cubic-bezier(.34, 1.56, .64, 1);
  --out: cubic-bezier(.16, 1, .3, 1);
}
.w5-frame > .w5-talk-stage, .w5-frame > .w5-talk-hero + section { border-top: 0; }

/* ---------------------------------------------------------------- hero op een landschap */
.w5-talk-hero { padding-top: 24px; }
.w5-talk-scene { position: relative; overflow: hidden; border-radius: 6px; isolation: isolate; background: #efe6dc; min-height: 640px; }
.w5-talk-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 70%; z-index: -1; }
.w5-talk-hero__grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 24px; align-items: start; padding: 88px 72px 200px; }
.w5-talk-h1 { font-size: clamp(48px, 5.6vw, 84px); font-weight: 500; line-height: 1; letter-spacing: -0.04em; color: var(--ink); }
.w5-talk-h1 .mw { margin-inline: .06em; }
.w5-talk-lead { margin-top: 24px; max-width: 30ch; font-size: clamp(19px, 1.6vw, 23px); line-height: 1.4; letter-spacing: -0.015em; color: rgba(13, 13, 13, .78); }
.w5-talk-facts { margin-top: 32px; display: grid; gap: 10px; }
.w5-talk-facts li { display: flex; align-items: center; gap: 10px; font-size: 15px; color: var(--ink); }
.w5-talk-facts svg { width: 18px; height: 18px; color: var(--talk); flex: none; }

.w5-talk-collage { position: relative; height: 400px; }
.w5-talk-collage .stk { position: absolute; }
.w5-talk-c1 { left: 6%; top: 8%; }
.w5-talk-c2 { right: 4%; top: 0; }
.w5-talk-c3 { left: 22%; top: 60%; }
.w5-talk-c4 { right: 10%; top: 44%; }

/* ---------------------------------------------------------------- de kaart met de flow */
.w5-talk-stage { position: relative; z-index: 2; margin-top: -168px; padding-bottom: 112px; }
.w5-talk-card {
  position: relative; max-width: 860px; margin-inline: auto; background: #fff; border-radius: 24px;
  box-shadow: 0 0 0 1px var(--line), 0 40px 90px -40px rgba(40, 24, 40, .35);
  padding: 36px 48px 40px; min-height: 420px;
}
.w5-talk-card { scroll-margin-top: 96px; }
.w5-talk-corner { position: absolute; right: -40px; top: -46px; }

/* kop van de kaart: figuurtje, voortgang, hoeveel vragen nog */
.w5-talk-top { display: flex; align-items: center; gap: 20px; padding-bottom: 24px; border-bottom: 1px solid var(--line); }
.w5-talk-fig { width: 52px; height: auto; flex: none; overflow: visible; transform-origin: 50% 90%; }
.w5-talk-fig.is-hop { animation: talk-hop .6s var(--spring); }
.w5-talk-fig.is-shake { animation: talk-shake .45s ease; }
.w5-talk-eyes { transform: translate(var(--lx, 0px), var(--ly, 0px)); transition: transform .35s var(--out); }
.w5-talk-eyes rect { transform-box: fill-box; transform-origin: center; }
.w5-talk-blink .w5-talk-eyes rect { animation: talk-blink 5.2s infinite; }
.w5-talk-blink .stk-cut .w5-talk-eyes rect { animation: none; }
.w5-talk-smile { opacity: 0; }
.is-happy .w5-talk-eyes { opacity: 0; }
.is-happy .w5-talk-smile { opacity: 1; }
.w5-talk-prog { position: relative; flex: 1 1 auto; height: 14px; display: flex; align-items: center; }
.w5-talk-track { position: absolute; left: 5px; right: 5px; top: 6px; height: 2px; border-radius: 2px; background: var(--line-2); overflow: hidden; }
.w5-talk-track i { position: absolute; inset: 0; background: var(--talk); transform-origin: left; transform: scaleX(var(--p, 0)); transition: transform .9s var(--out); }
.w5-talk-dots { position: relative; display: flex; justify-content: space-between; width: 100%; }
.w5-talk-dots b { width: 12px; height: 12px; border-radius: 99px; background: #fff; box-shadow: inset 0 0 0 1.5px rgba(0, 0, 0, .2); transition: background-color .3s ease, box-shadow .3s ease, transform .5s var(--spring); }
.w5-talk-dots b.is-new { animation: talk-pop .55s var(--spring) both; }
.w5-talk-dots b.is-on { background: var(--talk); box-shadow: inset 0 0 0 1.5px var(--talk); }
.w5-talk-dots b.is-cur { box-shadow: inset 0 0 0 1.5px var(--talk), 0 0 0 5px var(--talk-tint); transform: scale(1.1); }
.w5-talk-left { flex: none; min-width: 112px; text-align: right; font-size: 14px; color: var(--ink-3); font-variant-numeric: tabular-nums; }

/* ---------------------------------------------------------------- de flow (ids uit main.js) */
.w5-talk-card .contact-flow { position: relative; padding-top: 28px; font-family: var(--sans); }
.w5-talk-card button, .w5-talk-card input, .w5-talk-card textarea { font-family: var(--sans); }
.w5-talk-card .visually-hidden { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* beantwoorde vragen: compacte kaartjes die met een veer binnenspringen */
.w5-talk-card .contact-flow__history { display: flex; flex-wrap: wrap; gap: 8px; }
.w5-talk-card .contact-flow__history:not(:empty) { margin-bottom: 28px; }
.w5-talk-card .contact-flow__past {
  display: inline-flex; flex-direction: column; gap: 1px; max-width: 100%; padding: 8px 14px 9px; border-radius: 14px;
  background: var(--soft); box-shadow: inset 0 0 0 1px var(--line); animation: talk-past .6s var(--spring) both;
}
.w5-talk-card .contact-flow__past::before { content: attr(data-short); font-size: 12px; line-height: 1.3; color: var(--ink-3); }
.w5-talk-card .contact-flow__past-q { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.w5-talk-card .contact-flow__past-a { font-size: 15px; font-weight: 500; line-height: 1.35; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 46ch; }

/* de gemeente op de kaart */
.w5-talk-card .contact-globe-wrap { margin: 0 0 28px; animation: talk-past .7s var(--out) both; }
.w5-talk-card .contact-globe-wrap[hidden] { display: none; }
.w5-talk-card .contact-globe__label { margin: 0 0 10px; font-size: 14px; color: var(--ink-2); }
.w5-talk-card .contact-globe__label strong { color: var(--ink); font-weight: 600; }
.w5-talk-card .contact-globe { height: 260px; border-radius: 16px; overflow: hidden; background: #dfe6ef; box-shadow: inset 0 0 0 1px var(--line); }
.w5-talk-card .contact-globe .mapboxgl-ctrl-bottom-right, .w5-talk-card .contact-globe .mapboxgl-ctrl-bottom-left { display: none; }

/* de actieve vraag */
.w5-talk-card .contact-flow__active { position: relative; }
.w5-talk-card .contact-flow__back { display: inline-flex; align-items: center; gap: 4px; margin: 0 0 14px; padding: 4px 0; border: 0; background: none; font-size: 14px; color: var(--ink-3); cursor: pointer; }
.w5-talk-card .contact-flow__back:hover { color: var(--ink); }
.w5-talk-card .contact-flow__back:focus-visible { outline: 2px solid var(--talk); outline-offset: 3px; border-radius: 6px; }
.w5-talk-card .contact-flow__back[hidden] { display: none; }
.w5-talk-card .contact-flow__question { font-size: clamp(26px, 2.6vw, 34px); font-weight: 500; line-height: 1.15; letter-spacing: -0.025em; color: var(--ink); text-wrap: balance; }
.w5-talk-card .contact-flow__question.is-new { animation: talk-q .7s var(--out) both; }
.w5-talk-card .is-new-row { animation: talk-row .7s .08s var(--out) both; }

.w5-talk-card .contact-flow__choices { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.w5-talk-card .contact-flow__choices[hidden] { display: none; }
.w5-talk-card .contact-flow__choice {
  height: 52px; padding: 0 24px; border: 0; border-radius: 999px !important; background: #fff; color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--line-2); font-size: 16px; font-weight: 500; cursor: pointer;
  transition: box-shadow .15s ease, background-color .15s ease, color .15s ease, transform .4s var(--spring);
  animation: talk-pop .55s var(--spring) both;
}
.w5-talk-card .contact-flow__choice:nth-child(2) { animation-delay: .07s; }
.w5-talk-card .contact-flow__choice:nth-child(3) { animation-delay: .14s; }
.w5-talk-card .contact-flow__choice:hover { box-shadow: inset 0 0 0 1px var(--ink); transform: translateY(-2px); }
.w5-talk-card .contact-flow__choice:focus-visible { outline: 2px solid var(--talk); outline-offset: 3px; }
.w5-talk-card .contact-flow__choice--selected { background: var(--talk); color: #fff; box-shadow: none; animation: talk-pick .5s var(--spring) both; }

.w5-talk-card .contact-flow__answer-row { margin-top: 26px; }
.w5-talk-card .contact-flow__answer-row[hidden], .w5-talk-card .contact-flow__single[hidden], .w5-talk-card .contact-flow__multiline[hidden] { display: none; }
.w5-talk-card .contact-flow__field-wrap { position: relative; }
.w5-talk-card .contact-flow__field-wrap::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--talk); transform: scaleX(0); transform-origin: left; transition: transform .5s var(--out); }
.w5-talk-card .contact-flow__field-wrap:focus-within::after { transform: scaleX(1); }
.w5-talk-card .contact-flow__mirror, .w5-talk-card .contact-flow__caret { display: none; }
.w5-talk-card .contact-flow__field {
  display: block; width: 100%; height: 60px; margin: 0; padding: 0 0 4px; border: 0; border-bottom: 1px solid var(--line-2); border-radius: 0;
  background: transparent; font-size: 26px; font-weight: 500; letter-spacing: -0.02em; color: var(--ink); caret-color: var(--talk); outline: none;
}
.w5-talk-card .contact-flow__field::placeholder, .w5-talk-card .contact-flow__textarea::placeholder { color: #b9b9b9; font-weight: 400; }
.w5-talk-card .contact-flow__suggestions-wrap { position: relative; z-index: 3; margin-top: 10px; max-height: 260px; overflow: hidden auto; border-radius: 14px; background: #fff; box-shadow: 0 0 0 1px var(--line), 0 18px 40px -20px rgba(0, 0, 0, .25); }
.w5-talk-card .contact-flow__suggestions-wrap[hidden] { display: none; }
.w5-talk-card .contact-flow__suggestions { margin: 0; padding: 6px; list-style: none; }
.w5-talk-card .contact-flow__suggestion { padding: 10px 12px; border-radius: 9px; font-size: 16px; color: var(--ink); cursor: pointer; }
.w5-talk-card .contact-flow__suggestion:hover, .w5-talk-card .contact-flow__suggestion--active { background: var(--talk-tint); color: var(--talk-text); }

.w5-talk-card .contact-flow__multiline { display: grid; gap: 16px; }
.w5-talk-card .contact-flow__textarea {
  width: 100%; min-height: 160px; padding: 16px 18px; border: 0; border-radius: 16px; resize: vertical; background: var(--soft);
  box-shadow: inset 0 0 0 1px var(--line); font-size: 17px; line-height: 1.55; color: var(--ink); outline: none; transition: box-shadow .2s ease, background-color .2s ease;
}
.w5-talk-card .contact-flow__textarea:focus { background: #fff; box-shadow: inset 0 0 0 1.5px var(--talk); }
.w5-talk-card .contact-flow__submit {
  justify-self: start; display: inline-flex; align-items: center; height: 48px; padding: 0 26px; border: 0; border-radius: 999px;
  background: var(--talk); color: #fff; font-size: 16px; font-weight: 500; cursor: pointer; transition: background-color .15s ease, transform .4s var(--spring);
}
.w5-talk-card .contact-flow__submit:hover { background: var(--talk-deep); transform: translateY(-2px); }
.w5-talk-card .contact-flow__submit:focus-visible { outline: 2px solid var(--talk); outline-offset: 3px; }
.w5-talk-card .contact-flow__submit[hidden] { display: none; }
.w5-talk-card .contact-flow__err { display: flex; gap: 8px; align-items: flex-start; margin-top: 14px; font-size: 14.5px; line-height: 1.45; color: var(--talk-text); animation: talk-row .4s var(--out) both; }
.w5-talk-card .contact-flow__err::before { content: "!"; flex: none; display: grid; place-items: center; width: 18px; height: 18px; margin-top: 1px; border-radius: 99px; background: var(--talk); color: #fff; font-size: 12px; font-weight: 700; }
.w5-talk-card .contact-flow__err[hidden] { display: none; }

.w5-talk-hint { margin-top: 18px; font-size: 13px; color: var(--ink-3); transition: opacity .25s ease; }
.w5-talk-hint[hidden] { display: none; }
.w5-talk-hint kbd { display: inline-block; padding: 1px 7px; margin-right: 4px; border-radius: 6px; box-shadow: inset 0 0 0 1px var(--line-2); font: 500 12px/1.6 var(--sans); color: var(--ink-2); }

/* ---------------------------------------------------------------- bevestiging */
.w5-talk-card .contact-flow__sent[hidden], .w5-talk-done[hidden], .w5-talk-after[hidden] { display: none; }
.w5-talk-card .contact-flow__sent-window { padding: 0; background: none; border: 0; box-shadow: none; }
.w5-talk-card .contact-flow__sent-banner { display: none; }
.w5-talk-card .contact-flow__sent-line { margin: 0; font-size: 17px; line-height: 1.6; color: var(--ink-2); max-width: 60ch; }
.w5-talk-card .typewriter__caret { display: inline-block; width: 2px; height: 1.05em; margin-left: 2px; vertical-align: -0.15em; background: var(--talk); animation: talk-caret 1s steps(1) infinite; }
.w5-talk-card.is-sent { min-height: 0; }
.w5-talk-card.is-sent .w5-talk-top, .w5-talk-card.is-sent .w5-talk-hint { display: none; }
.w5-talk-card.is-sent .contact-flow { padding-top: 16px; }
.w5-talk-done { padding-top: 12px; }
.w5-talk-done__fig { display: inline-block; animation: talk-bounce 1s .1s var(--spring) both; }
.w5-talk-done__h { margin-top: 18px; font-size: clamp(34px, 3.6vw, 48px); font-weight: 500; line-height: 1.05; letter-spacing: -0.035em; animation: talk-q .8s .2s var(--out) both; }
.w5-talk-done__p { margin-top: 12px; font-size: 18px; line-height: 1.5; color: var(--ink); max-width: 46ch; animation: talk-q .8s .3s var(--out) both; }
.w5-talk-after { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; margin-top: 28px; animation: talk-row .7s 1.2s var(--out) both; }
.w5-talk-after .w5-pill { background: var(--talk); }
.w5-talk-after .w5-pill:hover { background: var(--talk-deep); }

.w5-talk-stamp { position: absolute; right: 40px; top: 36px; display: none; pointer-events: none; }
.w5-talk-card.is-sent .w5-talk-stamp { display: block; animation: talk-stamp .7s .55s cubic-bezier(.2, .9, .3, 1.2) both; }
.w5-talk-card.is-sent { animation: talk-thud .5s .95s ease both; }
.w5-talk-confetti { display: none; }
.w5-talk-card.is-sent .w5-talk-confetti { display: block; }
.w5-talk-confetti .stk { position: absolute; opacity: 0; animation: stk-pop .8s var(--d, 0s) var(--spring) both; }
.w5-talk-k1 { left: -64px; bottom: -40px; --d: 1.05s; }
.w5-talk-k2 { right: -36px; bottom: 48px; --d: 1.25s; }
.w5-talk-card.is-sent .w5-talk-corner { display: none; }

/* ---------------------------------------------------------------- direct contact, compact */
.w5-talk-direct { border-top: 1px solid var(--line); }
.w5-talk-direct__row { display: grid; grid-template-columns: minmax(0, 1.3fr) repeat(3, minmax(0, 1fr)); gap: 32px; align-items: center; padding-block: 40px 48px; }
.w5-talk-direct__intro h2 { font-size: 22px; font-weight: 500; letter-spacing: -0.015em; line-height: 1.25; }
.w5-talk-direct__intro p { margin-top: 6px; font-size: 14.5px; line-height: 1.5; color: var(--ink-2); max-width: 40ch; }
.w5-talk-person { display: flex; gap: 14px; align-items: center; min-width: 0; }
.w5-talk-person img { width: 48px; height: 48px; border-radius: 99px; object-fit: cover; flex: none; background: var(--soft-2); }
.w5-talk-person > svg { width: 22px; height: 22px; margin: 13px; color: var(--ink); flex: none; }
.w5-talk-person__n { font-size: 15px; font-weight: 500; line-height: 1.3; overflow-wrap: anywhere; }
.w5-talk-person__n a:hover { color: var(--talk-text); }
.w5-talk-person__r { font-size: 13.5px; color: var(--ink-3); line-height: 1.4; }
.w5-talk-person__l { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 4px; font-size: 13.5px; }
.w5-talk-person__l a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 3px; }
.w5-talk-person__l a:hover { color: var(--talk-text); text-decoration-color: currentColor; }

/* ---------------------------------------------------------------- beweging */
@keyframes talk-q { from { opacity: 0; transform: translate3d(32px, 0, 0); filter: blur(6px); } to { opacity: 1; transform: none; filter: none; } }
@keyframes talk-row { from { opacity: 0; transform: translate3d(0, 12px, 0); } to { opacity: 1; transform: none; } }
@keyframes talk-past { from { opacity: 0; transform: translate3d(0, 14px, 0) scale(.85); } to { opacity: 1; transform: none; } }
@keyframes talk-pop { from { opacity: 0; transform: scale(.6); } to { opacity: 1; transform: none; } }
@keyframes talk-pick { 0% { transform: scale(1); } 40% { transform: scale(1.1); } 100% { transform: scale(1); } }
@keyframes talk-hop { 0%, 100% { transform: none; } 35% { transform: translateY(-9px) scaleY(1.06); } 65% { transform: translateY(0) scaleY(.94); } }
@keyframes talk-shake { 0%, 100% { transform: none; } 20% { transform: translateX(-6px) rotate(-6deg); } 45% { transform: translateX(5px) rotate(5deg); } 70% { transform: translateX(-3px); } }
@keyframes talk-blink { 0%, 93%, 100% { transform: scaleY(1); } 95.5% { transform: scaleY(.1); } }
@keyframes talk-bounce { 0% { opacity: 0; transform: translateY(30px) scale(.5) rotate(-20deg); } 100% { opacity: 1; transform: none; } }
@keyframes talk-stamp { 0% { opacity: 0; transform: scale(2.4) rotate(-30deg); } 60% { opacity: 1; transform: scale(.9) rotate(-2deg); } 100% { opacity: 1; transform: scale(1); } }
@keyframes talk-thud { 0%, 100% { transform: none; } 30% { transform: translateY(3px) scale(.996); } }
@keyframes talk-caret { 50% { opacity: 0; } }

/* ---------------------------------------------------------------- tablet en mobiel */
@media (max-width: 1100px) {
  .w5-talk-hero__grid { padding: 64px 40px 200px; }
  .w5-talk-collage { height: 340px; zoom: .85; }
}
@media (max-width: 860px) {
  .w5-talk-scene { min-height: 0; }
  .w5-talk-hero__grid { grid-template-columns: 1fr; gap: 8px; padding: 48px 24px 170px; }
  .w5-talk-collage { height: 250px; zoom: 1; max-width: 420px; width: 100%; margin-inline: auto; }
  .w5-talk-collage .stk { zoom: .62; }
  .w5-talk-c1 { left: 0; top: 4%; } .w5-talk-c2 { right: 0; top: 0; } .w5-talk-c3 { left: 14%; top: 66%; } .w5-talk-c4 { right: 4%; top: 52%; }
  .w5-talk-stage { margin-top: -132px; padding-bottom: 72px; }
  .w5-talk-card { padding: 28px 28px 32px; }
  .w5-talk-corner { right: -10px; top: -40px; zoom: .8; }
  .w5-talk-direct__row { grid-template-columns: 1fr 1fr; gap: 24px; }
  .w5-talk-direct__intro { grid-column: 1 / -1; }
}
@media (max-width: 560px) {
  .w5-talk-hero { padding-top: 12px; }
  .w5-talk-hero .w5-in, .w5-talk-stage .w5-in { padding-inline: 12px; }
  .w5-talk-hero__grid { padding: 36px 18px 150px; }
  .w5-talk-h1 { font-size: 46px; }
  .w5-talk-lead { margin-top: 16px; font-size: 18px; }
  .w5-talk-facts { margin-top: 22px; gap: 8px; }
  .w5-talk-facts li { font-size: 14px; }
  .w5-talk-collage { height: 210px; }
  .w5-talk-collage .stk { zoom: .5; }
  .w5-talk-stage { margin-top: -120px; }
  .w5-talk-card { padding: 22px 18px 26px; border-radius: 20px; }
  .w5-talk-corner { right: -6px; top: -34px; zoom: .62; }
  .w5-talk-top { gap: 14px; padding-bottom: 18px; }
  .w5-talk-fig { width: 40px; }
  .w5-talk-left { min-width: 0; font-size: 13px; }
  .w5-talk-dots b { width: 10px; height: 10px; }
  .w5-talk-track { top: 5px; }
  .w5-talk-card .contact-flow { padding-top: 22px; }
  .w5-talk-card .contact-flow__question { font-size: 24px; }
  .w5-talk-card .contact-flow__choices { margin-top: 22px; gap: 8px; }
  .w5-talk-card .contact-flow__choice { height: 48px; padding: 0 20px; font-size: 15.5px; }
  .w5-talk-card .contact-flow__field { font-size: 21px; height: 52px; }
  .w5-talk-card .contact-flow__past-a { max-width: 28ch; }
  .w5-talk-stamp { right: 10px; top: 14px; zoom: .62; }
  .w5-talk-k1 { left: -14px; bottom: -34px; zoom: .6; } .w5-talk-k2 { right: -10px; bottom: 30px; zoom: .6; }
  .w5-talk-done__fig { zoom: .8; }
  .w5-talk-direct__row { grid-template-columns: 1fr; gap: 20px; padding-block: 32px 40px; }
}

@media (prefers-reduced-motion: reduce) {
  .w5-talk-card *, .w5-talk-card, .w5-talk-card *::after, .w5-talk-hero * { animation: none !important; transition: none !important; }
  .w5-talk-confetti .stk { opacity: 1; }
}
/* 12 nov 2026: twee knipperende cursors. Het invoerveld heeft al de echte (blauwe) cursor; de nagebootste
   typewriter-caret van de oude flow won hier van de display:none hierboven en knipperde ernaast. */
.w5-talk-card .typewriter__caret.contact-flow__caret { display: none !important; }
