/* Base & Typography */
html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    overflow-x: hidden;
}

::selection {
    background: rgba(212, 160, 60, 0.3);
    color: #f0d49a;
}

/* Scroll Reveal */
.reveal {
    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);
}

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

/* Hero Animations */
@media (prefers-reduced-motion: no-preference) {
    .hero-content {
        animation: heroFadeIn 1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    }
    
    .hero-elem {
        opacity: 0;
        animation: elemReveal 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    }
    
    .hero-elem:nth-child(1) { animation-delay: 0.2s; }
    .hero-elem:nth-child(2) { animation-delay: 0.4s; }
    .hero-elem:nth-child(3) { animation-delay: 0.6s; }
    .hero-elem:nth-child(4) { animation-delay: 0.8s; }
    
    .hero-scroll {
        opacity: 0;
        animation: fadeIn 1s 1.5s forwards;
    }
    
    .hero-img {
        animation: heroZoom 20s ease-in-out infinite alternate;
    }
    
    .hero-scroll-line {
        animation: scrollLine 2s ease-in-out infinite;
    }
}

@keyframes heroFadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes elemReveal {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes heroZoom {
    from { transform: scale(1.05); }
    to { transform: scale(1.15); }
}

@keyframes scrollLine {
    0%, 100% { transform: scaleY(1); opacity: 0.5; }
    50% { transform: scaleY(0.5); opacity: 1; transform-origin: top; }
}

/* Navbar */
#navbar {
    transition: background-color 0.4s ease, box-shadow 0.4s ease, padding 0.4s ease;
}

#navbar.scrolled {
    background-color: rgba(13, 12, 10, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 1px 0 rgba(212, 160, 60, 0.08);
}

.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background: #d4a03c;
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

/* Mobile Menu */
#mobileMenu.open {
    opacity: 1;
    pointer-events: all;
}

#mobileMenu.open .mobile-link {
    animation: mobileLinkIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

#mobileMenu.open .mobile-link:nth-child(1) { animation-delay: 0.05s; }
#mobileMenu.open .mobile-link:nth-child(2) { animation-delay: 0.1s; }
#mobileMenu.open .mobile-link:nth-child(3) { animation-delay: 0.15s; }
#mobileMenu.open .mobile-link:nth-child(4) { animation-delay: 0.2s; }
#mobileMenu.open .mobile-link:nth-child(5) { animation-delay: 0.25s; }

@keyframes mobileLinkIn {
    from { opacity: 0; transform: translateY(15px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Hamburger Animation */
.menu-btn.active .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(4px, 4px);
}

.menu-btn.active .menu-line:nth-child(2) {
    opacity: 0;
}

.menu-btn.active .menu-line:nth-child(3) {
    transform: rotate(-45deg) translate(4px, -4px);
    width: 1.25rem;
}

/* Gold Divider Lines */
.gold-divider {
    position: relative;
}

.gold-divider::after {
    content: '';
    position: absolute;
    bottom: -2rem;
    left: 0;
    width: 60px;
    height: 1px;
    background: linear-gradient(90deg, #d4a03c, transparent);
}

/* Smooth image loading */
img {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

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

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

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

::-webkit-scrollbar-thumb {
    background: #4e4c45;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #65635a;
}

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

/* Form select arrow */
select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2388867c' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    appearance: none;
    -webkit-appearance: none;
}

/* 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;
    }
}
