/* ============================================
   Nicecar Auto Sales — Custom Styles
   ============================================ */

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

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

body {
    margin: 0;
    overflow-x: hidden;
}

/* Selection Color */
::selection {
    background: #FF7A5C;
    color: #fff;
}

/* ============================================
   Hero Animations (above-fold, always visible)
   ============================================ */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.animate-fade-in-up {
    animation: fadeInUp 0.9s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.animate-fade-in {
    animation: fadeIn 1s ease both;
}

/* ============================================
   Scroll Reveal (below-fold only, progressive enhancement)
   ============================================ */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(40px);
        transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
                    transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    }
    
    .reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
    
    .reveal-delay-1 { transition-delay: 0.1s; }
    .reveal-delay-2 { transition-delay: 0.2s; }
    .reveal-delay-3 { transition-delay: 0.3s; }
    .reveal-delay-4 { transition-delay: 0.4s; }
}

/* Fallback: always visible if JS is disabled */
@media not all and (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 1;
        transform: translateY(0);
    }
}

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

#navbar.scrolled {
    background-color: rgba(26, 26, 26, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.05);
}

.nav-link {
    position: relative;
}

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

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

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

#mobile-menu {
    z-index: 50;
}

.menu-line {
    transition: transform 0.3s ease, opacity 0.3s ease;
}

/* ============================================
   Buttons & Links
   ============================================ */
a {
    text-decoration: none;
}

input:focus,
textarea:focus {
    outline: none;
}

/* ============================================
   Form Styles
   ============================================ */
input::placeholder,
textarea::placeholder {
    color: #d1d5db;
}

/* ============================================
   Utility
   ============================================ */
.font-serif {
    font-family: 'Playfair Display', serif;
}

.font-sans {
    font-family: 'Inter', sans-serif;
}
