/* ========== BASE & UTILITIES ========== */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

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

/* ========== NAVBAR ========== */
#navbar {
    background: transparent;
    transition: background 0.3s ease, box-shadow 0.3s ease, backdrop-filter 0.3s ease;
}

#navbar.scrolled {
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.2);
}

.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 4px;
    left: 50%;
    width: 0;
    height: 2px;
    background: #2dd4bf;
    border-radius: 1px;
    transition: width 0.25s ease, left 0.25s ease;
}

.nav-link:hover::after {
    width: 60%;
    left: 20%;
}

/* ========== HERO ANIMATIONS ========== */
.hero-anim {
    opacity: 0;
    transform: translateY(30px);
    animation: heroFadeUp 0.7s ease forwards;
}

.hero-anim:nth-child(1) { animation-delay: 0.1s; }
.hero-anim:nth-child(2) { animation-delay: 0.25s; }
.hero-anim:nth-child(3) { animation-delay: 0.4s; }
.hero-anim:nth-child(4) { animation-delay: 0.55s; }
.hero-anim:nth-child(5) { animation-delay: 0.7s; }

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

/* ========== SERVICE CARDS ========== */
.service-card {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.5s ease, transform 0.5s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.service-card.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ========== REVIEW CARDS ========== */
.review-card {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.review-card.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ========== CONTACT INPUTS ========== */
.contact-input {
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.contact-input:focus {
    background: white;
    box-shadow: 0 0 0 4px rgba(13, 148, 136, 0.1);
}

/* ========== MOBILE MENU ========== */
#mobileMenu.open {
    max-height: 400px;
}

/* ========== SCROLL REVEAL (generic) ========== */
.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

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

/* ========== RESPONSIVE ========== */
@media (max-width: 640px) {
    #hero h1 {
        font-size: 2.5rem;
    }

    .hero-anim {
        animation-duration: 0.5s;
    }

    section {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}

@media (min-width: 641px) and (max-width: 1023px) {
    section {
        padding-left: 1.25rem;
        padding-right: 1.25rem;
    }
}

/* ========== ACCESSIBILITY ========== */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }

    html {
        scroll-behavior: auto;
    }

    .hero-anim {
        opacity: 1;
        transform: none;
    }

    .service-card,
    .review-card,
    .reveal {
        opacity: 1;
        transform: none;
    }
}

/* ========== SELECTION ========== */
::selection {
    background: rgba(13, 148, 136, 0.2);
    color: #0f766e;
}
