/* Custom styles for New Jersey Interiors */

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

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    .hero-shape {
        animation: none !important;
    }
    .service-card, .gallery-item {
        transform: none !important;
    }
}

/* Scroll reveal animations - progressive enhancement, content visible by default */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

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

/* Only animate for users who prefer motion */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(24px);
    }
    .reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Hero shape animations */
@media (prefers-reduced-motion: no-preference) {
    .shape-circle-1 {
        animation: float-1 8s ease-in-out infinite;
    }
    .shape-circle-2 {
        animation: float-2 10s ease-in-out infinite;
    }
    .shape-circle-3 {
        animation: float-3 6s ease-in-out infinite;
    }
    .shape-circle-4 {
        animation: float-4 7s ease-in-out infinite;
    }
    .shape-square-1 {
        animation: float-5 9s ease-in-out infinite;
    }
    .shape-square-2 {
        animation: float-6 11s ease-in-out infinite;
    }
    .shape-circle-5 {
        animation: float-7 5s ease-in-out infinite;
    }
    .shape-circle-6 {
        animation: float-8 8s ease-in-out infinite;
    }
}

@keyframes float-1 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(-20px, 30px) scale(1.05); }
}

@keyframes float-2 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(25px, -20px) scale(1.03); }
}

@keyframes float-3 {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(15px, -25px); }
}

@keyframes float-4 {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(-20px, 15px); }
}

@keyframes float-5 {
    0%, 100% { transform: rotate(12deg) translate(0, 0); }
    50% { transform: rotate(12deg) translate(-15px, 20px); }
}

@keyframes float-6 {
    0%, 100% { transform: rotate(-12deg) translate(0, 0); }
    50% { transform: rotate(-12deg) translate(10px, -15px); }
}

@keyframes float-7 {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.3); }
}

@keyframes float-8 {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.4); }
}

/* Navbar scroll effect */
.nav-scrolled {
    background: rgba(255, 255, 255, 0.97) !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.nav-scrolled .nav-logo-text {
    color: #1e293b !important;
}

.nav-scrolled .nav-logo-text span {
    color: #0d9488 !important;
}

.nav-scrolled a:not(.bg-teal-500):not(.bg-teal-400) {
    color: #334155 !important;
}

.nav-scrolled a:not(.bg-teal-500):not(.bg-teal-400):hover {
    color: #0d9488 !important;
}

.nav-scrolled .mobile-menu-link {
    color: #334155 !important;
}

/* Mobile menu transitions */
#mobile-menu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease, opacity 0.35s ease;
    opacity: 0;
}

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

/* Service card stagger animation */
@media (prefers-reduced-motion: no-preference) {
    .service-card:nth-child(1) { transition-delay: 0.05s; }
    .service-card:nth-child(2) { transition-delay: 0.1s; }
    .service-card:nth-child(3) { transition-delay: 0.15s; }
    .service-card:nth-child(4) { transition-delay: 0.2s; }
    .service-card:nth-child(5) { transition-delay: 0.25s; }
    .service-card:nth-child(6) { transition-delay: 0.3s; }
    
    .gallery-item:nth-child(1) { transition-delay: 0.05s; }
    .gallery-item:nth-child(2) { transition-delay: 0.1s; }
    .gallery-item:nth-child(3) { transition-delay: 0.15s; }
    .gallery-item:nth-child(4) { transition-delay: 0.2s; }
    .gallery-item:nth-child(5) { transition-delay: 0.25s; }
    .gallery-item:nth-child(6) { transition-delay: 0.3s; }
}

/* Selection color */
::selection {
    background: #99f6e4;
    color: #134e4a;
}

/* Focus styles */
*:focus-visible {
    outline: 2px solid #14b8a6;
    outline-offset: 2px;
    border-radius: 4px;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #f1f5f9;
}
::-webkit-scrollbar-thumb {
    background: #94a3b8;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #64748b;
}

/* Form 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='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}
