/* Base & Utilities */
html {
    scroll-behavior: smooth;
}

body {
    overflow-x: hidden;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #2E1327;
}
::-webkit-scrollbar-thumb {
    background: #6B2F5B;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #8B3562;
}

/* Selection color */
::selection {
    background: #E8A838;
    color: #2E1327;
}

/* Hero fade animations — above the fold, always visible */
.hero-fade {
    opacity: 1;
    animation: heroFadeIn 0.8s ease-out forwards;
}

.hero-fade:nth-child(2) { animation-delay: 0.15s; }
.hero-fade:nth-child(3) { animation-delay: 0.3s; }
.hero-fade:nth-child(4) { animation-delay: 0.45s; }
.hero-fade:nth-child(5) { animation-delay: 0.6s; }

@keyframes heroFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Scroll reveal — progressive enhancement, only below the fold */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.7s ease-out, transform 0.7s ease-out;
}

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

/* Reduce motion preference */
@media (prefers-reduced-motion: reduce) {
    .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
    html {
        scroll-behavior: auto;
    }
    .hero-fade {
        animation: none;
        opacity: 1;
    }
}

/* Navbar states */
#navbar.scrolled {
    background: rgba(46, 19, 39, 0.95);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(232, 168, 56, 0.1);
}

#navbar.scrolled a:not([class*="bg-"]) {
    color: #F9F0F7;
}

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

.mobile-link {
    opacity: 1;
}

/* Service card hover glow */
.group:hover .group-hover\:bg-amber-500\/25 {
    background-color: rgba(232, 168, 56, 0.25);
}

/* Smooth image loading */
img {
    image-rendering: -webkit-optimize-contrast;
}

/* Focus visible styles */
:focus-visible {
    outline: 2px solid #E8A838;
    outline-offset: 2px;
    border-radius: 4px;
}

/* Form focus states */
input:focus,
textarea:focus {
    border-color: rgba(232, 168, 56, 0.6) !important;
    box-shadow: 0 0 0 1px rgba(232, 168, 56, 0.2) !important;
}

/* Mobile menu button animation */
.menu-line {
    transition: all 0.3s ease;
}

#menuBtn.active .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(3px, 3px);
}
#menuBtn.active .menu-line:nth-child(2) {
    opacity: 0;
}
#menuBtn.active .menu-line:nth-child(3) {
    width: 1.5rem;
    transform: rotate(-45deg) translate(3px, -3px);
}
