/* Custom styles for Northumberland Masonic Lodge 404 */

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

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #1a1320;
}
::-webkit-scrollbar-thumb {
  background: #581c87;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #7e22ce;
}

/* Selection color */
::selection {
  background: rgba(168, 85, 247, 0.3);
  color: #fff;
}

/* Base text rendering */
body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Reveal animations - progressive enhancement */
.reveal {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

/* Only apply animation on devices that support it and user prefers motion */
@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(30px);
  }
  .reveal.revealed {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Navbar transition */
#navbar {
  transition: background-color 0.4s ease, backdrop-filter 0.4s ease, box-shadow 0.4s ease;
}

#navbar.scrolled {
  background-color: rgba(13, 10, 15, 0.92);
  backdrop-filter: blur(16px);
  box-shadow: 0 1px 0 rgba(251, 191, 36, 0.08);
}

/* Mobile menu animation */
#mobile-menu {
  animation: slideDown 0.3s ease;
}

@keyframes slideDown {
  from {
    opacity: 0;
    max-height: 0;
  }
  to {
    opacity: 1;
    max-height: 500px;
  }
}

/* Gold shimmer effect on hover for buttons */
button, a {
  transition: all 0.3s ease;
}

/* Image loading placeholder */
img {
  background: linear-gradient(135deg, #2e2538 0%, #1a1320 100%);
}

/* Focus styles for accessibility */
a:focus-visible,
button:focus-visible {
  outline: 2px solid #fbbf24;
  outline-offset: 2px;
  border-radius: 4px;
}

/* Subtle gold accent line animation */
@keyframes shimmer {
  0% { background-position: -200% center; }
  100% { background-position: 200% center; }
}

/* Card hover glow */
.group:hover .group-hover\:border-amber-500\/40 {
  border-color: rgba(251, 191, 36, 0.4);
}

/* Responsive typography adjustments */
@media (max-width: 640px) {
  h1 {
    line-height: 1.15;
  }
  h2 {
    line-height: 1.2;
  }
}

/* Ensure hero images don't shift on load */
img[width][height] {
  content-visibility: auto;
}

/* Reduced motion - ensure content is always visible */
@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1 !important;
    transform: none !important;
  }
  html {
    scroll-behavior: auto;
  }
  img, .group img {
    transition: none;
  }
  .group:hover .group-hover\:scale-110 {
    transform: none;
  }
}
