/* ===== BASE & RESET ===== */
*, *::before, *::after {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  text-decoration: none;
  color: inherit;
}

/* ===== SCROLL REVEAL (progressive enhancement) ===== */
@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(32px);
    transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
  }

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

  /* Stagger children */
  .reveal-grid > *:nth-child(1) { transition-delay: 0s; }
  .reveal-grid > *:nth-child(2) { transition-delay: 0.1s; }
  .reveal-grid > *:nth-child(3) { transition-delay: 0.2s; }
  .reveal-grid > *:nth-child(4) { transition-delay: 0.3s; }
  .reveal-grid > *:nth-child(5) { transition-delay: 0.4s; }
  .reveal-grid > *:nth-child(6) { transition-delay: 0.5s; }
}

/* ===== NAVBAR SCROLL STATE ===== */
#navbar {
  background: transparent;
  backdrop-filter: none;
}

#navbar.scrolled {
  background: rgba(27, 7, 50, 0.92);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(168, 85, 247, 0.15);
  box-shadow: 0 4px 40px rgba(0, 0, 0, 0.3);
}

/* ===== MOBILE MENU ===== */
#mobileMenu {
  animation: slideDown 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* ===== CUSTOM SELECTION ===== */
::selection {
  background: rgba(251, 191, 36, 0.3);
  color: #fbbf24;
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #1e0a3c;
}
::-webkit-scrollbar-thumb {
  background: #7e22ce;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #9333ea;
}

/* ===== HERO ANIMATIONS ===== */
@keyframes float {
  0%, 100% { transform: translateY(0) rotate(12deg); }
  50% { transform: translateY(-12px) rotate(12deg); }
}

@keyframes floatReverse {
  0%, 100% { transform: translateY(0) rotate(45deg); }
  50% { transform: translateY(10px) rotate(45deg); }
}

.hero-float-1 {
  animation: float 6s ease-in-out infinite;
}

.hero-float-2 {
  animation: floatReverse 5s ease-in-out infinite;
}

/* ===== UTILITY ===== */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}
