/* Custom styles for Driftwood Resort */

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

/* Navbar scroll state */
nav.scrolled {
    background: rgba(253, 244, 245, 0.95);
    backdrop-filter: blur(12px);
    box-shadow: 0 4px 30px rgba(107, 58, 93, 0.08);
}

nav.scrolled .nav-logo-text {
    color: #6B3A5D;
}

nav.scrolled .nav-link {
    color: #6B3A5D;
}

nav:not(.scrolled) .nav-logo-text {
    color: #fff;
}

nav:not(.scrolled) .nav-link {
    color: rgba(255, 255, 255, 0.85);
}

/* Blob animations */
@keyframes blob-float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(30px, -30px) scale(1.05); }
    50% { transform: translate(-20px, 20px) scale(0.95); }
    75% { transform: translate(15px, 10px) scale(1.02); }
}

.hero-blob {
    animation: blob-float 20s ease-in-out infinite;
}

.blob-1 { animation-delay: 0s; }
.blob-2 { animation-delay: -5s; }
.blob-3 { animation-delay: -10s; }
.blob-4 { animation-delay: -15s; }

/* Float animations for small circles */
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

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

.float-1 { animation-delay: 0s; }
.float-2 { animation-delay: -1.5s; }
.float-3 { animation-delay: -3s; }
.float-4 { animation-delay: -4.5s; }

/* Scroll reveal animations */
/* Default state: visible (progressive enhancement) */
.reveal-up,
.reveal-left,
.reveal-right {
    opacity: 1;
    transform: none;
    transition: none;
}

/* Only apply animations when JS is active and reduced motion is not preferred */
.animate-scroll-reveals .reveal-up {
    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);
}

.animate-scroll-reveals .reveal-left {
    opacity: 0;
    transform: translateX(-40px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.animate-scroll-reveals .reveal-right {
    opacity: 0;
    transform: translateX(40px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.animate-scroll-reveals .reveal-up.revealed,
.animate-scroll-reveals .reveal-left.revealed,
.animate-scroll-reveals .reveal-right.revealed {
    opacity: 1;
    transform: translate(0, 0);
}

/* Mobile menu */
#mobile-menu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
    opacity: 0;
}

#mobile-menu.open {
    max-height: 500px;
    opacity: 1;
}

/* Mobile nav links */
.mobile-nav-link {
    position: relative;
}

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

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

/* Selection color */
::selection {
    background: rgba(212, 148, 58, 0.3);
    color: #3d1a30;
}

/* Focus visible styles */
*:focus-visible {
    outline: 3px solid #D4943A;
    outline-offset: 2px;
    border-radius: 4px;
}

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

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

::-webkit-scrollbar-thumb {
    background: #f9a8d4;
    border-radius: 5px;
}

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

/* Form select styling */
select {
    appearance: none;
    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'%3E%3Cpath d='M6 9l6 6 6-6' stroke='%236B3A5D' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto;
    }
    
    .reveal-up,
    .reveal-left,
    .reveal-right {
        opacity: 1;
        transform: none;
    }
}
