/* Hero Animation Container */
.hero-demo {
  position: relative;
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 
    0 25px 50px -12px rgba(0, 0, 0, 0.4),
    0 0 0 1px rgba(255, 255, 255, 0.1);
  background: #1a1a1a;
}

.hero-demo-inner {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
}

/* Screenshot frames */
.hero-frame {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.4s ease-in-out;
}

.hero-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top left;
}

.hero-frame.active {
  opacity: 1;
}

/* macOS-style cursor */
.hero-cursor {
  position: absolute;
  width: 20px;
  height: 20px;
  pointer-events: none;
  z-index: 100;
  opacity: 0;
  transition: opacity 0.3s ease;
  filter: drop-shadow(1px 2px 2px rgba(0, 0, 0, 0.4));
  transform-origin: 2px 2px;
}

.hero-cursor.visible {
  opacity: 1;
}

.hero-cursor.clicking {
  transform: scale(0.9);
  transition: transform 0.1s ease;
}

/* Click ripple effect */
.click-ripple {
  position: absolute;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(239, 68, 68, 0.3);
  transform: translate(-50%, -50%) scale(0);
  pointer-events: none;
  z-index: 99;
}

.click-ripple.animate {
  animation: ripple 0.4s ease-out forwards;
}

@keyframes ripple {
  0% {
    transform: translate(-50%, -50%) scale(0);
    opacity: 1;
  }
  100% {
    transform: translate(-50%, -50%) scale(2);
    opacity: 0;
  }
}

/* Window chrome (fake browser frame) */
.hero-window-chrome {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  background: linear-gradient(180deg, #3a3a3a 0%, #2a2a2a 100%);
  border-bottom: 1px solid #1a1a1a;
}

.hero-window-dots {
  display: flex;
  gap: 8px;
}

.hero-window-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.hero-window-dot.red { background: #ff5f57; }
.hero-window-dot.yellow { background: #febc2e; }
.hero-window-dot.green { background: #28c840; }

.hero-window-url {
  flex: 1;
  margin: 0 16px;
  padding: 6px 12px;
  background: #1a1a1a;
  border-radius: 6px;
  font-size: 13px;
  color: #888;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* Progress indicator */
.hero-progress {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 50;
}

.hero-progress-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transition: all 0.3s ease;
}

.hero-progress-dot.active {
  background: #ef4444;
  transform: scale(1.2);
}

/* Mobile responsive */
@media (max-width: 768px) {
  .hero-demo {
    max-width: 100%;
    border-radius: 12px;
    margin: 0 16px;
  }
  
  .hero-window-chrome {
    padding: 8px 12px;
  }
  
  .hero-window-dot {
    width: 10px;
    height: 10px;
  }
  
  .hero-window-url {
    font-size: 11px;
    padding: 4px 8px;
  }
  
  .hero-cursor {
    width: 16px;
    height: 16px;
  }
  
  .hero-progress {
    bottom: 12px;
  }
  
  .hero-progress-dot {
    width: 6px;
    height: 6px;
  }
}

/* Extra small screens - simplified view */
@media (max-width: 480px) {
  .hero-demo-inner {
    aspect-ratio: 4 / 3;
  }
  
  .hero-frame img {
    object-position: top center;
  }
  
  .hero-cursor {
    display: none;
  }
  
  .click-ripple {
    display: none;
  }
}

/* Pause animation on hover for accessibility */
.hero-demo:hover .hero-cursor {
  /* Keep cursor visible on hover */
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
  .hero-frame {
    transition: opacity 0.1s;
  }
  
  .hero-cursor {
    display: none;
  }
  
  .click-ripple {
    display: none;
  }
  
  @keyframes ripple {
    0%, 100% {
      transform: translate(-50%, -50%) scale(1);
      opacity: 0;
    }
  }
}
