/* ========================================
   Crosswinds Pool — Custom Styles
   ======================================== */

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

body {
    overflow-x: hidden;
}

::selection {
    background: rgba(212, 168, 75, 0.3);
    color: #1B4332;
}

/* --- Scrollbar --- */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #FAF7F0;
}
::-webkit-scrollbar-thumb {
    background: #1B4332;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #2a5c28;
}

/* --- Navbar --- */
#navbar {
    background: transparent;
    transition: background 0.5s ease, box-shadow 0.5s ease, padding 0.5s ease;
}

#navbar.scrolled {
    background: rgba(253, 252, 248, 0.97);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 20px rgba(27, 67, 50, 0.08);
}

/* --- Floating Cards Animation --- */
.floating-card {
    animation: floatCard 6s ease-in-out infinite;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}

.floating-card[data-delay="0"] {
    animation-delay: 0s;
}
.floating-card[data-delay="150"] {
    animation-delay: -1.5s;
}
.floating-card[data-delay="300"] {
    animation-delay: -3s;
}
.floating-card[data-delay="450"] {
    animation-delay: -4.5s;
}

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

/* --- Service Cards --- */
.service-card {
    position: relative;
    overflow: hidden;
}

.service-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #D4A84B, #C49A3C);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.5s ease;
}

.service-card:hover::after {
    transform: scaleX(1);
}

/* --- Gallery --- */
.gallery-item {
    cursor: pointer;
}

.gallery-item::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(27, 67, 50, 0.4) 0%, transparent 60%);
    opacity: 0;
    transition: opacity 0.5s ease;
}

.gallery-item:hover::after {
    opacity: 1;
}

/* --- Scroll Reveal (progressive enhancement) --- */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(30px);
        transition: opacity 0.8s ease, transform 0.8s ease;
    }

    .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; }
    .reveal-delay-6 { transition-delay: 0.6s; }
}

/* --- Button Focus States --- */
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid #D4A84B;
    outline-offset: 2px;
}

/* --- Mobile Menu Transition --- */
#mobile-menu {
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- Mobile Link Hover --- */
.mobile-link {
    position: relative;
}

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

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

/* --- Utility --- */
.glass {
    background: rgba(253, 252, 248, 0.85);
    backdrop-filter: blur(12px);
}

/* --- Print Styles --- */
@media print {
    #navbar, .floating-card, .gallery-item {
        display: none;
    }
    body {
        background: white;
    }
}
