/* ============================================================================
   Huber Solutions - ANIMATION SYSTEM
   Ultra-premium dark B2B theme – Vercel/Linear/Stripe level
   ============================================================================ */

/* ============================================================================
   1. SCROLL-REVEAL ANIMATIONS
   ============================================================================ */

[data-animate] {
  opacity: 0;
  transition:
    opacity 0.9s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.9s cubic-bezier(0.16, 1, 0.3, 1),
    filter 0.9s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

[data-animate].is-visible {
  opacity: 1;
  transform: none !important;
  filter: blur(0);
}

[data-animate="fade-up"] {
  transform: translateY(50px);
  filter: blur(4px);
}

[data-animate="fade-left"] {
  transform: translateX(60px);
  filter: blur(4px);
}

[data-animate="fade-right"] {
  transform: translateX(-60px);
  filter: blur(4px);
}

[data-animate="scale-up"] {
  transform: scale(0.85);
  filter: blur(6px);
}

[data-animate="stagger"] {
  transform: translateY(50px);
  filter: blur(4px);
}

[data-animate="stagger"].is-visible {
  transform: translateY(0);
}

[data-animate="stagger"] > * {
  opacity: 0;
  transition:
    opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
  transform: translateY(30px);
}

[data-animate="stagger"].is-visible > * {
  opacity: 1;
  transform: translateY(0);
}

[data-animate="stagger"].is-visible > *:nth-child(1) { transition-delay: 0ms; }
[data-animate="stagger"].is-visible > *:nth-child(2) { transition-delay: 80ms; }
[data-animate="stagger"].is-visible > *:nth-child(3) { transition-delay: 160ms; }
[data-animate="stagger"].is-visible > *:nth-child(4) { transition-delay: 240ms; }
[data-animate="stagger"].is-visible > *:nth-child(5) { transition-delay: 320ms; }
[data-animate="stagger"].is-visible > *:nth-child(6) { transition-delay: 400ms; }

/* Delay support */
[data-delay="100"] { transition-delay: 100ms; }
[data-delay="150"] { transition-delay: 150ms; }
[data-delay="200"] { transition-delay: 200ms; }
[data-delay="300"] { transition-delay: 300ms; }
[data-delay="400"] { transition-delay: 400ms; }
[data-delay="500"] { transition-delay: 500ms; }
[data-delay="600"] { transition-delay: 600ms; }

/* ============================================================================
   2. HERO – ANIMATED GRID BACKGROUND
   ============================================================================ */

.hs-hero__grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(59, 158, 255, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(59, 158, 255, 0.07) 1px, transparent 1px);
  background-size: 80px 80px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, black 20%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, black 20%, transparent 70%);
  animation: hs-grid-fade 4s ease-out forwards;
  z-index: 1;
}

@keyframes hs-grid-fade {
  0% { opacity: 0; background-size: 120px 120px; }
  100% { opacity: 1; background-size: 80px 80px; }
}

/* ============================================================================
   3. HERO – RADIAL BEAM FROM TOP
   ============================================================================ */

.hs-hero__beam {
  position: absolute;
  top: -2px;
  left: 50%;
  transform: translateX(-50%);
  width: 60%;
  max-width: 800px;
  height: 500px;
  background: radial-gradient(
    ellipse 100% 100% at 50% 0%,
    rgba(59, 158, 255, 0.2) 0%,
    rgba(0, 212, 255, 0.05) 40%,
    transparent 70%
  );
  z-index: 2;
  pointer-events: none;
  animation: hs-beam-pulse 6s ease-in-out infinite alternate;
}

@keyframes hs-beam-pulse {
  0% { opacity: 0.6; }
  100% { opacity: 1; }
}

/* ============================================================================
   4. HERO ORBS – AMBIENT FLOATING
   ============================================================================ */

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

.hs-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  pointer-events: none;
  opacity: 0;
  animation-fill-mode: forwards;
}

.hs-orb--1 {
  top: -15%;
  left: -5%;
  width: 700px;
  height: 700px;
  background: radial-gradient(circle, rgba(59, 158, 255, 0.25) 0%, transparent 70%);
  animation: hs-float1 20s ease-in-out infinite, hs-orb-in 2s ease-out 0.5s forwards;
}

.hs-orb--2 {
  top: 40%;
  right: -10%;
  width: 550px;
  height: 550px;
  background: radial-gradient(circle, rgba(245, 158, 11, 0.18) 0%, transparent 70%);
  animation: hs-float2 25s ease-in-out infinite, hs-orb-in 2s ease-out 0.8s forwards;
}

.hs-orb--3 {
  bottom: -20%;
  left: 25%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(0, 212, 255, 0.15) 0%, transparent 70%);
  animation: hs-float3 22s ease-in-out infinite, hs-orb-in 2s ease-out 1.1s forwards;
}

@keyframes hs-orb-in {
  0% { opacity: 0; transform: scale(0.5); }
  100% { opacity: 1; transform: scale(1); }
}

@keyframes hs-float1 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  25% { transform: translate(100px, -50px) scale(1.05); }
  50% { transform: translate(50px, 60px) scale(0.95); }
  75% { transform: translate(-60px, -30px) scale(1.02); }
}

@keyframes hs-float2 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(-80px, 50px) scale(1.08); }
  66% { transform: translate(60px, -90px) scale(0.92); }
}

@keyframes hs-float3 {
  0%, 100% { transform: translate(0, 0); }
  40% { transform: translate(70px, -50px); }
  80% { transform: translate(-40px, 30px); }
}

/* ============================================================================
   5. HERO – BADGE (Overline)
   ============================================================================ */

.hs-hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 1.25rem;
  border-radius: 9999px;
  border: 1px solid rgba(59, 158, 255, 0.2);
  background: rgba(59, 158, 255, 0.06);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 400;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--color-electric);
  margin-bottom: 2rem;
  backdrop-filter: blur(10px);
}

.hs-hero__badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-electric);
  box-shadow: 0 0 8px var(--color-electric);
  animation: hs-badge-blink 2s ease-in-out infinite;
}

@keyframes hs-badge-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* ============================================================================
   6. HERO – GLOWING BOTTOM BORDER
   ============================================================================ */

.hs-hero__glow-line {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(59, 158, 255, 0.5) 20%,
    rgba(0, 212, 255, 0.8) 50%,
    rgba(59, 158, 255, 0.5) 80%,
    transparent 100%
  );
  z-index: 20;
}

.hs-hero__glow-line::after {
  content: '';
  position: absolute;
  bottom: -20px;
  left: 50%;
  transform: translateX(-50%);
  width: 40%;
  height: 40px;
  background: radial-gradient(ellipse, rgba(0, 212, 255, 0.15) 0%, transparent 70%);
  filter: blur(10px);
}

/* ============================================================================
   7. SECTION DIVIDERS (glowing lines between sections)
   ============================================================================ */

.hs-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 5%;
  right: 5%;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    var(--glass-border) 30%,
    rgba(59, 158, 255, 0.3) 50%,
    var(--glass-border) 70%,
    transparent 100%
  );
  z-index: 5;
}

/* ============================================================================
   8. MARQUEE – ENHANCED
   ============================================================================ */

.hs-marquee-section {
  padding: 1.5rem 0;
  background: linear-gradient(180deg, rgba(10, 22, 40, 0.8) 0%, rgba(5, 10, 20, 0.6) 100%);
  border-top: 1px solid rgba(59, 158, 255, 0.08);
  border-bottom: 1px solid rgba(59, 158, 255, 0.08);
  overflow: hidden;
  position: relative;
}

/* Fade masks on edges */
.hs-marquee-section::before,
.hs-marquee-section::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: 120px;
  z-index: 10;
  pointer-events: none;
}

.hs-marquee-section::before {
  left: 0;
  background: linear-gradient(90deg, var(--color-void) 0%, transparent 100%);
}

.hs-marquee-section::after {
  right: 0;
  background: linear-gradient(270deg, var(--color-void) 0%, transparent 100%);
}

.hs-marquee {
  overflow: hidden;
  width: 100%;
}

.hs-marquee__track {
  display: flex;
  animation: hs-marquee 35s linear infinite;
  white-space: nowrap;
  will-change: transform;
}

.hs-marquee__item {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--color-text-dim);
  padding: 0 1.25rem;
  flex-shrink: 0;
  transition: color 0.3s ease;
}

.hs-marquee__separator {
  color: rgba(59, 158, 255, 0.3);
  padding: 0 0.5rem;
  display: flex;
  align-items: center;
  flex-shrink: 0;
  font-size: 0.7rem;
}

@keyframes hs-marquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-33.333%); }
}

/* ============================================================================
   9. NEON GLOW BUTTON EFFECTS
   ============================================================================ */

@keyframes hs-glow-pulse {
  0%, 100% { box-shadow: 0 0 20px rgba(245, 158, 11, 0.3), 0 0 60px rgba(245, 158, 11, 0.1); }
  50% { box-shadow: 0 0 30px rgba(245, 158, 11, 0.5), 0 0 80px rgba(245, 158, 11, 0.15); }
}

.hs-btn--primary:hover {
  animation: hs-glow-pulse 2s ease-in-out infinite;
}

.hs-btn--lg {
  padding: 1rem 2rem;
  font-size: 1rem;
  gap: 0.75rem;
}

.hs-btn--lg svg {
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.hs-btn--lg:hover svg {
  transform: translateX(4px);
}

/* ============================================================================
   10. GRADIENT SHIFT – HERO BACKGROUND
   ============================================================================ */

.hs-hero {
  background-size: 200% 200%;
  animation: hs-gradient-shift 12s ease-in-out infinite;
}

@keyframes hs-gradient-shift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* ============================================================================
   11. SCROLL INDICATOR – ENHANCED
   ============================================================================ */

.hs-hero__scroll {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.hs-hero__scroll-text {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--color-text-dim);
  opacity: 0.6;
}

.hs-hero__scroll-line {
  width: 1px;
  height: 48px;
  position: relative;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.1);
}

.hs-hero__scroll-line::after {
  content: '';
  position: absolute;
  top: -100%;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to bottom, transparent, var(--color-electric), transparent);
  animation: hs-scroll-beam 2s ease-in-out infinite;
}

@keyframes hs-scroll-beam {
  0% { top: -100%; }
  100% { top: 200%; }
}

/* ============================================================================
   12. COUNT-UP
   ============================================================================ */

.hs-count {
  display: inline-block;
  font-variant-numeric: tabular-nums;
}

/* ============================================================================
   13. TECH BAR FILL
   ============================================================================ */

.hs-tech-bar__fill {
  transition: width 1.5s cubic-bezier(0.16, 1, 0.3, 1);
  width: 0%;
  position: relative;
}

.hs-tech-bar__fill::after {
  content: '';
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-neon);
  box-shadow: 0 0 10px var(--color-neon);
  opacity: 0;
  transition: opacity 0.3s ease 1.5s;
}

.hs-tech-bar__fill.is-visible::after {
  opacity: 1;
}

/* ============================================================================
   14. ANIMATED CARD BORDER GRADIENT (on hover)
   ============================================================================ */

.hs-glass-card {
  position: relative;
}

.hs-glass-card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(
    135deg,
    transparent 20%,
    rgba(59, 158, 255, 0) 40%,
    rgba(59, 158, 255, 0) 60%,
    transparent 80%
  );
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.5s ease;
  pointer-events: none;
}

.hs-glass-card:hover::after {
  opacity: 1;
  background: linear-gradient(
    135deg,
    transparent 10%,
    rgba(59, 158, 255, 0.5) 30%,
    rgba(0, 212, 255, 0.5) 50%,
    rgba(59, 158, 255, 0.5) 70%,
    transparent 90%
  );
  animation: hs-border-rotate 3s linear infinite;
}

@keyframes hs-border-rotate {
  0% {
    background: linear-gradient(0deg, transparent 10%, rgba(59,158,255,0.5) 30%, rgba(0,212,255,0.5) 50%, rgba(59,158,255,0.5) 70%, transparent 90%);
  }
  25% {
    background: linear-gradient(90deg, transparent 10%, rgba(59,158,255,0.5) 30%, rgba(0,212,255,0.5) 50%, rgba(59,158,255,0.5) 70%, transparent 90%);
  }
  50% {
    background: linear-gradient(180deg, transparent 10%, rgba(59,158,255,0.5) 30%, rgba(0,212,255,0.5) 50%, rgba(59,158,255,0.5) 70%, transparent 90%);
  }
  75% {
    background: linear-gradient(270deg, transparent 10%, rgba(59,158,255,0.5) 30%, rgba(0,212,255,0.5) 50%, rgba(59,158,255,0.5) 70%, transparent 90%);
  }
  100% {
    background: linear-gradient(360deg, transparent 10%, rgba(59,158,255,0.5) 30%, rgba(0,212,255,0.5) 50%, rgba(59,158,255,0.5) 70%, transparent 90%);
  }
}

/* ============================================================================
   15. BADGE PULSE
   ============================================================================ */

.hs-badge__dot--pulse {
  position: relative;
}

.hs-badge__dot--pulse::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--color-success);
  animation: hs-pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes hs-pulse {
  0% { transform: scale(1); opacity: 0.8; }
  100% { transform: scale(3); opacity: 0; }
}

/* ============================================================================
   16. CURTAIN – DRAMATIC REVEAL
   ============================================================================ */

.hs-curtain {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--color-void);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
              visibility 0.8s;
}

.hs-curtain__inner {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--color-midnight) 0%, var(--color-void) 100%);
}

.hs-curtain--hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

/* ============================================================================
   17. PARALLAX SCROLL DEPTH
   ============================================================================ */

.hs-parallax-slow {
  will-change: transform;
}

/* ============================================================================
   18. STATS SECTION – BEAM EFFECT
   ============================================================================ */

.hs-stats-section::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 50%;
  height: 200%;
  background: radial-gradient(ellipse, rgba(245, 158, 11, 0.06) 0%, transparent 60%);
  filter: blur(40px);
  pointer-events: none;
  animation: hs-stat-glow 4s ease-in-out infinite alternate;
}

@keyframes hs-stat-glow {
  0% { opacity: 0.5; transform: translate(-50%, -50%) scale(0.9); }
  100% { opacity: 1; transform: translate(-50%, -50%) scale(1.1); }
}

/* ============================================================================
   19. FLOATING PARTICLES (JS-generated, CSS animation)
   ============================================================================ */

.hs-hero__particles {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  overflow: hidden;
}

@keyframes hs-particle-float {
  0% {
    transform: translateY(0) translateX(0);
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  90% {
    opacity: 1;
  }
  100% {
    transform: translateY(-120vh) translateX(var(--drift, 0px));
    opacity: 0;
  }
}

/* ============================================================================
   19b. MAGNETIC CURSOR GLOW ON CARDS
   ============================================================================ */

.hs-glass-card,
.hs-erp-tile,
.hs-project-card {
  --glow-x: 50%;
  --glow-y: 50%;
}

.hs-glass-card::before,
.hs-erp-tile::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(
    circle 200px at var(--glow-x) var(--glow-y),
    rgba(59, 158, 255, 0.12) 0%,
    transparent 60%
  );
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
  z-index: 1;
}

.hs-glass-card:hover::before,
.hs-erp-tile:hover::before {
  opacity: 1;
}

/* ============================================================================
   19c. STAT NUMBER GLOW EFFECT
   ============================================================================ */

.hs-stat__number {
  transition: text-shadow 1s ease;
}

.hs-stat--glow {
  text-shadow: 0 0 40px rgba(245, 158, 11, 0.3), 0 0 80px rgba(245, 158, 11, 0.1);
}

/* ============================================================================
   19d. SECTION ENTRANCE ANIMATION
   ============================================================================ */

.hs-section {
  position: relative;
}

.hs-section--visible {
  /* Marker class for JS-triggered animations */
}

/* ============================================================================
   20. ABOUT – PHOTO GLOW
   ============================================================================ */

.hs-about-photo::before {
  content: '';
  position: absolute;
  inset: -20px;
  background: radial-gradient(ellipse at 30% 50%, rgba(59, 158, 255, 0.15) 0%, transparent 60%);
  filter: blur(30px);
  z-index: -1;
  animation: hs-photo-glow 5s ease-in-out infinite alternate;
}

@keyframes hs-photo-glow {
  0% { opacity: 0.5; }
  100% { opacity: 1; }
}

/* ============================================================================
   21. KONTAKT SECTION – ENHANCED GLOW
   ============================================================================ */

.hs-kontakt-glow {
  position: absolute;
  top: -300px;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 600px;
  background:
    radial-gradient(ellipse 60% 40% at 50% 30%, rgba(59, 158, 255, 0.12) 0%, transparent 70%),
    radial-gradient(ellipse 40% 30% at 60% 60%, rgba(0, 212, 255, 0.06) 0%, transparent 70%);
  filter: blur(40px);
  pointer-events: none;
  z-index: 0;
  animation: hs-kontakt-breathe 8s ease-in-out infinite alternate;
}

@keyframes hs-kontakt-breathe {
  0% { opacity: 0.6; }
  100% { opacity: 1; }
}

/* ============================================================================
   22. SERVICE CARD – ICON GLOW ON HOVER
   ============================================================================ */

.hs-service-card__icon::after {
  content: '';
  position: absolute;
  inset: -10px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(59, 158, 255, 0.2) 0%, transparent 70%);
  opacity: 0;
  transition: opacity 0.4s ease;
  z-index: -1;
}

.hs-service-card__icon {
  position: relative;
}

.hs-service-card:hover .hs-service-card__icon::after {
  opacity: 1;
}

/* ============================================================================
   ACCESSIBILITY – PREFERS REDUCED MOTION
   ============================================================================ */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  [data-animate] {
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
  }

  .hs-orb { animation: none; opacity: 0.5; }
  .hs-marquee__track { animation: none; }
  .hs-hero { animation: none; }
  .hs-hero__beam { animation: none; }
  .hs-hero__scroll-line::after { animation: none; }
  .hs-hero__grid { animation: none; opacity: 0.5; }
  .hs-glass-card:hover::after { animation: none; }
  .hs-badge__dot--pulse::after { animation: none; }
}
