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

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

body {
    background-color: #040a17;
}

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

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

#navbar.scrolled {
    background: rgba(4, 10, 23, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 1px 0 rgba(201, 168, 76, 0.1);
}

.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background: linear-gradient(90deg, #c9a84c, #e8d5a3);
    transition: width 0.3s ease;
}

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

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

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

.mobile-link {
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s 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; }

/* ── Hamburger ── */
.menu-line {
    transition: transform 0.3s ease, opacity 0.3s ease;
}

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

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

#menu-toggle.active .menu-line:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
    width: 1.25rem;
}

/* ── Floating Cards ── */
.floating-card {
    animation: float 6s ease-in-out infinite;
}

.floating-card:nth-child(1) {
    animation-delay: 0s;
}

.floating-card:nth-child(2) {
    animation-delay: -1.5s;
}

.floating-card:nth-child(3) {
    animation-delay: -3s;
}

.floating-card:nth-child(4) {
    animation-delay: -4.5s;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-12px); }
}

/* ── Heritage Cards ── */
.heritage-card {
    transition: transform 0.4s ease, border-color 0.4s ease;
}

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

/* ── Offering Cards ── */
.offering-card {
    transition: transform 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease;
}

.offering-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

/* ── Gallery Items ── */
.gallery-item {
    cursor: pointer;
    transition: transform 0.4s ease;
}

.gallery-item:hover {
    transform: scale(1.02);
}

/* ── Scroll Animations ── */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal.visible {
    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; }

/* ── Gold Gradient Text (for special elements) ── */
.text-gold-gradient {
    background: linear-gradient(135deg, #e8d5a3, #c9a84c, #b8943f);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ── Form Focus States ── */
input:focus, select:focus, textarea:focus {
    background: rgba(4, 10, 23, 0.8);
}

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

::-webkit-scrollbar-track {
    background: #040a17;
}

::-webkit-scrollbar-thumb {
    background: rgba(201, 168, 76, 0.3);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(201, 168, 76, 0.5);
}

/* ── Responsive ── */
@media (max-width: 768px) {
    .floating-card {
        display: none;
    }

    #hero {
        min-height: auto;
        padding-top: 100px;
        padding-bottom: 80px;
    }

    h1 {
        font-size: 2.5rem !important;
        line-height: 1.15 !important;
    }

    @media (min-width: 769px) {
        h1 {
            font-size: 3.5rem !important;
        }
    }
}

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