/* Base styles and custom utilities */
html {
  scroll-behavior: smooth;
}

body {
  overflow-x: hidden;
}

/* Scroll reveal animations — progressive enhancement, hidden by default */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

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

/* Staggered delays for grid items */
.reveal:nth-child(1) { transition-delay: 0.05s; }
.reveal:nth-child(2) { transition-delay: 0.1s; }
.reveal:nth-child(3) { transition-delay: 0.15s; }
.reveal:nth-child(4) { transition-delay: 0.2s; }
.reveal:nth-child(5) { transition-delay: 0.25s; }
.reveal:nth-child(6) { transition-delay: 0.3s; }

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

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #1a1d23;
}
::-webkit-scrollbar-thumb {
  background: #3a3d45;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #FF6B4A;
}

/* Selection color */
::selection {
  background: rgba(255, 107, 74, 0.3);
  color: #fff;
}

/* Mobile menu transitions */
#mobileMenu {
  animation: slideDown 0.3s ease;
}

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

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .reveal,
  .reveal-visible {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
  img {
    transition: none !important;
  }
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

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