/* ===== Base & Typography ===== */
html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    overflow-x: hidden;
}

::selection {
    background: #7B2D3B;
    color: #FDF9F6;
}

/* ===== Scrollbar ===== */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #FDF9F6;
}
::-webkit-scrollbar-thumb {
    background: #7B2D3B;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #5c1e29;
}

/* ===== Navbar ===== */
#navbar {
    background: rgba(253, 249, 246, 0.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(26, 18, 16, 0.06);
}

#navbar.scrolled {
    box-shadow: 0 1px 20px rgba(26, 18, 16, 0.06);
}

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

.hero-title {
    animation: slideUp 0.9s ease-out 0.4s both;
}

.hero-subtitle {
    animation: slideUp 0.9s ease-out 0.6s both;
}

.hero-image-wrapper {
    animation: fadeIn 1.2s ease-out 0.5s both;
}

.hero-image {
    transition: transform 0.8s ease-out;
}

.hero-image-wrapper:hover .hero-image {
    transform: scale(1.03);
}

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

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* ===== Section Eyebrow ===== */
.section-eyebrow {
    display: block;
}

/* ===== Section Heading ===== */
.section-heading {
    font-weight: 400;
}

/* ===== Service Cards ===== */
.service-card {
    border-left: 3px solid transparent;
    transition: border-color 0.5s ease, transform 0.5s ease, box-shadow 0.5s ease;
}

.service-card:hover {
    border-left-color: #F5D5C8;
    transform: translateY(-4px);
    box-shadow: 0 20px 60px rgba(123, 45, 59, 0.12);
}

/* ===== Approach Items ===== */
.approach-item {
    transition: background-color 0.5s ease;
}

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

#mobileMenu.closed {
    opacity: 0;
    pointer-events: none;
}

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

/* Mobile menu hamburger animation */
#menuToggle.active #bar1 {
    transform: rotate(45deg) translate(5px, 5px);
}
#menuToggle.active #bar2 {
    opacity: 0;
}
#menuToggle.active #bar3 {
    transform: rotate(-45deg) translate(5px, -5px);
    width: 1.5rem;
}

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

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

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

/* ===== Stat Items ===== */
.stat-item {
    transition: background-color 0.3s ease;
}

.stat-item:hover {
    background: rgba(123, 45, 59, 0.04);
}

/* ===== Link Underline Animation ===== */
a {
    text-decoration: none;
}

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

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

    .hero-image-wrapper {
        height: 400px;
        margin-top: 2rem;
    }

    .approach-item {
        border-left: none !important;
        border-top: 1px solid rgba(26, 18, 16, 0.1) !important;
    }
}

@media (max-width: 640px) {
    .hero-title {
        font-size: 2.5rem;
    }
}
