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

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

body {
    overflow-x: hidden;
}

/* ===== Navbar ===== */
#navbar {
    background: transparent;
    transition: background 0.3s ease, box-shadow 0.3s ease, padding 0.3s ease;
}

#navbar.scrolled {
    background: rgba(12, 19, 38, 0.95);
    backdrop-filter: blur(12px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.2);
}

.nav-text {
    color: rgba(255, 255, 255, 0.9);
}

.nav-text-sub {
    color: rgba(147, 165, 216, 0.9);
}

/* ===== Mobile Menu ===== */
.mobile-nav-link {
    display: block;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.mobile-nav-link:last-child {
    border-bottom: none;
}

/* ===== Service Cards ===== */
.service-card {
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #d4a017, #f5c84a);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
}

.service-card:hover::before {
    transform: scaleX(1);
}

/* ===== Testimonial Cards ===== */
.testimonial-card {
    transition: transform 0.3s ease, background 0.3s ease;
}

.testimonial-card:hover {
    transform: translateY(-4px);
}

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

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

.reveal-up {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

/* ===== Button Hover Glow ===== */
button[type="submit"]:hover {
    box-shadow: 0 8px 30px rgba(30, 45, 90, 0.3) !important;
}

/* ===== Focus Styles ===== */
input:focus,
select:focus,
textarea:focus {
    outline: none;
}

/* ===== Reduced Motion ===== */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    .service-card::before,
    .testimonial-card,
    .service-card {
        transition: none;
        animation: none;
    }

    .reveal,
    .reveal-up {
        opacity: 1;
        transform: none;
    }
}

/* ===== Tablet ===== */
@media (max-width: 768px) {
    #navbar {
        padding: 0.5rem 0;
    }

    #navbar.scrolled {
        padding: 0.5rem 0;
    }
}

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

    .service-card {
        padding: 1.5rem;
    }
}
