/* Custom styles that complement Tailwind CSS */

/* Smooth scroll offset for fixed nav */
section[id] {
    scroll-margin-top: 80px;
}

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

::-webkit-scrollbar-track {
    background: #0d170d;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #d4af55, #c9a84c);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #e8d5a3, #d4af55);
}

/* Selection color */
::selection {
    background-color: rgba(212, 175, 85, 0.3);
    color: #f5f0e8;
}

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

/* Subtle grain texture overlay for sections */
section::before {
    content: '';
    position: absolute;
    inset: 0;
    opacity: 0.015;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 0;
}

/* Prevent layout shift on images */
img {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

/* Animation keyframes */
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

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

/* Gold shimmer effect for special text */
.gold-shimmer {
    background: linear-gradient(
        90deg,
        #c9a84c 0%,
        #e8d5a3 25%,
        #d4af55 50%,
        #e8d5a3 75%,
        #c9a84c 100%
    );
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: shimmer 4s linear infinite;
}

/* Mobile menu animation */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.mobile-menu.open a {
    animation: slideIn 0.3s ease forwards;
    opacity: 0;
}

.mobile-menu.open a:nth-child(1) { animation-delay: 0.1s; }
.mobile-menu.open a:nth-child(2) { animation-delay: 0.15s; }
.mobile-menu.open a:nth-child(3) { animation-delay: 0.2s; }
.mobile-menu.open a:nth-child(4) { animation-delay: 0.25s; }
.mobile-menu.open a:nth-child(5) { animation-delay: 0.3s; }

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .service-card:hover {
        transform: none;
    }
    
    img {
        transition: none;
    }
}

/* Print styles */
@media print {
    nav, .mobile-menu, #hamburger {
        display: none !important;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
    
    section::before {
        display: none;
    }
}
