/* Custom styles for B & S Hydraulic & Air Tool Repair */

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

/* Hero diagonal clip */
.clip-diagonal {
    clip-path: polygon(30% 0, 100% 0, 100% 100%, 0% 100%);
}

/* Vertical text */
.writing-vertical {
    writing-mode: vertical-rl;
    text-orientation: mixed;
}

/* Navbar scroll state */
.nav-scrolled {
    background: rgba(254, 253, 248, 0.95) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 1px 0 rgba(20, 83, 45, 0.08);
}

/* Service card hover lift */
.service-card {
    transition: background-color 0.5s ease;
}

/* Mobile menu transitions */
#mobile-menu.open {
    opacity: 1 !important;
    pointer-events: all !important;
}

/* Mobile menu link stagger */
.mobile-link {
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s 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; }

/* Menu animation */
.menu-line {
    transition: transform 0.3s ease, opacity 0.3s ease, width 0.3s ease;
}

#menu-btn.active .menu-line:nth-child(1) {
    transform: translateY(4px) rotate(45deg);
}

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

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

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

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

@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(30px);
        transition: opacity 0.8s ease, transform 0.8s ease;
    }
    
    .reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Selection color */
::selection {
    background: rgba(20, 83, 45, 0.15);
    color: #052e16;
}

/* Focus styles */
a:focus-visible,
button:focus-visible {
    outline: 2px solid #16a34a;
    outline-offset: 2px;
    border-radius: 2px;
}

/* Image hover zoom */
img {
    transition: transform 0.7s ease;
}

/* Subtle pattern overlay for cream sections */
.bg-cream-pattern {
    background-image: radial-gradient(circle at 1px 1px, rgba(20, 83, 45, 0.03) 1px, transparent 0);
    background-size: 24px 24px;
}

/* Thin line decorations */
.line-accent {
    position: relative;
}

.line-accent::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 40px;
    height: 1px;
    background: #4ade80;
}

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #15803d;
}

/* Success message for contact form */
.success-message {
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.success-message.show {
    opacity: 1;
    transform: translateY(0);
}
