/* =========================================================
   MarioBud — animacje i keyframes
   ========================================================= */

/* === Hero === */
@keyframes pulse-dot {
  0%   { box-shadow: 0 0 0 0 rgba(46,204,113,0.7); }
  70%  { box-shadow: 0 0 0 12px rgba(46,204,113,0); }
  100% { box-shadow: 0 0 0 0 rgba(46,204,113,0); }
}

@keyframes bounce-down {
  0%,100% { transform: translateY(0); }
  50%     { transform: translateY(6px); }
}

/* hero — entry */
.hero-eyebrow,
.hero-title .line,
.hero-sub,
.hero-actions,
.hero-trust {
  opacity: 0;
  transform: translateY(24px);
  animation: rise 0.9s var(--easing) forwards;
}
.hero-eyebrow      { animation-delay: 0.1s; }
.hero-title .line:nth-child(1) { animation-delay: 0.25s; }
.hero-title .line:nth-child(2) { animation-delay: 0.4s; }
.hero-title .line:nth-child(3) { animation-delay: 0.55s; }
.hero-sub          { animation-delay: 0.75s; }
.hero-actions      { animation-delay: 0.9s; }
.hero-trust        { animation-delay: 1.05s; }

@keyframes rise {
  to { opacity: 1; transform: translateY(0); }
}

/* logo entry */
.nav-logo img { animation: logo-rise 0.8s var(--easing) both 0.2s; }
@keyframes logo-rise {
  from { opacity: 0; transform: translateY(-6px) scale(0.95); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* chmury — wolny dryf */
.cloud-a { animation: drift 90s linear infinite; }
.cloud-b { animation: drift 110s linear infinite reverse; }
.cloud-c { animation: drift 75s linear infinite; }
@keyframes drift {
  from { transform: translateX(-15vw); }
  to   { transform: translateX(15vw); }
}

/* logo "wstrząs" po pięciokrotnym kliknięciu (klasa dodawana z JS) */
.nav-logo.shake img {
  animation: shake 0.5s ease-in-out;
}
@keyframes shake {
  0%,100% { transform: translateX(0) rotate(0); }
  10% { transform: translateX(-4px) rotate(-2deg); }
  30% { transform: translateX(4px) rotate(2deg); }
  50% { transform: translateX(-3px) rotate(-1deg); }
  70% { transform: translateX(3px) rotate(1deg); }
  90% { transform: translateX(-1px) rotate(0); }
}

/* === Reveal scroll === */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.9s var(--easing), transform 0.9s var(--easing);
}
.reveal.in {
  opacity: 1;
  transform: translateY(0);
}
.reveal.delay-1 { transition-delay: 0.1s; }
.reveal.delay-2 { transition-delay: 0.2s; }
.reveal.delay-3 { transition-delay: 0.3s; }
.reveal.delay-4 { transition-delay: 0.4s; }

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

/* === Konami: koparka === */
.konami-excavator {
  position: fixed;
  bottom: 8vh;
  left: -260px;
  width: 220px;
  z-index: 999;
  pointer-events: none;
  animation: drive-across 6s ease-in-out forwards;
}
@keyframes drive-across {
  0%   { transform: translateX(0); }
  20%  { transform: translateX(20vw); }
  25%  { transform: translateX(20vw) rotate(-3deg); }
  35%  { transform: translateX(20vw) rotate(3deg); }
  45%  { transform: translateX(20vw) rotate(0); }
  100% { transform: translateX(120vw); }
}

/* === Magnetic button shine === */
.btn-primary { position: relative; overflow: hidden; }
.btn-primary::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 30%, rgba(255,255,255,0.18) 50%, transparent 70%);
  transform: translateX(-100%);
  transition: transform 0.8s var(--easing);
}
.btn-primary:hover::before { transform: translateX(100%); }

/* === Parallax helpers === */
[data-parallax] { will-change: transform; }

/* === Map pin pulse === */
.map-pin { transition: transform 0.3s var(--easing); cursor: pointer; }
.map-pin:hover { transform: translateY(-6px); }
.map-pin circle { transform-origin: center; animation: pin-pulse 3s ease-in-out infinite; }
@keyframes pin-pulse {
  0%,100% { opacity: 1; }
  50%     { opacity: 0.5; }
}
.map-pin-egg circle { animation-duration: 1s; }

/* === Smoke (komin) === */
.smoke { animation: rise-smoke 4s ease-out infinite; }
.smoke-1 { animation-delay: 0s; }
.smoke-2 { animation-delay: 1.3s; }
.smoke-3 { animation-delay: 2.6s; }
@keyframes rise-smoke {
  0%   { transform: translateY(0) scale(0.8); opacity: 0.9; }
  100% { transform: translateY(-80px) scale(1.4); opacity: 0; }
}

/* === Reduced motion === */
@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;
  }
  .marquee-track { animation: none; }
}
