/* Custom styles for D n K Appliances */

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

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

/* Floating card animations */
@keyframes float-1 {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-12px) rotate(1deg); }
}

@keyframes float-2 {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-8px) rotate(-1deg); }
}

.floating-card-1 {
    animation: float-1 4s ease-in-out infinite;
}

.floating-card-2 {
    animation: float-2 5s ease-in-out infinite;
}

/* Reveal animations (progressive enhancement) */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(30px);
        transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
    }
    
    .reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
    
    /* Staggered delays */
    .reveal:nth-child(1) { transition-delay: 0.05s; }
    .reveal:nth-child(2) { transition-delay: 0.12s; }
    .reveal:nth-child(3) { transition-delay: 0.19s; }
    .reveal:nth-child(4) { transition-delay: 0.26s; }
    .reveal:nth-child(5) { transition-delay: 0.33s; }
    .reveal:nth-child(6) { transition-delay: 0.40s; }
}

/* Navbar scroll effect */
.navbar-scrolled {
    background: rgba(254, 253, 251, 0.95) !important;
    backdrop-filter: blur(20px);
    box-shadow: 0 1px 20px rgba(154, 30, 61, 0.08);
}

/* Mobile menu transition */
#mobile-menu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
    opacity: 0;
}

#mobile-menu.open {
    max-height: 500px;
    opacity: 1;
}

/* Custom select arrow */
select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%239a1e3d' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

/* Selection color */
::selection {
    background: rgba(154, 30, 61, 0.15);
    color: #3d0b17;
}

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

/* Button hover glow */
button, a {
    -webkit-tap-highlight-color: transparent;
}

/* Image loading placeholder */
img {
    background: linear-gradient(135deg, #fce7eb 0%, #fff0ec 100%);
}

/* Subtle gradient border on cards */
.reveal {
    will-change: transform, opacity;
}

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

::-webkit-scrollbar-track {
    background: #fefdfb;
}

::-webkit-scrollbar-thumb {
    background: #f9d0d9;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #f3a5b8;
}

/* Mobile menu link hover */
.mobile-link {
    position: relative;
}

.mobile-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: #9a1e3d;
    transition: width 0.3s ease;
}

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

/* Active nav link */
.nav-link-active {
    color: #9a1e3d !important;
}

/* Form input focus ring animation */
input:focus, textarea:focus, select:focus {
    box-shadow: 0 0 0 3px rgba(154, 30, 61, 0.1);
}

/* Smooth image transitions */
img {
    transition: filter 0.3s ease;
}

/* 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;
    }
}
