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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  overflow-x: hidden;
}

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #FAF9F6;
}
::-webkit-scrollbar-thumb {
  background: #D1FAE5;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #6EE7B7;
}

/* Selection */
::selection {
  background: #D1FAE5;
  color: #047857;
}

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

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

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

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

/* Fade-in on scroll */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }
.reveal-delay-5 { transition-delay: 0.5s; }

/* Header scroll state */
header.scrolled {
  background: rgba(250, 249, 246, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 1px 0 rgba(4, 120, 87, 0.06);
}

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

.mobile-menu-open .menu-line:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}
.mobile-menu-open .menu-line:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}
.mobile-menu-open .menu-line:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
  width: 5rem;
}

/* Mobile links */
.mobile-link {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.4s ease, transform 0.4s ease, color 0.3s ease;
}

.mobile-menu-open .mobile-link {
  opacity: 1;
  transform: translateY(0);
}

.mobile-menu-open .mobile-link:nth-child(1) { transition-delay: 0.1s; }
.mobile-menu-open .mobile-link:nth-child(2) { transition-delay: 0.15s; }
.mobile-menu-open .mobile-link:nth-child(3) { transition-delay: 0.2s; }
.mobile-menu-open .mobile-link:nth-child(4) { transition-delay: 0.25s; }
.mobile-menu-open .mobile-link:nth-child(5) { transition-delay: 0.3s; }

/* Thin line separators */
.section-line {
  width: 60px;
  height: 1px;
  background: linear-gradient(90deg, #10B981, transparent);
}

/* Select styling */
select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%239CA3AF' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
}

/* Focus visible for accessibility */
:focus-visible {
  outline: 2px solid #10B981;
  outline-offset: 2px;
}

/* Button hover lift */
a[href="#contact"], button[type="submit"] {
  will-change: transform;
}
