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

html {
    scroll-behavior: smooth;
}

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

::selection {
    background-color: rgba(13, 148, 136, 0.2);
    color: #0f766e;
}

/* ─── Scroll Reveal ─── */
.scroll-reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

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

.scroll-reveal.revealed:nth-child(2) { transition-delay: 0.1s; }
.scroll-reveal.revealed:nth-child(3) { transition-delay: 0.2s; }
.scroll-reveal.revealed:nth-child(4) { transition-delay: 0.3s; }
.scroll-reveal.revealed:nth-child(5) { transition-delay: 0.4s; }
.scroll-reveal.revealed:nth-child(6) { transition-delay: 0.5s; }

/* ─── Hero Animations ─── */
.hero-subtitle {
    animation: heroFadeUp 0.8s cubic-bezier(0.22, 1, 0.36, 1) 0.2s forwards;
}

.hero-title {
    animation: heroFadeUp 0.8s cubic-bezier(0.22, 1, 0.36, 1) 0.4s forwards;
}

.hero-description {
    animation: heroFadeUp 0.8s cubic-bezier(0.22, 1, 0.36, 1) 0.6s forwards;
}

.hero-cta {
    animation: heroFadeUp 0.8s cubic-bezier(0.22, 1, 0.36, 1) 0.8s forwards;
}

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

/* ─── Navbar ─── */
.navbar-scrolled .nav-link {
    color: #334155;
}

.navbar-scrolled .nav-text {
    color: #1e293b;
}

.navbar-dark .nav-link {
    color: #94a3b8;
}

.navbar-dark .nav-text {
    color: #475569;
}

.navbar-scrolled #navbar {
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.03);
}

/* ─── Service Cards ─── */
.service-card {
    transition: background-color 0.5s ease;
}

/* ─── Reduced Motion ─── */
@media (prefers-reduced-motion: reduce) {
    .scroll-reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
    
    .hero-subtitle,
    .hero-title,
    .hero-description,
    .hero-cta {
        opacity: 1;
        transform: none;
        animation: none;
    }
    
    html {
        scroll-behavior: auto;
    }
}

/* ─── Focus Styles ─── */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
    outline: 2px solid #14b8a6;
    outline-offset: 2px;
    border-radius: 4px;
}

/* ─── Mobile Menu Transitions ─── */
#mobile-menu {
    transition: opacity 0.4s cubic-bezier(0.22, 1, 0.36, 1), pointer-events 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

#mobile-menu.open {
    opacity: 1;
    pointer-events: all;
}

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

/* ─── Scrollbar ─── */
::-webkit-scrollbar {
    width: 6px;
}

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

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}
