/* Custom styles for Twisted Scissors By Chela */

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

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

::-webkit-scrollbar-track {
    background: #1a1a1a;
}

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

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

/* Selection color */
::selection {
    background: rgba(255, 107, 53, 0.3);
    color: #fff;
}

/* Navigation transitions */
.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background: #ff6b35;
    transition: width 0.3s ease;
}

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

/* Mobile menu animation */
#menu-icon span:nth-child(1) {
    transform-origin: center;
}

#menu-icon span:nth-child(2) {
    transform-origin: center;
}

#menu-icon span:nth-child(3) {
    transform-origin: center;
}

/* Mobile menu open state */
body.menu-open #menu-icon span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

body.menu-open #menu-icon span:nth-child(2) {
    opacity: 0;
}

body.menu-open #menu-icon span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
    width: 1.5rem;
}

/* Service card hover effects */
.service-card {
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.5s ease;
}

.service-card:hover {
    box-shadow: 0 20px 60px rgba(255, 107, 53, 0.1);
}

/* Gallery item hover */
.gallery-item {
    cursor: pointer;
}

/* Reveal animations - Progressive enhancement */
.reveal {
    /* Default: visible for accessibility */
    opacity: 1;
    transform: none;
}

@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(30px);
        transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1), 
                    transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    }
    
    .reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
    
    /* Staggered reveal delays */
    .reveal:nth-child(1) { transition-delay: 0.1s; }
    .reveal:nth-child(2) { transition-delay: 0.2s; }
    .reveal:nth-child(3) { transition-delay: 0.3s; }
    .reveal:nth-child(4) { transition-delay: 0.4s; }
    .reveal:nth-child(5) { transition-delay: 0.5s; }
    .reveal:nth-child(6) { transition-delay: 0.6s; }
}

/* Hero parallax effect */
#hero {
    will-change: transform;
}

/* Floating animation for decorative elements */
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

/* Pulse animation for CTA */
@keyframes pulse-coral {
    0%, 100% { box-shadow: 0 0 0 0 rgba(255, 107, 53, 0.4); }
    50% { box-shadow: 0 0 0 15px rgba(255, 107, 53, 0); }
}

/* Back to top button */
#back-to-top {
    transition: opacity 0.3s ease, transform 0.3s ease;
}

#back-to-top.visible {
    opacity: 1;
    pointer-events: all;
}

#back-to-top:not(.visible) {
    transform: translateY(20px);
}

/* Mobile menu transitions */
#mobile-menu {
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Mobile link hover effect */
.mobile-link {
    position: relative;
    display: inline-block;
}

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

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

/* Form focus styles */
input:focus,
select:focus,
textarea:focus {
    outline: none;
}

/* 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='%23ff6b35' stroke-width='2' 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;
}

/* Loading state for buttons */
button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Print styles */
@media print {
    nav, #back-to-top, .service-card, .gallery-item {
        display: none !important;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
    
    .bg-charcoal-900, .bg-charcoal-800 {
        background: white !important;
        color: black !important;
    }
}

/* High contrast mode support */
@media (forced-colors: active) {
    .service-card {
        border: 1px solid ButtonText;
    }
    
    .gallery-item {
        border: 1px solid ButtonText;
    }
}

/* Reduced motion support */
@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;
    }
}

/* Focus visible for keyboard navigation */
:focus-visible {
    outline: 2px solid #ff6b35;
    outline-offset: 2px;
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
    .service-card:hover {
        transform: none;
        box-shadow: none;
    }
    
    .gallery-item:hover {
        transform: none;
    }
    
    .gallery-item:hover .absolute {
        opacity: 0 !important;
    }
}
