/* LUXXO GARAGE · IVORY & GOLD LUXURY STYLES & ANIMATIONS */

:root {
    --gold-primary: #A8842F;
    --gold-deep: #8A6A1C;
    --gold-gradient: linear-gradient(135deg, #8A6A1C 0%, #C9A54E 30%, #9C7A2E 55%, #D2B464 78%, #7A5A14 100%);
    --bg-ivory: #F6F1E6;
    --surface: #FBF8F1;
    --card-bg: #FFFFFF;
    --border-color: #E6DCC6;
    --ink: #1C1A17;
    --watermark: url('assets/patterns/luxxo-watermark.png');
    /* Native form controls, dropdown popups and scrollbars render light (Windows Chrome otherwise mixes themes) */
    color-scheme: light;
}

/* Scrollbars: standard properties (Chrome 121+ on Windows, Firefox) with a WebKit fallback for Safari */
html {
    scroll-behavior: smooth;
    scrollbar-width: thin;
    scrollbar-color: #C9B27A #F1EADB;
    /* Reserve the classic Windows scrollbar space so opening modals doesn't shift the page */
    scrollbar-gutter: stable;
}
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}
::-webkit-scrollbar-track {
    background: #F1EADB;
}
::-webkit-scrollbar-thumb {
    background: #D6C49A;
    border-radius: 6px;
    border: 2px solid #F1EADB;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--gold-primary);
}

body {
    background-color: var(--bg-ivory);
    color: var(--ink);
    overflow-x: hidden;
    overflow-x: clip;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -webkit-tap-highlight-color: transparent;
}

/* LUXXO GARAGE watermark grid: the logo tilted 45° on a repeating grid behind every page */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: -20;
    pointer-events: none;
    background: var(--watermark) 0 0 / 200px 200px repeat;
    opacity: 0.06;
}

/* Same watermark for any surface that should carry the pattern on its own */
.luxxo-watermark {
    position: relative;
    isolation: isolate;
}
.luxxo-watermark::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    border-radius: inherit;
    background: var(--watermark) 0 0 / 160px 160px repeat;
    opacity: 0.07;
}

/* Form controls: consistent across Windows / macOS */
select option,
select optgroup {
    background-color: #FFFFFF;
    color: var(--ink);
}
input::placeholder,
textarea::placeholder {
    color: #9A8F7A;
    opacity: 1;
}
:focus-visible {
    outline: 2px solid var(--gold-primary);
    outline-offset: 2px;
}
::selection {
    background: #E9D9A8;
    color: var(--ink);
}

/* Metallic Gold Text Effect */
.gold-text-metallic {
    background: var(--gold-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Header & Typography Safeguards */
header nav a {
    white-space: nowrap;
}

.font-cinzel {
    letter-spacing: 0.02em;
}

h1.font-cinzel span,
h2.font-cinzel span {
    display: inline-block;
}

/* Glassmorphism Classes */
.glass-panel {
    background: rgba(255, 253, 248, 0.82);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(120, 95, 40, 0.14);
}

.glass-panel-gold {
    background: rgba(255, 253, 248, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(168, 132, 47, 0.35);
    box-shadow: 0 10px 30px -12px rgba(120, 95, 40, 0.25);
}

/* Ken Burns Animation for Hero Image */
@keyframes kenburns {
    0% {
        transform: scale(1.0) translate(0, 0);
    }
    50% {
        transform: scale(1.08) translate(-1%, -1%);
    }
    100% {
        transform: scale(1.0) translate(0, 0);
    }
}

.animate-kenburns {
    animation: kenburns 30s ease-in-out infinite alternate;
}

/* Shimmer Effect on Luxury Badges */
@keyframes goldShimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

.badge-shimmer {
    background: linear-gradient(90deg, #8A6A1C 0%, #D2B464 50%, #8A6A1C 100%);
    background-size: 200% 100%;
    animation: goldShimmer 4s infinite linear;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Car Card Hover Lift & Glow */
.car-card {
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.car-card:hover {
    transform: translateY(-8px);
    border-color: rgba(168, 132, 47, 0.5);
    box-shadow: 0 20px 35px -14px rgba(120, 95, 40, 0.3), 0 0 0 1px rgba(168, 132, 47, 0.15);
}

.car-card:hover .car-card-img {
    transform: scale(1.06);
}

.car-card-img {
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Range Input Luxury Styling */
input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--gold-primary);
    cursor: pointer;
    border: 2px solid #ffffff;
    box-shadow: 0 2px 8px rgba(120, 95, 40, 0.45);
    transition: transform 0.1s ease;
}

input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

/* Engine Revving Audio Vibration Simulation */
@keyframes revShake {
    0% { transform: translate(1px, 1px) rotate(0deg); }
    10% { transform: translate(-1px, -2px) rotate(-0.5deg); }
    20% { transform: translate(-3px, 0px) rotate(0.5deg); }
    30% { transform: translate(3px, 2px) rotate(0deg); }
    40% { transform: translate(1px, -1px) rotate(0.5deg); }
    50% { transform: translate(-1px, 2px) rotate(-0.5deg); }
    60% { transform: translate(-3px, 1px) rotate(0deg); }
    70% { transform: translate(3px, 1px) rotate(-0.5deg); }
    80% { transform: translate(-1px, -1px) rotate(0.5deg); }
    90% { transform: translate(1px, 2px) rotate(0deg); }
    100% { transform: translate(1px, -2px) rotate(-0.5deg); }
}

.engine-revving {
    animation: revShake 0.15s infinite;
}

/* Ripple Glow on Buttons */
.btn-gold-glow {
    position: relative;
    overflow: hidden;
}

.btn-gold-glow::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.35) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
}

.btn-gold-glow:hover::after {
    opacity: 1;
}

/* Range inputs: Firefox thumb */
input[type="range"]::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--gold-primary);
    border: 2px solid #ffffff;
    cursor: pointer;
}

/* Respect reduced-motion preferences */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}
