/* ===== Stampzer — "Voeg toe aan Wallet" animatie (herbruikbaar component) =====
   Gebruik: include dit bestand + wallet-anim.js en plaats de component-markup
   (zie apple-wallet-spaarkaart) in een element met [data-wallet-anim].
   Alle beweging is transform/opacity-only (GPU) met spring-curves. */

.wax-wrap { display: grid; justify-items: center; }
.wax-phone { width: 286px; background: var(--ink, #181f10); border-radius: 42px; padding: 12px; box-shadow: var(--shadow, 0 28px 60px -28px rgba(24,31,16,.45)); }
.wax { position: relative; width: 262px; height: 448px; border-radius: 31px; overflow: hidden; background: #05070b; }
.wax.no-anim *, .wax.no-anim { transition: none !important; animation: none !important; }

/* --- iPhone-chrome: Dynamic Island + statusbalk --- */
.wax-island { position: absolute; top: 9px; left: 50%; transform: translateX(-50%); width: 76px; height: 21px; background: #000; border-radius: 12px; z-index: 60; }
.wax-status { position: absolute; top: 10px; left: 0; right: 0; display: flex; justify-content: space-between; padding: 0 20px; z-index: 55; color: #f4f4f2; font-size: .72rem; font-weight: 600; letter-spacing: .02em; pointer-events: none; }
.wax-sticons { display: inline-flex; align-items: center; gap: 4px; }
.wax-sticons i { display: inline-block; }
.wax-sticons .sig { width: 15px; height: 9px; background: linear-gradient(to right, currentColor 2px, transparent 2px 3px, currentColor 3px 5px, transparent 5px 6px, currentColor 6px 8px, transparent 8px 9px, currentColor 9px 11px, transparent 11px); clip-path: polygon(0 70%, 100% 0, 100% 100%, 0 100%); }
.wax-sticons .wifi { width: 12px; height: 9px; border-radius: 50% 50% 0 0; border: 2px solid currentColor; border-bottom: 0; position: relative; }
.wax-sticons .wifi::after { content: ""; position: absolute; left: 50%; bottom: -1px; width: 3px; height: 3px; margin-left: -1.5px; border-radius: 50%; background: currentColor; }
.wax-sticons .bat { width: 18px; height: 9px; border: 1px solid rgba(244,244,242,.6); border-radius: 3px; position: relative; }
.wax-sticons .bat::before { content: ""; position: absolute; inset: 1px 4px 1px 1px; background: currentColor; border-radius: 1.5px; }
.wax-sticons .bat::after { content: ""; position: absolute; right: -3px; top: 2.5px; width: 2px; height: 4px; background: rgba(244,244,242,.6); border-radius: 0 1px 1px 0; }

/* ================= LAAG 1 — Wallet-achtergrond ================= */
.wax-bgwallet { position: absolute; inset: 0; z-index: 10; background: linear-gradient(180deg, #171c0e, #0d110a); padding: 40px 13px 0; opacity: 0; transition: opacity .4s ease; }
.s-fly .wax-bgwallet { opacity: 1; }
.wax-wtitle { display: flex; justify-content: space-between; color: #eef1ea; font-weight: 700; font-size: .95rem; padding: 4px 4px 10px; }
.wax-wtitle span:last-child { opacity: .5; letter-spacing: 2px; }
.wax-card { position: absolute; left: 13px; right: 13px; height: 140px; border-radius: 15px; padding: 13px 15px; box-shadow: 0 -10px 26px rgba(0,0,0,.4); transition: transform .32s cubic-bezier(.3,.9,.35,1); }
.wax-cbank { top: 96px; background: linear-gradient(135deg, #2b3550, #161d31); color: #dfe6f5; }
.wax-cbank .chip { width: 30px; height: 22px; border-radius: 5px; background: linear-gradient(135deg, #d8b64e, #b28f2e); margin-bottom: 20px; }
.wax-cbank .num { letter-spacing: 2px; font-size: .86rem; }
.wax-cbank .lbl { font-size: .68rem; opacity: .6; margin-top: 4px; }
.wax-cboard { top: 152px; background: #efe7d3; color: #2a3320; }
.wax-cboard .route { font-family: var(--font-display, Georgia), Georgia, serif; font-size: 1.2rem; margin-top: 2px; }
.wax-cboard .lbl { font-size: .68rem; color: #6c7458; }
/* anticipatie: kaarten wijken tijdens de vlucht */
.s-fly:not(.is-land) .wax-cbank { transform: translateY(-7px); }
.s-fly:not(.is-land) .wax-cboard { transform: translateY(-3px); }
/* follow-through: settle-duwtje na de landing */
.is-land .wax-cbank { animation: waxnudge .5s cubic-bezier(.3,.9,.35,1) .06s; }
.is-land .wax-cboard { animation: waxnudge .5s cubic-bezier(.3,.9,.35,1); }
@keyframes waxnudge { 35% { transform: translateY(6px); } 70% { transform: translateY(-1px); } 100% { transform: translateY(0); } }

/* ================= LAAG 2 — Camerabeeld ================= */
.wax-cam { position: absolute; inset: 0; z-index: 20; background: radial-gradient(140% 100% at 50% 0%, #12160c, #080a05); display: grid; place-items: center; transition: transform .5s cubic-bezier(.32,.9,.35,1), opacity .35s ease; }
.wax-cam::after { content: ""; position: absolute; inset: 0; background: #000; opacity: 0; transition: opacity .45s ease; }
.s-sheet .wax-cam { transform: scale(.93); border-radius: 22px; }
.s-sheet .wax-cam::after { opacity: .55; }
.s-fly .wax-cam { opacity: 0; transform: scale(.9); }

.wax-qrbox { position: relative; width: 148px; height: 148px; margin-top: 14px; }
.wax-qr { width: 100%; height: 100%; border-radius: 12px; background: #f7f2e7; padding: 11px; position: relative; overflow: hidden; }
.wax-qr svg { width: 100%; height: 100%; display: block; color: #181f10; }
.wax-qr::after { content: ""; position: absolute; inset: 0; background: rgba(41,199,0,.32); opacity: 0; }
.is-found .wax-qr::after { animation: waxflash .5s ease-out; }
@keyframes waxflash { 0% { opacity: 0; } 25% { opacity: 1; } 100% { opacity: 0; } }
.wax-corner { position: absolute; width: 26px; height: 26px; border: 3px solid #29c700; opacity: .95; transition: all .3s cubic-bezier(.3,1.4,.4,1); }
.wax-corner:nth-of-type(1) { top: -13px; left: -13px; border-right: 0; border-bottom: 0; border-radius: 8px 0 0 0; }
.wax-corner:nth-of-type(2) { top: -13px; right: -13px; border-left: 0; border-bottom: 0; border-radius: 0 8px 0 0; }
.wax-corner:nth-of-type(3) { bottom: -13px; left: -13px; border-right: 0; border-top: 0; border-radius: 0 0 0 8px; }
.wax-corner:nth-of-type(4) { bottom: -13px; right: -13px; border-left: 0; border-top: 0; border-radius: 0 0 8px 0; }
/* lock-on: zoeker klikt strak om de code */
.is-found .wax-corner:nth-of-type(1) { top: -5px; left: -5px; }
.is-found .wax-corner:nth-of-type(2) { top: -5px; right: -5px; }
.is-found .wax-corner:nth-of-type(3) { bottom: -5px; left: -5px; }
.is-found .wax-corner:nth-of-type(4) { bottom: -5px; right: -5px; }
.wax-scanline { position: absolute; left: 6px; right: 6px; top: 10px; height: 3px; border-radius: 2px; background: #29c700; box-shadow: 0 0 18px rgba(41,199,0,.95); opacity: 0; }
.s-scan .wax-scanline { opacity: 1; animation: waxscan 1.4s cubic-bezier(.45,.05,.55,.95) infinite alternate; }
.s-scan.is-found .wax-scanline { animation: none; top: 50%; opacity: 0; transition: opacity .3s ease .15s; }
@keyframes waxscan { from { top: 10px; } to { top: calc(100% - 12px); } }
.wax-found { position: absolute; left: 50%; bottom: -56px; transform: translateX(-50%) scale(.55); display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; background: #29c700; color: #181f10; font-weight: 700; font-size: .82rem; padding: 8px 15px; border-radius: 999px; opacity: 0; transition: all .34s cubic-bezier(.2,1.5,.4,1) .12s; }
.is-found .wax-found { opacity: 1; transform: translateX(-50%) scale(1); }

/* ================= LAAG 3 — iOS-sheet ================= */
.wax-sheet { position: absolute; left: 7px; right: 7px; bottom: 7px; height: 250px; z-index: 30; background: #f4f1ea; border-radius: 18px 18px 26px 26px; padding: 8px 10px 12px; transform: translateY(118%); transition: transform .6s cubic-bezier(.3,1.18,.35,1); box-shadow: 0 -14px 40px rgba(0,0,0,.45); }
.s-sheet .wax-sheet { transform: none; }
.s-fly .wax-sheet { transform: translateY(118%); transition: transform .45s cubic-bezier(.5,0,.75,.4); }
.wax-grab { display: block; width: 36px; height: 4.5px; border-radius: 3px; background: rgba(24,31,16,.18); margin: 0 auto 9px; }
.wax-sbar { display: flex; justify-content: space-between; align-items: center; font-size: .84rem; }
.wax-sbar span:first-child { color: #0a84ff; }
.wax-add { position: relative; color: #0a84ff; font-weight: 700; }
.wax-add::after { content: ""; position: absolute; inset: -9px -12px; border-radius: 999px; background: rgba(10,132,255,.22); opacity: 0; transform: scale(.5); }
.is-tap .wax-add::after { animation: waxtap .5s ease-out; }
@keyframes waxtap { 0% { opacity: 0; transform: scale(.4); } 35% { opacity: 1; transform: scale(1); } 100% { opacity: 0; transform: scale(1.25); } }
.wax-stitle { text-align: center; font-size: .76rem; color: #6c7458; margin-top: 3px; }

/* ================= DE KAART — één element, reist door de scène ============
   Basispositie = eindslot in de Wallet-stapel. In de sheet-fase staat hij
   via transform hoger en groter; de vlucht is één spring-transition. */
.wax-pass { position: absolute; left: 13px; right: 13px; top: 206px; height: 140px; z-index: 40; border-radius: 15px; background: linear-gradient(160deg, #3d2b1d, #2e2015); color: #f4e8d5; padding: 13px 15px; opacity: 0; overflow: hidden; box-shadow: 0 18px 40px -12px rgba(0,0,0,.55); }
.wax-pass__top { display: flex; align-items: center; gap: 9px; }
.wax-pass__ava { width: 30px; height: 30px; border-radius: 8px; background: #db9b53; color: #36261a; font-weight: 800; display: grid; place-items: center; font-size: .9rem; }
.wax-pass__top strong { font-size: .92rem; display: block; }
.wax-pass__top span { display: block; font-size: .68rem; opacity: .65; }
.wax-pass__dots { display: flex; gap: 7px; margin-top: 12px; }
.wax-pass__dots i { width: 20px; height: 20px; border-radius: 50%; border: 1.6px dashed rgba(244,232,213,.4); }
.wax-pass__dots i.on { background: #db9b53; border-style: solid; border-color: #db9b53; }
.wax-pass__rw { margin-top: 12px; font-size: .78rem; background: rgba(244,232,213,.12); border-radius: 8px; padding: 7px 10px; }
/* glans-sweep bij landing */
.wax-pass::after { content: ""; position: absolute; inset: -20% -60%; background: linear-gradient(105deg, transparent 42%, rgba(255,255,255,.28) 50%, transparent 58%); transform: translateX(-120%); pointer-events: none; }
.is-land .wax-pass::after { animation: waxglare .75s ease-out .1s; }
@keyframes waxglare { to { transform: translateX(120%); } }

/* pass-states — in de sheet-fase zit de kaart ÍN het sheet (onder de header),
   iets kleiner zodat hij binnen de sheet-randen past; de vlucht omhoog naar
   het stapel-slot laat hem op ware grootte "landen". */
.s-sheet .wax-pass { opacity: 0; transform: translateY(56px) scale(.9); transition: opacity .3s ease, transform .4s cubic-bezier(.3,1.2,.4,1); }
.s-sheet.is-passin .wax-pass { opacity: 1; transform: translateY(47px) scale(.95); }
.s-sheet.is-lift .wax-pass { transform: translateY(42px) scale(.985); transition: transform .18s cubic-bezier(.4,1.4,.6,1); }
.s-fly .wax-pass { opacity: 1; transform: none; transition: transform .62s cubic-bezier(.3,1.22,.4,1); }
.is-land .wax-pass { animation: waxsquash .34s cubic-bezier(.3,1.3,.4,1) .02s; }
@keyframes waxsquash { 30% { transform: scaleY(.955) scaleX(1.015); } 100% { transform: none; } }

/* impact: subtiele scène-schok */
.is-land .wax-bgwallet { animation: waxshake .32s ease-out; }
@keyframes waxshake { 30% { transform: translateY(2.5px); } 65% { transform: translateY(-1px); } 100% { transform: translateY(0); } }

/* toast */
.wax-toast { position: absolute; left: 50%; bottom: 16px; z-index: 50; transform: translateX(-50%) translateY(22px) scale(.9); white-space: nowrap; background: #29c700; color: #181f10; font-weight: 700; font-size: .82rem; padding: 9px 16px; border-radius: 999px; opacity: 0; transition: all .4s cubic-bezier(.2,1.4,.4,1); }
.is-toast .wax-toast { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); }

/* film-cut voor de loop */
.wax-cutter { position: absolute; inset: 0; z-index: 70; background: #05070b; opacity: 0; pointer-events: none; transition: opacity .32s ease; }
.is-cut .wax-cutter { opacity: 1; }

/* fase-knoppen */
.wax-steps { display: flex; gap: 10px; margin-top: 24px; flex-wrap: wrap; justify-content: center; }
.wax-steps button { font-family: var(--font-body, system-ui), system-ui, sans-serif; font-weight: 600; font-size: .88rem; padding: 9px 18px; border-radius: 999px; border: 1px solid rgba(24,31,16,.2); background: #fff; color: var(--muted, #6c7458); cursor: pointer; transition: all .18s ease; }
.wax-steps button:hover { border-color: #29c700; transform: translateY(-1px); }
.wax-steps button b { color: var(--green-700, #1f9b00); margin-right: 5px; }
.wax-steps button.is-active { background: var(--ink, #181f10); border-color: var(--ink, #181f10); color: var(--paper, #f7f2e7); }
.wax-steps button.is-active b { color: #29c700; }

@media (prefers-reduced-motion: reduce) {
  .wax * { animation: none !important; transition: none !important; }
}
