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

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

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: #f5f5f0;
}
::-webkit-scrollbar-thumb {
    background: #c9982e;
    border-radius: 3px;
}

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

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

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

/* Navbar states */
.nav-light {
    color: #0a1628;
}

.nav-dark {
    color: #ffffff;
}

#navbar {
    background: transparent;
}

#navbar.scrolled {
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(10px);
    box-shadow: 0 1px 0 rgba(10, 22, 40, 0.06);
}

#navbar.scrolled .nav-link {
    color: #0a1628;
}

#navbar.scrolled .nav-link::after {
    background: #c9982e;
}

#navbar.scrolled a[href="#contact"] {
    border-color: #0a1628;
    color: #0a1628;
}

/* Mobile menu */
.mobile-link {
    color: #0a1628;
    transition: color 0.3s ease;
}

.mobile-link:hover {
    color: #c9982e;
}

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

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

.hero-anim:nth-child(1) { animation-delay: 0.1s; }
.hero-anim:nth-child(2) { animation-delay: 0.25s; }
.hero-anim:nth-child(3) { animation-delay: 0.4s; }
.hero-anim:nth-child(4) { animation-delay: 0.55s; }
.hero-anim:nth-child(5) { animation-delay: 0.7s; }

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

.hero-img {
    opacity: 0;
    transform: translateX(32px);
    animation: heroImgIn 1s ease 0.3s forwards;
}

@keyframes heroImgIn {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

@media (prefers-reduced-motion: no-preference) {
    .scroll-reveal {
        opacity: 0;
        transform: translateY(32px);
    }

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

/* Button focus states */
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid #c9982e;
    outline-offset: 2px;
}

/* Selection color */
::selection {
    background: #c9982e;
    color: #0a1628;
}

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

#menu-toggle.active .menu-line:first-child {
    transform: translateY(4px) rotate(45deg);
}

#menu-toggle.active .menu-line:last-child {
    transform: translateY(-4px) rotate(-45deg);
}
