/* Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    overflow-x: hidden;
}

/* Animation Keyframes */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in-up {
    animation: fadeInUp 0.8s ease-out;
}

/* Scroll Animations */
.scroll-reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

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

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

#mobile-menu.active .mobile-link {
    animation: fadeInUp 0.5s ease-out forwards;
}

#mobile-menu.active .mobile-link:nth-child(1) { animation-delay: 0.1s; }
#mobile-menu.active .mobile-link:nth-child(2) { animation-delay: 0.2s; }
#mobile-menu.active .mobile-link:nth-child(3) { animation-delay: 0.3s; }
#mobile-menu.active .mobile-link:nth-child(4) { animation-delay: 0.4s; }

/* Menu Button Animation */
.menu-btn.active .menu-line:nth-child(1) {
    transform: rotate(45deg);
    top: 50%;
    margin-top: -1px;
}

.menu-btn.active .menu-line:nth-child(2) {
    opacity: 0;
}

.menu-btn.active .menu-line:nth-child(3) {
    transform: rotate(-45deg);
    bottom: 50%;
    margin-bottom: -1px;
    width: 1.5rem;
}

/* Navbar Scrolled State */
#navbar.scrolled {
    background-color: rgba(250, 248, 245, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.05);
}

/* Focus Styles */
input:focus,
textarea:focus,
button:focus {
    outline: none;
}

/* Selection Color */
::selection {
    background-color: #C05A43;
    color: white;
}

/* Smooth Image Loading */
img {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

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

::-webkit-scrollbar-track {
    background: #FAF8F5;
}

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

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

/* Responsive Typography */
@media (max-width: 768px) {
    .font-serif {
        line-height: 1.2;
    }
}

/* Print Styles */
@media print {
    nav,
    #contact-form,
    .scroll-indicator {
        display: none;
    }
}
