*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  overflow-x: hidden;
}

/* Scroll-reveal animations — progressive enhancement only */
@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94), transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  }

  .reveal.revealed {
    opacity: 1;
    transform: translateY(0);
  }

  .reveal-delay-1 { transition-delay: 0.1s; }
  .reveal-delay-2 { transition-delay: 0.2s; }
  .reveal-delay-3 { transition-delay: 0.3s; }
  .reveal-delay-4 { transition-delay: 0.4s; }
}

/* Navbar scroll state */
.navbar-scrolled {
  background: rgba(36, 11, 42, 0.95) !important;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.05);
}

.navbar-scrolled .nav-link {
  color: rgba(255, 255, 255, 0.85) !important;
}

/* Mobile menu open state */
.mobile-menu-open {
  opacity: 1 !important;
  pointer-events: all !important;
}

/* Custom selection color */
::selection {
  background: rgba(123, 45, 139, 0.2);
  color: inherit;
}

/* Smooth focus outlines */
:focus-visible {
  outline: 1px solid #D4A843;
  outline-offset: 2px;
}

/* Input autofill styling */
input:-webkit-autofill,
textarea:-webkit-autofill {
  -webkit-box-shadow: 0 0 0 30px #1a0a1e inset !important;
  -webkit-text-fill-color: #f0e0f4 !important;
  caret-color: #f0e0f4;
}
