/* Custom styles for Bfocus Eyewear */

html {
    scroll-behavior: smooth;
}

body {
    font-feature-settings: "cv02", "cv03", "cv04", "cv11";
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #f2f7f4;
}
::-webkit-scrollbar-thumb {
    background: #96ba97;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #6a9a6b;
}

/* Selection color */
::selection {
    background: #c5d9c7;
    color: #1f321f;
}

/* Smooth image loading */
img {
    opacity: 1;
    transition: opacity 0.3s ease;
}

img[loading="lazy"] {
    opacity: 0;
}

img[loading="lazy"].loaded {
    opacity: 1;
}

/* Floating animation for stat cards */
@keyframes float {
    0%, 100% {
        transform: translateY(0px) rotate(3deg);
    }
    50% {
        transform: translateY(-10px) rotate(3deg);
    }
}

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

.floating-card-1 {
    animation: float 4s ease-in-out infinite;
}

.floating-card-2 {
    animation: float-slow 5s ease-in-out infinite;
}

/* Subtle gradient animation for background */
@keyframes gradient-shift {
    0%, 100% {
        opacity: 0.6;
    }
    50% {
        opacity: 0.4;
    }
}

.bg-blob {
    animation: gradient-shift 8s ease-in-out infinite;
}

/* Nav scroll effect */
.nav-scrolled {
    background: rgba(254, 253, 248, 0.95) !important;
    backdrop-filter: blur(20px);
    box-shadow: 0 1px 3px rgba(46, 77, 47, 0.08);
}

/* Card hover effects */
.service-card {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.service-card:hover {
    transform: translateY(-4px);
}

/* Button ripple effect */
.btn-primary {
    position: relative;
    overflow: hidden;
}

.btn-primary::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-primary:active::after {
    width: 300px;
    height: 300px;
}

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

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

/* Print styles */
@media print {
    nav, .floating-card-1, .floating-card-2 {
        display: none;
    }
    
    body {
        background: white;
        color: black;
    }
}
