/* Base styles and custom properties */
:root {
    --color-midnight-900: #0F172A;
    --color-mint-500: #34D399;
    --color-mint-600: #059669;
}

html {
    scroll-behavior: smooth;
}

body {
    overflow-x: hidden;
}

/* Smooth scroll offset for fixed nav */
section[id] {
    scroll-margin-top: 80px;
}

/* Navigation link underline animation */
.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--color-mint-500);
    transition: width 0.3s ease;
}

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

/* Navbar scroll state */
.navbar-scrolled {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    box-shadow: 0 1px 0 rgba(15, 23, 42, 0.08);
}

/* Mobile menu animations */
.menu-line {
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.27, 1.55);
}

#mobile-toggle.active .menu-line:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
    width: 24px;
    margin-right: 0;
}

#mobile-toggle.active .menu-line:nth-child(2) {
    opacity: 0;
    transform: translateX(10px);
}

#mobile-toggle.active .menu-line:nth-child(3) {
    width: 24px;
    margin-left: 0;
}

/* Mobile nav link hover */
.mobile-nav-link {
    position: relative;
}

.mobile-nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--color-mint-500);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

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

/* Scroll reveal animations */
.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);
}

/* Staggered reveal delays */
.reveal:nth-child(1) { transition-delay: 0.05s; }
.reveal:nth-child(2) { transition-delay: 0.1s; }
.reveal:nth-child(3) { transition-delay: 0.15s; }
.reveal:nth-child(4) { transition-delay: 0.2s; }
.reveal:nth-child(5) { transition-delay: 0.25s; }

/* Product card image zoom on hover */
.group:hover .group-hover\:scale-110 {
    transform: scale(1.1);
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--color-midnight-900);
}

::-webkit-scrollbar-thumb {
    background: var(--color-mint-500);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--color-mint-600);
}

/* Reduced motion preference */
@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 {
        opacity: 1;
        transform: none;
    }
}

/* Focus visible for accessibility */
:focus-visible {
    outline: 2px solid var(--color-mint-500);
    outline-offset: 2px;
}

/* Button press effect */
button:active,
a:active {
    transform: scale(0.98);
}

/* Selection color */
::selection {
    background: var(--color-mint-500);
    color: var(--color-midnight-900);
}
