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

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

body {
    margin: 0;
    overflow-x: hidden;
}

::selection {
    background: rgba(201, 168, 76, 0.3);
    color: #fff;
}

::-webkit-scrollbar {
    width: 8px;
}

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

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

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

/* Scroll reveal base - always visible */
.scroll-reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

/* Animate only when JS is active and user prefers motion */
@media (prefers-reduced-motion: no-preference) {
    html.animate-scroll .scroll-reveal {
        opacity: 0;
        transform: translateY(30px);
        transition: opacity 0.7s ease, transform 0.7s ease;
    }
    html.animate-scroll .scroll-reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Navbar scroll state */
.navbar-scrolled {
    background: rgba(5, 14, 26, 0.95) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 1px 0 rgba(201, 168, 76, 0.1);
}

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

.navbar-scrolled .menu-line:last-child {
    background: #D4B96A;
}

/* Mobile menu transitions */
.mobile-menu-enter {
    animation: slideDown 0.3s ease forwards;
}

.mobile-menu-exit {
    animation: slideUp 0.3s ease forwards;
}

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

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

/* Mobile link hover */
.mobile-link {
    display: block;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.mobile-link:last-child {
    border-bottom: none;
}

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

/* Button focus states */
button:focus-visible,
a:focus-visible {
    outline: 2px solid #C9A84C;
    outline-offset: 2px;
    border-radius: 4px;
}

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

/* Reduce motion preference */
@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;
    }
}

/* Responsive adjustments */
@media (max-width: 640px) {
    .font-display {
        word-spacing: -0.02em;
    }
}
