/* lux-motion.css – gemeinsame, leichtgewichtige Animationen für Lux-Seiten.
   Respektiert prefers-reduced-motion. Keine Abhängigkeit von Bibliotheken. */
:root {
  --lux-ease: cubic-bezier(.22, .8, .24, 1);
  --lux-accent: #c9a46a;
  --lux-accent-2: #8ec8f0;
}
html[data-lux-theme="books"] {
  --lux-accent: #e0c48a;
  --lux-accent-2: #f4e6c4;
}
html[data-lux-theme="air"] {
  --lux-accent: #1f6feb;
  --lux-accent-2: #4fd1c5;
}
html[data-lux-theme="unitas"] {
  --lux-accent: #0a6fd6;
  --lux-accent-2: #7dd3fc;
}

/* Fortschrittsbalken */
.lux-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  z-index: 10000;
  pointer-events: none;
  background: linear-gradient(90deg, var(--lux-accent), var(--lux-accent-2), var(--lux-accent));
  background-size: 200% 100%;
  box-shadow: 0 0 12px color-mix(in srgb, var(--lux-accent) 70%, transparent);
  animation: lux-bar-shine 4s linear infinite;
}
@keyframes lux-bar-shine {
  to { background-position: 200% 0; }
}

/* Hero: weiches Licht */
.lux-hero-fx {
  position: absolute;
  inset: -8%;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}
.lux-hero-fx .lux-blob {
  position: absolute;
  width: 55%;
  height: 70%;
  border-radius: 50%;
  filter: blur(60px);
  opacity: .38;
  mix-blend-mode: soft-light;
  animation: lux-drift 18s ease-in-out infinite alternate;
}
.lux-hero-fx .lux-blob-a {
  left: -10%;
  top: -15%;
  background: radial-gradient(circle, var(--lux-accent), transparent 70%);
}
.lux-hero-fx .lux-blob-b {
  right: -12%;
  bottom: -20%;
  background: radial-gradient(circle, var(--lux-accent-2), transparent 70%);
  animation-delay: -7s;
  animation-duration: 22s;
}
@keyframes lux-drift {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to { transform: translate3d(6%, 8%, 0) scale(1.18); }
}

/* Ken-Burns / Parallax-Helfer */
.lux-kenburns {
  animation: lux-ken 28s ease-in-out infinite alternate;
  will-change: transform;
  transform-origin: center center;
}
@keyframes lux-ken {
  from { transform: scale(1) translate3d(0, 0, 0); }
  to { transform: scale(1.08) translate3d(0, -2%, 0); }
}
.lux-parallax {
  will-change: transform;
}

/* Hero-Text beim Laden */
.lux-enter {
  opacity: 0;
  transform: translateY(24px);
  animation: lux-enter .9s var(--lux-ease) forwards;
}
.lux-enter-d1 { animation-delay: .08s; }
.lux-enter-d2 { animation-delay: .2s; }
.lux-enter-d3 { animation-delay: .34s; }
.lux-enter-d4 { animation-delay: .48s; }
.lux-enter-d5 { animation-delay: .62s; }
@keyframes lux-enter {
  to { opacity: 1; transform: none; }
}

/* Scroll-Reveal – eigene Klassen, damit vorhandene .reveal unangetastet bleiben */
.lux-reveal {
  opacity: 0;
  transform: translateY(28px);
}
.lux-reveal.lux-left { transform: translateX(-32px); }
.lux-reveal.lux-right { transform: translateX(32px); }
.lux-reveal.lux-scale { transform: scale(.96); }
.lux-reveal.lux-in {
  opacity: 1;
  transform: none;
  transition: opacity .85s var(--lux-ease), transform .85s var(--lux-ease);
}

/* Hover: Karten, Buttons, Bilder */
a.lux-lift,
.lux-lift {
  transition: transform .35s var(--lux-ease), box-shadow .35s var(--lux-ease), border-color .35s;
  will-change: transform;
}
@media (hover: hover) and (pointer: fine) {
  a.lux-lift:hover,
  .lux-lift:hover {
    transform: translateY(-6px);
    box-shadow: 0 22px 40px -22px rgba(8, 24, 60, .45);
  }
  .lux-zoom {
    overflow: hidden;
  }
  .lux-zoom img,
  .lux-zoom picture img {
    transition: transform .7s var(--lux-ease);
  }
  .lux-zoom:hover img,
  .lux-zoom:hover picture img {
    transform: scale(1.06);
  }
  .lux-shine {
    position: relative;
    overflow: hidden;
  }
  .lux-shine::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(110deg, transparent 30%, rgba(255,255,255,.35) 50%, transparent 70%);
    transform: translateX(-130%);
    pointer-events: none;
  }
  .lux-shine:hover::after {
    animation: lux-shine .8s ease forwards;
  }
}
@keyframes lux-shine {
  to { transform: translateX(130%); }
}

/* Überschriften-Linie */
.lux-rule {
  position: relative;
}
.lux-rule.lux-in::after {
  content: "";
  display: block;
  width: min(7rem, 40%);
  height: 2px;
  margin-top: .7rem;
  background: linear-gradient(90deg, var(--lux-accent), transparent);
  transform-origin: left;
  animation: lux-rule .8s var(--lux-ease) both;
}
@keyframes lux-rule {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}

/* Zähler */
.lux-count {
  font-variant-numeric: tabular-nums;
}

@media (prefers-reduced-motion: reduce) {
  .lux-progress,
  .lux-hero-fx { display: none !important; }
  .lux-reveal,
  .lux-reveal.lux-in,
  .lux-enter,
  .lux-kenburns,
  .lux-parallax,
  .lux-lift,
  .lux-zoom img {
    opacity: 1 !important;
    transform: none !important;
    animation: none !important;
    transition: none !important;
    will-change: auto;
  }
  .lux-rule.lux-in::after { animation: none !important; }
}
