/* Custom styles for Homestead Studio Suites */

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

/* Selection color */
::selection {
    background-color: rgba(200, 169, 126, 0.3);
    color: #E8D5C0;
}

/* Scroll reveal base - always visible by default */
.scroll-reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1), transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Scroll reveal hidden state - applied via JS for progressive enhancement */
.scroll-reveal.revealed {
    opacity: 0;
    transform: translateY(30px);
}

@media (prefers-reduced-motion: no-preference) {
    .scroll-reveal.revealed {
        opacity: 0;
        transform: translateY(30px);
    }
}

/* Navbar styles */
#navbar {
    background: transparent;
}

#navbar.scrolled {
    background: rgba(15, 20, 25, 0.92);
    backdrop-blur-xl;
    border-bottom: 1px solid rgba(200, 169, 126, 0.08);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

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

/* Menu toggle animation */
.menu-line:last-child {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#menu-toggle.active .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(3px, 3px);
}

#menu-toggle.active .menu-line:nth-child(2) {
    opacity: 0;
}

#menu-toggle.active .menu-line:nth-child(3) {
    width: 20px;
    transform: rotate(-45deg) translate(3px, -3px);
}

/* Mobile link animation */
.mobile-link {
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease, color 0.3s ease;
}

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

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

/* Input autofill styling */
input:-webkit-autofill,
textarea:-webkit-autofill {
    -webkit-box-shadow: 0 0 0 30px #161D24 inset !important;
    -webkit-text-fill-color: #E8D5C0 !important;
}

/* Subtle image hover glow */
.group:hover img {
    filter: brightness(1.05);
}

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

::-webkit-scrollbar-track {
    background: #0F1419;
}

::-webkit-scrollbar-thumb {
    background: rgba(200, 169, 126, 0.3);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(200, 169, 126, 0.5);
}

/* Form focus ring animation */
input:focus,
textarea:focus {
    animation: focusRing 0.3s ease forwards;
}

@keyframes focusRing {
    from { box-shadow: 0 0 0 0 rgba(200, 169, 126, 0.2); }
    to { box-shadow: 0 0 0 3px rgba(200, 169, 126, 0.1); }
}

/* Fade-in for hero elements on load */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-animate {
    animation: fadeInUp 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.hero-animate:nth-child(1) { animation-delay: 0.1s; opacity: 0; }
.hero-animate:nth-child(2) { animation-delay: 0.25s; opacity: 0; }
.hero-animate:nth-child(3) { animation-delay: 0.4s; opacity: 0; }
.hero-animate:nth-child(4) { animation-delay: 0.55s; opacity: 0; }

/* Gold shimmer on hover for CTA buttons */
@keyframes shimmer {
    0% { background-position: -200% center; }
    100% { background-position: 200% center; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    .scroll-reveal {
        opacity: 1 !important;
        transform: none !important;
    }
    .hero-animate {
        animation: none;
        opacity: 1;
    }
    .group:hover img {
        transition: none;
    }
}
