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

body {
    overflow-x: hidden;
}

::selection {
    background: rgba(27, 67, 50, 0.15);
    color: #1B4332;
}

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

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

.hero-description {
    opacity: 0;
    animation: fadeUp 0.8s ease forwards 0.7s;
}

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

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

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

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

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

#navbar.scrolled {
    background: rgba(253, 252, 248, 0.97);
    box-shadow: 0 1px 20px rgba(27, 67, 50, 0.08);
    backdrop-filter: blur(10px);
}

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

#navbar:not(.scrolled) .nav-logo {
    color: #FDFCF8;
}

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

.nav-link {
    position: relative;
}

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

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

#navbar:not(.scrolled) .nav-link {
    color: rgba(253, 252, 248, 0.85);
}

#navbar:not(.scrolled) .nav-link:hover {
    color: #D4A373;
}

#navbar:not(.scrolled) .nav-link::after {
    background: #D4A373;
}

#navbar:not(.scrolled) .nav-link:hover {
    color: #D4A373;
}

#navbar:not(.scrolled) .contact-btn-nav {
    border-color: rgba(253, 252, 248, 0.4);
    color: #FDFCF8;
}

#navbar:not(.scrolled) .contact-btn-nav:hover {
    background: rgba(253, 252, 248, 0.1);
}

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

#mobile-menu.open .mobile-link {
    animation: fadeUp 0.5s ease forwards;
}

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

/* ===== Mobile Menu Toggle ===== */
#navbar:not(.scrolled) .menu-line {
    background: #FDFCF8;
}

#navbar.scrolled .menu-line {
    background: #1B4332;
}

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

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

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

/* ===== Service Cards ===== */
.group:hover svg {
    transform: scale(1.1);
}

.group svg {
    transition: transform 0.3s ease;
}

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

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

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

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

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

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.25rem;
    }

    .hero-description {
        font-size: 1.125rem;
    }
}
