/* ==========================================================================
   MKWEBS.EU — ADVANCED ANIMATIONS & MICRO-INTERACTIONS
   ========================================================================== */

/* Pulse dot on active status badge */
@keyframes pulseDot {
  0%, 100% {
    transform: scale(1);
    opacity: 1;
    box-shadow: 0 0 0 0 rgba(0, 223, 137, 0.7);
  }
  50% {
    transform: scale(1.15);
    opacity: 0.85;
    box-shadow: 0 0 0 8px rgba(0, 223, 137, 0);
  }
}

/* Floating animation for badge pills and decorative elements */
@keyframes floatSlow {
  0% {
    transform: translateY(0px) rotate(0deg);
  }
  50% {
    transform: translateY(-12px) rotate(1.5deg);
  }
  100% {
    transform: translateY(6px) rotate(-1deg);
  }
}

@keyframes floatReverse {
  0% {
    transform: translateY(0px) rotate(0deg);
  }
  50% {
    transform: translateY(14px) rotate(-2deg);
  }
  100% {
    transform: translateY(-8px) rotate(1deg);
  }
}

/* Ambient gradient rotation */
@keyframes rotateGradient {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

/* Shimmer shine sweep across buttons */
@keyframes shineSweep {
  0% {
    transform: translateX(-150%) skewX(-25deg);
    opacity: 0;
  }
  50% {
    opacity: 0.4;
  }
  100% {
    transform: translateX(250%) skewX(-25deg);
    opacity: 0;
  }
}

.shine-effect {
  position: relative;
  overflow: hidden;
}

.shine-effect::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(
    60deg,
    rgba(255, 255, 255, 0) 30%,
    rgba(255, 255, 255, 0.15) 50%,
    rgba(255, 255, 255, 0) 70%
  );
  transform: rotate(30deg);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s;
}

.shine-effect:hover::after {
  opacity: 1;
  animation: shineSweep 1.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Neon glow border breathing */
@keyframes neonBorderPulse {
  0%, 100% {
    border-color: rgba(0, 242, 254, 0.25);
    box-shadow: 0 0 15px rgba(0, 242, 254, 0.15);
  }
  50% {
    border-color: rgba(0, 242, 254, 0.6);
    box-shadow: 0 0 35px rgba(0, 242, 254, 0.35);
  }
}

.pulse-border {
  animation: neonBorderPulse 4s infinite ease-in-out;
}

/* Scroll reveal classes - Fixed: Zero delay on hover/tilt */
.reveal-init {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

.reveal-init.revealed {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 0s !important;
}

/* Stagger entrance delays only before revealed */
.reveal-init:not(.revealed).delay-100 { transition-delay: 0.1s; }
.reveal-init:not(.revealed).delay-200 { transition-delay: 0.2s; }
.reveal-init:not(.revealed).delay-300 { transition-delay: 0.3s; }

/* Interactive Hover Magnet Effect */
.magnetic-item {
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform;
}

/* Card 3D Tilt Reflection Overlay */
.card-glare {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
  border-radius: inherit;
  background: radial-gradient(circle at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(255, 255, 255, 0.14) 0%, rgba(255, 255, 255, 0) 65%);
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 2;
}

.project-card:hover .card-glare {
  opacity: 1;
}

/* Marquee / Ticker text */
.marquee-container {
  width: 100%;
  overflow: hidden;
  position: relative;
  padding: 1.35rem 0;
  background: rgba(11, 15, 26, 0.4);
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
}

.marquee-content {
  display: flex;
  gap: 3rem;
  width: max-content;
  animation: scrollMarquee 25s linear infinite;
}

.marquee-container:hover .marquee-content {
  animation-play-state: paused;
}

@keyframes scrollMarquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.marquee-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text-secondary);
  white-space: nowrap;
}

.marquee-item span.accent {
  color: var(--neon-cyan);
}

/* ==========================================================================
   PORTFOLIO CARDS — BRUTAL SVG MICRO-ANIMATIONS (ALL 6 PROJECTS)
   ========================================================================== */

/* Prevent any transition delay on cards */
.project-card,
.project-card.revealed,
.project-card:hover {
  transition-delay: 0s !important;
}

/* 1. METHER: Rocket Ion Thrust & Telemetry Flow */
@keyframes rocketFlamePulse {
  0%, 100% {
    transform: scaleY(0.85);
    opacity: 0.75;
    stroke: #00f2fe;
    filter: drop-shadow(0 0 4px #00f2fe);
  }
  50% {
    transform: scaleY(1.35);
    opacity: 1;
    stroke: #c3ff00;
    filter: drop-shadow(0 0 10px #c3ff00);
  }
}

.anim-rocket-flame {
  transform-origin: 0 65px;
  animation: rocketFlamePulse 1.1s ease-in-out infinite alternate;
}

@keyframes telemetryLineDash {
  0% { stroke-dashoffset: 60; }
  100% { stroke-dashoffset: 0; }
}

.anim-telemetry-flow {
  stroke-dasharray: 6 6;
  animation: telemetryLineDash 3s linear infinite;
}

/* 2. SPOOLLOGIC: Motorized Spool Rotation & Filament Flow */
@keyframes spoolSpin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.anim-spool-spin {
  transform-origin: 0 0;
  animation: spoolSpin 8s linear infinite;
}

.project-card:hover .anim-spool-spin {
  animation-duration: 2.2s; /* Spool speeds up on hover */
}

@keyframes filamentFlow {
  0% { stroke-dashoffset: 40; }
  100% { stroke-dashoffset: 0; }
}

.anim-filament-flow {
  stroke-dasharray: 8 4;
  animation: filamentFlow 1.8s linear infinite;
}

/* 3. FORMIKARIA: Hexagonal Hydra Chamber Moisture Pulse */
@keyframes hydraPulse {
  0%, 100% {
    fill: rgba(0, 223, 137, 0.05);
    stroke: #00df89;
    filter: drop-shadow(0 0 4px rgba(0, 223, 137, 0.25));
  }
  50% {
    fill: rgba(0, 242, 254, 0.18);
    stroke: #00f2fe;
    filter: drop-shadow(0 0 14px rgba(0, 242, 254, 0.7));
  }
}

.anim-hydra-chamber {
  animation: hydraPulse 3s ease-in-out infinite alternate;
}

.anim-hydra-pulse {
  transform-origin: 0 0;
  animation: spoolSpin 12s linear infinite;
}

/* 4. RANČ PRI ŽILINE: Star Twinkle & Warm Lodge Glow */
@keyframes starTwinkle {
  0%, 100% { opacity: 0.2; transform: scale(0.7); }
  50% { opacity: 1; transform: scale(1.4); }
}

.anim-star-1 { transform-origin: 0 0; animation: starTwinkle 2s infinite ease-in-out; }
.anim-star-2 { transform-origin: 0 0; animation: starTwinkle 2.8s infinite ease-in-out 0.6s; }
.anim-star-3 { transform-origin: 0 0; animation: starTwinkle 2.4s infinite ease-in-out 1.2s; }

@keyframes ranchGlow {
  0%, 100% { stroke: #ff9900; filter: drop-shadow(0 0 3px rgba(255, 153, 0, 0.3)); }
  50% { stroke: #ffbb33; filter: drop-shadow(0 0 12px rgba(255, 187, 51, 0.8)); }
}

.anim-ranch-pulse {
  transform-origin: 0 0;
  animation: ranchGlow 2.8s infinite ease-in-out alternate;
}

/* 5. OBĽÚBENÁ REŠTAURÁCIA: Slovenský Orloj Clock Hands Movement */
@keyframes rotateClockMinute {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@keyframes rotateClockHour {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.anim-clock-minute {
  transform-origin: 0 0;
  animation: rotateClockMinute 7s linear infinite;
}

.anim-clock-hour {
  transform-origin: 0 0;
  animation: rotateClockHour 42s linear infinite;
}

.anim-orloj-ring {
  transform-origin: 0 0;
  animation: spoolSpin 20s linear infinite reverse;
}

/* 6. AUTO-HMIRA: Wheels Rotation & Diagnostic Pulse */
@keyframes wheelSpin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.anim-car-wheel-1 {
  transform-origin: 0 0;
  animation: wheelSpin 3.5s linear infinite;
}

.anim-car-wheel-2 {
  transform-origin: 0 0;
  animation: wheelSpin 3.5s linear infinite;
}

.project-card:hover .anim-car-wheel-1,
.project-card:hover .anim-car-wheel-2 {
  animation-duration: 1s; /* Wheels accelerate on hover */
}

@keyframes ecgPulse {
  0% {
    stroke-dashoffset: 90;
    opacity: 0.3;
  }
  50% {
    opacity: 1;
    filter: drop-shadow(0 0 6px #ff3b30);
  }
  100% {
    stroke-dashoffset: 0;
    opacity: 0.3;
  }
}

.anim-ecg-wave {
  stroke-dasharray: 25 10;
  animation: ecgPulse 2.2s ease-in-out infinite;
}

/* 7. HOPLANDIA: Bouncing Ball on Trampoline Mat */
@keyframes hopBounce {
  0%, 100% { transform: translateY(0) scale(1.1, 0.88); }
  50% { transform: translateY(-34px) scale(0.94, 1.06); }
}

.anim-hop-ball {
  transform-origin: 0 6px;
  animation: hopBounce 1.6s cubic-bezier(0.3, 0, 0.7, 1) infinite;
}

.project-card:hover .anim-hop-ball {
  animation-duration: 0.9s; /* Ball bounces faster on hover */
}

/* 8. ADMIN MOCKUP: Blinking Text Caret */
@keyframes caretBlink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

/* 9. SALÓN BIANKA: Scissors Cutting Motion */
@keyframes scissorCutA {
  0%, 100% { transform: rotate(0deg); }
  50% { transform: rotate(13deg); }
}

@keyframes scissorCutB {
  0%, 100% { transform: rotate(0deg); }
  50% { transform: rotate(-13deg); }
}

.anim-scissor-a {
  transform-origin: 0 0;
  animation: scissorCutA 1.8s ease-in-out infinite;
}

.anim-scissor-b {
  transform-origin: 0 0;
  animation: scissorCutB 1.8s ease-in-out infinite;
}

.project-card:hover .anim-scissor-a,
.project-card:hover .anim-scissor-b {
  animation-duration: 0.9s; /* Faster cutting on hover */
}
