/* "Kurs auf ..." rocket transition between Cockpit, Gate, Schalter, Tower and Buchhaltung (see js/portal-switch.js).
   Layers: .eps-sky (z 0, behind)  <  body (z 1, flies up)  <  .eps-fx (z 2, rocket + trail).
   Design direction: a quiet night sky with still stars, plain white type, a flat rocket, no glow. */
html.eps-launching { overflow: hidden; background: #07080d; }
html.eps-launching body { position: relative; z-index: 1; will-change: transform;
  transition: transform .74s cubic-bezier(.55, 0, .75, .2) .7s, opacity .45s ease .98s; }
html.eps-go body { transform: translateY(-108vh); opacity: 0; }

.eps-sky, .eps-fx { position: fixed; inset: 0; pointer-events: none; overflow: hidden; }
.eps-sky { z-index: 0; background: #07080d; }
.eps-fx { z-index: 2; }

.eps-stars i { position: absolute; border-radius: 50%; background: #eef0f5; }

/* step 1 (0-.55 s): veil + destination, readable */
.eps-veil { position: absolute; inset: 0; background: rgba(7, 8, 13, .78); opacity: 0; transition: opacity .25s cubic-bezier(.22, 1, .36, 1); }
html.eps-go .eps-veil { opacity: 1; }
.eps-dest { position: absolute; left: 0; right: 0; top: 34%; text-align: center; color: #eef0f5; opacity: 0; transform: translateY(8px);
  font: 500 15px/1.2 "Inter", -apple-system, "Segoe UI", system-ui, sans-serif;
  transition: opacity .28s cubic-bezier(.22, 1, .36, 1) .05s, transform .4s cubic-bezier(.22, 1, .36, 1) .05s; }
.eps-dest span { display: block; color: #a3a9b8; font-size: 16px; font-weight: 500; }
.eps-dest strong { display: block; font-size: 56px; font-weight: 500; letter-spacing: -.03em; margin-top: 8px; color: #eef0f5; }
html.eps-go .eps-dest { opacity: 1; transform: none; }

.eps-rocket { position: absolute; left: 50%; bottom: 0; width: 84px; height: 168px; margin-left: -42px; transform: translateY(110%); }
/* step 2 (from .55 s): take-off, the page goes up with it */
html.eps-go .eps-rocket { animation: eps-fly .95s cubic-bezier(.5, 0, .7, .3) .55s forwards; }
@keyframes eps-fly {
  0% { transform: translateY(110%); }
  14% { transform: translateY(38%) rotate(-2deg); }
  22% { transform: translateY(30%) rotate(2deg); }
  30% { transform: translateY(24%) rotate(0deg); }
  100% { transform: translateY(calc(-100vh - 120%)); }
}
.eps-flame { transform-origin: 60px 150px; animation: eps-flicker .08s linear infinite alternate; }
@keyframes eps-flicker { from { transform: scaleY(.88); } to { transform: scaleY(1.12); } }

/* the trail: a soft grey column, no blur filter (cheap on weak laptops) */
.eps-trail { position: absolute; left: 50%; bottom: 0; width: 24px; margin-left: -12px; height: 0; border-radius: 12px 12px 0 0;
  background: linear-gradient(to top, rgba(238, 240, 245, 0) 0%, rgba(238, 240, 245, .18) 60%, rgba(240, 179, 90, .55) 100%); }
html.eps-go .eps-trail { animation: eps-trail .95s cubic-bezier(.5, 0, .7, .3) .55s forwards; }
@keyframes eps-trail { 0% { height: 0; opacity: 1; } 70% { height: 105vh; opacity: .9; } 100% { height: 125vh; opacity: 0; } }

/* arrival in the next area: the page rises in from below, no overshoot */
html.eps-arriving { background: #07080d; }
html.eps-arriving body { transform: translateY(32px); opacity: 0; }
html.eps-arriving.eps-arrived body { transform: none; opacity: 1;
  transition: transform .5s cubic-bezier(.22, 1, .36, 1), opacity .4s cubic-bezier(.22, 1, .36, 1); }

@media (prefers-reduced-motion: reduce) {
  html.eps-arriving body { transform: none; opacity: 1; }
}
