/* ─── Base & 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, sans-serif;
    overflow-x: hidden;
}

::selection {
    background: #d4a017;
    color: #0d1b2a;
}

/* ─── Scrollbar ─── */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #1a2744;
}
::-webkit-scrollbar-thumb {
    background: #d4a017;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #e6b422;
}

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

#navbar.scrolled {
    background: rgba(13, 27, 42, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding-top: 0;
    padding-bottom: 0;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: #d4a017;
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

/* ─── 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; }
#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; }

/* ─── Hero ─── */
#hero {
    position: relative;
}

#hero::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 120px;
    background: linear-gradient(to top, #ffffff, transparent);
    z-index: 1;
    pointer-events: none;
}

/* ─── Service Cards ─── */
.service-card {
    transform: translateY(0);
    transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.5s ease;
}

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

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

/* ─── Animations ─── */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.animate-on-scroll {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1), transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

.animate-on-scroll.scale-in.visible {
    transform: scale(1);
}

/* Stagger delays */
.delay-100 { transition-delay: 0.1s; }
.delay-200 { transition-delay: 0.2s; }
.delay-300 { transition-delay: 0.3s; }
.delay-400 { transition-delay: 0.4s; }
.delay-500 { transition-delay: 0.5s; }
.delay-600 { transition-delay: 0.6s; }

/* ─── Button ripple ─── */
button, a {
    position: relative;
    overflow: hidden;
}

/* ─── Form focus ─── */
input:focus, textarea:focus {
    border-color: #d4a017 !important;
    box-shadow: 0 0 0 4px rgba(212, 160, 23, 0.15) !important;
}

/* ─── Responsive ─── */
@media (max-width: 768px) {
    #hero::after {
        height: 60px;
    }

    .font-display {
        word-break: break-word;
    }
}

/* ─── Reduced motion ─── */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }

    html {
        scroll-behavior: auto;
    }

    .animate-on-scroll {
        opacity: 1;
        transform: none;
    }
}
