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

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

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: #fdf8f6;
}
::-webkit-scrollbar-thumb {
    background: #d04f35;
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: #a82f2f;
}

/* Hero animations */
.hero-line {
    display: inline-block;
    transform: translateY(100%);
    animation: slideUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.hero-line:nth-child(1) { animation-delay: 0.1s; }
.hero-line:nth-child(2) { animation-delay: 0.2s; }
.hero-line:nth-child(3) { animation-delay: 0.3s; }
.hero-line:nth-child(4) { animation-delay: 0.4s; }
.hero-line:nth-child(5) { animation-delay: 0.5s; }

.hero-subtitle {
    animation: fadeIn 0.8s ease forwards;
    animation-delay: 0.6s;
    opacity: 0;
}

#hero-desc {
    animation: fadeIn 0.8s ease forwards;
    animation-delay: 0.9s;
    opacity: 0;
}

#hero-cta {
    animation: fadeIn 0.8s ease forwards;
    animation-delay: 1.1s;
    opacity: 0;
}

#hero-stats {
    animation: fadeIn 0.8s ease forwards;
    animation-delay: 1.3s;
    opacity: 0;
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
    }
    to {
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Scroll reveal animations - progressive enhancement */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* Menu item hover */
.menu-item {
    transition: transform 0.3s ease;
}

.menu-item:hover {
    transform: translateX(4px);
}

/* Navbar scroll state */
nav.scrolled {
    background: rgba(253, 248, 246, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(138, 37, 37, 0.06);
}

nav.scrolled .font-serif {
    color: #611a1a !important;
}

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

#mobile-menu.open .mobile-link {
    animation: fadeIn 0.4s ease forwards;
}

#mobile-menu.open .mobile-link:nth-child(1) { animation-delay: 0.05s; }
#mobile-menu.open .mobile-link:nth-child(2) { animation-delay: 0.1s; }
#mobile-menu.open .mobile-link:nth-child(3) { animation-delay: 0.15s; }

/* Mobile menu button animation */
.menu-btn.active .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(3px, 3px);
}
.menu-btn.active .menu-line:nth-child(2) {
    opacity: 0;
}
.menu-btn.active .menu-line:nth-child(3) {
    transform: rotate(-45deg) translate(3px, -3px);
    width: 1.25rem;
}

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

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

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

/* Prefers reduced motion */
@media (prefers-reduced-motion: reduce) {
    .hero-line,
    .hero-subtitle,
    #hero-desc,
    #hero-cta,
    #hero-stats {
        animation: none;
        opacity: 1;
        transform: none;
    }
    
    .reveal {
        transition: none;
    }
    
    html {
        scroll-behavior: auto;
    }
    
    .menu-item:hover {
        transform: none;
    }
}
