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

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

body {
    background-color: #030B1A;
    color: #ffffff;
}

::selection {
    background-color: rgba(251, 191, 36, 0.3);
    color: #ffffff;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: #030B1A;
}
::-webkit-scrollbar-thumb {
    background: rgba(251, 191, 36, 0.3);
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(251, 191, 36, 0.5);
}

/* Navbar */
.nav-link {
    position: relative;
}
.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background: #fbbf24;
    transition: width 0.3s ease;
}
.nav-link:hover::after {
    width: 100%;
}

/* Mobile menu */
#mobileMenu.open {
    opacity: 1;
    pointer-events: all;
}
#mobileMenu.closed {
    opacity: 0;
    pointer-events: none;
}
.menu-line {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.menu-btn.active .menu-line:nth-child(1) {
    transform: rotate(45deg);
    top: 3px;
}
.menu-btn.active .menu-line:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}
.menu-btn.active .menu-line:nth-child(3) {
    transform: rotate(-45deg);
    top: 6px;
    width: 6px;
}

/* Hero animations */
.hero-reveal {
    opacity: 0;
    transform: translateY(30px);
    animation: heroReveal 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
.hero-reveal:nth-child(1) { animation-delay: 0.1s; }
.hero-reveal:nth-child(2) { animation-delay: 0.25s; }
.hero-reveal:nth-child(3) { animation-delay: 0.4s; }
.hero-reveal:nth-child(4) { animation-delay: 0.55s; }

.hero-image {
    opacity: 0;
    transform: translateX(40px);
    animation: heroImageSlide 1s cubic-bezier(0.16, 1, 0.3, 1) 0.3s forwards;
}

@keyframes heroReveal {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
@keyframes heroImageSlide {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Scroll dot */
.scroll-dot {
    animation: scrollDot 2s ease-in-out infinite;
}
@keyframes scrollDot {
    0%, 100% { top: 0; opacity: 1; }
    50% { top: 16px; opacity: 0.3; }
}

/* Scroll reveal animations */
.reveal-up,
.reveal-left,
.reveal-right {
    opacity: 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-up {
    transform: translateY(40px);
}
.reveal-left {
    transform: translateX(-40px);
}
.reveal-right {
    transform: translateX(40px);
}

.reveal-up.visible,
.reveal-left.visible,
.reveal-right.visible {
    opacity: 1;
    transform: translate(0, 0);
}

/* Stagger children */
.reveal-up > * {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal-up.visible > *:nth-child(1) { transition-delay: 0s; opacity: 1; transform: translateY(0); }
.reveal-up.visible > *:nth-child(2) { transition-delay: 0.1s; opacity: 1; transform: translateY(0); }
.reveal-up.visible > *:nth-child(3) { transition-delay: 0.2s; opacity: 1; transform: translateY(0); }
.reveal-up.visible > *:nth-child(4) { transition-delay: 0.3s; opacity: 1; transform: translateY(0); }
.reveal-up.visible > *:nth-child(5) { transition-delay: 0.4s; opacity: 1; transform: translateY(0); }

/* Menu tabs */
.menu-tab {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
}
.menu-tab:hover {
    border-color: rgba(251, 191, 36, 0.4);
    color: rgba(255, 255, 255, 0.8);
}
.menu-tab.active {
    background: rgba(251, 191, 36, 0.1);
    border-color: rgba(251, 191, 36, 0.5);
    color: #fbbf24;
}

/* Menu content transitions */
.menu-content {
    animation: menuFadeIn 0.4s ease forwards;
}
@keyframes menuFadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Mobile link hover */
.mobile-link {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.4s ease, transform 0.4s ease, color 0.3s ease;
}
#mobileMenu.open .mobile-link {
    opacity: 1;
    transform: translateY(0);
}
#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; }

/* Image hover zoom */
img {
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.5s ease;
}

/* 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;
    }
    .reveal-up, .reveal-left, .reveal-right {
        opacity: 1;
        transform: none;
    }
    .hero-reveal, .hero-image {
        opacity: 1;
        transform: none;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .font-serif {
        line-height: 1.1;
    }
}
