/* ============================================
   Chestertown Vision Center — Custom Styles
   ============================================ */

/* --- Base & Reset --- */
*, *::before, *::after {
    box-sizing: border-box;
}

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

body {
    overflow-x: hidden;
}

::selection {
    background: rgba(197, 160, 89, 0.3);
    color: #0A1628;
}

/* --- Scrollbar --- */
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: #0F2140;
}
::-webkit-scrollbar-thumb {
    background: #C5A059;
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: #D4B06A;
}

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

#navbar.scrolled {
    background: rgba(250, 250, 248, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 1px 0 rgba(15, 33, 64, 0.08);
}

#navbar.scrolled .nav-text {
    color: #0F2140 !important;
}

#navbar.scrolled .nav-subtext {
    color: #1B3A6B !important;
}

#navbar.scrolled .nav-link {
    color: #1B3A6B !important;
}

#navbar.scrolled .nav-line-1,
#navbar.scrolled .nav-line-2 {
    background: #0F2140 !important;
}

#navbar.scrolled .nav-logo-color {
    stroke: #0F2140 !important;
}

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

/* --- Hero Scroll Line --- */
.scroll-line {
    animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes scrollPulse {
    0%, 100% { opacity: 0.4; height: 12px; }
    50% { opacity: 1; height: 20px; }
}

/* --- Floating Cards --- */
.card-float-1 {
    animation: floatCard1 6s ease-in-out infinite;
}

.card-float-2 {
    animation: floatCard2 7s ease-in-out infinite;
}

@keyframes floatCard1 {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-8px); }
}

@keyframes floatCard2 {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(6px); }
}

/* --- Service Cards --- */
.service-card {
    opacity: 1;
    transform: translateY(0);
}

/* --- Scroll Reveal Animations --- */
/* These are applied via JS for progressive enhancement */
.reveal-up {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* Stagger delays for service cards */
.service-card:nth-child(1) { transition-delay: 0.0s; }
.service-card:nth-child(2) { transition-delay: 0.08s; }
.service-card:nth-child(3) { transition-delay: 0.16s; }
.service-card:nth-child(4) { transition-delay: 0.24s; }
.service-card:nth-child(5) { transition-delay: 0.32s; }
.service-card:nth-child(6) { transition-delay: 0.40s; }

/* --- Reduced Motion --- */
@media (prefers-reduced-motion: reduce) {
    .card-float-1,
    .card-float-2 {
        animation: none;
    }
    
    .scroll-line {
        animation: none;
    }
    
    html {
        scroll-behavior: auto;
    }
    
    .reveal-up {
        transition: none;
    }
}

/* --- Focus Styles --- */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 2px solid #C5A059;
    outline-offset: 2px;
    border-radius: 4px;
}

/* --- Print --- */
@media print {
    #navbar,
    .scroll-line,
    .card-float-1,
    .card-float-2 {
        display: none !important;
    }
    
    body {
        color: #000;
        background: #fff;
    }
}
