/* ==========================================================================
   Auerberg Design-Effects — Demo-CSS
   Wird nur auf Pages geladen, die Effekte aktiv haben sollen.
   Effects: Scroll-Reveals, KPI-Counter (JS), Karten-Hover-Lift,
            Parallax-Hero, Trennlinien-Reveal, Film-Grain.
   ========================================================================== */

/* ─── A) Scroll-Reveals ──────────────────────────────────── */
.reveal-on-scroll {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .8s cubic-bezier(.2,.7,.2,1), transform .8s cubic-bezier(.2,.7,.2,1);
  will-change: opacity, transform;
}
.reveal-on-scroll.is-visible {
  opacity: 1;
  transform: translateY(0);
}
.reveal-on-scroll.delay-1 { transition-delay: .08s; }
.reveal-on-scroll.delay-2 { transition-delay: .16s; }
.reveal-on-scroll.delay-3 { transition-delay: .24s; }
.reveal-on-scroll.delay-4 { transition-delay: .32s; }

/* ─── C) Karten-Hover-Lift ──────────────────────────────── */
.fx-card-lift {
  transition: transform .3s cubic-bezier(.2,.7,.2,1),
              box-shadow .3s cubic-bezier(.2,.7,.2,1),
              border-color .3s ease;
}
.fx-card-lift:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0,0,0,.08), 0 0 0 1px rgba(45,106,79,.18);
  border-color: var(--accent);
}

/* Spezifischer für die existierenden Karten-Komponenten */
.tool-card.fx-card-lift:hover { border-color: var(--accent); }
.kunden-card.fx-card-lift:hover .kunden-card__title { color: var(--accent); }

/* ─── D) Parallax-Hero ──────────────────────────────────── */
/* Hero-BG wird via JS leicht versetzt (translate3d) basierend auf scrollY */
.hero__bg.fx-parallax {
  will-change: transform;
}

/* ─── E) Trennlinien-Reveal ─────────────────────────────── */
/* Die border-top-Linien werden mit Pseudo-Element überschrieben und animieren */
.fx-line-reveal {
  position: relative;
  border-top-color: transparent !important;
}
.fx-line-reveal::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 0;
  height: 1px;
  width: 0;
  background: var(--border);
  transition: width .9s cubic-bezier(.2,.7,.2,1);
}
.fx-line-reveal.is-visible::before {
  width: 100%;
}

/* ─── F) Film-Grain Overlay (Industrial-Vibe) ─────────────── */
.fx-grain {
  position: relative;
  isolation: isolate;
}
.fx-grain::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160' viewBox='0 0 160 160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%25' height='100%25' filter='url(%23n)' opacity='0.5'/></svg>");
  mix-blend-mode: overlay;
  opacity: .12;
  z-index: 1;
}

/* Reduced motion respect */
@media (prefers-reduced-motion: reduce) {
  .reveal-on-scroll, .fx-line-reveal::before, .fx-card-lift {
    transition: none !important;
    animation: none !important;
  }
  .reveal-on-scroll { opacity: 1; transform: none; }
  .fx-line-reveal { border-top-color: var(--border) !important; }
  .fx-line-reveal::before { display: none; }
  .hero__bg.fx-parallax { transform: none !important; }
}
