/* ============================================
   Valley Eye Care — Custom Styles
   ============================================ */

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

body {
    overflow-x: hidden;
}

/* Selection */
::selection {
    background-color: rgba(6, 95, 70, 0.15);
    color: #065f46;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: #fefdf8;
}
::-webkit-scrollbar-thumb {
    background: #a7f3d0;
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: #6ee7b7;
}

/* Scroll Reveal Animations — Progressive Enhancement
   Default state: visible. JS adds .is-visible.
   Respects prefers-reduced-motion. */
@media (prefers-reduced-motion: no-preference) {
    .scroll-reveal {
        opacity: 1;
        transform: translateY(0);
        transition: opacity 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                    transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    }

    .scroll-reveal.animated {
        opacity: 0;
        transform: translateY(24px);
        transition: opacity 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                    transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    }
}

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

#navbar.scrolled {
    background: rgba(254, 253, 248, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(167, 243, 208, 0.3);
    box-shadow: 0 1px 20px rgba(6, 95, 70, 0.06);
}

/* Mobile menu link hover */
.mobile-link {
    position: relative;
}
.mobile-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 1px;
    background: #059669;
    transition: width 0.3s ease;
}
.mobile-link:hover::after {
    width: 100%;
}

/* Image hover zoom */
img {
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Button focus states */
a:focus-visible,
button:focus-visible {
    outline: 2px solid #059669;
    outline-offset: 2px;
    border-radius: 4px;
}

/* Smooth image loading */
img {
    image-rendering: -webkit-optimize-contrast;
}

/* Subtle gradient line animations */
@keyframes shimmer {
    0% { background-position: -200% center; }
    100% { background-position: 200% center; }
}

/* Print styles */
@media print {
    nav, .scroll-reveal.animated, #hero .absolute { display: none; }
    body { background: white; color: black; }
    section { padding: 20px 0; }
}
