/* ============================================
   Seas the Day Beach Getaway — Custom Styles
   ============================================ */

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

body {
    overflow-x: hidden;
}

::selection {
    background-color: #0d9488;
    color: white;
}

/* ============================================
   Navigation
   ============================================ */
#navbar {
    transition: background-color 0.4s ease, box-shadow 0.4s ease, padding 0.4s ease;
}

#navbar.scrolled {
    background-color: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 20px rgba(0, 0, 0, 0.08);
}

#navbar.scrolled .nav-text {
    color: #0f172a;
}

#navbar.scrolled .nav-subtext {
    color: #0d9488;
}

#navbar.scrolled .nav-link {
    color: #475569;
}

#navbar.scrolled .nav-link:hover {
    color: #0d9488;
}

/* ============================================
   Mobile Menu
   ============================================ */
.mobile-link {
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s 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; }

/* ============================================
   Hero Floating Cards
   ============================================ */
.stat-card {
    animation: floatCard 6s ease-in-out infinite;
}

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

.stat-card:nth-child(3) {
    animation-delay: -4s;
}

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

/* ============================================
   Scroll Animations (progressive enhancement)
   ============================================ */
@media (prefers-reduced-motion: no-preference) {
    .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.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; }
}

/* ============================================
   Room Cards
   ============================================ */
.room-card {
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.room-card:hover {
    transform: translateY(-6px);
}

/* ============================================
   Feature Items
   ============================================ */
.feature-item {
    transition: transform 0.3s ease;
}

.feature-item:hover {
    transform: translateX(6px);
}

/* ============================================
   Location Cards
   ============================================ */
.location-card {
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s ease;
}

.location-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 60px rgba(13, 148, 136, 0.2);
}

/* ============================================
   Input Focus States
   ============================================ */
input:focus,
textarea:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.15);
}

/* ============================================
   Smooth Scroll Offset for Fixed Nav
   ============================================ */
section[id] {
    scroll-margin-top: 80px;
}

/* ============================================
   Utility: 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;
    }
}
