/* animations.css — Animacje: reveal scroll, marquee, hover karty, hover przyciski, kursor */

/* ===================== REVEAL — wejście przy scrollu ===================== */
.reveal,
.reveal-stagger {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity var(--transition-reveal), transform var(--transition-reveal);
}

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

/* ===================== MARQUEE ===================== */
@keyframes marquee {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

/* Pauza marquee na hover */
.marquee-wrapper:hover .marquee__track {
  animation-play-state: paused;
}

/* ===================== HOVER KARTY USŁUG — sprężysty ruch ===================== */
.service-card {
  will-change: transform;
  transition: transform var(--transition-bounce), box-shadow var(--transition-slow), border-color var(--transition-base);
}

/* ===================== HOVER PRZYCISKI ===================== */
.btn,
.contact-btn {
  will-change: transform, box-shadow;
  transition: transform var(--transition-base), box-shadow var(--transition-base),
              background var(--transition-base), border-color var(--transition-base),
              color var(--transition-base);
}

/* ===================== KURSOR NIESTANDARDOWY ===================== */
#cursor {
  position: fixed;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--color-accent);
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  display: none;
  transition: width 0.2s ease, height 0.2s ease, opacity 0.2s ease;
  will-change: left, top;
}

/* Widoczny tylko na urządzeniach bez dotyku */
body:not(.touch-device) #cursor {
  display: block;
}

/* ===================== FOCUS STYLES ===================== */
:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

/* ===================== PRZEJŚCIE MOBILE MENU ===================== */
.nav__mobile {
  will-change: transform;
}

/* ===================== HERO — animacja wejścia ===================== */
/* Elementy hero używają klas .reveal z opóźnieniami ustawionymi inline */

/* ===================== SCROLL SMOOTH ===================== */
html {
  scroll-behavior: smooth;
}

/* ===================== REDUKCJA RUCHU ===================== */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .reveal,
  .reveal-stagger {
    opacity: 1;
    transform: none;
  }

  .marquee__track {
    animation: none;
  }
}

/* Split text hero — słowa wyjeżdżają z dołu */
.hero-word-wrapper {
  overflow: hidden;
  display: inline-block;
}
.hero-word {
  display: inline-block;
  transform: translateY(100%);
  opacity: 0;
  transition: transform 0.6s cubic-bezier(0.76, 0, 0.24, 1), opacity 0.4s ease;
}
.hero-word.visible {
  transform: translateY(0);
  opacity: 1;
}

/* Section title clip-path reveal */
.section-title {
  clip-path: inset(0 0 100% 0);
  transition: clip-path 0.8s cubic-bezier(0.76, 0, 0.24, 1);
}
.section-title.visible {
  clip-path: inset(0 0 0% 0);
}

/* Tilt kart — płynny powrót */
.service-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  will-change: transform;
}

/* Hero SVG pattern oddychanie */
.hero-pattern {
  animation: breathe 8s ease-in-out infinite;
}
@keyframes breathe {
  0%, 100% { transform: scale(1) rotate(0deg); opacity: 0.06; }
  50% { transform: scale(1.05) rotate(2deg); opacity: 0.08; }
}

/* Magnetic button reset */
.btn {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  will-change: transform;
}

/* ── CUSTOM CURSOR ── */
#custom-cursor {
  position: fixed;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #2563EB;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 12px 4px rgba(37,99,235,0.7), 0 0 24px 8px rgba(37,99,235,0.3);
  transition: width 0.2s ease, height 0.2s ease, box-shadow 0.2s ease;
}

#custom-cursor.cursor--hover {
  width: 20px;
  height: 20px;
  box-shadow: 0 0 20px 6px rgba(37,99,235,0.8), 0 0 40px 12px rgba(37,99,235,0.3);
}
