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

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

body {
    margin: 0;
    overflow-x: hidden;
}

::selection {
    background: rgba(245, 197, 24, 0.3);
    color: #2A0A30;
}

/* Scroll reveal — progressive enhancement, hidden by default */
.scroll-reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .scroll-reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
    html {
        scroll-behavior: auto;
    }
}

/* Navbar */
#navbar {
    background: transparent;
}

#navbar.scrolled {
    background: rgba(255, 255, 255, 0.92);
    backdrop-blur-md;
    border-bottom: 1px solid rgba(123, 45, 139, 0.08);
    box-shadow: 0 1px 0 rgba(123, 45, 139, 0.06);
}

.nav-link {
    position: relative;
}

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

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

#navbar.scrolled .nav-logo {
    color: #2A0A30;
}

#navbar.scrolled .nav-link {
    color: #5E1F6A;
}

#navbar.scrolled .nav-link:hover {
    color: #B8860B;
}

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

#mobile-menu.open .mobile-link {
    animation: fadeUp 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

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

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Hamburger */
.menu-line {
    width: 20px;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

#menu-btn.active .menu-line:first-child {
    transform: rotate(45deg) translate(5px, 5px);
}

#menu-btn.active .menu-line:last-child {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* Smooth image loading */
img {
    display: block;
}

/* Subtle focus styles */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 2px solid #F5C518;
    outline-offset: 2px;
    border-radius: 4px;
}

/* Thin scrollbar */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: #F9F0FB;
}

::-webkit-scrollbar-thumb {
    background: #D798E0;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #A84BB8;
}
