/* Uitleganimaties op energieplichtwijzer.nl: de vier stappen van "Zo werkt het" (check, vul in, controleer, dien in).
   Zelfde aanpak als de animaties op ecr-software.nl:
   - zonder animatie (geen JavaScript, of "verminderde beweging" aan) staat het eindbeeld er;
   - uitleg.js zet .wacht (beginbeeld, stilgezet) en .play; komt het beeld in zicht, dan gaat .wacht eraf en speelt de
     tijdlijn; na afloop 2 s eindbeeld en dan opnieuw (uit beeld gepauzeerd); de knop ↻ begint meteen opnieuw;
   - elk onderdeel heeft één animatie; het moment staat in --d (vertraging) en de duur in --t;
   - wat tijdens de animatie verdwijnt (.w-weg) is in het eindbeeld al weg.
   Kleuren uit stijl.css: navy 16324f · blauw 2f66a8 · groen 5aa63a. Alle gegevens in de tekeningen zijn fictief. */

.uitleg-sectie{margin:4px 0 22px}
.uitleg-sectie > h2{margin-bottom:4px}
.uitleg-sectie > p{color:var(--grijs);max-width:720px}
.uitleg-raster{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px;margin-top:14px}
@media (max-width:760px){.uitleg-raster{grid-template-columns:1fr}}

.uitleg{
  --u-navy:#16324f;--u-blauw:#2f66a8;--u-blauw-050:#eaf1fa;--u-groen:#5aa63a;--u-groen-050:#eef6ea;--u-groen-donker:#2d5f18;
  --u-oranje:#c77700;--u-oranje-050:#fff4e0;--u-inkt:#1d1d1f;--u-grijs:#6e6e73;--u-paneel:#f5f5f7;--u-lijn:#e3e7ee;--u-lijn-sterk:#c9ced6;
  position:relative;margin:0;background:#fff;border:1px solid var(--lijn);border-radius:10px;padding:16px 16px 14px;
  box-shadow:0 18px 44px -30px rgba(22,50,79,.35)}
.uitleg svg.u-art{display:block;width:100%;height:auto;overflow:visible}
.uitleg figcaption{font-size:.92rem;color:var(--grijs);margin-top:10px;padding-right:52px;line-height:1.5}
.uitleg figcaption b{display:block;color:var(--navy);font-size:1rem;margin-bottom:2px}
.uitleg figcaption b span{color:var(--groen)}
.u-replay{display:none;position:absolute;right:12px;bottom:12px;width:44px;height:44px;border-radius:50%;border:1px solid var(--lijn);background:#fff;color:var(--grijs);align-items:center;justify-content:center;cursor:pointer;padding:0}
.u-replay:hover{color:var(--blauw);border-color:var(--blauw)}
.u-replay svg{width:20px;height:20px}
.uitleg.js .u-replay{display:flex}

/* tekst en vormen in de tekeningen */
.u-art text{font-family:Arial,Helvetica,sans-serif;fill:var(--u-inkt)}
.u-midden{text-anchor:middle}
.w-kaart{fill:#fff;stroke:var(--u-lijn-sterk);stroke-width:1.2}
.w-kop{font-size:13px;font-weight:700;fill:var(--u-navy)!important}
.w-label{font-size:10px;fill:var(--u-grijs)!important}
.w-klein{font-size:9.5px;fill:var(--u-grijs)!important}
.w-titel{font-size:11px;font-weight:700}
.w-veld{fill:#fff;stroke:var(--u-lijn-sterk);stroke-width:1.2}
.w-waarde{font-size:13px;font-weight:700}
.w-baan{fill:var(--u-lijn)}
.w-vul{fill:var(--u-blauw);transform-box:fill-box;transform-origin:left center}
.w-vul.groen{fill:var(--u-groen)}
.w-drempel{stroke:var(--u-navy);stroke-width:2;stroke-linecap:round}
.w-scheiding{stroke:var(--u-lijn);stroke-width:1}
.w-pijl{fill:none;stroke:var(--u-blauw);stroke-width:2.4;stroke-linecap:round;stroke-linejoin:round}
.w-badge text{font-size:10px;font-weight:700;text-anchor:middle}
.w-badge.ja rect{fill:var(--u-groen-050)}.w-badge.ja text{fill:var(--u-groen-donker)!important}
.w-badge.nee rect{fill:var(--u-paneel)}.w-badge.nee text{fill:var(--u-grijs)!important}
.w-badge.let rect{fill:var(--u-oranje-050)}.w-badge.let text{fill:var(--u-oranje)!important}
.w-knop{transform-box:fill-box;transform-origin:center}
.w-knop rect{fill:var(--u-navy)}
.w-knop.groen rect{fill:var(--u-groen)}
.w-knop text{fill:#fff!important;font-size:11px;font-weight:700;text-anchor:middle}
.w-vink{fill:none;stroke:#fff;stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round}
.w-ok{fill:var(--u-groen)}
.w-let{fill:var(--u-oranje)}
.w-uitroep{fill:#fff!important;font-size:12px;font-weight:700;text-anchor:middle}
.w-sk{fill:var(--u-lijn)}

/* 2 · vul in */
.w-stap text{font-size:9.5px;font-weight:700;text-anchor:middle}
.w-stap.klaar rect{fill:var(--u-groen-050)}.w-stap.klaar text{fill:var(--u-groen-donker)!important}
.w-stap.actief rect{fill:var(--u-navy)}.w-stap.actief text{fill:#fff!important}
.w-stap.open rect{fill:#fff;stroke:var(--u-lijn-sterk);stroke-width:1}.w-stap.open text{fill:var(--u-grijs)!important}
.w-seg rect{fill:#fff;stroke:var(--u-lijn-sterk);stroke-width:1}
.w-seg text{font-size:10px;font-weight:700;text-anchor:middle;fill:var(--u-grijs)!important}
.w-seg.aan rect{fill:var(--u-navy);stroke:var(--u-navy)}.w-seg.aan text{fill:#fff!important}
.w-seg.uit rect{fill:#e6e9ee}.w-seg.uit text{fill:var(--u-inkt)!important}
.w-mkaart{fill:#fff;stroke:var(--u-lijn);stroke-width:1.2}

/* 3 · controleer */
.w3-bg{fill:none;stroke:var(--u-lijn);stroke-width:8}
.w3-ring{fill:none;stroke:var(--u-groen);stroke-width:8;stroke-linecap:round;stroke-dasharray:238.76;stroke-dashoffset:160;
  transform-box:view-box;transform-origin:101px 122px;transform:rotate(-90deg)}
.w3-score{font-size:28px;font-weight:700;fill:var(--u-navy)!important;text-anchor:middle}
.w-dek{fill:#fff;fill-opacity:.62}
.w-streep{fill:none;stroke:var(--u-grijs);stroke-width:1.3;stroke-dasharray:1}

/* 4 · dien in */
.w-raam{fill:#fff;stroke:var(--u-lijn-sterk);stroke-width:1.2}
.w-balk{fill:var(--u-paneel)}
.w-punt{fill:var(--u-lijn-sterk)}
.w-zone{fill:#fafbfd;stroke:var(--u-lijn-sterk);stroke-width:1.5;stroke-dasharray:5 4}
.w-doc{fill:#fff;stroke:var(--u-blauw);stroke-width:1.8;stroke-linejoin:round}
.w-vouw{fill:var(--u-blauw-050);stroke:var(--u-blauw);stroke-width:1.8;stroke-linejoin:round}
.w-doctekst{font-size:8px;font-weight:700;fill:var(--u-blauw)!important;text-anchor:middle}
.w-stip{fill:none;stroke:#b9cde6;stroke-width:2;stroke-dasharray:2 6;stroke-linecap:round}

/* eindbeeld zonder animatie: wat verdwijnt is weg */
.w-weg{opacity:0}

/* de tijdlijnen: één animatie per onderdeel; moment in --d, duur in --t */
.uitleg.wacht,.uitleg.wacht *{animation-play-state:paused!important}
.uitleg.play .u-pop{transform-box:fill-box;transform-origin:center;animation:u-pop var(--t,.45s) cubic-bezier(.3,1.5,.5,1) var(--d,0s) both}
.uitleg.play .u-in{animation:u-in var(--t,.4s) ease-out var(--d,0s) both}
.uitleg.play .u-uit{animation:u-uit var(--t,.3s) ease-in var(--d,0s) both}
.uitleg.play .u-teken{animation:u-teken var(--t,.5s) ease-in-out var(--d,0s) both}
.uitleg.play .u-schuif{animation:u-schuif var(--t,.55s) cubic-bezier(.3,.9,.4,1) var(--d,0s) both}
.uitleg.play .u-groei{animation:u-groei var(--t,.6s) ease-out var(--d,0s) both}
.uitleg.play .w-druk{animation:w-druk .4s ease-in-out var(--d,0s) both}
.uitleg.play .w-licht{animation:w-licht var(--t,.4s) ease-out var(--d,0s) both}
@keyframes u-pop{0%{opacity:0;transform:scale(.3)}100%{opacity:1;transform:scale(1)}}
@keyframes u-in{0%{opacity:0}100%{opacity:1}}
@keyframes u-uit{0%{opacity:1}100%{opacity:0}}
@keyframes u-teken{0%{stroke-dashoffset:1}100%{stroke-dashoffset:0}}
@keyframes u-schuif{0%{opacity:0;transform:translate(-22px,0)}100%{opacity:1;transform:translate(0,0)}}
@keyframes u-groei{0%{transform:scaleX(0)}100%{transform:scaleX(1)}}
@keyframes w-druk{0%,100%{transform:scale(1)}50%{transform:scale(.9)}}
@keyframes w-licht{0%{stroke:var(--u-lijn-sterk);fill:#fafbfd}100%{stroke:var(--u-blauw);fill:var(--u-blauw-050)}}

/* 3 · de score loopt op tot 41 en zakt na het oplossen naar 33 (van oranje naar groen) */
.uitleg.play .w3-ring{animation:w3-ring 4.4s ease-in-out .3s both}
@keyframes w3-ring{
  0%{stroke-dashoffset:238.76;stroke:var(--u-oranje)}
  16%{stroke-dashoffset:140.87;stroke:var(--u-oranje)}
  72%{stroke-dashoffset:140.87;stroke:var(--u-oranje)}
  84%,100%{stroke-dashoffset:160.0;stroke:var(--u-groen)}}

/* 4 · het IPEB-bestand gaat met een boog van de downloadknop naar eLoket */
.w4-bestand{transform-box:fill-box;transform-origin:center}
.uitleg.play .w4-bestand{animation:w4-bestand 1.7s ease-in-out 1s both}
@keyframes w4-bestand{
  0%{opacity:0;transform:translate(-252px,36px) scale(.5)}
  14%{opacity:1;transform:translate(-252px,30px) scale(1)}
  38%{transform:translate(-188px,-2px)}
  62%{transform:translate(-110px,-16px)}
  84%{transform:translate(-36px,-10px)}
  100%{opacity:1;transform:translate(0,0)}}

@media (prefers-reduced-motion:reduce){
  .uitleg *,.uitleg{animation:none!important}
  .u-replay,.uitleg.js .u-replay{display:none!important}
}
