/* Custom styles for Sam's Watch Gallery */

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

/* Hero animation */
@keyframes fade-in-up {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in-up {
    animation-name: fade-in-up;
    animation-duration: 0.8s;
    animation-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    animation-fill-mode: forwards;
}

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

::-webkit-scrollbar-track {
    background: #1e293b;
}

::-webkit-scrollbar-thumb {
    background: #2d6a8f;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #1e4d6e;
}

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

/* Focus styles */
button:focus,
input:focus,
textarea:focus,
select:focus,
a:focus {
    outline: 2px solid #2d6a8f;
    outline-offset: 2px;
}

/* Button hover effects */
button,
a {
    transition: all 0.2s ease-in-out;
}

/* Image loading placeholder */
img {
    background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

img[src] {
    animation: none;
    background: none;
}

/* Mobile menu animation */
#mobile-menu {
    animation: slideDown 0.3s ease-out;
}

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

/* Card hover effects */
.group:hover .group-hover\\:translate-y-0 {
    transform: translateY(0);
}

/* Subtle shadow on scroll */
nav.scrolled {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .font-serif {
        font-size: clamp(1.5rem, 5vw, 2.5rem);
    }
}

/* Reduced motion preference */
@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;
    }
}
