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

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

::selection {
    background: rgba(196, 154, 60, 0.3);
    color: #FDFBF7;
}

/* ===== Animations ===== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in {
    animation-name: fadeIn;
    animation-duration: 0.8s;
    animation-timing-function: cubic-bezier(0.25, 0.46, 0.45, 0.94);
    animation-iteration-count: 1;
}

/* ===== Scroll Reveal ===== */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
    html {
        scroll-behavior: auto;
    }
    .animate-fade-in {
        animation: none;
        opacity: 1;
    }
}

/* ===== Navbar ===== */
#navbar {
    background: transparent;
    backdrop-filter: none;
}

#navbar.scrolled {
    background: rgba(1, 20, 14, 0.92);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(196, 154, 60, 0.1);
}

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

#mobile-menu.closed {
    opacity: 0;
    pointer-events: none;
}

.mobile-link {
    opacity: 1;
}

/* ===== Mobile hamburger animation ===== */
#mobile-toggle.active #bar1 {
    transform: rotate(45deg) translate(5px, 5px);
}

#mobile-toggle.active #bar2 {
    opacity: 0;
}

#mobile-toggle.active #bar3 {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* ===== Input autofill override ===== */
input:-webkit-autofill,
textarea:-webkit-autofill {
    -webkit-box-shadow: 0 0 0 30px #022c22 inset !important;
    -webkit-text-fill-color: #FDFBF7 !important;
}

/* ===== Scrollbar ===== */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #01140e;
}
::-webkit-scrollbar-thumb {
    background: rgba(196, 154, 60, 0.3);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(196, 154, 60, 0.5);
}
