/* Global site theme overrides (destinations + main pages)
   - Light sand base background
   - Fine grain texture via subtle overlay
*/

:root {
  --paper-sand-rgb: 255, 248, 238;
  --paper-sand: rgb(var(--paper-sand-rgb));
}

html {
  background: var(--paper-sand);
}

body {
  background-color: var(--paper-sand) !important;
}

/* Add a subtle grain overlay even on pages that don't define their own body::before */
body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 9999;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
  opacity: 0.035;
}

/* On mobile, the grain overlay can make small text feel “soft”.
   Disable it for crisper typography.
*/
@media (max-width: 768px) {
  body::before {
    opacity: 0;
    background-image: none;
  }
}

/* Ensure the overlay doesn't affect clickability on high z-index UI */
@supports (pointer-events: none) {
  body::before { pointer-events: none; }
}
