/* ============================================================
   ROBOTT.SK — animácie (keyframes, scroll-reveal, efekty)
   ============================================================ */

/* ---------- Keyframes ---------- */
@keyframes blink {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0; }
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-18px); }
}

@keyframes border-rotate {
  to { filter: hue-rotate(360deg); }
}

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

@keyframes orb-drift-1 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33%      { transform: translate(60px, 40px) scale(1.1); }
  66%      { transform: translate(-30px, 70px) scale(0.95); }
}

@keyframes orb-drift-2 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33%      { transform: translate(-70px, -40px) scale(1.05); }
  66%      { transform: translate(40px, -60px) scale(0.9); }
}

/* ---------- Aplikované animácie ---------- */
.orb-1 { animation: orb-drift-1 18s ease-in-out infinite; }
.orb-2 { animation: orb-drift-2 22s ease-in-out infinite; }
.orb-3 { animation: orb-drift-1 26s ease-in-out infinite reverse; }

/* Animovaný brand gradient v nadpisoch */
.text-gradient-animated {
  background: linear-gradient(90deg, var(--neon-1), var(--neon-2), var(--neon-3), var(--neon-1));
  background-size: 300% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  animation: gradient-shift 8s ease infinite;
}

.float { animation: float 5s ease-in-out infinite; }

/* ---------- Scroll-reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(36px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
  transition-delay: var(--reveal-delay, 0s);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-left  { transform: translateX(-48px); }
.reveal-right { transform: translateX(48px); }
.reveal-left.visible, .reveal-right.visible { transform: translateX(0); }

/* Kaskádové oneskorenie pre skupiny kariet */
.stagger > *:nth-child(1) { --reveal-delay: 0s; }
.stagger > *:nth-child(2) { --reveal-delay: 0.12s; }
.stagger > *:nth-child(3) { --reveal-delay: 0.24s; }
.stagger > *:nth-child(4) { --reveal-delay: 0.36s; }
.stagger > *:nth-child(5) { --reveal-delay: 0.48s; }
.stagger > *:nth-child(6) { --reveal-delay: 0.6s; }

/* ---------- Hero vstupná animácia ---------- */
.hero-content > * {
  opacity: 0;
  transform: translateY(24px);
  animation: hero-in 0.9s var(--ease) forwards;
}

.hero-content > *:nth-child(1) { animation-delay: 0.15s; }
.hero-content > *:nth-child(2) { animation-delay: 0.3s; }
.hero-content > *:nth-child(3) { animation-delay: 0.45s; }
.hero-content > *:nth-child(4) { animation-delay: 0.6s; }

@keyframes hero-in {
  to { opacity: 1; transform: translateY(0); }
}

/* ---------- Neónová mriežka (pozadie sekcií) ---------- */
.grid-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(124, 58, 237, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(124, 58, 237, 0.06) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, #000 30%, transparent 75%);
  pointer-events: none;
  z-index: 0;
}

/* ---------- Redukcia pohybu (prístupnosť) ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .reveal, .hero-content > * {
    opacity: 1 !important;
    transform: none !important;
  }

  #particles, .cursor-dot, .cursor-ring { display: none !important; }
}
