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

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

body {
    margin: 0;
    overflow-x: hidden;
}

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

/* Scrollbar */
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: #0a1628;
}
::-webkit-scrollbar-thumb {
    background: #c9a84c;
    border-radius: 3px;
}

/* Scroll Reveal - Progressive Enhancement */
.reveal-section {
    opacity: 1;
    transform: none;
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

@media (prefers-reduced-motion: no-preference) {
    .reveal-section {
        opacity: 0;
        transform: translateY(40px);
    }
    .reveal-section.revealed {
        opacity: 1;
        transform: translateY(0);
    }
    .reveal-section:nth-child(2) { transition-delay: 0.1s; }
    .reveal-section:nth-child(3) { transition-delay: 0.2s; }
    .reveal-section:nth-child(4) { transition-delay: 0.3s; }
}

/* Hero Animations */
@media (prefers-reduced-motion: no-preference) {
    .hero-headline {
        opacity: 0;
        transform: translateY(30px);
        animation: heroEntrance 1s cubic-bezier(0.16, 1, 0.3, 1) 0.2s forwards;
    }
    .hero-subtitle {
        opacity: 0;
        transform: translateY(20px);
        animation: heroEntrance 1s cubic-bezier(0.16, 1, 0.3, 1) 0.1s forwards;
    }
    .hero-desc {
        opacity: 0;
        transform: translateY(20px);
        animation: heroEntrance 1s cubic-bezier(0.16, 1, 0.3, 1) 0.3s forwards;
    }
    .hero-cta {
        opacity: 0;
        transform: translateY(20px);
        animation: heroEntrance 1s cubic-bezier(0.16, 1, 0.3, 1) 0.4s forwards;
    }
}

@keyframes heroEntrance {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Gallery Hover */
.gallery-item {
    cursor: pointer;
}

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

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

.mobile-link {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.4s ease, transform 0.4s ease, color 0.3s ease;
}

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

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

/* Navbar scroll state */
#navbar.scrolled {
    background: rgba(10, 22, 40, 0.95);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(201, 168, 76, 0.1);
}

/* Service card stagger */
@media (prefers-reduced-motion: no-preference) {
    .service-card {
        opacity: 0;
        transform: translateY(30px);
    }
    .service-card.revealed {
        opacity: 1;
        transform: translateY(0);
    }
    .service-card:nth-child(1) { transition-delay: 0s; }
    .service-card:nth-child(2) { transition-delay: 0.08s; }
    .service-card:nth-child(3) { transition-delay: 0.16s; }
    .service-card:nth-child(4) { transition-delay: 0.24s; }
    .service-card:nth-child(5) { transition-delay: 0.32s; }
    .service-card:nth-child(6) { transition-delay: 0.4s; }
}

/* Gallery stagger */
@media (prefers-reduced-motion: no-preference) {
    .gallery-item {
        opacity: 0;
        transform: scale(0.97);
    }
    .gallery-item.revealed {
        opacity: 1;
        transform: scale(1);
    }
    .gallery-item:nth-child(1) { transition-delay: 0s; }
    .gallery-item:nth-child(2) { transition-delay: 0.06s; }
    .gallery-item:nth-child(3) { transition-delay: 0.12s; }
    .gallery-item:nth-child(4) { transition-delay: 0.18s; }
    .gallery-item:nth-child(5) { transition-delay: 0.24s; }
    .gallery-item:nth-child(6) { transition-delay: 0.3s; }
}

/* Smooth focus outlines */
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
    outline: 2px solid #c9a84c;
    outline-offset: 2px;
}

/* 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='%23c9a84c' 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 1rem center;
    padding-right: 2.5rem;
}
