/**
 * Performance Optimizations
 * CSS for lazy-loaded images and content
 */

/* Lazy-loaded image styles */
img[loading="lazy"],
img[data-src] {
  opacity: 0;
  transition: opacity 0.3s ease-in-out;
}

img.lazy-loaded,
img[loading="lazy"]:not([data-src]) {
  opacity: 1;
}

/* Placeholder for lazy images */
img[data-src]::before {
  content: '';
  display: block;
  width: 100%;
  height: 100%;
  background: var(--bg-secondary);
  position: absolute;
  top: 0;
  left: 0;
}

/* Lazy-loaded background images */
[data-bg-src] {
  background-color: var(--bg-secondary);
  transition: background-image 0.3s ease-in-out;
}

[data-bg-src].lazy-bg-loaded {
  background-color: transparent;
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
  img[loading="lazy"],
  img[data-src],
  [data-bg-src] {
    transition: none;
  }
}

/* Optimize font rendering */
body {
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Will-change hints for animated elements */
.hero-bg-animation,
#Clouds,
.Cloud {
  will-change: transform, opacity;
}

/* Contain layout for better performance */
.hero-content,
.mockup-slider,
.feature-card {
  contain: layout style paint;
}






