/* ===== Custom Styles for Hair on the Square ===== */

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

/* Base font styles */
body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Navbar styles */
#navbar {
    backdrop-filter: blur(0px);
    -webkit-backdrop-filter: blur(0px);
    transition: background-color 0.5s ease, backdrop-filter 0.5s ease, box-shadow 0.5s ease;
}

#navbar.scrolled {
    background-color: rgba(15, 26, 17, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 1px 30px rgba(0, 0, 0, 0.3);
}

/* Nav links */
.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1.5px;
    background: linear-gradient(90deg, #d4a03f, #e8c77a);
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

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

#mobile-menu.open .mobile-link {
    animation: slideIn 0.4s ease forwards;
    opacity: 0;
}

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

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

/* Mobile menu button active state */
#menu-btn.active #bar1 {
    transform: rotate(45deg) translate(4px, 4px);
}

#menu-btn.active #bar2 {
    opacity: 0;
}

#menu-btn.active #bar3 {
    transform: rotate(-45deg) translate(4px, -4px);
    width: 1.5rem;
}

/* Scroll indicator animation */
@keyframes scrollLine {
    0% {
        height: 0;
        opacity: 0;
    }
    50% {
        height: 40px;
        opacity: 1;
    }
    100% {
        height: 40px;
        opacity: 0;
    }
}

.animate-scroll-line {
    animation: scrollLine 2s ease-in-out infinite;
}

/* Reveal animations - ONLY for below-the-fold content */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
    
    html {
        scroll-behavior: auto;
    }
    
    .animate-scroll-line {
        animation: none;
    }
    
    #mobile-menu.open .mobile-link {
        animation: none;
        opacity: 1;
    }
    
    .group:hover img,
    .reveal img {
        transform: none;
    }
}

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

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

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #2f4e35, #d4a03f);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #3a6142, #e8c77a);
}

/* Selection color */
::selection {
    background: rgba(212, 160, 63, 0.3);
    color: #f2f7f4;
}

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

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

/* Gold gradient text utility */
.text-gold-gradient {
    background: linear-gradient(135deg, #d4a03f 0%, #e8c77a 50%, #d4a03f 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Image loading placeholder */
img {
    background: linear-gradient(135deg, #1f3324 0%, #263f2c 100%);
}

/* Prevent layout shift on images */
img {
    content-visibility: auto;
}

/* Mobile menu overlay fix */
body.menu-open {
    overflow: hidden;
}

/* Card hover glow effect */
.group:hover .group-hover\:border-gold-400\/30 {
    border-color: rgba(212, 160, 63, 0.3);
    box-shadow: 0 0 40px rgba(212, 160, 63, 0.08);
}

/* Testimonial quote styling */
.testimonial-quote {
    position: relative;
}

.testimonial-quote::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 3px;
    height: 100%;
    background: linear-gradient(180deg, #d4a03f, transparent);
    border-radius: 2px;
}
