/* ─── BASE ─── */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

body {
    background-color: #08140e;
    color: #faf8f3;
    font-family: 'Inter', system-ui, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

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

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

/* ─── MOBILE MENU ─── */
#mobile-menu.open {
    opacity: 1;
    pointer-events: all;
}

#mobile-menu.open .mobile-link {
    animation: fadeUp 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 fadeUp {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Hamburger animation */
body.menu-open #bar1 {
    transform: translateY(6px) rotate(45deg);
}
body.menu-open #bar2 {
    opacity: 0;
    transform: scaleX(0);
}
body.menu-open #bar3 {
    transform: translateY(-6px) rotate(-45deg);
    width: 1.5rem;
}

/* ─── HERO STAT CARDS ─── */
.stat-card {
    animation: float 6s ease-in-out infinite;
}

.stat-card:nth-child(2) { animation-delay: -1.5s; }
.stat-card:nth-child(3) { animation-delay: -3s; }
.stat-card:nth-child(4) { animation-delay: -4.5s; }

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

/* ─── MENU TABS ─── */
.menu-tab {
    color: rgba(250, 248, 243, 0.5);
    background: transparent;
    border: none;
    cursor: pointer;
    transition: color 0.3s ease, background 0.3s ease;
}

.menu-tab.active {
    color: #0f261a;
    background: #c9a84c;
    box-shadow: 0 4px 16px rgba(201, 168, 76, 0.3);
}

.menu-tab:not(.active):hover {
    color: #faf8f3;
    background: rgba(201, 168, 76, 0.1);
}

/* ─── SCROLL REVEAL ─── */
[data-reveal] {
    opacity: 0;
    transform: translateY(32px);
    transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
                transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

[data-reveal].revealed {
    opacity: 1;
    transform: translateY(0);
}

[data-reveal-delay="1"] { transition-delay: 0.1s; }
[data-reveal-delay="2"] { transition-delay: 0.2s; }
[data-reveal-delay="3"] { transition-delay: 0.3s; }
[data-reveal-delay="4"] { transition-delay: 0.4s; }

/* Grid reveal for gallery/about */
.reveal-grid > * {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s cubic-bezier(0.22, 1, 0.36, 1),
                transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal-grid.revealed > *:nth-child(1) { transition-delay: 0s;    opacity: 1; transform: translateY(0); }
.reveal-grid.revealed > *:nth-child(2) { transition-delay: 0.1s;  opacity: 1; transform: translateY(0); }
.reveal-grid.revealed > *:nth-child(3) { transition-delay: 0.2s;  opacity: 1; transform: translateY(0); }
.reveal-grid.revealed > *:nth-child(4) { transition-delay: 0.3s;  opacity: 1; transform: translateY(0); }
.reveal-grid.revealed > *:nth-child(5) { transition-delay: 0.4s;  opacity: 1; transform: translateY(0); }
.reveal-grid.revealed > *:nth-child(6) { transition-delay: 0.5s;  opacity: 1; transform: translateY(0); }
.reveal-grid.revealed > *:nth-child(7) { transition-delay: 0.6s;  opacity: 1; transform: translateY(0); }
.reveal-grid.revealed > *:nth-child(8) { transition-delay: 0.7s;  opacity: 1; transform: translateY(0); }

/* ─── REDUCED MOTION ─── */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
    html { scroll-behavior: auto; }
    
    [data-reveal],
    .reveal-grid > * {
        opacity: 1;
        transform: none;
    }
}

/* ─── FOCUS STYLES ─── */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid #c9a84c;
    outline-offset: 2px;
    border-radius: 4px;
}

/* ─── SCROLLBAR ─── */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #08140e;
}
::-webkit-scrollbar-thumb {
    background: rgba(201, 168, 76, 0.3);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(201, 168, 76, 0.5);
}
