/* ── Base & Utilities ── */
html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  overflow-x: hidden;
}

/* ── Floating Card Animations ── */
.floating-card {
  animation: float 6s ease-in-out infinite;
}

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

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

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

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

/* ── Service Card Hover ── */
.service-card {
  transition: background-color 0.5s ease;
}

.service-card:hover svg {
  transform: scale(1.1);
  transition: transform 0.3s ease;
}

/* ── Scroll Reveal (progressive enhancement) ── */
@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), 
                transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
  }

  .reveal.revealed {
    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; }
}

/* ── Mobile Menu Transitions ── */
#mobileMenu.open {
  opacity: 1;
  pointer-events: all;
}

#mobileMenu.closed {
  opacity: 0;
  pointer-events: none;
}

/* ── Navbar Scrolled State ── */
.navbar-scrolled {
  background: rgba(250, 249, 246, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(110, 231, 183, 0.2);
  box-shadow: 0 1px 0 rgba(6, 78, 59, 0.06);
}

/* ── Select Arrow ── */
select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12' fill='none'%3E%3Cpath d='M3 4.5l3 3 3-3' stroke='%23059669' stroke-width='1.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
}

/* ── Focus Visible ── */
*:focus-visible {
  outline: 2px solid #059669;
  outline-offset: 2px;
  border-radius: 4px;
}

/* ── Smooth Image Loading ── */
img {
  display: block;
  max-width: 100%;
}

/* ── Selection Color ── */
::selection {
  background: rgba(5, 150, 105, 0.15);
  color: #064E3B;
}
