/* Custom Styles for Kaida Ink */

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

html {
    scroll-behavior: smooth;
}

body {
    overflow-x: hidden;
}

/* Scroll Reveal Animations - Progressive Enhancement */
@media (prefers-reduced-motion: no-preference) {
    .reveal-element {
        opacity: 0;
        transform: translateY(30px);
        transition: opacity 0.8s ease-out, transform 0.8s ease-out;
    }
    
    .reveal-element.revealed {
        opacity: 1;
        transform: translateY(0);
    }
    
    .reveal-left {
        opacity: 0;
        transform: translateX(-50px);
        transition: opacity 0.8s ease-out, transform 0.8s ease-out;
    }
    
    .reveal-left.revealed {
        opacity: 1;
        transform: translateX(0);
    }
    
    .reveal-right {
        opacity: 0;
        transform: translateX(50px);
        transition: opacity 0.8s ease-out, transform 0.8s ease-out;
    }
    
    .reveal-right.revealed {
        opacity: 1;
        transform: translateX(0);
    }
    
    .service-card {
        opacity: 0;
        transform: translateY(20px);
        transition: opacity 0.6s ease-out, transform 0.6s ease-out;
    }
    
    .service-card.revealed {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Navbar Styles */
#navbar {
    transition: background-color 0.5s ease, padding 0.5s ease;
}

#navbar.scrolled {
    background-color: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.05);
}

/* Mobile Menu Animation */
#mobile-menu.active {
    opacity: 1 !important;
    pointer-events: all !important;
}

#menu-line-1 {
    transform-origin: center;
}

#menu-line-2 {
    transform-origin: center;
}

#menu-line-3 {
    transform-origin: center;
}

/* Active menu state */
body.menu-open #menu-line-1 {
    transform: translateY(6px) rotate(45deg);
}

body.menu-open #menu-line-2 {
    opacity: 0;
}

body.menu-open #menu-line-3 {
    transform: translateY(-6px) rotate(-45deg);
    width: 1.5rem;
}

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

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

/* Smooth Scroll Offset for Fixed Navbar */
section[id] {
    scroll-margin-top: 80px;
}

/* Custom Selection Color */
::selection {
    background-color: rgba(20, 184, 166, 0.3);
    color: inherit;
}

/* Image Loading Optimization */
img {
    max-width: 100%;
    height: auto;
}

/* Performance: Reduce 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;
    }
    
    .animate-bounce {
        animation: none;
    }
}

/* Print Styles */
@media print {
    nav,
    #contact-form,
    iframe {
        display: none;
    }
    
    body {
        color: #000;
        background: #fff;
    }
    
    a {
        text-decoration: underline;
    }
}

/* High Contrast Mode Support */
@media (forced-colors: active) {
    .service-card {
        border: 1px solid CanvasText;
    }
    
    button,
    .bg-teal-600 {
        border: 1px solid ButtonText;
    }
}

/* Touch Device Optimizations */
@media (hover: none) {
    .service-card:hover {
        transform: none;
        box-shadow: none;
    }
    
    .group:hover .group-hover\:scale-110 {
        transform: none;
    }
}
