/* Base Styles */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    overflow-x: hidden;
}

/* Selection */
::selection {
    background-color: rgba(251, 191, 36, 0.3);
    color: #fbbf24;
}

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #a12342;
}

/* Scrollbar Firefox */
* {
    scrollbar-width: thin;
    scrollbar-color: #6f1d32 #0c0a09;
}

/* Scroll Line Animation */
@keyframes scrollLine {
    0% {
        height: 0;
        opacity: 0;
    }
    50% {
        height: 48px;
        opacity: 1;
    }
    100% {
        height: 48px;
        opacity: 0;
    }
}

.animate-scroll-line {
    animation: scrollLine 2s ease-in-out infinite;
}

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

.reveal-left {
    opacity: 1;
    transform: translateX(0);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-right {
    opacity: 1;
    transform: translateX(0);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* Navbar transition */
.nav-scrolled {
    background-color: rgba(12, 10, 9, 0.95) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 1px 0 rgba(251, 191, 36, 0.08);
}

.nav-scrolled .nav-link {
    color: rgba(212, 212, 212, 0.9);
}

/* Mobile menu transitions */
#mobile-menu {
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

#mobile-menu.open {
    transform: translateX(0);
}

#mobile-menu.closed {
    transform: translateX(100%);
}

/* Mobile link transitions */
.mobile-link {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.4s ease, transform 0.4s ease, color 0.3s ease;
}

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

/* Image placeholder fallback */
img {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

/* Smooth image loading */
img {
    transition: opacity 0.3s ease;
}

img[loading="lazy"] {
    opacity: 0;
}

img.loaded {
    opacity: 1;
}

/* Gold shimmer effect for decorative elements */
@keyframes shimmer {
    0% {
        background-position: -200% center;
    }
    100% {
        background-position: 200% center;
    }
}

/* Subtle float animation for decorative dots */
@keyframes float {
    0%, 100% {
        transform: translateY(0) scale(1);
        opacity: 0.4;
    }
    50% {
        transform: translateY(-8px) scale(1.1);
        opacity: 0.7;
    }
}

/* Button press effect */
button:active, a:active {
    transform: scale(0.98);
}

/* Focus visible for accessibility */
:focus-visible {
    outline: 2px solid #fbbf24;
    outline-offset: 2px;
}

/* Print styles */
@media print {
    nav, #mobile-menu-btn, .animate-scroll-line {
        display: none !important;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
}
