/* Custom styles for Griffins Lair Vineyard */

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

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #fdf8f0;
}
::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #a1a5aa;
}

/* Selection color */
::selection {
    background: #ffd4c9;
    color: #1f2937;
}

/* Nav link underline animation */
.nav-link {
    position: relative;
}
.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: #E07A5F;
    transition: width 0.3s ease;
}
.nav-link:hover::after {
    width: 100%;
}

/* Mobile nav link animation */
.mobile-nav-link {
    opacity: 0;
    transform: translateY(10px);
}
.mobile-menu-open .mobile-nav-link {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.3s ease, transform 0.3s ease;
}
.mobile-menu-open .mobile-nav-link:nth-child(1) { transition-delay: 0.05s; }
.mobile-menu-open .mobile-nav-link:nth-child(2) { transition-delay: 0.1s; }
.mobile-menu-open .mobile-nav-link:nth-child(3) { transition-delay: 0.15s; }
.mobile-menu-open .mobile-nav-link:nth-child(4) { transition-delay: 0.2s; }
.mobile-menu-open .mobile-nav-link:nth-child(5) { transition-delay: 0.25s; }

/* Reveal animations (progressive enhancement) */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(24px);
    }
    .reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Navbar background transition */
#navbar.scrolled {
    background: rgba(254, 253, 251, 0.95);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 20px rgba(0, 0, 0, 0.06);
}

/* Form focus styles */
input:focus,
select:focus,
textarea:focus {
    outline: none;
}

/* Subtle hover lift for cards */
.group:hover .group-hover\:scale-105 {
    transform: scale(1.05);
}

/* Gradient text utility */
.text-gradient {
    background: linear-gradient(135deg, #E07A5F 0%, #b54a35 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Ensure images don't cause layout shift */
img {
    max-width: 100%;
    height: auto;
}

/* Prevent flash of unstyled content */
.no-js .reveal {
    opacity: 1 !important;
    transform: none !important;
}

/* Active nav link styling */
.nav-link.active {
    color: #E07A5F;
}
.nav-link.active::after {
    width: 100%;
}

/* Mobile menu transitions */
#mobile-menu {
    transition: opacity 0.3s ease, pointer-events 0.3s ease;
}
#mobile-menu.open {
    opacity: 1;
    pointer-events: auto;
}
#mobile-menu.closed {
    opacity: 0;
    pointer-events: none;
}

/* Back to top button */
#back-to-top.visible {
    opacity: 1;
    pointer-events: auto;
}

/* Image loading placeholder */
img {
    background: linear-gradient(110deg, #f6f6f7 8%, #faf0e0 18%, #f6f6f7 33%);
    background-size: 200% 100%;
    animation: shimmer 1.5s linear infinite;
}
img.loaded {
    animation: none;
    background: none;
}

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