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

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

body {
    overflow-x: hidden;
}

::selection {
    background: #0d3b2e;
    color: #f5f0e8;
}

/* === Navbar === */
#navbar {
    color: #f5f0e8;
}

#navbar.scrolled {
    background: rgba(13, 59, 46, 0.95);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(245, 240, 232, 0.08);
}

#navbar:not(.scrolled) .nav-link {
    color: rgba(245, 240, 232, 0.75);
}

#navbar.scrolled .nav-link {
    color: rgba(245, 240, 232, 0.7);
}

#navbar.scrolled .nav-link:hover {
    color: #d4b896;
}

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

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

#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.open .mobile-link:nth-child(4) { animation-delay: 0.2s; }
#mobile-menu.open .mobile-link:nth-child(5) { animation-delay: 0.25s; }

@keyframes fadeDown {
    from { opacity: 0; transform: translateY(-12px); }
    to { opacity: 1; transform: translateY(0); }
}

.menu-line {
    display: block;
    width: 24px;
    height: 1px;
    background: currentColor;
    transition: all 0.3s ease;
}

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

#menu-toggle.active .menu-line:nth-child(2) {
    transform: rotate(-45deg) translate(3px, -3px);
}

/* === Hero Animations === */
.hero-subtitle {
    animation: fadeUp 0.8s ease 0.3s forwards;
}

.hero-title {
    animation: fadeUp 0.8s ease 0.5s forwards;
}

.hero-desc {
    animation: fadeUp 0.8s ease 0.7s forwards;
}

.hero-cta {
    animation: fadeUp 0.8s ease 0.9s forwards;
}

#scroll-indicator {
    animation: fadeIn 1s ease 1.4s forwards;
}

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

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 0.7; }
}

/* === Scroll Reveal === */
.service-reveal,
.gallery-reveal,
.about-reveal,
.process-reveal,
.contact-reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.service-card {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.6s ease, transform 0.6s ease, background-color 0.5s ease;
}

.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; }

.gallery-item {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.gallery-item:nth-child(1) { transition-delay: 0s; }
.gallery-item:nth-child(2) { transition-delay: 0.06s; }
.gallery-item:nth-child(3) { transition-delay: 0.12s; }
.gallery-item:nth-child(4) { transition-delay: 0.18s; }
.gallery-item:nth-child(5) { transition-delay: 0.24s; }
.gallery-item:nth-child(6) { transition-delay: 0.3s; }

/* === Reduced Motion === */
@media (prefers-reduced-motion: no-preference) {
    .service-reveal,
    .gallery-reveal,
    .about-reveal,
    .process-reveal,
    .contact-reveal {
        opacity: 0;
        transform: translateY(24px);
    }

    .service-card,
    .gallery-item {
        opacity: 0;
        transform: translateY(24px);
    }
}

/* === Form === */
.contact-form input:focus,
.contact-form textarea:focus {
    border-bottom-color: #0d3b2e;
}

/* === Scrollbar === */
::-webkit-scrollbar {
    width: 6px;
}

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

::-webkit-scrollbar-thumb {
    background: #b8976a;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #0d3b2e;
}
