/* ── Base & Reset ── */
*, *::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.4s ease, box-shadow 0.4s ease, backdrop-filter 0.4s ease;
}
#navbar.scrolled {
    background: rgba(6, 9, 16, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 1px 0 rgba(255,255,255,0.05), 0 4px 30px rgba(0,0,0,0.3);
}

/* ── Hero Stat Cards ── */
.stat-card {
    animation: floatIn 0.7s ease-out both;
}
.card-1 { animation-delay: 0.3s; }
.card-2 { animation-delay: 0.5s; }
.card-3 { animation-delay: 0.7s; }
.card-4 { animation-delay: 0.9s; }

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

/* Subtle floating animation after entrance */
.stat-card {
    animation: floatIn 0.7s ease-out both, gentleFloat 4s ease-in-out infinite;
}
.card-2 { animation-delay: 0.5s, 0.5s; animation-name: floatIn, gentleFloat2; }
.card-3 { animation-delay: 0.7s, 1s; animation-name: floatIn, gentleFloat3; }
.card-4 { animation-delay: 0.9s, 1.5s; animation-name: floatIn, gentleFloat4; }

@keyframes gentleFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}
@keyframes gentleFloat2 {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-4px); }
}
@keyframes gentleFloat3 {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}
@keyframes gentleFloat4 {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

/* ── Service Cards ── */
.service-card {
    position: relative;
    overflow: hidden;
}
.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, #34d399, transparent);
    opacity: 0;
    transition: opacity 0.5s ease;
}
.service-card:hover::before {
    opacity: 1;
}

/* ── Gallery ── */
.gallery-item {
    position: relative;
    cursor: pointer;
}
.gallery-item::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(6,9,16,0.4) 0%, transparent 50%);
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
    border-radius: inherit;
}
.gallery-item:hover::after {
    opacity: 1;
}

/* ── Testimonials ── */
.testimonial-card {
    position: relative;
}
.testimonial-card::before {
    content: '\201C';
    position: absolute;
    top: 16px;
    right: 24px;
    font-size: 80px;
    font-family: 'Playfair Display', Georgia, serif;
    color: rgba(52, 211, 153, 0.08);
    line-height: 1;
    pointer-events: none;
}

/* ── Scroll Reveal (progressive enhancement) ── */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(24px);
        transition: opacity 0.7s ease, transform 0.7s ease;
    }
    .reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
    .reveal-delay-1 { transition-delay: 0.1s; }
    .reveal-delay-2 { transition-delay: 0.2s; }
    .reveal-delay-3 { transition-delay: 0.3s; }
    .reveal-delay-4 { transition-delay: 0.4s; }
}

/* ── Mobile Menu ── */
#mobile-menu {
    animation: slideDown 0.3s ease;
}
@keyframes slideDown {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ── Custom Scrollbar ── */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #060910; }
::-webkit-scrollbar-thumb { background: #1a2332; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #2a3a52; }

/* ── 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='%239ca3af' 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 12px center;
    padding-right: 36px;
}

/* ── Utility ── */
::selection {
    background: rgba(16, 185, 129, 0.3);
    color: #f0fdf4;
}
