/* ========================================
   Brent Sykes SYS Yacht Sales
   Custom Styles
======================================== */

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

body {
    overflow-x: hidden;
}

::selection {
    background-color: #C0603A;
    color: #ffffff;
}

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

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

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

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

/* --- Navbar --- */
#navbar {
    background: transparent;
}

#navbar.scrolled {
    background: rgba(253, 251, 247, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06);
}

.nav-link {
    position: relative;
}

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

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

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

/* Menu Button Animation */
#menu-btn.open .menu-line:nth-child(1) {
    transform: translateY(3.5px) rotate(45deg);
}

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

#menu-btn.open .menu-line:nth-child(3) {
    transform: translateY(-3.5px) rotate(-45deg);
    width: 55%;
}

/* --- Fleet Cards --- */
.fleet-card {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fleet-card.revealed {
    opacity: 1;
    transform: translateY(0);
}

.fleet-card:nth-child(1) { transition-delay: 0.05s; }
.fleet-card:nth-child(2) { transition-delay: 0.1s; }
.fleet-card:nth-child(3) { transition-delay: 0.15s; }
.fleet-card:nth-child(4) { transition-delay: 0.2s; }
.fleet-card:nth-child(5) { transition-delay: 0.25s; }
.fleet-card:nth-child(6) { transition-delay: 0.3s; }

/* --- Service Cards --- */
.service-card {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.service-card.revealed {
    opacity: 1;
    transform: translateY(0);
}

.service-card:nth-child(1) { transition-delay: 0.05s; }
.service-card:nth-child(2) { transition-delay: 0.1s; }
.service-card:nth-child(3) { transition-delay: 0.15s; }
.service-card:nth-child(4) { transition-delay: 0.2s; }
.service-card:nth-child(5) { transition-delay: 0.25s; }
.service-card:nth-child(6) { transition-delay: 0.3s; }

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

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

.testimonial-card:nth-child(1) { transition-delay: 0.05s; }
.testimonial-card:nth-child(2) { transition-delay: 0.1s; }
.testimonial-card:nth-child(3) { transition-delay: 0.15s; }

/* --- Back to Top --- */
#back-to-top.visible {
    opacity: 1;
    pointer-events: auto;
}

#back-to-top:not(.visible) {
    opacity: 0;
    pointer-events: none;
    transform: translateY(10px);
}

#back-to-top.visible {
    transform: translateY(0);
}

/* --- Reduced Motion --- */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    
    .fleet-card,
    .service-card,
    .testimonial-card {
        opacity: 1;
        transform: none;
    }
    
    .fleet-card,
    .service-card,
    .testimonial-card {
        transition: none;
    }
    
    #back-to-top {
        transition: none;
    }
    
    .fleet-card img,
    .fleet-card .group-hover\:scale-110 {
        transition: none;
    }
}

/* --- Responsive Adjustments --- */
@media (max-width: 768px) {
    .font-serif {
        line-height: 1.15;
    }
}

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

/* --- Form Focus States --- */
input:focus,
textarea:focus,
select:focus {
    outline: none;
}

/* --- Subtle Image Hover --- */
img {
    display: block;
    max-width: 100%;
}
