/* ===== Custom Styles for The Evolving Center ===== */

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #1a0d12;
}
::-webkit-scrollbar-thumb {
    background: #4a2035;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #6b2f4d;
}

/* Selection color */
::selection {
    background: rgba(212, 165, 116, 0.3);
    color: #f7ebcc;
}

/* ===== Hero Animations ===== */
.hero-anim {
    opacity: 0;
    transform: translateY(30px);
    animation: heroFadeIn 0.8s ease forwards;
}

.hero-anim:nth-child(1) { animation-delay: 0.2s; }
.hero-anim:nth-child(2) { animation-delay: 0.4s; }
.hero-anim:nth-child(3) { animation-delay: 0.6s; }
.hero-anim:nth-child(4) { animation-delay: 0.8s; }

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

/* ===== Hero Image Animation ===== */
.hero-image {
    opacity: 0;
    transform: translateX(40px);
    animation: heroImageSlide 1s ease 0.5s forwards;
}

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

/* ===== Scroll Reveal ===== */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal[data-reveal] {
    opacity: 0;
    transform: translateY(40px);
}

.reveal[data-reveal].revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Staggered reveal for grid children */
.reveal-grid > * {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal-grid.revealed > *:nth-child(1) { transition-delay: 0.05s; }
.reveal-grid.revealed > *:nth-child(2) { transition-delay: 0.1s; }
.reveal-grid.revealed > *:nth-child(3) { transition-delay: 0.15s; }
.reveal-grid.revealed > *:nth-child(4) { transition-delay: 0.2s; }
.reveal-grid.revealed > *:nth-child(5) { transition-delay: 0.25s; }
.reveal-grid.revealed > *:nth-child(6) { transition-delay: 0.3s; }

.reveal-grid.revealed > * {
    opacity: 1;
    transform: translateY(0);
}

/* ===== Navbar ===== */
.nav-scrolled {
    background: rgba(26, 13, 18, 0.95) !important;
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(212, 165, 116, 0.1);
}

.nav-scrolled .menu-line {
    background: #e0b88a !important;
}

/* ===== Mobile Menu ===== */
.mobile-link {
    opacity: 0;
    transform: translateY(15px);
    transition: opacity 0.3s ease, transform 0.3s 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; }

/* ===== Mobile Menu Button Animation ===== */
#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) {
    transform: rotate(-45deg) translate(3px, -3px);
    width: 1.5rem;
}

/* ===== Image hover effects ===== */
.group img {
    transition: transform 0.7s ease;
}

.group:hover img {
    transform: scale(1.03);
}

/* ===== Gold shimmer on hover ===== */
.group::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(212, 165, 116, 0.03), transparent);
    transition: left 0.6s ease;
    pointer-events: none;
}

.group:hover::after {
    left: 100%;
}

/* ===== 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[data-reveal],
    .reveal-grid > * {
        opacity: 1;
        transform: none;
    }
}

/* ===== Focus styles ===== */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 2px solid #d4a574;
    outline-offset: 2px;
}

/* ===== Input autofill override ===== */
input:-webkit-autofill,
textarea:-webkit-autofill {
    -webkit-box-shadow: 0 0 0 30px #1a0d12 inset !important;
    -webkit-text-fill-color: #f7ebcc !important;
}
