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

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

body {
    overflow-x: hidden;
}

::selection {
    background: #E07A5F;
    color: #fff;
}

/* Hero animations */
.hero-content {
    opacity: 1;
}

.hero-elem {
    opacity: 0;
    transform: translateY(30px);
    animation: heroReveal 0.9s ease forwards;
}

.hero-elem:nth-child(1) { animation-delay: 0.2s; }
.hero-elem:nth-child(2) { animation-delay: 0.4s; }
.hero-elem:nth-child(3) { animation-delay: 0.6s; }
.hero-elem:nth-child(4) { animation-delay: 0.8s; }

.hero-scroll {
    opacity: 0;
    animation: fadeIn 1s ease forwards;
    animation-delay: 1.4s;
}

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

@keyframes fadeIn {
    to { opacity: 0.7; }
}

/* Nav text animation */
.nav-logo-text {
    animation: navTextReveal 0.8s ease forwards;
    animation-delay: 0.5s;
}

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

/* Scroll reveal for below-fold sections */
.section-reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

@media (prefers-reduced-motion: no-preference) {
    .section-reveal {
        opacity: 0;
        transform: translateY(24px);
    }
    
    .section-reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Navbar scroll state */
.nav-scrolled #navbar {
    background: rgba(26, 29, 32, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 1px 0 rgba(255,255,255,0.06);
}

.nav-scrolled .nav-logo-text {
    opacity: 1;
    transform: translateY(0);
}

/* Mobile menu */
#mobile-menu {
    transition: max-height 0.5s cubic-bezier(0.4, 0, 0.2, 1), padding 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

#mobile-menu.open {
    max-height: 400px;
    padding: 0;
}

.mobile-menu-link {
    display: block;
    padding: 4px 0;
}

/* Smooth image loading */
img {
    background-color: #f5f5f5;
}

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

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

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

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

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

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