/* ===== CSS Custom Properties ===== */
:root {
    --midnight-950: #050a14;
    --midnight-900: #0a1628;
    --midnight-800: #0f2140;
    --midnight-700: #142d56;
    --mint-400: #4ade80;
    --mint-500: #2dd4bf;
    --gold-400: #e8c547;
    --gold-500: #d4a843;
    --gold-600: #c49a30;
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    font-family: 'Raleway', sans-serif;
    background-color: var(--midnight-950);
    color: #ffffff;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

::-webkit-scrollbar-track {
    background: var(--midnight-950);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(to bottom, var(--gold-500), var(--mint-500));
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(to bottom, var(--gold-400), var(--mint-400));
}

/* ===== Selection ===== */
::selection {
    background: rgba(45, 212, 191, 0.3);
    color: #ffffff;
}

/* ===== Navbar ===== */
#navbar {
    backdrop-filter: blur(0px);
    -webkit-backdrop-filter: blur(0px);
    transition: backdrop-filter 0.5s ease, background-color 0.5s ease, padding 0.5s ease;
}

#navbar.scrolled {
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    background-color: rgba(5, 10, 20, 0.85);
}

/* ===== Mobile Menu ===== */
.mobile-link {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

#mobileMenu.open .mobile-link {
    opacity: 1;
    transform: translateY(0);
}

#mobileMenu.open .mobile-link:nth-child(1) { transition-delay: 0.1s; }
#mobileMenu.open .mobile-link:nth-child(2) { transition-delay: 0.15s; }
#mobileMenu.open .mobile-link:nth-child(3) { transition-delay: 0.2s; }
#mobileMenu.open .mobile-link:nth-child(4) { transition-delay: 0.25s; }
#mobileMenu.open .mobile-link:nth-child(5) { transition-delay: 0.3s; }

/* ===== Menu Button Animation ===== */
.menu-line {
    transition: transform 0.4s ease, opacity 0.3s ease, width 0.4s ease;
}

#menuBtn.active .menu-line:nth-child(1) {
    transform: translateY(4px) rotate(45deg);
}

#menuBtn.active .menu-line:nth-child(2) {
    opacity: 0;
    width: 0;
}

#menuBtn.active .menu-line:nth-child(3) {
    transform: translateY(-4px) rotate(-45deg);
    width: 7px;
}

/* ===== Service Cards ===== */
.service-card {
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: transform 0.5s cubic-bezier(0.23, 1, 0.32, 1), 
                box-shadow 0.5s ease,
                border-color 0.5s ease;
}

.service-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4), 
                0 0 40px rgba(212, 168, 67, 0.08);
}

/* ===== Gallery ===== */
.gallery-item {
    position: relative;
    cursor: pointer;
}

.gallery-item::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    border: 1px solid rgba(212, 168, 67, 0);
    transition: border-color 0.5s ease;
    pointer-events: none;
}

.gallery-item:hover::after {
    border-color: rgba(212, 168, 67, 0.3);
}

/* ===== Scroll Reveal Animations ===== */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s cubic-bezier(0.23, 1, 0.32, 1), 
                transform 0.8s cubic-bezier(0.23, 1, 0.32, 1);
}

.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; }
.reveal-delay-5 { transition-delay: 0.5s; }
.reveal-delay-6 { transition-delay: 0.6s; }

/* ===== Gold Shimmer Effect ===== */
@keyframes shimmer {
    0% { background-position: -200% center; }
    100% { background-position: 200% center; }
}

.gold-shimmer {
    background: linear-gradient(
        90deg,
        var(--gold-400) 0%,
        var(--gold-300) 25%,
        var(--gold-400) 50%,
        var(--gold-300) 75%,
        var(--gold-400) 100%
    );
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: shimmer 4s linear infinite;
}

/* ===== Floating Particles ===== */
@keyframes float {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    33% { transform: translateY(-10px) rotate(5deg); }
    66% { transform: translateY(5px) rotate(-3deg); }
}

/* ===== Pulse Animation ===== */
@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 0 20px rgba(212, 168, 67, 0.2); }
    50% { box-shadow: 0 0 40px rgba(212, 168, 67, 0.4); }
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    html {
        scroll-padding-top: 60px;
    }
    
    .font-display {
        font-size: clamp(2rem, 8vw, 3.5rem);
    }
}

/* ===== 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 {
        opacity: 1;
        transform: none;
    }
}

/* ===== Focus Styles ===== */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
    outline: 2px solid var(--mint-500);
    outline-offset: 2px;
    border-radius: 4px;
}
