/* Performance optimizations for Belle Époque Atelier */

/* Lazy loading images - reduce paint operations */
img[loading="lazy"] {
  background-color: var(--color-cream-deep);
}

/* Font display swap for faster text rendering */
@font-face {
  font-family: 'Cormorant Garamond';
  font-display: swap;
}

@font-face {
  font-family: 'Inter';
  font-display: swap;
}

/* GPU acceleration for animations */
.product-card,
.page-transition,
.feature {
  transform: translateZ(0);
  backface-visibility: hidden;
}

/* CSS containment reduces browser reflow */
.shop-grid {
  contain: layout style paint;
}

.product-card {
  contain: layout style;
}

.features-grid {
  contain: layout style paint;
}

/* Smooth scroll optimization */
html {
  scroll-behavior: smooth;
}

/* Reduce animation for users with motion sensitivity */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Optimize font loading */
body {
  font-display: fallback;
}

/* Remove unused styles for animations */
.page-transition {
  will-change: opacity;
}

/* Reduce layout thrashing */
.reveal {
  position: relative;
}

/* Image rendering optimization */
img {
  image-rendering: -webkit-optimize-contrast;
}
