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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    overflow-x: hidden;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #fdf9ed;
}
::-webkit-scrollbar-thumb {
    background: #e8735a;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #d45639;
}

/* Navbar scroll state */
#navbar.scrolled {
    background: rgba(254, 253, 248, 0.95);
    backdrop-filter: blur(20px);
    box-shadow: 0 1px 0 rgba(0,0,0,0.05);
}

#navbar.scrolled .font-serif {
    color: #1e1e25;
}

/* Nav links underline animation */
.nav-link {
    position: relative;
}
.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background: #e8735a;
    transition: width 0.3s ease;
}
.nav-link:hover::after {
    width: 100%;
}

/* Mobile menu */
.mobile-nav-link {
    position: relative;
}
.mobile-nav-link::after {
    content: '';
    display: block;
    width: 0;
    height: 1px;
    background: #e8735a;
    transition: width 0.3s ease;
    margin: 0 auto;
}
.mobile-nav-link:hover::after {
    width: 60%;
}

/* Hero animations */
.hero-content {
    animation: heroReveal 1s ease forwards;
    animation-delay: 0.2s;
}
.hero-stats {
    animation: heroReveal 1s ease forwards;
    animation-delay: 0.6s;
}

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

/* Float animation */
@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(2deg); }
}

.animate-float {
    animation: float 6s ease-in-out infinite;
}

/* Reveal on scroll */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}
.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Staggered reveal for grid items */
.reveal:nth-child(2) { transition-delay: 0.1s; }
.reveal:nth-child(3) { transition-delay: 0.2s; }
.reveal:nth-child(4) { transition-delay: 0.3s; }
.reveal:nth-child(5) { transition-delay: 0.4s; }
.reveal:nth-child(6) { transition-delay: 0.5s; }

/* Selection color */
::selection {
    background: rgba(232, 115, 90, 0.2);
    color: #1e1e25;
}

/* Focus styles */
:focus-visible {
    outline: 2px solid #e8735a;
    outline-offset: 2px;
}

/* Mobile menu open state */
body.menu-open {
    overflow: hidden;
}

/* Smooth image loading */
img {
    image-rendering: -webkit-optimize-contrast;
}

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