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

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

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    overflow-x: hidden;
}

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

::-webkit-scrollbar-track {
    background: #0e1f33;
}

::-webkit-scrollbar-thumb {
    background: #1e3a5f;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #d4a017;
}

/* Selection */
::selection {
    background: rgba(212, 160, 23, 0.3);
    color: #fff;
}

/* Animation Keyframes */
@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(2deg); }
}

@keyframes float-delay {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-15px) rotate(-2deg); }
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.2); }
}

@keyframes pulse-delay {
    0%, 100% { opacity: 0.6; transform: scale(1); }
    50% { opacity: 0.3; transform: scale(1.3); }
}

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

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Animation Classes */
.animate-float {
    animation: float 6s ease-in-out infinite;
}

.animate-float-delay {
    animation: float-delay 8s ease-in-out infinite;
}

.animate-pulse {
    animation: pulse 3s ease-in-out infinite;
}

.animate-pulse-delay {
    animation: pulse-delay 2.5s ease-in-out infinite;
}

.animate-fade-in-up {
    animation: fadeInUp 0.8s ease-out forwards;
}

.animate-fade-in-up-delay {
    animation: fadeInUp 0.8s ease-out 0.2s forwards;
    opacity: 0;
}

.animate-fade-in-up-delay-2 {
    animation: fadeInUp 0.8s ease-out 0.4s forwards;
    opacity: 0;
}

.animate-fade-in-up-delay-3 {
    animation: fadeInUp 0.8s ease-out 0.6s forwards;
    opacity: 0;
}

/* Scroll Reveal */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

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

/* Service Card Stagger */
.service-card {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

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

/* Gallery Items */
.gallery-item {
    opacity: 0;
    transform: scale(0.95);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.gallery-item.revealed {
    opacity: 1;
    transform: scale(1);
}

/* Testimonial Cards */
.testimonial-card {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.testimonial-card.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Navbar Scroll Effect */
.navbar-scrolled {
    background: rgba(14, 31, 51, 0.95) !important;
    backdrop-filter: blur(20px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

/* Mobile Menu Transitions */
.mobile-menu-open {
    opacity: 1 !important;
    pointer-events: all !important;
}

/* Smooth Image Loading */
img {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

/* Focus Styles for Accessibility */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
    outline: 2px solid #d4a017;
    outline-offset: 2px;
    border-radius: 4px;
}

/* Responsive Typography */
@media (max-width: 640px) {
    .font-display {
        line-height: 1.1;
    }
}

/* Print Styles */
@media print {
    .fixed, nav, #navbar {
        position: relative !important;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
}

/* 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;
    }
    
    .reveal, .service-card, .gallery-item, .testimonial-card {
        opacity: 1;
        transform: none;
    }
}
