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

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

body {
    margin: 0;
    overflow-x: hidden;
}

img {
    max-width: 100%;
    height: auto;
}

::selection {
    background: #C4703F;
    color: white;
}

/* ── Scrollbar ── */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #FDF8F0;
}
::-webkit-scrollbar-thumb {
    background: #d4c9ba;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #b8aa98;
}

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

#navbar.scrolled {
    background: rgba(253, 248, 240, 0.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 1px 20px rgba(196, 112, 63, 0.08);
}

.nav-link {
    position: relative;
}

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

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

/* ── Hero Animations ── */
.hero-fade {
    opacity: 0;
    transform: translateY(24px);
    animation: heroFadeUp 0.7s ease forwards;
}

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

.hero-image {
    opacity: 0;
    transform: translateX(40px);
    animation: heroSlideIn 0.8s ease 0.3s forwards;
}

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

@keyframes heroSlideIn {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ── Section Animations ── */
.section-label,
.section-title,
.section-text,
.section-stats,
.service-card {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.section-label.visible,
.section-title.visible,
.section-text.visible,
.section-stats.visible,
.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.40s; }

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

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

#menuIcon span {
    transition: transform 0.3s ease, opacity 0.3s ease;
}

#menuIcon.active span:nth-child(1) {
    transform: translateY(4px) rotate(45deg);
}

#menuIcon.active span:nth-child(2) {
    opacity: 0;
}

#menuIcon.active span:nth-child(3) {
    transform: translateY(-4px) rotate(-45deg);
}

.mobile-nav-link {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.3s ease, transform 0.3s ease, color 0.2s ease;
}

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

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

/* ── Floating Elements ── */
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

/* ── Button Focus Styles ── */
button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 2px solid #C4703F;
    outline-offset: 2px;
}

/* ── Responsive ── */
@media (max-width: 768px) {
    .hero-fade {
        animation-duration: 0.5s;
    }
    
    .hero-image {
        animation-duration: 0.6s;
    }
}
