/* Einlasspilot website: animations (used together with ep.js). Without JS nothing here is active. */

/* reveal on scroll */
.ep-js .ep-reveal { opacity: 0; transform: translateY(26px); transition: opacity .7s ease var(--ep-d, 0ms), transform .8s cubic-bezier(.2, .8, .2, 1) var(--ep-d, 0ms); }
.ep-js .ep-reveal.ep-in { opacity: 1; transform: none; }
.ep-js .ep-card.ep-reveal.ep-in:hover { transform: translateY(-4px); }

/* hero sky: stars + rocket */
.ep-hero > .ep-sky { position: absolute; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.ep-sky > i { position: absolute; border-radius: 50%; background: #fff; opacity: .15; animation: ep-twinkle 3s ease-in-out infinite; }
@keyframes ep-twinkle { 50% { opacity: .85; } }
.ep-hero-rocket { position: absolute; right: 6%; bottom: -160px; width: 46px; opacity: 0; animation: ep-hero-fly 11s cubic-bezier(.45, 0, .7, .4) infinite 1.2s; }
.ep-hero-rocket .ep-rocket-svg { width: 46px; height: 92px; display: block; filter: drop-shadow(0 0 14px rgba(129, 140, 248, .7)); }
.ep-hero-rocket .ep-trail { position: absolute; left: 50%; top: 80px; width: 14px; margin-left: -7px; height: 220px; border-radius: 10px;
  background: linear-gradient(to bottom, rgba(251, 191, 36, .8), rgba(199, 210, 254, .35) 40%, transparent); filter: blur(6px); }
@keyframes ep-hero-fly {
  0% { transform: translate(0, 0) rotate(8deg); opacity: 0; }
  6% { opacity: .9; }
  60% { transform: translate(-220px, calc(-100vh - 200px)) rotate(-6deg); opacity: .9; }
  61%, 100% { transform: translate(-220px, calc(-100vh - 200px)); opacity: 0; }
}
.ep-flame { transform-origin: 60px 150px; animation: ep-flicker .08s linear infinite alternate; }
@keyframes ep-flicker { from { transform: scaleY(.85) scaleX(.94); } to { transform: scaleY(1.18) scaleX(1.06); } }

/* hero: live scanner demo */
.ep-hero-img.ep-has-demo > img { display: none; }
.ep-demo { position: relative; width: min(100%, 440px); height: 520px; margin-inline: auto; }
.ep-phone { position: absolute; left: 50%; top: 0; width: 250px; height: 510px; margin-left: -125px; border-radius: 40px; padding: 11px;
  background: linear-gradient(145deg, #1e293b, #0b1020); box-shadow: 0 0 0 2px #334155, 0 40px 80px -30px rgba(0, 0, 0, .8), 0 0 60px -10px rgba(99, 102, 241, .45);
  animation: ep-float 6s ease-in-out infinite; }
@keyframes ep-float { 50% { transform: translateY(-12px) rotate(-1deg); } }
.ep-notch { position: absolute; left: 50%; top: 18px; width: 70px; height: 18px; margin-left: -35px; border-radius: 12px; background: #000; z-index: 6; }
.ep-screen { position: relative; height: 100%; border-radius: 30px; overflow: hidden; background: #0f172a; color: #f8fafc; }
.ep-topbar { display: grid; grid-template-columns: auto 1fr; column-gap: 8px; align-items: center; padding: 40px 14px 10px; font-size: 13px; line-height: 1.25; }
.ep-topbar .ep-mark { grid-row: span 2; width: 26px; height: 26px; border-radius: 8px; background: linear-gradient(135deg, #3b82f6, #7c3aed); }
.ep-topbar small { color: #94a3b8; font-size: 11px; }
.ep-cam { position: relative; margin: 6px 12px; aspect-ratio: 1; border-radius: 18px; overflow: hidden;
  background: radial-gradient(circle at 40% 35%, #334155, #0b1020 75%); }
.ep-cam > i { position: absolute; width: 22%; height: 22%; border: 3px solid #fff; border-radius: 5px; z-index: 2; }
.ep-cam > i:nth-child(1) { left: 14%; top: 14%; border-right: 0; border-bottom: 0; }
.ep-cam > i:nth-child(2) { right: 14%; top: 14%; border-left: 0; border-bottom: 0; }
.ep-cam > i:nth-child(3) { left: 14%; bottom: 14%; border-right: 0; border-top: 0; }
.ep-cam > i:nth-child(4) { right: 14%; bottom: 14%; border-left: 0; border-top: 0; }
.ep-qr { position: absolute; left: 24%; top: 24%; width: 52%; height: 52%; border-radius: 6px;
  animation: ep-qr-wobble 5s ease-in-out infinite; box-shadow: 0 10px 24px rgba(0, 0, 0, .45); }
@keyframes ep-qr-wobble { 0%, 100% { transform: rotate(-6deg) translate(4px, 6px) scale(.96); } 50% { transform: rotate(3deg) translate(-3px, -2px) scale(1); } }
.ep-laser { position: absolute; left: 16%; right: 16%; height: 2px; top: 50%; z-index: 3;
  background: linear-gradient(90deg, transparent, #60a5fa, #a78bfa, transparent); box-shadow: 0 0 10px #818cf8; animation: ep-laser 3s ease-in-out infinite; }
@keyframes ep-laser { 0%, 100% { top: 22%; } 50% { top: 78%; } }
.ep-list { padding: 10px 12px; display: grid; gap: 7px; }
.ep-list div { height: 30px; border-radius: 9px; background: #1e293b; border-left: 4px solid #22c55e; opacity: .8; }
.ep-list div:nth-child(2) { border-left-color: #fbbf24; }
.ep-list div:nth-child(3) { opacity: .45; }
.ep-res { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
  padding: 18px; opacity: 0; transform: scale(1.04); transition: opacity .2s ease, transform .25s ease; background: #15803d; z-index: 4; }
.ep-res.show { opacity: 1; transform: none; }
.ep-res.vip { background: linear-gradient(160deg, #15803d, #166534 60%, #854d0e); }
.ep-res.warn { background: #b45309; }
.ep-res .ep-vip { display: none; background: linear-gradient(135deg, #fde68a, #f59e0b); color: #451a03; font-weight: 900; letter-spacing: .1em;
  padding: 5px 16px; border-radius: 99px; margin-bottom: 10px; font-size: 14px; }
.ep-res.vip .ep-vip { display: block; }
.ep-res .ep-big { font-size: 25px; font-weight: 900; letter-spacing: .02em; }
.ep-res .ep-who { font-size: 18px; font-weight: 700; margin-top: 6px; }
.ep-res .ep-det { font-size: 12.5px; opacity: .9; margin-top: 4px; }
.ep-spark { position: absolute; z-index: 5; color: #fde68a; font-style: normal; font-size: 16px; pointer-events: none;
  animation: ep-spark 1.2s ease-out forwards; text-shadow: 0 0 8px #f59e0b; }
@keyframes ep-spark { from { transform: translate(0, 0) scale(.4); opacity: 1; } to { transform: translate(var(--dx), var(--dy)) scale(1.1) rotate(160deg); opacity: 0; } }
.ep-livecard { position: absolute; left: 0; bottom: 70px; z-index: 5; width: 190px; padding: 14px 16px; border-radius: 18px; font-size: 11px; font-weight: 800;
  letter-spacing: .08em; text-transform: uppercase; color: #047857; background: rgba(255, 255, 255, .96); line-height: 1.3;
  box-shadow: 0 24px 50px -20px rgba(0, 0, 0, .6); animation: ep-float 7s ease-in-out infinite reverse; }
.ep-livecard .ep-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #10b981; margin-right: 6px; animation: ep-twinkle 1.4s infinite; }
.ep-livecard strong { display: block; color: #0f172a; font-size: 28px; letter-spacing: -.02em; text-transform: none; margin-top: 6px; }
.ep-livecard strong small { font-size: 13px; color: #64748b; font-weight: 600; }
.ep-bar { height: 6px; border-radius: 99px; background: #e2e8f0; overflow: hidden; margin-top: 8px; }
.ep-bar i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, #3b82f6, #7c3aed); transition: width .6s ease; }
.ep-toast-card { position: absolute; right: 0; top: 120px; z-index: 5; padding: 10px 14px; border-radius: 14px; background: rgba(15, 23, 42, .92); color: #e0e7ff;
  font-size: 13px; font-weight: 700; border: 1px solid rgba(129, 140, 248, .35); opacity: 0; transform: translateX(14px); transition: opacity .25s, transform .3s; }
.ep-toast-card.show { opacity: 1; transform: none; }
@media (max-width: 781px) {
  .ep-demo { height: 500px; }
  .ep-livecard { left: 4px; bottom: 30px; }
  .ep-toast-card { right: 4px; }
}

/* "Ablauf": rocket travels along the steps */
.ep-steps-row { position: relative; }
.ep-track { position: absolute; left: 26px; right: 26px; top: 25px; height: 3px; border-radius: 3px; background: #e2e8f0; z-index: 0; }
.ep-track-fill { height: 100%; width: 0; border-radius: 3px; background: linear-gradient(90deg, #3b82f6, #7c3aed); transition: width .15s linear; }
.ep-track-rocket { position: absolute; top: -17px; left: 0; width: 18px; margin-left: -9px; transform: rotate(90deg); transition: left .15s linear; }
.ep-track-rocket .ep-rocket-svg { width: 18px; height: 36px; display: block; }
.ep-step { z-index: 1; }
.ep-step .ep-num { transition: transform .4s cubic-bezier(.2, .9, .3, 1.4), box-shadow .4s; }
.ep-step.ep-reached .ep-num { transform: scale(1.08); box-shadow: 0 0 0 6px rgba(124, 58, 237, .14), 0 12px 26px -10px rgba(79, 70, 229, .8); }
@media (max-width: 781px) { .ep-track { display: none; } }

/* take-off on "Demo anfragen" */
.ep-launch { position: fixed; z-index: 9999; width: 34px; margin: -34px 0 0 -17px; pointer-events: none; animation: ep-launch 1.1s cubic-bezier(.5, 0, .75, .3) forwards; }
.ep-launch .ep-rocket-svg { width: 34px; height: 68px; display: block; filter: drop-shadow(0 0 12px rgba(129, 140, 248, .8)); }
.ep-launch .ep-trail { position: absolute; left: 50%; top: 58px; width: 12px; margin-left: -6px; height: 160px;
  background: linear-gradient(to bottom, rgba(251, 191, 36, .9), rgba(199, 210, 254, .4) 40%, transparent); filter: blur(5px); border-radius: 8px; }
@keyframes ep-launch {
  0% { transform: translateY(0) scale(.6); opacity: 0; }
  12% { opacity: 1; transform: translateY(6px) scale(1); }
  100% { transform: translateY(-110vh) scale(1); opacity: 1; }
}
a.ep-launched { animation: ep-shake .25s ease 2; }
@keyframes ep-shake { 25% { transform: translateX(-2px); } 75% { transform: translateX(2px); } }

/* "Neu" highlight cards */
.ep-new { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 1.4rem; margin-top: 3rem; }
.ep-new-card { position: relative; overflow: hidden; border-radius: 22px; padding: 1.7rem; color: #f8fafc; background: #0b1020;
  border: 1px solid rgba(148, 163, 184, .18); box-shadow: 0 24px 50px -30px rgba(15, 23, 42, .9); transition: transform .25s ease; }
.ep-new-card:hover { transform: translateY(-5px); }
.ep-new-card::before { content: ""; position: absolute; width: 220px; height: 220px; border-radius: 50%; right: -80px; top: -90px; filter: blur(40px); opacity: .55; }
.ep-new-card.vip::before { background: #f59e0b; }
.ep-new-card.id::before { background: #3b82f6; }
.ep-new-card.stop::before { background: #ef4444; }
.ep-new-card.pdf::before { background: #7c3aed; }
.ep-new-card.pay::before { background: #22c55e; }
.ep-new-card.wait::before { background: #06b6d4; }
.ep-new-icon { position: relative; font-size: 28px; line-height: 1; width: 56px; height: 56px; display: grid; place-items: center; border-radius: 16px;
  background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .12); }
.ep-new-card h3 { position: relative; margin: 1.1rem 0 .4rem; font-size: 1.2rem; font-weight: 800; color: #fff; }
.ep-new-card p { position: relative; margin: 0; color: #cbd5e1; line-height: 1.6; font-size: .97rem; }
.ep-new-card.stop .ep-new-icon { animation: ep-stop-pulse 2.4s ease-in-out infinite; }
@keyframes ep-stop-pulse { 50% { box-shadow: 0 0 0 8px rgba(239, 68, 68, .18); } }

/* small phones: keep the nav buttons on one line */
.ep-nav .wp-block-button__link { white-space: nowrap; }
@media (max-width: 420px) {
  .ep-nav .wp-block-image img { height: 28px !important; }
  .ep-nav .wp-block-buttons { gap: .4rem !important; }
  .ep-nav .ep-btn-small .wp-block-button__link { padding: .45rem .6rem !important; font-size: .76rem !important; }
}

@media (prefers-reduced-motion: reduce) {
  .ep-hero-rocket, .ep-phone, .ep-livecard, .ep-qr, .ep-laser, .ep-sky > i, .ep-new-card.stop .ep-new-icon { animation: none !important; }
}
