/* === Base & Reset === */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    margin: 0;
    background-color: #1a0a1e;
    color: #ffffff;
}

/* === Scroll Reveal Animations === */
.reveal-up {
    opacity: 1;
    transform: none;
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal-left {
    opacity: 1;
    transform: none;
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal-right {
    opacity: 1;
    transform: none;
    transition: opacity 0.7s ease, transform 0.7s ease;
}

@media (prefers-reduced-motion: no-preference) {
    .reveal-up {
        opacity: 0;
        transform: translateY(30px);
    }
    
    .reveal-left {
        opacity: 0;
        transform: translateX(-30px);
    }
    
    .reveal-right {
        opacity: 0;
        transform: translateX(30px);
    }
    
    .reveal-up.revealed,
    .reveal-left.revealed,
    .reveal-right.revealed {
        opacity: 1;
        transform: translate(0, 0);
    }
}

/* === Navbar Scroll State === */
nav.scrolled {
    background: rgba(26, 10, 30, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(212, 160, 23, 0.1);
}

nav.scrolled .menu-line {
    background: #ffffff;
}

/* === Mobile Menu === */
.mobile-link {
    opacity: 1;
}

#mobileMenu.open {
    opacity: 1;
    pointer-events: all;
}

#mobileMenu.close {
    opacity: 0;
    pointer-events: none;
}

#mobileMenu.open .mobile-link {
    animation: slideIn 0.3s ease 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; }

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

/* === Menu Button Animation === */
#menuBtn.active .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(4px, 4px);
}

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

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

/* === Gold Accent Line === */
.gold-line {
    background: linear-gradient(90deg, transparent, #d4a017, transparent);
}

/* === Image Hover Effects === */
img {
    display: block;
    max-width: 100%;
}

/* === Selection Color === */
::selection {
    background: rgba(212, 160, 23, 0.3);
    color: #ffffff;
}

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #5a1e65;
}

/* === Focus Styles === */
a:focus-visible,
button:focus-visible {
    outline: 2px solid #d4a017;
    outline-offset: 4px;
    border-radius: 4px;
}

/* === Responsive Adjustments === */
@media (max-width: 768px) {
    .font-display {
        font-weight: 700;
    }
}
