/* Custom styles for Wild Dunes — Isle of Palms Rental */

/* Smooth scroll */
html {
    scroll-behavior: smooth;
}

/* Navigation scroll state */
nav.scrolled {
    background: rgba(254, 253, 248, 0.95);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(6, 78, 59, 0.08);
    box-shadow: 0 1px 20px rgba(6, 78, 59, 0.06);
}

/* Nav links underline animation */
.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: #064e3b;
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

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

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

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

/* Scroll reveal animations */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    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; }

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

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

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

/* Custom selection color */
::selection {
    background: rgba(6, 78, 59, 0.2);
    color: #064e3b;
}

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

/* Input autofill styling */
input:-webkit-autofill,
textarea:-webkit-autofill {
    -webkit-box-shadow: 0 0 0 30px #fefdf8 inset !important;
    -webkit-text-fill-color: #064e3b !important;
}
