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

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img, video {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Scroll Reveal */
.reveal {
    opacity: 1;
    transform: none;
    transition: opacity 0.6s ease, transform 0.6s ease;
}

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

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

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

/* Navbar */
#navbar {
    background: transparent;
    transition: background 0.3s ease, box-shadow 0.3s ease, padding 0.3s ease;
}

#navbar.scrolled {
    background: rgba(253, 251, 247, 0.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 1px 20px rgba(0, 0, 0, 0.06);
}

.nav-link {
    position: relative;
}

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

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

/* Mobile Menu */
#mobileMenu {
    animation: slideDown 0.25s ease;
}

#mobileMenu.open {
    display: block;
}

#mobileMenu.hidden {
    display: none;
}

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

.mobile-link {
    display: block;
}

/* 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, #d45624, #e87347);
    border-radius: 3px 3px 0 0;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.service-card:hover::before {
    opacity: 1;
}

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

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

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

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

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

/* Selection */
::selection {
    background: rgba(212, 86, 36, 0.2);
    color: #632317;
}

/* Focus Visible */
:focus-visible {
    outline: 2px solid #d45624;
    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;
    }
}
