/* ════════════════════════════════════════════════════════════
   scroll-effects.css — Butzbach IT Startseite
   Nur auf der Startseite geladen (via functions.php)
   ════════════════════════════════════════════════════════════ */

:root {
  --ease-spring: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ── 1. Scroll Progress Bar ───────────────────────────────── */
#scroll-progress {
  position: fixed;
  top: 0; left: 0;
  height: 2px; width: 0%;
  background: linear-gradient(90deg, var(--color-accent) 0%, rgba(201,162,39,0.45) 100%);
  z-index: 9999;
  pointer-events: none;
  transition: width 0.05s linear;
}

/* ── 2. Hero Entrance Animations ─────────────────────────── */
/* Nur aktiv wenn JS .hero--anim-ready setzt → kein Flash bei JS-Ausfall */

.hero--anim-ready .hero__badge {
  animation: sfx-hero-in 0.65s 0.05s var(--ease-spring) both;
}
.hero--anim-ready .hero__eyebrow {
  animation: sfx-hero-in 0.65s 0.18s var(--ease-spring) both;
}
.hero--anim-ready .hero__headline {
  animation: sfx-hero-in 0.80s 0.30s var(--ease-spring) both;
}
.hero--anim-ready .hero__subheadline {
  animation: sfx-hero-in 0.65s 0.46s var(--ease-spring) both;
}
.hero--anim-ready .hero__ctas {
  animation: sfx-hero-in 0.65s 0.58s var(--ease-spring) both;
}
.hero--anim-ready .hero__stats {
  animation: sfx-hero-in 0.65s 0.70s var(--ease-spring) both;
}
.hero--anim-ready .hero__visual {
  animation: sfx-hero-visual 1.0s 0.10s var(--ease-spring) both;
}

@keyframes sfx-hero-in {
  from {
    opacity: 0;
    transform: translateY(22px);
    filter: blur(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0px);
  }
}

@keyframes sfx-hero-visual {
  from {
    opacity: 0;
    transform: translateX(32px) scale(0.94);
    filter: blur(8px);
  }
  to {
    opacity: 1;
    transform: translateX(0) scale(1);
    filter: blur(0px);
  }
}

/* ── 3. Hero Spotlight (folgt der Maus) ──────────────────── */
.hero__spotlight {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.5s ease;
  background: radial-gradient(
    1100px circle at var(--x, 50%) var(--y, 50%),
    rgba(201,162,39,0.09)  0%,
    rgba(26,58,122,0.06)   32%,
    transparent 62%
  );
  z-index: 1;
}

/* ── 4. Hero Hintergrund-Orbs ────────────────────────────── */
.hero-orb {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
  will-change: transform;
  animation: sfx-orb-drift var(--orb-dur, 12s) ease-in-out infinite alternate;
}

@keyframes sfx-orb-drift {
  from { transform: translate(0, 0); }
  to   { transform: translate(var(--orb-dx, 18px), var(--orb-dy, -22px)); }
}

/* ── 5. Verbesserte Fade-up (Blur + Scale) ───────────────── */
/* Überschreibt .fade-up sitewide mit dramatischerer Variante */
.fade-up {
  opacity: 0;
  transform: translateY(28px) scale(0.975);
  filter: blur(5px);
  transition:
    opacity   0.75s var(--ease-spring),
    transform 0.75s var(--ease-spring),
    filter    0.60s ease;
}

.fade-up.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
  filter: blur(0px);
}

/* ── 6. Process-Schritt Aktivierung ─────────────────────── */
.process-step {
  transition: transform 0.4s var(--ease-spring);
  position: relative;
  z-index: 1; /* über der absoluten Progress-Linie */
}

.process-step__number {
  transition:
    color       0.55s ease,
    background  0.55s ease,
    box-shadow  0.55s ease,
    border-color 0.55s ease;
}

.process-step--active .process-step__number {
  background: var(--color-accent) !important;
  color: var(--color-dark) !important;
  border-color: var(--color-accent) !important;
  box-shadow: 0 0 0 8px rgba(201,162,39,0.12), 0 0 40px rgba(201,162,39,0.25) !important;
}

.process-step--active .process-step__title {
  color: #fff;
}

/* ── 7. Process Progress-Linie ───────────────────────────── */
/* Absolutely positioned inside .process__grid (position:relative)
   top = padding-top of .process-step (2rem = 32px) + half circle height (30px) */
.process__progress-bar {
  position: absolute;
  z-index: 0; /* hinter den Steps (z-index:1) */
  top: calc(var(--space-8, 2rem) + 30px);
  left: 0;
  right: 0;
  width: auto;
  max-width: none;
  margin: 0;
  height: 1px;
  background: rgba(255,255,255,0.07);
  overflow: hidden;
  border-radius: 1px;
  pointer-events: none;
}

.process__progress-fill {
  position: absolute;
  left: 0; top: 0;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--color-accent) 0%, rgba(201,162,39,0.35) 100%);
  transition: width 0.9s var(--ease-spring);
  border-radius: 1px;
}

/* Hide when grid stacks (≤1024px) — line only makes sense in 4-column layout */
@media (max-width: 1024px) {
  .process__progress-bar { display: none; }
}

/* ── 8. Service-Card 3D Tilt + Shine ─────────────────────── */
.service-card {
  transform-style: preserve-3d;
  overflow: hidden;
  transition: transform 0.15s ease-out, box-shadow 0.3s ease, border-color 0.3s ease;
}

/* Shine-Sweep beim Hover */
.service-card::after {
  content: '';
  position: absolute;
  top: 0; left: -120%;
  width: 60%; height: 100%;
  background: linear-gradient(
    105deg,
    transparent 0%,
    rgba(255,255,255,0.045) 50%,
    transparent 100%
  );
  transform: skewX(-20deg);
  transition: left 0.55s ease;
  pointer-events: none;
  z-index: 5;
}

.service-card:hover::after {
  left: 160%;
}

/* ── 9. USP-Card Dark Shine ──────────────────────────────── */
.usp-card {
  transform-style: preserve-3d;
  overflow: hidden;
  transition: transform 0.15s ease-out, background 0.3s ease, border-color 0.3s ease;
}

.usp-card::after {
  content: '';
  position: absolute;
  top: 0; left: -120%;
  width: 60%; height: 100%;
  background: linear-gradient(
    105deg,
    transparent 0%,
    rgba(255,255,255,0.03) 50%,
    transparent 100%
  );
  transform: skewX(-20deg);
  transition: left 0.55s ease;
  pointer-events: none;
  z-index: 5;
}

.usp-card:hover::after {
  left: 160%;
}

/* ── 10. Section Label – Linie rechts ───────────────────── */
.section-header__label::after,
.section-label::after {
  content: '';
  display: inline-block;
  width: 0;
  height: 1px;
  background: var(--color-accent);
  vertical-align: middle;
  margin-left: 14px;
  transition: width 0.9s var(--ease-spring);
}

.section-header__label.label--line::after,
.section-label.label--line::after {
  width: 28px;
}

/* ── 11. Partner-Network Cards – Hover Glow ─────────────── */
.partner-network__card {
  transition:
    transform   0.3s var(--ease-spring),
    border-color 0.3s ease,
    box-shadow  0.3s ease,
    background  0.3s ease;
}

.partner-network__card:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 8px 32px rgba(201,162,39,0.12), 0 0 0 1px rgba(201,162,39,0.2);
}

/* ── 12. About-Teaser Circuit SVG – Fade-In-Draw ─────────── */
.about-teaser__image-wrap {
  position: relative;
}

.about-teaser__image-wrap::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 50%, transparent 40%, rgba(13,24,40,0.6) 100%);
  pointer-events: none;
}

/* ── 13. CTA Section – Animierter Glow-Rand ─────────────── */
.cta-section {
  position: relative;
}

.cta-section__inner {
  position: relative;
  isolation: isolate;
}

.cta-section__inner::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(
    135deg,
    rgba(201,162,39,0.35) 0%,
    transparent 35%,
    transparent 65%,
    rgba(201,162,39,0.2) 100%
  );
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  animation: sfx-border-pulse 5s ease-in-out infinite alternate;
}

@keyframes sfx-border-pulse {
  0%   { opacity: 0.5; }
  100% { opacity: 1;   }
}

/* ── 14. Stat-Zahl – Tabular + Pop ──────────────────────── */
.hero__stat-number {
  font-variant-numeric: tabular-nums;
}

@keyframes sfx-num-pop {
  0%   { transform: scale(1);    }
  45%  { transform: scale(1.14); }
  100% { transform: scale(1);    }
}

.hero__stat-number--pop {
  display: inline-block;
  animation: sfx-num-pop 0.35s var(--ease-spring);
}

/* ── 15. Parallax Wrapper ────────────────────────────────── */
.hero__visual,
.positioning__large-text {
  will-change: transform;
}

/* ── 16. Funding Panel – Border Glow ────────────────────── */
.funding__panel {
  position: relative;
  isolation: isolate;
}

.funding__panel::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(ellipse at top left, rgba(201,162,39,0.06) 0%, transparent 55%);
  pointer-events: none;
}

/* ════════════════════════════════════════════════════════════
   Premium Hero — Signature Effects
   ════════════════════════════════════════════════════════════ */

/* ── 17. Headline – Word-by-Word Reveal ──────────────────── */
/* Block-Animation wird durch individuelle Wort-Animationen ersetzt */
.hero--anim-ready .hero__headline {
  animation: none !important;
  opacity:   1    !important;
  transform: none !important;
  filter:    none !important;
}

.hero__word {
  display: inline-block;
  overflow: hidden;
  vertical-align: bottom;
  line-height: 1.15;
  margin-right: 0.24em;
}

/* em-Block: ganzes Element als eine Animations-Einheit */
.hero__word--block {
  display: block;
  overflow: hidden;
  margin: 0;
  line-height: inherit;
}
.hero__word--block .hero__word-inner {
  display: block;
}

.hero--anim-ready .hero__word-inner {
  display: inline-block;
  animation: sfx-word-up 0.72s var(--ease-spring) both;
  animation-delay: var(--word-delay, 0.3s);
}

@keyframes sfx-word-up {
  from {
    opacity: 0;
    transform: translateY(115%) skewX(-6deg);
  }
  to {
    opacity: 1;
    transform: translateY(0) skewX(0deg);
  }
}

/* ── 18. Headline em – Animated Gold Shimmer ─────────────── */
.hero__headline em {
  font-style: normal;
  display: block;
  background: linear-gradient(
    118deg,
    #c9a227  0%,
    #f7e27a 28%,
    #ffe168 50%,
    #d4a820 72%,
    #f5d460 100%
  );
  background-size: 300% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: transparent;
  animation: sfx-gold-shimmer 5s linear infinite;
}

@keyframes sfx-gold-shimmer {
  0%   { background-position:   0% center; }
  100% { background-position: 300% center; }
}

/* ── 19. CTA – Gold Aura Glow ───────────────────────────── */
.hero__ctas .btn--primary {
  position: relative;
  overflow: visible;     /* allow glow to radiate outside border-radius */
  isolation: isolate;
  z-index: 0;
}

.hero__ctas .btn--primary::before {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: inherit;
  background: linear-gradient(135deg, #c9a227, rgba(201,162,39,0.4));
  filter: blur(22px);
  opacity: 0;
  z-index: -1;
  animation: sfx-cta-aura 3.2s ease-in-out infinite;
}

@keyframes sfx-cta-aura {
  0%, 100% { opacity: 0;    transform: scale(0.82); }
  50%       { opacity: 0.58; transform: scale(1.14); }
}

/* ── 20. Geo Element – Orbiting Dots ────────────────────── */
.geo-orbit__dot {
  position: absolute;
  border-radius: 50%;
  top: 50%;
  left: 50%;
  background: var(--color-accent);
  box-shadow:
    0 0  6px 1px rgba(201,162,39,0.95),
    0 0 16px 3px rgba(201,162,39,0.30);
  animation: sfx-orbit var(--orbit-dur, 9s) linear infinite;
}

@keyframes sfx-orbit {
  from { transform: translate(-50%,-50%) rotate(0deg)   translateX(var(--orbit-r, 90px)); }
  to   { transform: translate(-50%,-50%) rotate(360deg) translateX(var(--orbit-r, 90px)); }
}

.geo-orbit__dot--ccw {
  animation-direction: reverse;
}

/* ── 21. Float Cards – Gentle Levitation ────────────────── */
.geo-float-card--1 {
  animation: sfx-float-1 4.5s ease-in-out infinite alternate;
}
.geo-float-card--2 {
  animation: sfx-float-2 6s ease-in-out infinite alternate-reverse;
}

@keyframes sfx-float-1 {
  from { transform: rotate(-3deg) translateY(0);     }
  to   { transform: rotate(-3deg) translateY(-10px); }
}
@keyframes sfx-float-2 {
  from { transform: rotate(2deg)  translateY(0);     }
  to   { transform: rotate(2deg)  translateY(-10px); }
}

/* ── 22. Hero Badge – Blinking Cursor ───────────────────── */
.hero__badge-cursor {
  display: inline-block;
  width: 2px;
  height: 0.72em;
  background: var(--color-accent);
  margin-left: 3px;
  vertical-align: middle;
  border-radius: 1px;
  animation: sfx-cursor-blink 1.1s step-end infinite;
}

@keyframes sfx-cursor-blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

/* ── Reduced Motion ──────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .hero-orb                           { animation: none !important; }
  .hero--anim-ready .hero__badge,
  .hero--anim-ready .hero__eyebrow,
  .hero--anim-ready .hero__headline,
  .hero--anim-ready .hero__subheadline,
  .hero--anim-ready .hero__ctas,
  .hero--anim-ready .hero__stats,
  .hero--anim-ready .hero__visual     { animation: none !important; }
  .process__progress-fill             { transition: none; }
  .section-header__label::after,
  .section-label::after               { transition: none; }
  .cta-section__inner::before         { animation: none; }
  .fade-up {
    transition: opacity 0.3s ease, transform 0.3s ease;
    filter: none !important;
  }
  /* Premium Hero additions */
  .hero__headline em                  { animation: none; }
  .hero__ctas .btn--primary::before   { animation: none; opacity: 0; }
  .hero--anim-ready .hero__word-inner { animation: none !important; opacity: 1; transform: none; }
  .geo-orbit__dot                     { animation: none; }
  .geo-float-card--1,
  .geo-float-card--2                  { animation: none; }
  .hero__badge-cursor                 { animation: none; }
}
