/* Custom styles for Las Americas REO Wallingford */

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

body {
  overflow-x: hidden;
}

/* Floating animation for stat cards */
@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-8px); }
}

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

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

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

/* Header scroll state */
header.scrolled {
  background: rgba(254, 253, 248, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 1px 0 rgba(6, 78, 59, 0.08);
}

/* Mobile menu */
.mobile-link {
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.4s ease;
}

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

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

/* Menu button animation */
.menu-open .menu-line:nth-child(1) {
  transform: rotate(45deg) translate(4px, 4px);
}

.menu-open .menu-line:nth-child(2) {
  opacity: 0;
}

.menu-open .menu-line:nth-child(3) {
  transform: rotate(-45deg) translate(4px, -4px);
  width: 20px;
}

/* Service cards */
.service-card {
  transition: transform 0.4s ease, background-color 0.5s ease;
}

.service-card:hover {
  transform: translateY(-4px);
}

/* Process steps */
.process-step {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.process-step.visible {
  opacity: 1;
  transform: translateY(0);
}

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

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

/* Hero content */
.hero-content {
  opacity: 0;
  transform: translateY(40px);
  animation: heroReveal 0.8s ease forwards;
}

.hero-content-delay-1 { animation-delay: 0.1s; opacity: 0; }
.hero-content-delay-2 { animation-delay: 0.2s; opacity: 0; }
.hero-content-delay-3 { animation-delay: 0.3s; opacity: 0; }
.hero-content-delay-4 { animation-delay: 0.4s; opacity: 0; }
.hero-content-delay-5 { animation-delay: 0.5s; opacity: 0; }

@keyframes heroReveal {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Hero image */
.hero-image {
  opacity: 0;
  transform: scale(0.95) translateX(30px);
  animation: heroImageReveal 1s ease 0.3s forwards;
}

@keyframes heroImageReveal {
  to {
    opacity: 1;
    transform: scale(1) translateX(0);
  }
}

/* Section reveal on scroll */
.section-reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

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

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

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

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

::-webkit-scrollbar-thumb:hover {
  background: #047857;
}

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

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

/* Mobile menu overlay */
#mobileMenu {
  transition: opacity 0.4s ease, pointer-events 0.4s ease;
}

#mobileMenu.open {
  opacity: 1;
  pointer-events: all;
}

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