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

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

body {
    overflow-x: hidden;
}

::selection {
    background: rgba(201, 168, 76, 0.3);
    color: #FDF8F0;
}

/* === Scroll Reveal Animations === */
.reveal-up {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

/* === Navigation === */
.nav-link {
    position: relative;
}

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

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

.nav-link:hover {
    color: #C9A84C !important;
}

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

#mobile-menu.open .mobile-link {
    animation: fadeUp 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; }

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

/* Menu button active state */
#menu-btn.active .menu-line:nth-child(1) {
    top: 50%;
    transform: rotate(45deg);
}

#menu-btn.active .menu-line:nth-child(2) {
    opacity: 0;
}

#menu-btn.active .menu-line:nth-child(3) {
    top: 50%;
    width: 6px;
    left: calc(50% - 12px);
    transform: rotate(-45deg);
}

/* === Navbar scrolled state === */
#navbar.scrolled {
    background: rgba(10, 31, 20, 0.95);
    backdrop-blur-xl;
    border-bottom: 1px solid rgba(201, 168, 76, 0.1);
}

#navbar.scrolled .nav-link {
    color: rgba(253, 248, 240, 0.8) !important;
}

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

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, #C9A84C, transparent);
    opacity: 0;
    transition: opacity 0.5s ease;
}

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

/* === Gold gradient text utility === */
.text-gold-gradient {
    background: linear-gradient(135deg, #E8D5A0 0%, #C9A84C 50%, #B8943F 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

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

::-webkit-scrollbar-track {
    background: #0A1F14;
}

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

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

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

/* === Responsive adjustments === */
@media (max-width: 767px) {
    .font-serif {
        line-height: 1.1;
    }

    #hero h1 {
        font-size: 2.75rem;
    }

    #hero h1 span {
        display: block;
    }

    #about h2,
    #services h2,
    #approach h2,
    #contact h2 {
        font-size: 2.25rem;
    }
}

@media (min-width: 768px) and (max-width: 1023px) {
    #hero h1 {
        font-size: 4rem;
    }
}

/* === Print styles === */
@media print {
    body {
        background: white;
        color: black;
    }

    nav, #contact-form, button {
        display: none;
    }
}

/* === Reduced motion === */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }

    html {
        scroll-behavior: auto;
    }

    .reveal-up {
        opacity: 1;
        transform: none;
    }
}
