/* Landing-only visuals: plane flight + subtle parallax. */

.landing .bg-layer{
  /* Ensure our plane can layer above the existing bg pseudo-elements. */
  z-index: 0;
}

.landing .bg-layer:before{ z-index: 0; }
.landing .bg-layer:after{ z-index: 1; opacity: 0.08; }

.landing-plane{
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  overflow: hidden;
}

.landing-plane__fly{
  --plane-boost: 0;
  position: absolute;
  left: 0;
  top: 0;
  /* Keep it subtle: big enough to feel, small enough not to dominate the page. */
  width: clamp(160px, 26vw, 560px);
  opacity: 0.30;
  transform: translate3d(0, 0, 0);
  will-change: transform, opacity;
  animation: landingPlaneFly 26s linear infinite;
}

.landing-plane__fly::before{
  content: "";
  position: absolute;
  left: -78%;
  top: 50%;
  width: 86%;
  height: 3px;
  transform-origin: 100% 50%;
  transform: translateY(-50%) scaleX(calc(0.55 + var(--plane-boost) * 0.60)) skewX(-10deg);
  background: linear-gradient(90deg, rgba(255,255,255,0), rgba(255,255,255,0.55), rgba(255,255,255,0));
  filter: blur(3px);
  opacity: calc(0.20 + var(--plane-boost) * 0.48);
  mix-blend-mode: screen;
}

.landing-plane__fly::after{
  content: "";
  position: absolute;
  left: -96%;
  top: 50%;
  width: 102%;
  height: 14px;
  transform-origin: 100% 50%;
  transform: translateY(-50%) scaleX(calc(0.45 + var(--plane-boost) * 0.85)) skewX(-10deg);
  background: linear-gradient(90deg, rgba(255,255,255,0), rgba(255,255,255,0.45), rgba(255,255,255,0));
  filter: blur(12px);
  opacity: calc(0.10 + var(--plane-boost) * 0.20);
  mix-blend-mode: screen;
}

.landing-plane__wobble{
  position: relative;
  z-index: 2;
  transform: translate3d(0, 0, 0);
  animation: landingPlaneWobble 4.2s ease-in-out infinite;
}

.landing-plane__wobble::before{
  content: "";
  position: absolute;
  inset: 0;
  background: url("../img/plane.83c28bb4b961.svg") no-repeat center / contain;
  transform: translate3d(var(--plane-off-x, 0px), var(--plane-off-y, 0px), 0) rotate(var(--plane-rot, 0deg));
  filter:
    blur(10px)
    drop-shadow(0 18px 26px rgba(91,86,179,0.34))
    drop-shadow(0 58px 130px rgba(35,32,90,0.18));
  opacity: calc(0.06 + var(--plane-boost) * 0.22);
  mix-blend-mode: screen;
  pointer-events: none;
}

.landing-plane__img{
  position: relative;
  z-index: 3;
  width: 100%;
  height: auto;
  display: block;
  transform: translate3d(var(--plane-off-x, 0px), var(--plane-off-y, 0px), 0) rotate(var(--plane-rot, 0deg));
  will-change: transform;
  filter:
    drop-shadow(0 14px 22px rgba(91,86,179,0.16))
    drop-shadow(0 44px 90px rgba(35,32,90,0.12));
}

@keyframes landingPlaneFly{
  0%   { transform: translate3d(-92vw, 122vh, 0) rotate(-18deg) scale(0.56); opacity: 0; }
  10%  { opacity: 0.30; }
  55%  { transform: translate3d(18vw, 46vh, 0) rotate(-34deg) scale(0.84); opacity: 0.42; }
  92%  { opacity: 0.30; }
  100% { transform: translate3d(146vw, -46vh, 0) rotate(-56deg) scale(0.72); opacity: 0; }
}

@keyframes landingPlaneWobble{
  0%,100% { transform: translate3d(0, -3px, 0); }
  50%     { transform: translate3d(0, 3px, 0); }
}

/* Minimal landing header (no burger). */
.nav.nav-landing{
  padding-top: 4px;
}

.nav-landing__actions{
  flex-wrap: wrap;
  justify-content: flex-end;
}

.nav-landing__actions .btn{
  padding: 10px 14px;
}

/* Keep content above the animated background layer. */
.landing .container{
  position: relative;
  z-index: 10;
}

/* Entry animation. */
.landing .card{
  animation: landingRise 0.55s ease both;
}

@keyframes landingRise{
  from{ opacity: 0; transform: translate3d(0, 10px, 0); }
  to  { opacity: 1; transform: translate3d(0, 0, 0); }
}

/* Centered auth card. */
.landing-auth{
  max-width: 820px;
  margin: 0 auto;
}

.landing-auth__card{
  max-width: 820px;
  margin: 0 auto;
}

.landing-auth__actions{
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

@media (min-width: 920px){
  .landing-auth{
    min-height: calc(100vh - 260px);
    display: flex;
    align-items: center;
  }
}

/* Reduced motion: keep things calm. */
@media (prefers-reduced-motion: reduce){
  .landing-plane__fly,
  .landing-plane__wobble,
  .landing .card{
    animation: none !important;
  }

  .landing-plane__fly{
    opacity: 0.22;
    transform: translate3d(22vw, 34vh, 0) scale(0.85);
  }
}
