/* Custom styles for Nyumbani Kwetu Tanzania */

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

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #080e1a;
}
::-webkit-scrollbar-thumb {
    background: #1e293b;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #334155;
}

/* Selection color */
::selection {
    background: rgba(212, 175, 55, 0.3);
    color: #f8fafc;
}

/* Gold shimmer effect for special elements */
@keyframes goldShimmer {
    0% { background-position: -200% center; }
    100% { background-position: 200% center; }
}

/* Subtle pulse for decorative elements */
@keyframes subtlePulse {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 0.8; }
}

/* Scroll reveal base styles - content is visible by default */
.scroll-reveal {
    /* Default state: visible, no animation needed */
}

/* Only apply animation when JS is active and user prefers motion */
@media (prefers-reduced-motion: no-preference) {
    .js-enabled .scroll-reveal {
        opacity: 0;
        transform: translateY(24px);
        transition: opacity 0.6s ease-out, transform 0.6s ease-out;
    }
    .js-enabled .scroll-reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
    .js-enabled .scroll-reveal:nth-child(2) { transition-delay: 0.1s; }
    .js-enabled .scroll-reveal:nth-child(3) { transition-delay: 0.2s; }
    .js-enabled .scroll-reveal:nth-child(4) { transition-delay: 0.3s; }
}

/* Hero text entrance - only for hero, not above-fold critical content */
@keyframes heroFadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.hero-animate {
    animation: heroFadeIn 0.8s ease-out forwards;
}

.hero-animate-delay-1 { animation-delay: 0.2s; opacity: 0; }
.hero-animate-delay-2 { animation-delay: 0.4s; opacity: 0; }
.hero-animate-delay-3 { animation-delay: 0.6s; opacity: 0; }

/* Gold gradient text utility */
.text-gold-gradient {
    background: linear-gradient(135deg, #f0d78c, #d4af37, #b8941f);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Card hover glow effect */
.card-glow:hover {
    box-shadow: 0 0 40px -10px rgba(212, 175, 55, 0.15);
}

/* Input autofill styling for dark theme */
input:-webkit-autofill,
textarea:-webkit-autofill,
select:-webkit-autofill {
    -webkit-box-shadow: 0 0 0 30px #0f172a inset !important;
    -webkit-text-fill-color: #f8fafc !important;
    caret-color: #f8fafc;
}

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

/* Mobile menu transition */
#mobile-menu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}
#mobile-menu.open {
    max-height: 400px;
}
