/* Custom styles for Sand and Stone */

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

/* Base selection color */
::selection {
    background-color: rgba(200, 160, 48, 0.3);
    color: #f7f7f5;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #0f0f0a;
}
::-webkit-scrollbar-thumb {
    background: #484838;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #888878;
}

/* Navigation transitions */
.nav-link {
    position: relative;
}
.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background: #c8a030;
    transition: width 0.3s ease;
}
.nav-link:hover::after {
    width: 100%;
}

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

/* Hamburger animation */
#bar1.open {
    transform: rotate(45deg) translate(4px, 4px);
}
#bar2.open {
    opacity: 0;
}
#bar3.open {
    transform: rotate(-45deg) translate(4px, -4px);
    width: 1.5rem;
}

/* Mobile link fade-in */
.mobile-link {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.4s ease, transform 0.4s ease, color 0.3s ease;
}
#mobileMenu.open .mobile-link {
    opacity: 1;
    transform: translateY(0);
}
#mobileMenu.open .mobile-link:nth-child(1) { transition-delay: 0.1s; }
#mobileMenu.open .mobile-link:nth-child(2) { transition-delay: 0.2s; }
#mobileMenu.open .mobile-link:nth-child(3) { transition-delay: 0.3s; }
#mobileMenu.open .mobile-link:nth-child(4) { transition-delay: 0.4s; }

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

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

/* Gold shimmer on hover for CTA buttons */
@keyframes shimmer {
    0% { background-position: -200% center; }
    100% { background-position: 200% center; }
}

/* Subtle pulse for decorative elements */
@keyframes subtlePulse {
    0%, 100% { opacity: 0.15; }
    50% { opacity: 0.25; }
}

/* Floating accent cards */
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-8px); }
}

.floating {
    animation: float 6s ease-in-out infinite;
}

/* Image hover overlay */
.group:hover .group-hover\:scale-105 {
    transform: scale(1.05);
}

/* Focus styles for accessibility */
a:focus-visible,
button:focus-visible {
    outline: 2px solid #c8a030;
    outline-offset: 4px;
    border-radius: 4px;
}

/* Print styles */
@media print {
    nav, #mobileMenu, .reveal { display: none; }
    body { background: white; color: black; }
    .bg-stone-950, .bg-stone-900 { background: white !important; }
    .text-stone-100, .text-stone-200, .text-stone-300 { color: black !important; }
}

/* Mobile-specific adjustments */
@media (max-width: 768px) {
    .font-serif {
        line-height: 1.1;
    }
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    .reveal {
        opacity: 1;
        transform: none;
    }
    @keyframes float, subtlePulse {
        display: none;
    }
    .floating {
        animation: none;
    }
}
