/* Reset & Base */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

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

body {
    overflow-x: hidden;
}

img {
    max-width: 100%;
    height: auto;
}

/* Selection */
::selection {
    background: rgba(13, 148, 136, 0.15);
    color: #0f766e;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: #f8fafc;
}
::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

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

.animate-fade-up {
    animation: fadeUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) both;
}

/* Scroll reveal */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* Navbar */
.nav-logo-text {
    transition: color 0.3s ease;
}
.nav-logo-sub {
    transition: color 0.3s ease;
}

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

#hero ~ .navbar-scrolled .nav-logo-text,
.navbar-scrolled .nav-logo-text {
    color: #1e293b;
}

/* Hero nav state */
.navbar-dark .nav-logo-text {
    color: #f8fafc;
}
.navbar-dark .nav-logo-sub {
    color: #94a3b8;
}

.navbar-scrolled .nav-logo-text {
    color: #1e293b;
}
.navbar-scrolled .nav-logo-sub {
    color: #64748b;
}

/* Mobile menu active state */
.mobile-menu-open #bar1 {
    transform: translateY(5px) rotate(45deg);
}
.mobile-menu-open #bar2 {
    opacity: 0;
}
.mobile-menu-open #bar3 {
    transform: translateY(-5px) rotate(-45deg);
    width: 1.5rem;
}

/* Service card hover line */
.service-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: #0d9488;
    transition: width 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.service-card {
    position: relative;
}

.service-card:hover::after {
    width: 60%;
}

/* Form select arrow */
select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

/* Smooth focus */
input:focus,
textarea:focus,
select:focus {
    outline: none;
}

/* Utility */
.text-balance {
    text-balance: balance;
}

/* Print styles */
@media print {
    nav, #contactForm, button {
        display: none;
    }
    body {
        color: #000;
        background: #fff;
    }
}
