/* ===== Custom Styles for K&H Rugs ===== */

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

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 10px;
}
::-webkit-scrollbar-track {
    background: #1a1d23;
}
::-webkit-scrollbar-thumb {
    background: #374151;
    border-radius: 5px;
}
::-webkit-scrollbar-thumb:hover {
    background: #F97316;
}

/* Selection color */
::selection {
    background: #F97316;
    color: #1a1d23;
}

/* ===== Reveal Animations ===== */
/* Default state: visible (progressive enhancement) */
.reveal {
    opacity: 1;
    transform: none;
    transition: opacity 0.6s ease, transform 0.6s ease;
}

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

/* ===== Navbar transitions ===== */
#navbar.scrolled {
    background: rgba(26, 29, 35, 0.95);
    backdrop-filter: blur(20px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

/* ===== Mobile menu ===== */
.mobile-link {
    opacity: 1;
    transform: none;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

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

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

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

/* ===== Menu button animation ===== */
#menu-btn.active .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}
#menu-btn.active .menu-line:nth-child(2) {
    opacity: 0;
}
#menu-btn.active .menu-line:nth-child(3) {
    width: 6;
    transform: rotate(-45deg) translate(5px, -5px);
}

/* ===== Image hover effects ===== */
.group img {
    transition: transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* ===== Button ripple effect ===== */
button, a {
    position: relative;
    overflow: hidden;
}

/* ===== Card hover lift ===== */
.group {
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

/* ===== Gradient text utility ===== */
.gradient-text {
    background: linear-gradient(135deg, #F97316, #FB923C);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ===== Subtle pattern overlay ===== */
.pattern-overlay {
    background-image: radial-gradient(circle at 1px 1px, rgba(255,255,255,0.03) 1px, transparent 0);
    background-size: 40px 40px;
}

/* ===== Responsive adjustments ===== */
@media (max-width: 768px) {
    .font-serif {
        line-height: 1.1;
    }
}
