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

html {
    scroll-behavior: smooth;
    -webkit-tap-highlight-color: transparent;
}

body {
    overflow-x: hidden;
}

/* Selection */
::selection {
    background: rgba(201, 168, 76, 0.3);
    color: #fff;
}

/* Navbar */
#navbar {
    transition: background 0.4s ease, box-shadow 0.4s ease, backdrop-filter 0.4s ease;
}

#navbar.scrolled {
    background: rgba(4, 8, 20, 0.85);
    backdrop-filter: blur(20px);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.05);
}

/* Mobile menu */
.menu-line {
    transition: transform 0.3s ease, opacity 0.3s ease;
}

#mobileMenu.open .menu-line:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

#mobileMenu.open .menu-line:nth-child(2) {
    opacity: 0;
}

#mobileMenu.open .menu-line:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
    width: 24px;
}

/* Service cards */
.service-card {
    opacity: 1;
    transform: translateY(0);
}

@media (prefers-reduced-motion: no-preference) {
    .service-card {
        opacity: 0;
        transform: translateY(24px);
        transition: opacity 0.6s ease, transform 0.6s ease, border-color 0.5s ease, background 0.5s ease;
    }

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

/* Project cards */
.project-card {
    opacity: 1;
}

@media (prefers-reduced-motion: no-preference) {
    .project-card {
        opacity: 0;
        transform: scale(0.97);
        transition: opacity 0.6s ease, transform 0.6s ease;
    }

    .project-card.visible {
        opacity: 1;
        transform: scale(1);
    }
}

/* Floating stat cards animation */
@media (prefers-reduced-motion: no-preference) {
    .float-1 { animation: float1 6s ease-in-out infinite; }
    .float-2 { animation: float2 7s ease-in-out infinite; }
    .float-3 { animation: float3 5.5s ease-in-out infinite; }
    .float-4 { animation: float4 8s ease-in-out infinite; }
}

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

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

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

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

/* Gold shimmer on CTA buttons */
@keyframes shimmer {
    0% { background-position: -200% center; }
    100% { background-position: 200% center; }
}

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

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='rgba(255,255,255,0.4)' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

/* Smooth scroll offset for fixed nav */
section[id] {
    scroll-margin-top: 80px;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    html {
        scroll-behavior: auto;
    }
}
