/* ============================================================
   ELITE AUTH — Lighting FX layer
   Pure CSS ambient light animations for all pages.
   ============================================================ */

@keyframes lxLineFlow {
  0%   { background-position: 0% 50%; }
  100% { background-position: 300% 50%; }
}
@keyframes lxLineFlowY {
  0%   { background-position: 50% 0%; }
  100% { background-position: 50% 250%; }
}
@keyframes lxPulseSoft {
  0%, 100% { opacity: .5; }
  50%      { opacity: 1; }
}
@keyframes lxBeam {
  0%   { transform: translateX(-80%) rotate(14deg); opacity: 0; }
  10%  { opacity: .5; }
  38%  { opacity: .5; }
  58%, 100% { transform: translateX(190%) rotate(14deg); opacity: 0; }
}
@keyframes lxShineLoop {
  0%, 52%   { transform: translateX(-190%) skewX(-18deg); }
  78%, 100% { transform: translateX(260%) skewX(-18deg); }
}
@keyframes lxCardGlow {
  0%, 100% { box-shadow: 0 16px 45px rgba(0,0,0,.65), 0 0 34px rgba(147,51,234,.10); }
  50%      { box-shadow: 0 18px 58px rgba(0,0,0,.72), 0 0 62px rgba(168,85,247,.26); }
}
@keyframes lxShineOnce {
  0%   { transform: translateX(-190%) skewX(-18deg); }
  100% { transform: translateX(260%) skewX(-18deg); }
}
@keyframes lxScanY {
  0%   { transform: translateY(-140%); opacity: 0; }
  15%  { opacity: .55; }
  85%  { opacity: .55; }
  100% { transform: translateY(560%); opacity: 0; }
}

/* ── NAVBAR: flowing light line ─────────────────────────────── */
.navbar::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  height: 1.5px;
  background: linear-gradient(90deg,
    transparent 0%, rgba(200,16,46,0) 12%, #c8102e 42%,
    #a855f7 58%, rgba(168,85,247,0) 88%, transparent 100%);
  background-size: 240% 100%;
  animation: lxLineFlow 7s linear infinite;
  pointer-events: none;
  opacity: .85;
}

/* ── HERO: breathing glow + moving light beam ───────────────── */
.ah-hero-glow { animation: lxPulseSoft 7s ease-in-out infinite; }
.ah-hero::after {
  content: "";
  position: absolute;
  top: -35%; bottom: -35%; left: 0;
  width: 34%;
  background: linear-gradient(90deg,
    transparent, rgba(255,255,255,.045), rgba(200,16,46,.12), transparent);
  filter: blur(26px);
  transform: translateX(-80%) rotate(14deg);
  animation: lxBeam 11s ease-in-out infinite;
  pointer-events: none;
  z-index: 0;
}

/* ── FEATURE CARDS: top glow + sheen sweep on hover ─────────── */
.ah-feat-card {
  position: relative;
  overflow: hidden;
}
.ah-feat-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(360px circle at 50% 0%, rgba(200,16,46,.18), transparent 66%);
  opacity: 0;
  transition: opacity .35s ease;
  pointer-events: none;
}
.ah-feat-card:hover::before { opacity: 1; }
.ah-feat-card::after {
  content: "";
  position: absolute;
  top: -60%; bottom: -60%; left: 0;
  width: 38%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.12), transparent);
  transform: translateX(-220%) skewX(-18deg);
  pointer-events: none;
}
.ah-feat-card:hover::after { animation: lxShineOnce .8s ease; }

/* ── PRIMARY BUTTONS: periodic light sweep ──────────────────── */
.btn-hero-primary, .btn-hero-trial, .btn-submit {
  position: relative;
  overflow: hidden;
}
.btn-hero-primary::after, .btn-hero-trial::after, .btn-submit::after {
  content: "";
  position: absolute;
  top: -60%; bottom: -60%; left: 0;
  width: 45%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.38), transparent);
  transform: translateX(-190%) skewX(-18deg);
  animation: lxShineLoop 6.5s ease-in-out infinite;
  pointer-events: none;
}

/* ── LOGIN: breathing orbs + glowing card + flowing top line ── */
.bg-glow-top    { animation: lxPulseSoft 6s ease-in-out infinite; }
.bg-glow-bottom { animation: lxPulseSoft 8.5s ease-in-out infinite reverse; }
.login-card     { animation: lxCardGlow 7s ease-in-out infinite; }
.login-card::before {
  background-size: 220% 100%;
  animation: lxLineFlow 5s linear infinite;
}

/* ── DOCS: moving beam in header + glowing cards ────────────── */
.docs-header {
  position: relative;
  overflow: hidden;
}
.docs-header::after {
  content: "";
  position: absolute;
  top: -60%; bottom: -60%; left: 0;
  width: 30%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.05), rgba(168,85,247,.14), transparent);
  filter: blur(22px);
  transform: translateX(-80%) rotate(14deg);
  animation: lxBeam 10s ease-in-out infinite;
  pointer-events: none;
}
.docs-container .ap-card {
  transition: border-color .3s ease, box-shadow .3s ease, transform .3s ease;
}
.docs-container .ap-card:hover {
  border-color: rgba(168,85,247,.45);
  box-shadow: 0 14px 42px rgba(0,0,0,.55), 0 0 34px rgba(168,85,247,.14);
  transform: translateY(-2px);
}

/* ── DASHBOARD: topbar light line + card hover glow ─────────── */
.ap-topbar {
  position: relative;
  overflow: hidden;
}
.ap-topbar::after {
  content: "";
  position: absolute;
  left: 0; right: 0; top: 0;
  height: 1.5px;
  background: linear-gradient(90deg,
    transparent, #c8102e, #a855f7, transparent);
  background-size: 240% 100%;
  animation: lxLineFlow 6s linear infinite;
  opacity: .85;
  pointer-events: none;
}
.ap-card {
  position: relative;
  transition: border-color .3s ease, box-shadow .3s ease;
}
.ap-card::before {
  content: "";
  position: absolute;
  top: 0; left: 10%; right: 10%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(168,85,247,.55), transparent);
  opacity: 0;
  transition: opacity .3s ease;
  pointer-events: none;
  z-index: 2;
}
.ap-card:hover::before { opacity: 1; }
.ap-card:hover {
  border-color: var(--ap-border2);
  box-shadow: 0 0 0 1px rgba(168,85,247,.10), 0 10px 36px rgba(0,0,0,.5);
}

/* Sidebar edge light */
.ap-sb { position: relative; }
.ap-sb::after {
  content: "";
  position: absolute;
  top: 0; bottom: 0; right: -1px;
  width: 1px;
  background: linear-gradient(180deg,
    transparent, #c8102e 35%, #a855f7 65%, transparent);
  background-size: 100% 260%;
  animation: lxLineFlowY 9s linear infinite;
  opacity: .55;
  pointer-events: none;
}

/* Stat cards: soft breathing glow */
.ap-stat {
  position: relative;
  overflow: hidden;
}
.ap-stat::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(220px circle at 50% 0%, rgba(168,85,247,.12), transparent 70%);
  opacity: .55;
  animation: lxPulseSoft 6s ease-in-out infinite;
  pointer-events: none;
}

/* ── Accessibility ─────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .navbar::after, .ah-hero-glow, .ah-hero::after,
  .ah-feat-card::before, .ah-feat-card::after,
  .btn-hero-primary::after, .btn-hero-trial::after, .btn-submit::after,
  .bg-glow-top, .bg-glow-bottom, .login-card, .login-card::before,
  .docs-header::after, .ap-topbar::after, .ap-card::before,
  .ap-sb::after, .ap-stat::after {
    animation: none !important;
  }
}
