/* ===== Base & Utilities ===== */
*, *::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;
}

::selection {
    background: rgba(200, 150, 30, 0.3);
    color: #fff;
}

/* ===== Scrollbar ===== */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #0A1628;
}
::-webkit-scrollbar-thumb {
    background: rgba(200, 150, 30, 0.3);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(200, 150, 30, 0.5);
}

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

#navbar.scrolled {
    background: rgba(6, 15, 28, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.05);
}

/* ===== Mobile Menu ===== */
#mobileMenu.open {
    opacity: 1;
    pointer-events: all;
}

#mobileMenu.closed {
    opacity: 0;
    pointer-events: none;
}

.mobile-link {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

/* ===== Hero Floating Cards ===== */
@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); }
}

/* Apply to hero cards */
.absolute.top-0.right-0.w-72 { animation: float1 6s ease-in-out infinite; }
.absolute.top-44.left-0.w-64 { animation: float2 5s ease-in-out infinite 0.5s; }
.absolute.bottom-16.right-8.w-72 { animation: float3 7s ease-in-out infinite 1s; }
.absolute.bottom-0.left-8.w-56 { animation: float4 5.5s ease-in-out infinite 1.5s; }

/* Pause on hover */
.relative.h-\\[500px\\]:hover > div {
    animation-play-state: paused;
}

/* ===== Service Cards ===== */
.service-card {
    opacity: 1;
    transform: translateY(0);
    transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1), 
                border-color 0.5s ease, 
                background-color 0.5s ease;
}

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

/* ===== Scroll Reveal Animations ===== */
/* These are progressive enhancement — content is visible by default.
   JS adds the animated states below the fold. */
.reveal-up {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1), 
                transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

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

/* Stagger delays */
.stagger-1 { transition-delay: 0.1s; }
.stagger-2 { transition-delay: 0.2s; }
.stagger-3 { transition-delay: 0.3s; }
.stagger-4 { transition-delay: 0.4s; }
.stagger-5 { transition-delay: 0.5s; }
.stagger-6 { transition-delay: 0.6s; }

/* ===== 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-up {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== Focus Styles ===== */
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
    outline: 2px solid rgba(200, 150, 30, 0.6);
    outline-offset: 2px;
    border-radius: 4px;
}

/* ===== Mobile Menu Button Animation ===== */
#bar1.open {
    transform: translateY(5px) rotate(45deg);
}
#bar2.open {
    opacity: 0;
    transform: scaleX(0);
}
#bar3.open {
    transform: translateY(-5px) rotate(-45deg);
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .relative.h-\\[500px\\] {
        display: none;
    }
}
