/* Custom styles for Shoji Edgehair */

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

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

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: #FAFAF7;
}
::-webkit-scrollbar-thumb {
    background: #c5d8c5;
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: #96bc96;
}

/* Selection color */
::selection {
    background: #c5d8c5;
    color: #1f351f;
}

/* Navbar transitions */
.navbar-text {
    transition: color 0.3s ease;
}
.navbar-subtext {
    transition: color 0.3s ease;
}
#navbar:not(.scrolled) .navbar-text {
    color: #2d4f2d;
}
#navbar:not(.scrolled) .navbar-subtext {
    color: #6a9e6a;
}
#navbar.scrolled .navbar-text {
    color: #1f351f;
}
#navbar.scrolled .navbar-subtext {
    color: #4a7c4a;
}

/* Mobile menu transitions */
.mobile-nav-link {
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.4s ease, transform 0.4s ease, color 0.3s ease;
}
#mobile-menu.open .mobile-nav-link {
    opacity: 1;
    transform: translateY(0);
}
#mobile-menu.open .mobile-nav-link:nth-child(1) { transition-delay: 0.1s; }
#mobile-menu.open .mobile-nav-link:nth-child(2) { transition-delay: 0.15s; }
#mobile-menu.open .mobile-nav-link:nth-child(3) { transition-delay: 0.2s; }
#mobile-menu.open .mobile-nav-link:nth-child(4) { transition-delay: 0.25s; }

/* Nav lines animation */
#menu-btn.active .nav-line:nth-child(1) {
    transform: rotate(45deg) translate(3px, 3px);
}
#menu-btn.active .nav-line:nth-child(2) {
    opacity: 0;
}
#menu-btn.active .nav-line:nth-child(3) {
    transform: rotate(-45deg) translate(3px, -3px);
    width: 1.5rem;
}

/* Service card hover effect */
.service-card {
    position: relative;
    overflow: hidden;
}
.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 3px;
    height: 0;
    background: #4a7c4a;
    transition: height 0.4s ease;
}
.service-card:hover::before {
    height: 100%;
}

/* Reveal animations - progressive enhancement */
.reveal-element {
    opacity: 1;
    transform: none;
    transition: opacity 0.6s ease, transform 0.6s ease;
}

@media (prefers-reduced-motion: no-preference) {
    .reveal-element {
        opacity: 0;
        transform: translateY(20px);
    }
    .reveal-element.revealed {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Form select styling */
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='%2396bc96' stroke-width='1.5'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0 center;
    padding-right: 2rem;
}

/* Focus styles */
input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: #4a7c4a !important;
}

/* Image loading placeholder */
img {
    background-color: #e3ebe3;
}

/* Print styles */
@media print {
    #navbar, #mobile-menu, .reveal-element {
        display: block !important;
        opacity: 1 !important;
    }
    footer {
        background: #1f351f !important;
        color: white !important;
    }
}
