/* === Base & Typography === */
html {
    scroll-behavior: smooth;
}

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

::selection {
    background-color: #C9A96E;
    color: #142016;
}

/* === Navigation === */
.nav-logo-color {
    transition: color 0.5s ease;
}

.nav-logo-sub {
    transition: color 0.5s ease;
}

#navbar.scrolled .nav-logo-color {
    color: #142016;
}

#navbar.scrolled .nav-logo-sub {
    color: #2d4a31;
}

#navbar.scrolled {
    background-color: rgba(253, 252, 248, 0.97);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(45, 74, 49, 0.08);
}

/* === Mobile Menu === */
.mobile-link {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

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

#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; }
#mobileMenu.open .mobile-link:nth-child(6) { transition-delay: 0.35s; }

/* === Menu Button Animation === */
#mobileMenu.open ~ header .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

#mobileMenu.open ~ header .menu-line:nth-child(2) {
    opacity: 0;
}

#mobileMenu.open ~ header .menu-line:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
    width: 24px;
}

/* === Hero Animations === */
.hero-eyebrow {
    animation: slideUp 0.8s ease forwards;
    animation-delay: 0.2s;
}

.hero-headline {
    animation: slideUp 0.8s ease forwards;
    animation-delay: 0.4s;
    opacity: 0;
    transform: translateY(30px);
}

.hero-desc {
    animation: fadeIn 0.8s ease forwards;
    animation-delay: 0.8s;
}

.hero-ctas {
    animation: fadeIn 0.8s ease forwards;
    animation-delay: 1s;
}

.hero-image-container {
    animation: fadeIn 1s ease forwards;
    animation-delay: 0.6s;
    opacity: 0;
}

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

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

/* === Reveal Animations === */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

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

.reveal:nth-child(2) { transition-delay: 0.1s; }
.reveal:nth-child(3) { transition-delay: 0.2s; }
.reveal:nth-child(4) { transition-delay: 0.3s; }

/* === Service Card Hover === */
.group img {
    transition: transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* === Custom Select === */
select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%232d4a31' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    appearance: none;
    -webkit-appearance: none;
}

/* === Smooth Scroll Offset === */
[id] {
    scroll-margin-top: 80px;
}

/* === Image aspect ratios === */
img {
    display: block;
}

/* === Focus styles === */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
    outline: 2px solid #C9A96E;
    outline-offset: 2px;
}

/* === Responsive adjustments === */
@media (max-width: 767px) {
    [id] {
        scroll-margin-top: 60px;
    }
}
