/* Custom Styles for Wilson Sleep Associates */

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

/* Reduce motion preference */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Reveal animations - progressive enhancement via JS */
@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);
    }
    
    /* Stagger delays */
    .reveal-delay-1 { transition-delay: 0.1s; }
    .reveal-delay-2 { transition-delay: 0.2s; }
    .reveal-delay-3 { transition-delay: 0.3s; }
}

/* Default visible state for reduced motion */
@media (prefers-reduced-motion: reduce) {
    .reveal {
        opacity: 1;
        transform: none;
    }
}

/* Hero animations */
@media (prefers-reduced-motion: no-preference) {
    .hero-badge {
        animation: fadeInDown 0.8s ease forwards;
    }
    
    .hero-title {
        animation: fadeInUp 0.8s ease 0.2s forwards;
        opacity: 0;
    }
    
    .hero-subtitle {
        animation: fadeInUp 0.8s ease 0.4s forwards;
        opacity: 0;
    }
    
    .hero-cta {
        animation: fadeInUp 0.8s ease 0.6s forwards;
        opacity: 0;
    }
    
    .hero-trust {
        animation: fadeInUp 0.8s ease 0.8s forwards;
        opacity: 0;
    }
    
    .hero-scroll {
        animation: fadeIn 0.8s ease 1.2s forwards;
        opacity: 0;
    }
}

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

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Navbar transitions */
.nav-text-color {
    transition: color 0.3s ease;
}

.nav-text-sub {
    transition: color 0.3s ease;
}

/* Navbar scrolled state */
nav.scrolled .nav-text-color {
    color: #1a1a1a;
}

nav.scrolled .nav-text-sub {
    color: #6d6d6d;
}

nav.scrolled .nav-link {
    color: #4a4a4a;
}

nav.scrolled .nav-link:hover {
    color: #e56b6b;
}

/* Mobile menu */
.mobile-nav-link {
    display: block;
    padding: 0.5rem 0;
    border-bottom: 1px solid transparent;
    transition: border-color 0.3s ease;
}

.mobile-nav-link:hover {
    border-bottom-color: #f97583;
}

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

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

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

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

/* Selection color */
::selection {
    background: #f97583;
    color: white;
}

/* Focus styles */
:focus-visible {
    outline: 2px solid #f97583;
    outline-offset: 2px;
}

/* Image optimization */
img {
    max-width: 100%;
    height: auto;
}

/* Print styles */
@media print {
    nav, .hero-scroll, #contact-form button {
        display: none;
    }
    
    body {
        color: #000;
        background: #fff;
    }
    
    a {
        color: #000;
    }
}
