/* Custom styles for Stiles Used Auto Parts */

/* Base typography */
html {
    scroll-behavior: smooth;
}

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

/* Nav text opacity for hero overlay */
.nav-text-opacity {
    color: rgba(255, 255, 255, 0.95);
}

.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: #2dd4bf;
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

/* Mobile menu */
.mobile-nav-link {
    position: relative;
}

/* Scroll reveal base - content always visible, animation is progressive enhancement */
.scroll-reveal {
    opacity: 1;
    transform: none;
}

@media (prefers-reduced-motion: no-preference) {
    .scroll-reveal {
        opacity: 0;
        transform: translateY(30px);
        transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
    }

    .scroll-reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }

    /* Staggered reveal delays */
    .scroll-reveal:nth-child(2) { transition-delay: 0.1s; }
    .scroll-reveal:nth-child(3) { transition-delay: 0.2s; }
    .scroll-reveal:nth-child(4) { transition-delay: 0.3s; }
    .scroll-reveal:nth-child(5) { transition-delay: 0.4s; }
}

/* Navbar scroll state */
.nav-scrolled {
    background: rgba(15, 23, 42, 0.95) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.05);
}

.nav-scrolled .nav-text-opacity {
    color: rgba(255, 255, 255, 0.95);
}

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

/* Menu button animation */
.menu-open .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.menu-open .menu-line:nth-child(2) {
    opacity: 0;
}

.menu-open .menu-line:nth-child(3) {
    width: 24px;
    margin-left: 0;
}

/* Subtle hover lift for cards */
.group:hover .group-hover\:scale-110 {
    transform: scale(1.1);
}

/* Selection color */
::selection {
    background: #0f766e;
    color: white;
}

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

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

::-webkit-scrollbar-thumb {
    background: #94a3b8;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #64748b;
}

/* Form styles */
input, textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #e7e5e4;
    border-radius: 12px;
    font-size: 15px;
    font-family: inherit;
    background: white;
    color: #1e293b;
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
}

input:focus, textarea:focus {
    border-color: #0f766e;
    box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.1);
}

input::placeholder, textarea::placeholder {
    color: #a8a29e;
}

textarea {
    resize: vertical;
    min-height: 120px;
}

/* Success message */
.form-success {
    display: none;
    text-align: center;
    padding: 2rem;
}

.form-success.show {
    display: block;
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}
