/* Base Styles */
html {
    scroll-behavior: smooth;
}

body {
    overflow-x: hidden;
}

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

::-webkit-scrollbar-track {
    background: #102a43;
}

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

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

/* Navigation */
.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background: #d4a843;
    transition: width 0.3s ease;
}

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

/* Mobile menu animation */
.menu-line {
    transition: all 0.3s ease;
}

#menu-toggle.active .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(4px, 4px);
}

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

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

.mobile-link {
    opacity: 1;
}

/* Navbar scroll state */
.navbar-scrolled #navbar {
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(10px);
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.05);
}

.navbar-scrolled .nav-text {
    color: #102a43;
}

.navbar-scrolled .menu-line {
    background: #102a43;
}

/* Menu items */
.menu-item {
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: padding-left 0.3s ease;
}

.menu-item:hover {
    padding-left: 8px;
}

/* Reveal animations - progressive enhancement */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

/* Only apply reveal animations when JS is available and user prefers motion */
@media (prefers-reduced-motion: no-preference) {
    .reveal-hidden {
        opacity: 0;
        transform: translateY(30px);
        transition: opacity 0.8s ease, transform 0.8s ease;
    }
    
    .reveal-visible {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Gold accent line animation */
@keyframes growLine {
    from {
        width: 0;
    }
    to {
        width: 48px;
    }
}

.gold-line {
    animation: growLine 0.6s ease forwards;
}

/* Image hover effects */
img {
    transition: transform 0.7s ease;
}

/* Smooth section transitions */
section {
    position: relative;
}

/* Print styles */
@media print {
    #navbar,
    .reveal-hidden {
        display: none;
    }
    
    body {
        color: #000;
        background: #fff;
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    
    img {
        transition: none;
    }
}

/* High contrast mode */
@media (forced-colors: active) {
    .menu-item:hover {
        border-bottom: 1px solid ButtonText;
    }
}
