/* 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;
}

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

/* Floating Animation */
@keyframes float {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  50% { transform: translateY(-10px) rotate(1deg); }
}

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

.floating-card {
  animation: float 4s ease-in-out infinite;
}

.floating-card-delayed,
.animate-float-delayed {
  animation: float-delayed 5s ease-in-out infinite;
  animation-delay: 1s;
}

/* Scroll Reveal (progressive enhancement - only active with JS) */
@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
  }

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

  /* Stagger children */
  .reveal:nth-child(1) { transition-delay: 0.05s; }
  .reveal:nth-child(2) { transition-delay: 0.12s; }
  .reveal:nth-child(3) { transition-delay: 0.19s; }
  .reveal:nth-child(4) { transition-delay: 0.26s; }
  .reveal:nth-child(5) { transition-delay: 0.33s; }
  .reveal:nth-child(6) { transition-delay: 0.40s; }
}

/* Navbar */
.nav-scrolled {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  background: rgba(255, 254, 249, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(5, 150, 105, 0.08);
  box-shadow: 0 1px 20px rgba(5, 150, 105, 0.06);
  transition: all 0.3s ease;
}

.nav-scrolled .nav-logo svg {
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.1));
}

/* Mobile Menu */
#mobile-menu {
  animation: slideDown 0.3s ease-out;
}

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

.mobile-menu-link {
  display: block;
  padding: 0.5rem 0;
  border-bottom: 1px solid rgba(5, 150, 105, 0.08);
}

.mobile-menu-link:last-of-type {
  border-bottom: none;
}

.mobile-menu-link:hover {
  color: #059669;
}

/* Input Focus */
input:focus, textarea:focus {
  outline: none;
}

/* Smooth image loading */
img {
  loading: lazy;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #FFF9EB;
}
::-webkit-scrollbar-thumb {
  background: #A7F3D0;
  border-radius: 999px;
}
::-webkit-scrollbar-thumb:hover {
  background: #6EE7B7;
}

/* Print */
@media print {
  .nav-scrolled, .animate-bounce { display: none; }
  body { background: white; }
}
