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

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

body {
    overflow-x: hidden;
}

::selection {
    background-color: rgba(255, 107, 53, 0.3);
    color: #f6f6f7;
}

/* ===== Scroll Reveal (progressive enhancement) ===== */
@media (prefers-reduced-motion: no-preference) {
    .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);
    }

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

    .reveal:nth-child(2) { transition-delay: 0.08s; }
    .reveal:nth-child(3) { transition-delay: 0.16s; }
    .reveal:nth-child(4) { transition-delay: 0.24s; }
    .reveal:nth-child(5) { transition-delay: 0.32s; }
}

/* ===== Stat Cards (Hero) ===== */
.stat-card {
    animation: float 6s ease-in-out infinite;
}

.stat-card:nth-child(2) {
    animation-delay: -1.5s;
}

.stat-card:nth-child(3) {
    animation-delay: -3s;
}

.stat-card:nth-child(4) {
    animation-delay: -4.5s;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

/* ===== Service Cards ===== */
.service-card {
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.service-card:hover {
    box-shadow: 0 20px 60px -20px rgba(255, 107, 53, 0.15);
}

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

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

/* ===== Navbar ===== */
.nav-scrolled {
    background-color: rgba(14, 15, 20, 0.92) !important;
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(92, 96, 107, 0.2);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

#navbar {
    background-color: transparent;
}

/* ===== Custom 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='%237a7d87' 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;
}

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

/* ===== Button Ripple Effect ===== */
button, a {
    position: relative;
    overflow: hidden;
}

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

::-webkit-scrollbar-track {
    background: #1a1c22;
}

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

::-webkit-scrollbar-thumb:hover {
    background: #5c606b;
}

/* ===== Mobile Menu Animation ===== */
#mobile-menu {
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== Selection for form inputs ===== */
input:focus,
textarea:focus,
select:focus {
    border-color: #ff6b35 !important;
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.1);
}

/* ===== Responsive Tweaks ===== */
@media (max-width: 768px) {
    .stat-card {
        animation: none !important;
    }
}
