/* ===== Base & Typography ===== */
html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

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

::selection {
    background: #fbbf24;
    color: #500724;
}

/* ===== Navbar ===== */
.nav-logo-text,
.nav-logo-sub {
    color: #500724;
}

#navbar.scrolled .nav-logo-text,
#navbar.scrolled .nav-logo-sub {
    color: #500724;
}

.nav-link {
    position: relative;
}

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

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

/* ===== Hero Animations ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

@keyframes slideRight {
    from {
        width: 0;
    }
    to {
        width: 3rem;
    }
}

.hero-eyebrow {
    animation: fadeIn 0.8s ease forwards;
    animation-delay: 0.2s;
    opacity: 0;
}

.hero-eyebrow > div {
    animation: slideRight 0.6s ease forwards;
    animation-delay: 0.3s;
    width: 0;
}

.hero-headline {
    animation: fadeInUp 0.8s ease forwards;
    animation-delay: 0.5s;
    opacity: 0;
}

.hero-sub {
    animation: fadeInUp 0.8s ease forwards;
    animation-delay: 0.7s;
    opacity: 0;
}

.hero-ctas {
    animation: fadeInUp 0.8s ease forwards;
    animation-delay: 0.9s;
    opacity: 0;
}

/* ===== Scroll Reveal ===== */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.7s ease, transform 0.7s 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);
    }
}

/* ===== Staggered Reveal Delays ===== */
.reveal:nth-child(1) { transition-delay: 0s; }
.reveal:nth-child(2) { transition-delay: 0.1s; }
.reveal:nth-child(3) { transition-delay: 0.2s; }
.reveal:nth-child(4) { transition-delay: 0.3s; }
.reveal:nth-child(5) { transition-delay: 0.4s; }
.reveal:nth-child(6) { transition-delay: 0.5s; }

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

.mobile-nav-link {
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

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

#mobile-menu.open .mobile-nav-link:nth-child(1) { transition-delay: 0.05s; }
#mobile-menu.open .mobile-nav-link:nth-child(2) { transition-delay: 0.1s; }
#mobile-menu.open .mobile-nav-link:nth-child(3) { transition-delay: 0.15s; }
#mobile-menu.open .mobile-nav-link:nth-child(4) { transition-delay: 0.2s; }
#mobile-menu.open .mobile-nav-link:nth-child(5) { transition-delay: 0.25s; }

/* ===== Hamburger Animation ===== */
#menu-icon.active #bar1 {
    transform: rotate(45deg) translate(5px, 5px);
}

#menu-icon.active #bar2 {
    opacity: 0;
}

#menu-icon.active #bar3 {
    transform: rotate(-45deg) translate(5px, -5px);
    width: 100%;
}

/* ===== Service Card Image Hover ===== */
.group:hover .group-hover\:rotate-12 {
    transform: rotate(12deg);
}

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #9ca3af;
}

/* ===== Focus Visible ===== */
*:focus-visible {
    outline: 2px solid #fbbf24;
    outline-offset: 2px;
}

/* ===== Print Styles ===== */
@media print {
    #navbar, #mobile-menu, .reveal {
        display: none !important;
    }
    
    body {
        color: #000;
        background: #fff;
    }
}
