/* Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    overflow-x: hidden;
}

/* Selection Color */
::selection {
    background-color: #ff8a68;
    color: white;
}

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

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

::-webkit-scrollbar-thumb {
    background: #d1d1d1;
    border-radius: 3px;
}

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

/* Reveal Animations - Progressive Enhancement */
@media (prefers-reduced-motion: no-preference) {
    .reveal-item {
        opacity: 0;
        transform: translateY(30px);
        transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94), 
                    transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    }
    
    .reveal-item.revealed {
        opacity: 1;
        transform: translateY(0);
    }
    
    .reveal-item:nth-child(2) { transition-delay: 0.1s; }
    .reveal-item:nth-child(3) { transition-delay: 0.2s; }
    .reveal-item:nth-child(4) { transition-delay: 0.3s; }
    .reveal-item:nth-child(5) { transition-delay: 0.4s; }
    .reveal-item:nth-child(6) { transition-delay: 0.5s; }
}

/* Service Card Hover */
.service-card {
    position: relative;
    overflow: hidden;
}

.service-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, #ff6b47, #ff8a68);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.service-card:hover::after {
    transform: scaleX(1);
}

/* Navbar Transition */
nav.scrolled {
    background-color: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(10px);
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.05);
}

nav.scrolled .menu-line {
    background-color: #1a1a1a;
}

/* Mobile Menu Transitions */
.mobile-link {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.4s ease, transform 0.4s ease, color 0.3s ease;
}

#mobile-menu.open .mobile-link {
    opacity: 1;
    transform: translateY(0);
}

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

/* Menu Button Animation */
#menu-btn.active .menu-line:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
}

#menu-btn.active .menu-line:nth-child(2) {
    opacity: 0;
}

#menu-btn.active .menu-line:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
    width: 24px;
}

/* Image Hover */
aspect-square img,
aspect-\[3\/4\] img,
aspect-\[4\/5\] img {
    transition: transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Button Focus */
button:focus-visible,
a:focus-visible {
    outline: 2px solid #ff6b47;
    outline-offset: 2px;
}

/* 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='%23888888' 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;
    appearance: none;
    -webkit-appearance: none;
}

/* Reduced Motion */
@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;
    }
    
    .reveal-item {
        opacity: 1;
        transform: none;
    }
}

/* Print Styles */
@media print {
    nav,
    #contact-form,
    .reveal-item {
        display: block !important;
        opacity: 1 !important;
    }
    
    footer {
        background: white !important;
        color: black !important;
    }
}
