/* Base & Reset */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

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

body {
    font-family: 'Inter', system-ui, sans-serif;
    overflow-x: hidden;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #2a0838;
}
::-webkit-scrollbar-thumb {
    background: #5B2C6F;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #7c3aed;
}

/* Selection */
::selection {
    background: #F59E0B;
    color: #2a0838;
}

/* Clip diagonal for background shapes */
.clip-diagonal {
    clip-path: polygon(50% 0%, 100% 0%, 100% 100%, 0% 100%);
}

/* Marquee Animation */
@keyframes marquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

.animate-marquee {
    animation: marquee 30s linear infinite;
}

/* Product Card Hover */
.product-card {
    will-change: transform;
}

.product-card:hover {
    transform: translateY(-4px);
}

/* Service Card Hover */
.service-card {
    will-change: transform;
}

.service-card:hover {
    transform: translateY(-4px);
}

/* Gallery Item Hover */
.gallery-item {
    overflow: hidden;
    position: relative;
}

.gallery-item::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(42, 8, 56, 0.3) 0%, transparent 50%);
    opacity: 0;
    transition: opacity 0.5s ease;
}

.gallery-item:hover::after {
    opacity: 1;
}

/* Navbar Scroll State */
nav.scrolled {
    background: rgba(42, 8, 56, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

nav.scrolled .menu-line {
    background: #fff;
}

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

#mobileMenu .mobile-link {
    transform: translateY(20px);
    opacity: 0;
    transition: all 0.4s ease;
}

#mobileMenu.open .mobile-link {
    transform: translateY(0);
    opacity: 1;
}

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

/* Mobile Menu Button Animation */
.menu-btn-active .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}
.menu-btn-active .menu-line:nth-child(2) {
    opacity: 0;
}
.menu-btn-active .menu-line:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
    width: 1.25rem;
}

/* Scroll Reveal (progressive enhancement) */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(30px);
        transition: opacity 0.8s ease, transform 0.8s ease;
    }

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

    .reveal-delay-1 { transition-delay: 0.1s; }
    .reveal-delay-2 { transition-delay: 0.2s; }
    .reveal-delay-3 { transition-delay: 0.3s; }
    .reveal-delay-4 { transition-delay: 0.4s; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
    html {
        scroll-behavior: auto;
    }
    .animate-marquee {
        animation: none;
    }
}

/* Focus visible */
*:focus-visible {
    outline: 2px solid #F59E0B;
    outline-offset: 2px;
}

/* Form select arrow */
select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23F59E0B' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

/* Aspect ratio utilities */
.aspect-\[4\/3\] {
    aspect-ratio: 4 / 3;
}
