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

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

body {
    overflow-x: hidden;
}

.nav-text {
    transition: color 0.3s ease;
}

.nav-link {
    position: relative;
}

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

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

.scroll-line {
    animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes scrollPulse {
    0%, 100% { opacity: 0.3; transform: scaleY(0.5); transform-origin: top; }
    50% { opacity: 1; transform: scaleY(1); }
}

.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94), transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

/* Mobile menu animations */
#menu-toggle span {
    transition: transform 0.3s ease, opacity 0.3s ease;
}

#menu-toggle.active span:nth-child(1) {
    transform: translateY(4px) rotate(45deg);
}

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

#menu-toggle.active span:nth-child(3) {
    transform: translateY(-4px) rotate(-45deg);
    width: 1.5rem;
}

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

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

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
    .scroll-line {
        animation: none;
        opacity: 0.5;
    }
    html {
        scroll-behavior: auto;
    }
    * {
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
    }
}

/* Selection color */
::selection {
    background-color: rgba(255, 107, 74, 0.2);
    color: #1A1D20;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: #F5F5F0;
}
::-webkit-scrollbar-thumb {
    background: #3D4044;
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: #FF6B4A;
}
