/* Base & Typography */
html {
  scroll-behavior: smooth;
}

body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #2e0f19;
}

::-webkit-scrollbar-thumb {
  background: #7a2e48;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #933e5c;
}

/* Reveal Animations — Progressive Enhancement */
@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
  }

  .reveal[data-reveal] {
    opacity: 0;
    transform: translateY(32px);
  }

  .reveal[data-reveal].is-visible {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Navbar transition */
#navbar.scrolled {
  background: rgba(46, 15, 25, 0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

/* Hero subtle parallax */
#hero {
  will-change: transform;
}

#hero img {
  will-change: transform;
}

/* Smooth image loading */
img {
  background-color: #582033;
}

/* Selection color */
::selection {
  background: #ffcf24;
  color: #2e0f19;
}

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

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

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Subtle grain texture overlay */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.015;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  z-index: 9999;
}

/* Card hover effects */
.bg-plum-900\/50:hover {
  border-color: rgba(255, 207, 36, 0.2);
  transition: border-color 0.4s ease;
}
