/* ============================================
   John's Beach Service — Custom Styles
   ============================================ */

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

body {
    overflow-x: hidden;
}

/* Scroll-reveal (progressive enhancement) */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(30px);
        transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94), 
                    transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    }

    .reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }

    /* Stagger children */
    .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; }
}

/* Hero animations (only when JS is enabled — progressive enhancement) */
@media (prefers-reduced-motion: no-preference) {
    .hero-anim {
        opacity: 0;
        transform: translateY(20px);
        animation: heroFadeIn 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
    }
    .hero-anim:nth-child(1) { animation-delay: 0.1s; }
    .hero-anim:nth-child(2) { animation-delay: 0.25s; }
    .hero-anim:nth-child(3) { animation-delay: 0.4s; }
    .hero-anim:nth-child(4) { animation-delay: 0.55s; }
    .hero-anim:nth-child(5) { animation-delay: 0.7s; }
}

@keyframes heroFadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Scroll indicator pulse */
.scroll-indicator {
    display: inline-block;
    animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes scrollPulse {
    0%, 100% { transform: translateY(0); opacity: 0.6; }
    50% { transform: translateY(8px); opacity: 1; }
}

/* Navbar scroll state */
#navbar.scrolled {
    background: rgba(13, 13, 13, 0.95);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(201, 162, 39, 0.1);
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
}

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

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

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

#mobile-menu.open {
    opacity: 1;
    pointer-events: all;
}

/* Custom select styling */
select option {
    background: #1A1512;
    color: #E8C4B8;
}

/* Gold line accent */
.gold-line {
    background: linear-gradient(90deg, transparent, #C9A227, transparent);
}

/* Subtle texture overlay for cards */
.service-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(201, 162, 39, 0.02) 0%, transparent 60%);
    pointer-events: none;
    border-radius: inherit;
}

.service-card {
    position: relative;
}

/* Selection color */
::selection {
    background: rgba(123, 46, 48, 0.6);
    color: #F0D8CE;
}

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

::-webkit-scrollbar-track {
    background: #0D0D0D;
}

::-webkit-scrollbar-thumb {
    background: rgba(201, 162, 39, 0.3);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(201, 162, 39, 0.5);
}
