/* ============================================
   Rouge Dealership — Custom Styles
   Classic & Elegant | Burgundy + Blush
   ============================================ */

/* ---- Custom Animations ---- */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes scrollPulse {
    0%, 100% {
        opacity: 0.4;
        transform: scaleY(1);
    }
    50% {
        opacity: 0.8;
        transform: scaleY(1.2);
    }
}

.animate-fade-in {
    animation: fadeIn 0.8s ease-out forwards;
}

.scroll-indicator {
    animation: scrollPulse 2s ease-in-out infinite;
    transform-origin: top;
}

/* ---- Scroll Reveal Styles ---- */
/* Default state: visible (progressive enhancement) */
[data-reveal] {
    opacity: 1;
    transform: none;
    transition: opacity 0.7s ease, transform 0.7s ease;
}

/* Animated state: only applied when JS activates */
.reveal-up {
    opacity: 1;
    transform: none;
}

.reveal-left {
    opacity: 1;
    transform: none;
}

.reveal-right {
    opacity: 1;
    transform: none;
}

/* Only apply animations when JS adds the .revealed class */
.revealed.reveal-up {
    animation: fadeIn 0.8s ease-out forwards;
}

.revealed.reveal-left {
    animation: fadeInLeft 0.8s ease-out forwards;
}

.revealed.reveal-right {
    animation: fadeInRight 0.8s ease-out forwards;
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ---- Reduced Motion ---- */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .reveal-up,
    .reveal-left,
    .reveal-right {
        opacity: 1;
        transform: none;
    }
    
    .revealed.reveal-up,
    .revealed.reveal-left,
    .revealed.reveal-right {
        animation: none;
    }
}

/* ---- Navbar Scroll State ---- */
.navbar-scrolled {
    background: rgba(58, 15, 24, 0.95) !important;
    backdrop-filter: blur(20px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

.navbar-scrolled .nav-logo-text,
.navbar-scrolled .nav-subtext,
.navbar-scrolled .nav-link {
    color: white !important;
}

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

/* ---- Selection Color ---- */
::selection {
    background: rgba(114, 47, 55, 0.3);
    color: inherit;
}

/* ---- Focus Styles ---- */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 2px solid rgba(114, 47, 55, 0.6);
    outline-offset: 2px;
}

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

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

::-webkit-scrollbar-thumb {
    background: #722F37;
    border-radius: 4px;
}

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

/* ---- Mobile Menu Transitions ---- */
#mobileMenu {
    transition: opacity 0.4s ease, pointer-events 0.4s ease;
}

#mobileMenu.active {
    opacity: 1;
    pointer-events: all;
}

.mobile-nav-link {
    transition: opacity 0.3s ease, transform 0.3s ease;
}

/* ---- Image Loading ---- */
img {
    background-color: #F5ECD7;
}

/* ---- Form Input Focus Transitions ---- */
input:focus,
textarea:focus {
    box-shadow: 0 0 0 3px rgba(114, 47, 55, 0.1);
}

/* ---- Button Hover Transitions ---- */
button,
a {
    -webkit-tap-highlight-color: transparent;
}

/* ---- Utility: Container ---- */
.container {
    width: 100%;
    max-width: 80rem;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

/* ---- Mobile Menu Overlay ---- */
body.menu-open {
    overflow: hidden;
}

/* ---- Aspect Ratio Helpers ---- */
.aspect-square {
    aspect-ratio: 1 / 1;
}

/* ---- Print Styles ---- */
@media print {
    #navbar,
    #mobileMenu,
    .scroll-indicator {
        display: none !important;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
    
    a {
        color: black !important;
    }
}
