*, *::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;
}

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

nav.scrolled .nav-text {
  color: #064E3B;
}

nav.scrolled .nav-subtext {
  color: #059669;
}

nav.scrolled .nav-link {
  color: #064E3B;
}

nav.scrolled .menu-line {
  background: #064E3B;
}

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

#mobile-menu.open .menu-line:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

#mobile-menu.open .menu-line:nth-child(2) {
  opacity: 0;
}

#mobile-menu.open .menu-line:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
  width: 1.5rem;
}

/* Scroll reveal animations */
.reveal-up,
.reveal-left,
.reveal-right {
  opacity: 1;
  transform: none;
  transition: opacity 0.6s ease, transform 0.6s ease;
}

@media (prefers-reduced-motion: no-preference) {
  .reveal-up {
    opacity: 0;
    transform: translateY(30px);
  }

  .reveal-left {
    opacity: 0;
    transform: translateX(-30px);
  }

  .reveal-right {
    opacity: 0;
    transform: translateX(30px);
  }

  .reveal-up.visible,
  .reveal-left.visible,
  .reveal-right.visible {
    opacity: 1;
    transform: none;
  }
}

/* Floating animation */
@keyframes float {
  0%, 100% { transform: translateY(0px) scale(1); }
  50% { transform: translateY(-20px) scale(1.05); }
}

@keyframes float-delay {
  0%, 100% { transform: translateY(0px) scale(1); }
  50% { transform: translateY(-15px) scale(1.03); }
}

.animate-float {
  animation: float 8s ease-in-out infinite;
}

.animate-float-delay {
  animation: float-delay 10s ease-in-out infinite;
  animation-delay: 2s;
}

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

::-webkit-scrollbar-track {
  background: #FDFBF7;
}

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

::-webkit-scrollbar-thumb:hover {
  background: #065F46;
}

/* Selection color */
::selection {
  background: rgba(4, 120, 87, 0.2);
  color: #064E3B;
}
