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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  overflow-x: hidden;
}

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #fdfcf8;
}
::-webkit-scrollbar-thumb {
  background: #d5e5d8;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #aed0b0;
}

/* Animations */
@keyframes float {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  50% { transform: translateY(-20px) rotate(3deg); }
}

@keyframes float-delayed {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  50% { transform: translateY(-15px) rotate(-2deg); }
}

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

.animate-float-delayed {
  animation: float-delayed 7s ease-in-out infinite;
  animation-delay: 1s;
}

/* Navbar scroll state */
nav.scrolled {
  background: rgba(253, 252, 248, 0.9);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  box-shadow: 0 1px 20px rgba(0, 0, 0, 0.05);
}

/* Team cards */
.team-card {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

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

/* Product cards */
.product-card {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

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

/* Staggered animation delays */
.team-card:nth-child(1) { transition-delay: 0.05s; }
.team-card:nth-child(2) { transition-delay: 0.1s; }
.team-card:nth-child(3) { transition-delay: 0.15s; }
.team-card:nth-child(4) { transition-delay: 0.2s; }
.team-card:nth-child(5) { transition-delay: 0.25s; }
.team-card:nth-child(6) { transition-delay: 0.3s; }
.team-card:nth-child(7) { transition-delay: 0.35s; }
.team-card:nth-child(8) { transition-delay: 0.4s; }
.team-card:nth-child(9) { transition-delay: 0.45s; }
.team-card:nth-child(10) { transition-delay: 0.5s; }
.team-card:nth-child(11) { transition-delay: 0.55s; }
.team-card:nth-child(12) { transition-delay: 0.6s; }

.product-card:nth-child(1) { transition-delay: 0.05s; }
.product-card:nth-child(2) { transition-delay: 0.15s; }
.product-card:nth-child(3) { transition-delay: 0.25s; }
.product-card:nth-child(4) { transition-delay: 0.35s; }
.product-card:nth-child(5) { transition-delay: 0.45s; }
.product-card:nth-child(6) { transition-delay: 0.55s; }

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

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

.mobile-link {
  transition: color 0.2s ease;
}

.mobile-link:hover {
  color: #1B5E20;
}

/* Hero text animation */
#hero h1 {
  opacity: 0;
  animation: fadeUp 0.8s ease forwards;
  animation-delay: 0.2s;
}

#hero p {
  opacity: 0;
  animation: fadeUp 0.8s ease forwards;
  animation-delay: 0.4s;
}

#hero .flex-col {
  opacity: 0;
  animation: fadeUp 0.8s ease forwards;
  animation-delay: 0.6s;
}

#hero .grid {
  opacity: 0;
  animation: fadeUp 0.8s ease forwards;
  animation-delay: 0.8s;
}

#hero .inline-flex {
  opacity: 0;
  animation: fadeUp 0.8s ease forwards;
  animation-delay: 0.1s;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Focus styles */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid #1B5E20;
  outline-offset: 2px;
  border-radius: 4px;
}

/* Selection */
::selection {
  background: #d5e5d8;
  color: #0d2e0f;
}
