/* ===================================
   McCarty's Busted Knuckle Garage
   Custom Styles
   =================================== */

/* Reset & Base */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    overflow-x: hidden;
}

/* Selection */
::selection {
    background-color: rgba(26, 94, 53, 0.15);
    color: #0a3d22;
}

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #5fb37d;
}

/* ===================================
   Navbar
   =================================== */
#navbar {
    background: transparent;
    transition: background-color 0.4s ease, box-shadow 0.4s ease, backdrop-filter 0.4s ease;
}

#navbar.scrolled {
    background: rgba(253, 252, 250, 0.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 1px 0 rgba(26, 94, 53, 0.08);
}

/* ===================================
   Mobile Menu
   =================================== */
#mobile-menu.open {
    opacity: 1;
    pointer-events: all;
}

#mobile-menu.close {
    opacity: 0;
    pointer-events: none;
}

.mobile-link {
    opacity: 0;
    transform: translateY(12px);
    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.05s; }
#mobile-menu.open .mobile-link:nth-child(2) { transition-delay: 0.1s; }
#mobile-menu.open .mobile-link:nth-child(3) { transition-delay: 0.15s; }
#mobile-menu.open .mobile-link:nth-child(4) { transition-delay: 0.2s; }
#mobile-menu.open .mobile-link:nth-child(5) { transition-delay: 0.25s; }

/* Menu button animation */
.menu-btn.active .menu-line:nth-child(1) {
    transform: translateY(4px) rotate(45deg);
}

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

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

/* ===================================
   Hero
   =================================== */
#hero {
    position: relative;
}

/* Floating badge animation */
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-8px); }
}

.absolute.bottom-8.left-[-20px] {
    animation: float 4s ease-in-out infinite;
}

/* ===================================
   Service Cards
   =================================== */
.service-card {
    transition: transform 0.4s ease, background-color 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease;
}

.service-card:hover {
    transform: translateY(-4px);
}

/* ===================================
   Scroll Reveal Animations
   (Progressive enhancement — content visible without JS)
   =================================== */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 1;
        transform: translateY(0);
        transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
    }

    .reveal[data-reveal] {
        opacity: 0;
        transform: translateY(24px);
        transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
    }

    .reveal[data-reveal="left"] {
        transform: translateX(-24px);
    }

    .reveal[data-reveal="right"] {
        transform: translateX(24px);
    }

    .reveal[data-reveal="scale"] {
        transform: scale(0.96);
    }

    .reveal.visible {
        opacity: 1;
        transform: translateY(0) translateX(0) scale(1);
    }

    /* Stagger children */
    .stagger-children .reveal[data-reveal] {
        transition-delay: calc(var(--index, 0) * 0.08s);
    }
}

/* ===================================
   Utility
   =================================== */
img {
    max-width: 100%;
    height: auto;
}

a {
    text-decoration: none;
}

button {
    cursor: pointer;
    border: none;
    background: none;
}

/* Focus visible for accessibility */
:focus-visible {
    outline: 2px solid #1a5e35;
    outline-offset: 2px;
    border-radius: 4px;
}

/* ===================================
   Responsive Adjustments
   =================================== */
@media (max-width: 767px) {
    .absolute.bottom-8.left-[-20px] {
        left: 16px;
        bottom: 16px;
    }
}

@media (min-width: 768px) and (max-width: 1023px) {
    .absolute.bottom-8.left-[-20px] {
        left: -12px;
    }
}
