/* ─── Reset & Base ─── */
*, *::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: 'Space Grotesk', sans-serif;
    background-color: #1a0b15;
    color: #ffffff;
    overflow-x: hidden;
}

::selection {
    background: #F59E0B;
    color: #1a0b15;
}

/* ─── Navbar ─── */
#navbar {
    backdrop-filter: blur(0px);
    -webkit-backdrop-filter: blur(0px);
}

#navbar.scrolled {
    background: rgba(26, 11, 21, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.06);
}

/* ─── Mobile Menu ─── */
#mobile-menu.open {
    transform: translateX(0);
}

#mobile-menu.closed {
    transform: translateX(100%);
}

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

/* ─── Hero ─── */
.hero-bg {
    will-change: transform;
}

.hero-scrim {
    background: linear-gradient(
        to right,
        rgba(26, 11, 21, 0.95) 0%,
        rgba(26, 11, 21, 0.85) 40%,
        rgba(26, 11, 21, 0.5) 70%,
        rgba(26, 11, 21, 0.2) 100%
    );
}

/* ─── Floating Shapes ─── */
@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(var(--rotation, 12deg)); }
    50% { transform: translateY(-20px) rotate(var(--rotation, 12deg)); }
}

.shape-1 { --rotation: 12deg; animation: float 6s ease-in-out infinite; }
.shape-2 { --rotation: 0deg; animation: float 5s ease-in-out infinite; }
.shape-3 { --rotation: 0deg; animation: float 4s ease-in-out infinite; }
.shape-4 { --rotation: -12deg; animation: float 7s ease-in-out infinite; }
.shape-5 { --rotation: 0deg; animation: float 3.5s ease-in-out infinite; }
.shape-6 { --rotation: 45deg; animation: float 5.5s ease-in-out infinite; }

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

.reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .reveal {
        transition: none;
        opacity: 1;
        transform: none;
    }
    @keyframes float {
        0%, 100% { transform: translateY(0) rotate(var(--rotation, 12deg)); }
        50% { transform: translateY(-10px) rotate(var(--rotation, 12deg)); }
    }
    html { scroll-behavior: auto; }
}

/* ─── Custom Scrollbar ─── */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #1a0b15;
}
::-webkit-scrollbar-thumb {
    background: #6B2F5B;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #F59E0B;
}

/* ─── Focus Styles ─── */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid #F59E0B;
    outline-offset: 2px;
}

/* ─── Utility ─── */
@media (max-width: 768px) {
    .font-display {
        font-weight: 700;
    }
}
