/* Farah scrapbook performance patch.
   Load this AFTER styles.css. Does not change the music/iframe logic. */

/* SVG feTurbulence across a fixed full-screen layer is costly to repaint while scrolling. */
.paper-grain {
  display: none !important;
  background-image: none !important;
}

/* Blur behind a sticky navigation bar can trigger expensive repaints on mobile GPUs. */
.site-nav {
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
  background: rgba(248, 241, 232, 0.98) !important;
}

/* Keep content visible without waiting for animated scroll reveals. */
.reveal-ready,
.reveal-ready.visible {
  opacity: 1 !important;
  transform: none !important;
  transition: none !important;
}

/* Avoid animating card shadows/transforms as the pointer moves over the gallery. */
.memory-card {
  transition: none !important;
}

/* Prefer a simpler, consistent surface while scrolling on narrow devices. */
@media (max-width: 700px) {
  .memory-card,
  .letter-card,
  .surprise-reveal,
  .lock-card {
    box-shadow: 0 8px 20px rgba(74, 48, 37, 0.09) !important;
  }

  .memory-card:hover {
    transform: rotate(var(--angle, -2deg)) !important;
  }
}

/* Respect a visitor's accessibility preference and suppress decorative 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;
  }
}
