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

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

body {
    overflow-x: hidden;
}

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

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #faf8f5;
}
::-webkit-scrollbar-thumb {
    background: #d6bea4;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #a67852;
}

/* Navigation */
#navbar {
    background: transparent;
    transition: background 0.4s ease, box-shadow 0.4s ease;
}

#navbar.scrolled {
    background: rgba(250, 248, 245, 0.97);
    box-shadow: 0 1px 20px rgba(0, 0, 0, 0.08);
    backdrop-filter: blur(10px);
}

#navbar.scrolled .nav-text {
    color: #1c1917;
}

#navbar.scrolled .nav-text-sub {
    color: #78716c;
}

.nav-link {
    position: relative;
}

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

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

#navbar.scrolled .nav-link {
    color: #44403c;
}

/* Mobile Menu */
.mobile-link {
    position: relative;
}

/* Scroll Reveal Animations */
.reveal {
    opacity: 1;
    transform: none;
    transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.delay-1 { transition-delay: 0.1s; }
.reveal.delay-2 { transition-delay: 0.2s; }
.reveal.delay-3 { transition-delay: 0.3s; }
.reveal.delay-4 { transition-delay: 0.4s; }
.reveal.delay-5 { transition-delay: 0.5s; }
.reveal.delay-6 { transition-delay: 0.6s; }

@media (prefers-reduced-motion: no-preference) {
    .reveal.hidden-reveal {
        opacity: 0;
        transform: translateY(30px);
    }
}

/* Hero Image Grid */
@media (min-width: 1024px) {
    .hero-img-grid img {
        transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    }
    .hero-img-grid:hover img:nth-child(1) {
        transform: translateY(-8px);
    }
    .hero-img-grid:hover img:nth-child(2) {
        transform: translateY(8px);
    }
    .hero-img-grid:hover img:nth-child(3) {
        transform: translateY(8px);
    }
    .hero-img-grid:hover img:nth-child(4) {
        transform: translateY(-8px);
    }
}

/* Service Cards */
.service-card {
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #c7441e, #ee7d50);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.service-card:hover::before {
    transform: scaleX(1);
}

/* Project Cards */
.project-card {
    overflow: hidden;
}

.project-card img {
    transition: transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.project-card:hover img {
    transform: scale(1.08);
}

/* Form Focus States */
input:focus,
select:focus,
textarea:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(199, 68, 30, 0.15);
}

/* Selection */
::selection {
    background: #fce4d9;
    color: #6c2817;
}

/* Smooth transitions for all interactive elements */
a, button {
    transition: all 0.2s ease;
}

/* Print styles */
@media print {
    #navbar, #mobileMenu {
        display: none !important;
    }
    body {
        color: #000;
        background: #fff;
    }
}
