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

body {
  overflow-x: hidden;
}

/* Reveal animations - progressive enhancement, only active when JS runs */
.reveal {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal[data-revealed="false"] {
  opacity: 0;
  transform: translateY(30px);
}

/* Navbar scroll state */
#navbar.scrolled {
  background: rgba(254, 253, 248, 0.95);
  backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 rgba(6, 78, 59, 0.08);
}

#navbar.scrolled .nav-logo {
  color: #064e3b;
}

/* Mobile menu animations */
.menu-line:nth-child(1) {
  transform-origin: center;
}
.menu-line:nth-child(2) {
  transform-origin: center;
}
.menu-line:nth-child(3) {
  transform-origin: center;
}

#mobileMenu.open .menu-line:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}
#mobileMenu.open .menu-line:nth-child(2) {
  opacity: 0;
}
#mobileMenu.open .menu-line:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #ecfdf5;
}
::-webkit-scrollbar-thumb {
  background: #059669;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #047857;
}

/* Selection color */
::selection {
  background: #059669;
  color: white;
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  html {
    scroll-behavior: auto;
  }
  .animate-spin {
    animation: none;
  }
}
