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

body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Floating card animation */
@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-12px); }
}

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

.floating-card:nth-child(2) {
  animation-delay: -1.3s;
  animation-duration: 4.5s;
}

.floating-card:nth-child(3) {
  animation-delay: -2.6s;
  animation-duration: 3.8s;
}

/* Scroll reveal animations */
.section-reveal {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

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

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

/* Navbar transition */
.nav-scrolled {
  background-color: rgba(250, 249, 246, 0.95) !important;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 rgba(6, 78, 59, 0.08);
}

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

.nav-scrolled .nav-link {
  color: #064e3b !important;
}

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

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

.mobile-link {
  display: block;
  padding: 8px 0;
  border-bottom: 1px solid rgba(6, 78, 59, 0.08);
}

.mobile-link:last-child {
  border-bottom: none;
}

/* Selection color */
::selection {
  background-color: #064e3b;
  color: #faf9f6;
}

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

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

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

::-webkit-scrollbar-thumb:hover {
  background: #064e3b;
}

/* Smooth focus visible */
:focus-visible {
  outline: 2px solid #059669;
  outline-offset: 2px;
}

/* Image loading placeholder */
img {
  background-color: #ebe8df;
}
