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

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

body {
    overflow-x: hidden;
}

::selection {
    background: #c8a24e;
    color: #0f1f3d;
}

/* ── Scrollbar ── */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #0f1f3d;
}
::-webkit-scrollbar-thumb {
    background: #c8a24e;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #e0d06e;
}

/* ── Navigation ── */
#navbar {
    background: transparent;
}

#navbar.scrolled {
    background: rgba(15, 31, 61, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 1px 30px rgba(0, 0, 0, 0.3);
}

.nav-link {
    position: relative;
}

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

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

.nav-link:hover {
    color: #c8a24e !important;
}

/* ── Mobile Menu ── */
.menu-line {
    display: block;
}

#mobile-menu.open {
    opacity: 1 !important;
    pointer-events: all !important;
}

#mobile-menu.open .mobile-link {
    animation: fadeDown 0.4s ease forwards;
    opacity: 0;
}

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

@keyframes fadeDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.menu-toggle.active .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(3px, 3px);
}
.menu-toggle.active .menu-line:nth-child(2) {
    opacity: 0;
}
.menu-toggle.active .menu-line:nth-child(3) {
    transform: rotate(-45deg) translate(3px, -3px);
    width: 24px;
    margin-left: 0;
}

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

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

/* ── Reveal Animations ── */
.reveal-up {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* ── Service Cards ── */
.service-card {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.service-card:nth-child(1) { transition-delay: 0ms; }
.service-card:nth-child(2) { transition-delay: 80ms; }
.service-card:nth-child(3) { transition-delay: 160ms; }
.service-card:nth-child(4) { transition-delay: 240ms; }
.service-card:nth-child(5) { transition-delay: 320ms; }
.service-card:nth-child(6) { transition-delay: 400ms; }

/* ── Why Us Cards ── */
#why-us .group {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

#why-us .group.visible {
    opacity: 1;
    transform: translateY(0);
}

#why-us .group:nth-child(1) { transition-delay: 0ms; }
#why-us .group:nth-child(2) { transition-delay: 100ms; }
#why-us .group:nth-child(3) { transition-delay: 200ms; }
#why-us .group:nth-child(4) { transition-delay: 300ms; }

/* ── About Section ── */
#about .group {
    opacity: 0;
    transform: translateX(-20px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

#about .group.visible {
    opacity: 1;
    transform: translateX(0);
}

/* ── Contact Form ── */
#contact-form input:focus,
#contact-form textarea:focus {
    border-bottom-color: #c8a24e !important;
}

#contact-form input::placeholder,
#contact-form textarea::placeholder {
    color: #9bb0d6;
    opacity: 0.6;
}

/* ── Divider Lines ── */
.w-20.h-px.bg-gold-400 {
    transition: width 0.5s ease;
}

/* ── Form Success ── */
#form-success {
    animation: fadeIn 0.4s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

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

/* ── 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,
    .service-card,
    #why-us .group {
        opacity: 1;
        transform: none;
    }
}
