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

html {
    scroll-behavior: smooth;
}

body {
    overflow-x: hidden;
}

/* Hero animations */
.hero-anim {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeUp 0.8s ease forwards;
}

.hero-anim:nth-child(1) { animation-delay: 0.2s; }
.hero-anim:nth-child(2) { animation-delay: 0.4s; }
.hero-anim:nth-child(3) { animation-delay: 0.6s; }
.hero-anim:nth-child(4) { animation-delay: 0.8s; }

@keyframes fadeUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Scroll reveal */
.scroll-reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

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

/* Navbar scroll state */
nav.scrolled {
    background: rgba(15, 26, 46, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.05);
}

nav.scrolled a.text-gold-400 {
    color: #e0bc6a;
}

/* Mobile links */
.mobile-link {
    position: relative;
}

.mobile-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 50%;
    width: 0;
    height: 2px;
    background: #d4a843;
    transition: width 0.3s ease, left 0.3s ease;
}

.mobile-link:hover::after {
    width: 80%;
    left: 10%;
}

/* Subtle grain overlay */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    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");
    z-index: 9999;
}

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

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

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

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

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