/* Base & Reset */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

body {
    min-height: 100vh;
}

/* Selection */
::selection {
    background-color: #D4A574;
    color: #251625;
}

/* Navbar */
#navbar {
    background: transparent;
    transition: background-color 0.4s ease, backdrop-filter 0.4s ease, box-shadow 0.4s ease;
}

#navbar.scrolled {
    background: rgba(249, 245, 247, 0.92);
    backdrop-filter: blur(20px);
    box-shadow: 0 1px 20px rgba(107, 70, 107, 0.08);
}

#navbar.scrolled .menu-line {
    background-color: #6B466B;
}

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

#mobileMenu.closed {
    opacity: 0;
    pointer-events: none;
}

.mobile-link {
    transform: translateY(20px);
    opacity: 0;
    transition: all 0.4s ease;
}

#mobileMenu.open .mobile-link {
    transform: translateY(0);
    opacity: 1;
}

#mobileMenu.open .mobile-link:nth-child(1) { transition-delay: 0.1s; }
#mobileMenu.open .mobile-link:nth-child(2) { transition-delay: 0.15s; }
#mobileMenu.open .mobile-link:nth-child(3) { transition-delay: 0.2s; }
#mobileMenu.open .mobile-link:nth-child(4) { transition-delay: 0.25s; }
#mobileMenu.open .mobile-link:nth-child(5) { transition-delay: 0.3s; }

/* Hamburger */
.menu-line {
    transition: all 0.3s ease;
}

#menuBtn.active .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(4px, 4px);
}

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

#menuBtn.active .menu-line:nth-child(3) {
    transform: rotate(-45deg) translate(4px, -4px);
    width: 1.25rem;
}

/* Hero Animations */
.hero-badge {
    animation: fadeInUp 0.8s ease forwards;
    opacity: 0;
}

.hero-title {
    animation: fadeInUp 0.8s ease 0.15s forwards;
    opacity: 0;
}

.hero-subtitle {
    animation: fadeInUp 0.8s ease 0.3s forwards;
    opacity: 0;
}

.hero-cta {
    animation: fadeInUp 0.8s ease 0.45s forwards;
    opacity: 0;
}

.hero-stats {
    animation: fadeInUp 0.8s ease 0.6s forwards;
    opacity: 0;
}

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

/* Section Animations */
.section-header {
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.section-header.visible {
    opacity: 1;
    transform: translateY(0);
}

.section-label {
    opacity: 0;
    transform: translateY(15px);
    transition: all 0.6s ease;
}

.section-label.visible {
    opacity: 1;
    transform: translateY(0);
}

.section-title {
    opacity: 0;
    transform: translateY(25px);
    transition: all 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0.1s;
}

.section-title.visible {
    opacity: 1;
    transform: translateY(0);
}

.section-subtitle {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.7s ease 0.2s;
}

.section-subtitle.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Service Cards */
.service-card {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.service-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.service-card:nth-child(1) { transition-delay: 0s; }
.service-card:nth-child(2) { transition-delay: 0.08s; }
.service-card:nth-child(3) { transition-delay: 0.16s; }
.service-card:nth-child(4) { transition-delay: 0.24s; }
.service-card:nth-child(5) { transition-delay: 0.32s; }
.service-card:nth-child(6) { transition-delay: 0.4s; }

/* Why Cards */
.why-card {
    opacity: 0;
    transform: translateY(25px);
    transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.why-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.why-card:nth-child(1) { transition-delay: 0s; }
.why-card:nth-child(2) { transition-delay: 0.1s; }
.why-card:nth-child(3) { transition-delay: 0.2s; }
.why-card:nth-child(4) { transition-delay: 0.3s; }

/* Contact Info Cards */
.contact-info-card {
    opacity: 0;
    transform: translateX(-20px);
    transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.contact-info-card.visible {
    opacity: 1;
    transform: translateX(0);
}

.contact-info-card:nth-child(1) { transition-delay: 0s; }
.contact-info-card:nth-child(2) { transition-delay: 0.1s; }
.contact-info-card:nth-child(3) { transition-delay: 0.2s; }

/* About Images */
.about-images {
    opacity: 0;
    transform: translateX(-30px);
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.about-images.visible {
    opacity: 1;
    transform: translateX(0);
}

/* About Text */
.about-text {
    opacity: 0;
    transform: translateX(30px);
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.about-text.visible {
    opacity: 1;
    transform: translateX(0);
}

/* CTA Section */
.cta-content {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.cta-content.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Form */
#contactForm {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.7s ease;
}

#contactForm.visible {
    opacity: 1;
    transform: translateY(0);
}

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

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

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

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

/* Focus styles */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 2px solid #D4A574;
    outline-offset: 2px;
    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;
    }
}
