/* === Base & Typography === */
*, *::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(251, 191, 36, 0.3);
    color: #f5f0f7;
}

/* === Scrollbar === */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #0d0614;
}
::-webkit-scrollbar-thumb {
    background: #3d183d;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #542254;
}

/* === Animations === */
@keyframes pulse-slow {
    0%, 100% { opacity: 0.3; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.05); }
}

.animate-pulse-slow {
    animation: pulse-slow 4s ease-in-out infinite;
}

/* === Reveal Animations === */
.reveal-up,
.reveal-left,
.reveal-right {
    opacity: 1;
    transform: none;
    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 {
    transform: translateY(0);
}

.reveal-left {
    transform: translateX(0);
}

.reveal-right {
    transform: translateX(0);
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    .reveal-up,
    .reveal-left,
    .reveal-right {
        opacity: 1;
        transform: none;
        transition: none;
    }
    
    .animate-pulse-slow {
        animation: none;
        opacity: 0.3;
    }
    
    html {
        scroll-behavior: auto;
    }
}

/* === Mobile Menu === */
#mobileMenu.open {
    opacity: 1;
    pointer-events: all;
}

#mobileMenu.closed {
    opacity: 0;
    pointer-events: none;
}

.mobile-link {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.4s ease, transform 0.4s ease, color 0.3s ease;
}

#mobileMenu.closed .mobile-link {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.3s ease, transform 0.3s ease, color 0.3s ease;
}

#mobileMenu.closed .mobile-link:nth-child(1) { transition-delay: 0s; }
#mobileMenu.closed .mobile-link:nth-child(2) { transition-delay: 0.05s; }
#mobileMenu.closed .mobile-link:nth-child(3) { transition-delay: 0.1s; }
#mobileMenu.closed .mobile-link:nth-child(4) { transition-delay: 0.15s; }
#mobileMenu.closed .mobile-link:nth-child(5) { transition-delay: 0.2s; }

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

/* === Menu lines animation === */
.menu-line {
    display: block;
}

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

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

#menuBtn.active .menu-line:nth-child(3) {
    width: 24px;
    transform: rotate(-45deg) translate(5px, -5px);
}

/* === Navbar transition === */
#navbar.scrolled {
    background: rgba(7, 3, 12, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(251, 191, 36, 0.1);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
}

/* === Gold shimmer on hover for cards === */
.reveal-up:hover {
    border-color: rgba(251, 191, 36, 0.3) !important;
}

/* === Button focus styles === */
a:focus-visible,
button:focus-visible {
    outline: 2px solid #fbbf24;
    outline-offset: 2px;
    border-radius: 4px;
}

/* === Image loading === */
img {
    image-rendering: auto;
    loading: lazy;
}

/* === Smooth section transitions === */
section {
    position: relative;
}
