/* Custom styles for Hornell Eye Associates */

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

body {
    overflow-x: hidden;
}

/* Hero animations - applied immediately, no JS dependency */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

/* Hero elements animate on load - these are above the fold */
.animate-fade-in {
    animation: fadeIn 0.8s ease-out forwards;
    opacity: 0;
}

/* Scroll reveal animations - ONLY for below-fold content */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.reveal[data-revealed="true"] {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

/* Mobile menu transitions */
.mobile-link {
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

/* Navbar scroll state */
.navbar-scrolled {
    box-shadow: 0 1px 0 rgba(13, 21, 41, 0.05);
}

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

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

::-webkit-scrollbar-thumb {
    background: #94a3b8;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #64748b;
}

/* Focus styles for accessibility */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 2px solid #2dd4bf;
    outline-offset: 2px;
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    
    .animate-fade-in {
        animation: none;
        opacity: 1;
    }
    
    .reveal {
        transition: none;
    }
    
    .group:hover img {
        transform: none;
    }
}

/* Mobile menu open state */
body.menu-open {
    overflow: hidden;
}

/* Smooth image loading */
img {
    background-color: #f1f5f9;
}

/* Form focus states */
input:focus,
textarea:focus {
    border-color: #2dd4bf !important;
}

/* Selection color */
::selection {
    background-color: #ccfbf1;
    color: #0d1529;
}
