/* Site-wide animated gradient applied to body via plugin */
body.animated-gradient-hero {
  position: relative;
  overflow-x: hidden;
  background: linear-gradient(120deg, #000 0%, #004E65 50%, #000 100%);
  background-attachment: fixed;
  background-size: 300% 300%;
  animation: marketGradientShift 14s ease infinite;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  will-change: background-position;
  min-height: 100vh;
}

/* Ensure page content sits above pseudo overlay */
body.animated-gradient-hero {
  position: relative;
  z-index: 2;
}

/* overlay for contrast (fixed so content is readable) */
body.animated-gradient-hero::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, rgba(0,0,0,0.06), rgba(0,0,0,0.12));
  pointer-events: none;
}

/* Fix admin bar overlap in WP admin view */
html.wp-admin-bar body.animated-gradient-hero {
  padding-top: 32px;
}

/* Keyframes for gradient movement */
@keyframes marketGradientShift {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  body.animated-gradient-hero {
    animation: none !important;
    background-position: 50% 50% !important;
  }
}

/* Mobile tweaks */
@media (max-width: 768px) {
  body.animated-gradient-hero {
    background-size: 200% 200%;
    animation-duration: 20s;
  }
}
