*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    overflow-x: hidden;
}

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

::-webkit-scrollbar-track {
    background: #040405;
}

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

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

/* Gold gradient text utility */
.text-gold-gradient {
    background: linear-gradient(135deg, #f0d890 0%, #d4a843 50%, #b8860b 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Navigation active state */
.nav-link::after {
    content: '';
    display: block;
    width: 0;
    height: 1px;
    background: #d4a843;
    transition: width 0.3s ease;
    margin-top: 4px;
}

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

/* Navbar scroll state */
.navbar-scrolled {
    background: rgba(4, 4, 5, 0.95) !important;
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(212, 168, 67, 0.1);
}

/* Mobile menu open state */
.mobile-menu-open #mobileMenu {
    opacity: 1 !important;
    pointer-events: all !important;
}

.mobile-menu-open .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-open .menu-line:nth-child(2) {
    opacity: 0;
}

.mobile-menu-open .menu-line:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
    width: 5px;
}

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

.mobile-menu-open .mobile-link {
    opacity: 1;
    transform: translateY(0);
}

.mobile-menu-open .mobile-link:nth-child(1) { transition-delay: 0.1s; }
.mobile-menu-open .mobile-link:nth-child(2) { transition-delay: 0.2s; }
.mobile-menu-open .mobile-link:nth-child(3) { transition-delay: 0.3s; }
.mobile-menu-open .mobile-link:nth-child(4) { transition-delay: 0.4s; }
.mobile-menu-open .mobile-link:nth-child(5) { transition-delay: 0.5s; }

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

.reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* 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;
    }
    
    .reveal {
        opacity: 1;
        transform: none;
    }
}

/* Scroll down animation */
@keyframes scrollDown {
    0% { transform: translateY(-100%); }
    100% { transform: translateY(400%); }
}

.animate-scroll-down {
    animation: scrollDown 1.5s ease-in-out infinite;
}

/* Gold shimmer effect on hover for cards */
.reveal:hover .group-hover\:border-gold-500\/30 {
    border-color: rgba(212, 168, 67, 0.3);
}

/* Input autofill styling */
input:-webkit-autofill,
textarea:-webkit-autofill {
    -webkit-box-shadow: 0 0 0 30px #08080a inset !important;
    -webkit-text-fill-color: #e7e5e4 !important;
    caret-color: #e7e5e4;
}

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

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

/* Image loading placeholder */
img {
    background: linear-gradient(135deg, #1a1a1e 0%, #0d0d0f 100%);
}

/* Selection color */
::selection {
    background: rgba(212, 168, 67, 0.3);
    color: #f5f5f4;
}
