/* ============================================
   SMART DEBOSSELAGE - Custom Styles
   Theme: Dark automotive vintage premium
   ============================================ */

/* ---- Smooth scroll ---- */
html {
    scroll-behavior: smooth;
}

/* ---- Scrollbar styling ---- */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #0a0a0a;
}
::-webkit-scrollbar-thumb {
    background: #2a2a2a;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #FFE000;
}

/* Hide scrollbar for carousel */
.scrollbar-hide::-webkit-scrollbar {
    display: none;
}
.scrollbar-hide {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* ---- Selection ---- */
::selection {
    background-color: rgba(255, 224, 0, 0.3);
    color: #fff;
}

/* ============================================
   SCROLL PROGRESS BAR
   ============================================ */

#scroll-progress,
#scroll-progress-right {
    transform-origin: top;
    will-change: height;
}

/* ============================================
   HERO SECTION
   ============================================ */

/* Dark gradient background */
.hero-gradient {
    background: radial-gradient(ellipse at center top, rgba(255, 224, 0, 0.04) 0%, transparent 50%),
                radial-gradient(ellipse at center bottom, rgba(255, 224, 0, 0.02) 0%, transparent 50%),
                #0a0a0a;
}

/* Subtle grid pattern */
.hero-grid {
    background-image:
        linear-gradient(rgba(255, 224, 0, 0.1) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 224, 0, 0.1) 1px, transparent 1px);
    background-size: 60px 60px;
}

/* Noise/grain overlay texture */
.noise-overlay {
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
    background-repeat: repeat;
    background-size: 200px 200px;
}

/* Hero car - slide in from right */
.hero-car {
    animation: slideInRight 1.5s ease-out 0.5s both;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100px);
    }
    to {
        opacity: 0.06;
        transform: translateX(0);
    }
}

/* Vintage badge */
.vintage-badge {
    backdrop-filter: blur(4px);
    background: rgba(255, 224, 0, 0.03);
}

/* Racing line animation */
.racing-line {
    animation: racingLine 4s ease-in-out infinite;
}
.racing-line-delayed {
    animation: racingLine 4s ease-in-out infinite 2s;
}

@keyframes racingLine {
    0%, 100% { opacity: 0; transform: translateX(-100%); }
    50% { opacity: 1; transform: translateX(0); }
}

/* ============================================
   ANIMATIONS
   ============================================ */

/* Fade In Down */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Fade In Up */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Fade In Scale */
@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.animate-fadeInDown {
    animation: fadeInDown 0.8s ease-out forwards;
}

.animate-fadeInUp {
    animation: fadeInUp 0.8s ease-out forwards;
}

.animate-fadeInScale {
    animation: fadeInScale 0.6s ease-out forwards;
}

/* Animation delays */
.animation-delay-200 {
    animation-delay: 0.2s;
    opacity: 0;
    animation-fill-mode: forwards;
}
.animation-delay-400 {
    animation-delay: 0.4s;
    opacity: 0;
    animation-fill-mode: forwards;
}
.animation-delay-600 {
    animation-delay: 0.6s;
    opacity: 0;
    animation-fill-mode: forwards;
}

/* ============================================
   SCROLL REVEAL ANIMATIONS
   ============================================ */

.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.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; }

/* Reveal from left */
.reveal-left {
    opacity: 0;
    transform: translateX(-50px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}
.reveal-left.revealed {
    opacity: 1;
    transform: translateX(0);
}

/* Reveal from right */
.reveal-right {
    opacity: 0;
    transform: translateX(50px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}
.reveal-right.revealed {
    opacity: 1;
    transform: translateX(0);
}

/* Chrome frame - metallic gradient border */
.chrome-frame {
    border: 2px solid transparent;
    background: linear-gradient(#1a1a1a, #1a1a1a) padding-box,
                linear-gradient(135deg, rgba(208,208,208,0.3), rgba(255,224,0,0.2), rgba(208,208,208,0.1), rgba(255,224,0,0.15)) border-box;
}

/* ============================================
   NAVBAR
   ============================================ */

#navbar {
    background: transparent;
    transition: all 0.4s ease;
}

#navbar.scrolled {
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 224, 0, 0.1);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

/* Active nav link */
.nav-link.active {
    color: #FFE000;
    position: relative;
}
.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 100%;
    height: 2px;
    background: #FFE000;
    border-radius: 1px;
}

/* ============================================
   SERVICE CARDS - Chrome/Automotive Effect + 3D tilt
   ============================================ */

.service-card {
    perspective: 800px;
}

.service-card .card-inner {
    position: relative;
    transition: transform 0.5s ease, box-shadow 0.5s ease;
    transform-style: preserve-3d;
}

.service-card:hover .card-inner {
    transform: rotateY(-3deg) rotateX(3deg) translateY(-6px);
    box-shadow: 8px 8px 30px rgba(255, 224, 0, 0.06), 0 0 0 1px rgba(255, 224, 0, 0.15);
}

/* Brushed metal texture on cards */
.service-card .card-inner::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        linear-gradient(135deg, rgba(255, 224, 0, 0.03) 0%, transparent 50%, rgba(255, 224, 0, 0.01) 100%),
        repeating-linear-gradient(90deg, transparent, transparent 2px, rgba(208, 208, 208, 0.015) 2px, rgba(208, 208, 208, 0.015) 4px);
    border-radius: inherit;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.service-card:hover .card-inner::before {
    opacity: 1;
}

/* Chrome circle for icons */
.chrome-circle {
    position: relative;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(208, 208, 208, 0.1), rgba(255, 224, 0, 0.1));
    border: 2px solid rgba(208, 208, 208, 0.15);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 2px 8px rgba(0, 0, 0, 0.2);
}

.service-card:hover .chrome-circle {
    border-color: rgba(255, 224, 0, 0.4);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 0 15px rgba(255, 224, 0, 0.1);
}

/* Retro number */
.retro-number {
    position: absolute;
    top: 12px;
    right: 16px;
    font-size: 3.5rem;
    font-weight: 700;
    line-height: 1;
    color: rgba(255, 224, 0, 0.06);
    pointer-events: none;
    transition: color 0.5s ease;
}

.service-card:hover .retro-number {
    color: rgba(255, 224, 0, 0.12);
}

/* ============================================
   CTA BUTTON - Glow pulse
   ============================================ */

.cta-button {
    position: relative;
    overflow: hidden;
}

.cta-button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.cta-button:hover::before {
    width: 300px;
    height: 300px;
}

/* ============================================
   GALLERY - Masonry + Chrome borders
   ============================================ */

/* Masonry layout via CSS columns */
.gallery-masonry {
    columns: 3;
    column-gap: 1.5rem;
}

.gallery-masonry .gallery-item {
    break-inside: avoid;
    margin-bottom: 1.5rem;
}

@media (max-width: 1024px) {
    .gallery-masonry {
        columns: 2;
    }
}

@media (max-width: 640px) {
    .gallery-masonry {
        columns: 1;
    }
}

.gallery-item {
    transition: transform 0.3s ease;
    cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 24 24' fill='none' stroke='%23FFE000' stroke-width='2'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'/%3E%3Cline x1='11' y1='8' x2='11' y2='14'/%3E%3Cline x1='8' y1='11' x2='14' y2='11'/%3E%3C/svg%3E") 16 16, zoom-in;
}

.gallery-item:hover {
    transform: translateY(-4px);
}

/* Chrome double border on hover */
.gallery-item .gallery-frame {
    border: 1px solid #2a2a2a;
    transition: all 0.5s ease;
}

.gallery-item:hover .gallery-frame {
    border-color: rgba(208, 208, 208, 0.3);
    box-shadow: 0 0 0 3px rgba(10, 10, 10, 1), 0 0 0 4px rgba(255, 224, 0, 0.25), 0 8px 25px rgba(0, 0, 0, 0.3);
}

/* ============================================
   LIGHTBOX
   ============================================ */

#lightbox {
    transition: opacity 0.3s ease;
}

#lightbox.active {
    display: flex;
    opacity: 1;
}

#lightbox img {
    transition: transform 0.3s ease, opacity 0.3s ease;
}

/* ============================================
   REVIEW CARDS
   ============================================ */

.review-card {
    min-width: 350px;
    max-width: 400px;
    flex-shrink: 0;
    scroll-snap-align: start;
    background: #1a1a1a;
    border: 1px solid #2a2a2a;
    border-radius: 0.75rem;
    padding: 2rem;
    transition: all 0.3s ease;
}

.review-card:hover {
    border-color: rgba(255, 224, 0, 0.3);
    box-shadow: 0 0 20px rgba(255, 224, 0, 0.05);
}

.review-stars {
    display: flex;
    gap: 2px;
}

.review-star {
    color: #FFE000;
    width: 18px;
    height: 18px;
}

.review-star.empty {
    color: #3a3a3a;
}

/* ============================================
   FORM INPUTS - Focus glow & validation
   ============================================ */

input:focus,
textarea:focus {
    box-shadow: 0 0 0 2px rgba(255, 224, 0, 0.1);
}

/* Form error state */
.form-input.error {
    border-color: rgba(239, 68, 68, 0.6) !important;
    box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.15);
}

.form-input.error:focus {
    border-color: rgba(239, 68, 68, 0.8) !important;
    box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.2);
}

/* ============================================
   CONTACT CARDS - Icon hover animation
   ============================================ */

.contact-icon {
    transition: transform 0.3s ease, background-color 0.3s ease;
}

.group:hover .contact-icon {
    transform: scale(1.1) rotate(-5deg);
}

/* ============================================
   FAQ - Accordion
   ============================================ */

.faq-item {
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.faq-item:hover {
    border-color: rgba(255, 224, 0, 0.2);
}

.faq-item.active {
    border-color: rgba(255, 224, 0, 0.3);
    box-shadow: 0 0 20px rgba(255, 224, 0, 0.05);
}

.faq-toggle {
    cursor: pointer;
    background: none;
    border: none;
}

.faq-icon {
    transition: transform 0.3s ease;
}

.faq-item.active .faq-icon {
    transform: rotate(180deg);
}

.faq-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, padding 0.3s ease;
}

.faq-content.visible {
    max-height: 500px;
}

/* ============================================
   BACK TO TOP - Visibility
   ============================================ */

#back-to-top.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

/* ============================================
   CHROME / AUTOMOTIVE DECORATIVE ELEMENTS
   ============================================ */

/* Racing stripe separator - 3 parallel lines */
.racing-stripe {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 0 10%;
}
.racing-stripe::before,
.racing-stripe::after {
    content: '';
    height: 2px;
    width: 100%;
    background: linear-gradient(90deg, transparent 5%, rgba(255, 224, 0, 0.5) 30%, rgba(255, 224, 0, 0.5) 70%, transparent 95%);
}
.racing-stripe-center {
    height: 2px;
    width: 100%;
    background: linear-gradient(90deg, transparent 5%, rgba(208, 208, 208, 0.4) 30%, rgba(208, 208, 208, 0.4) 70%, transparent 95%);
}

/* Section separator override */
.section-separator {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding: 0;
}
.section-separator .sep-line {
    height: 1px;
    width: 100%;
}
.section-separator .sep-line:nth-child(1),
.section-separator .sep-line:nth-child(3) {
    background: linear-gradient(90deg, transparent, rgba(255, 224, 0, 0.35), transparent);
}
.section-separator .sep-line:nth-child(2) {
    background: linear-gradient(90deg, transparent, rgba(208, 208, 208, 0.25), transparent);
}

/* Chrome corner ornaments */
.chrome-corners {
    position: relative;
}
.chrome-corners::before,
.chrome-corners::after {
    content: '';
    position: absolute;
    width: 30px;
    height: 30px;
    border-color: rgba(208, 208, 208, 0.25);
    pointer-events: none;
}
.chrome-corners::before {
    top: -1px;
    left: 20px;
    border-top: 2px solid;
    border-left: 2px solid;
    border-color: inherit;
}
.chrome-corners::after {
    top: -1px;
    right: 20px;
    border-top: 2px solid;
    border-right: 2px solid;
    border-color: inherit;
}

/* Chrome-like text shimmer for headings */
@keyframes chromeShimmer {
    0% { background-position: -200% center; }
    100% { background-position: 200% center; }
}

.chrome-text {
    background: linear-gradient(
        90deg,
        #FFE000 0%,
        #FFF9C4 25%,
        #FFE000 50%,
        #FFF9C4 75%,
        #FFE000 100%
    );
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: chromeShimmer 6s linear infinite;
}

/* ============================================
   MOBILE FULLSCREEN MENU
   ============================================ */

.mobile-menu-overlay {
    position: fixed;
    inset: 0;
    background: rgba(10, 10, 10, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 45;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mobile-menu-overlay.active {
    display: flex;
    opacity: 1;
}

.mobile-menu-overlay .mobile-nav-link {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.3s ease, transform 0.3s ease, color 0.3s ease;
}

.mobile-menu-overlay.active .mobile-nav-link {
    opacity: 1;
    transform: translateY(0);
}

.mobile-menu-overlay.active .mobile-nav-link:nth-child(2) { transition-delay: 0.05s; }
.mobile-menu-overlay.active .mobile-nav-link:nth-child(3) { transition-delay: 0.1s; }
.mobile-menu-overlay.active .mobile-nav-link:nth-child(4) { transition-delay: 0.15s; }
.mobile-menu-overlay.active .mobile-nav-link:nth-child(5) { transition-delay: 0.2s; }
.mobile-menu-overlay.active .mobile-nav-link:nth-child(6) { transition-delay: 0.25s; }
.mobile-menu-overlay.active .mobile-nav-link:nth-child(7) { transition-delay: 0.3s; }

/* Mobile CTA bar */
#mobile-cta-bar.visible {
    transform: translateY(0);
}

/* ============================================
   RESPONSIVE ADJUSTMENTS
   ============================================ */

/* Responsive typography with clamp() */
@media (max-width: 1024px) {
    h1 { font-size: clamp(2rem, 6vw, 4.5rem) !important; }
    h2 { font-size: clamp(1.8rem, 5vw, 3.75rem) !important; }
    h3 { font-size: clamp(1.2rem, 3vw, 1.5rem) !important; }
}

@media (max-width: 640px) {
    .review-card {
        min-width: 280px;
        max-width: 320px;
        padding: 1.5rem;
    }

    .hero-grid {
        background-size: 40px 40px;
    }

    /* More padding on mobile sections */
    section {
        padding-top: 4rem;
        padding-bottom: 4rem;
    }

    /* Larger tap targets */
    a, button {
        min-height: 44px;
    }

    /* Account for mobile CTA bar */
    footer {
        padding-bottom: 5rem;
    }

    /* WhatsApp button above CTA bar on mobile */
    #whatsapp-float {
        bottom: 5rem;
    }

    #back-to-top {
        bottom: 5rem;
        right: 1rem;
    }
}

@media (max-width: 768px) {
    /* Show lightbox nav on mobile too (bigger buttons) */
    #lightbox-prev,
    #lightbox-next {
        display: flex;
    }
}

/* ============================================
   LOADING SPINNER
   ============================================ */

@keyframes spin {
    to { transform: rotate(360deg); }
}

.animate-spin {
    animation: spin 1s linear infinite;
}

/* ============================================
   WHATSAPP FLOATING BUTTON
   ============================================ */

.whatsapp-pulse {
    animation: whatsappPulse 2s ease-in-out infinite;
}

@keyframes whatsappPulse {
    0%, 100% { box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4); }
    50% { box-shadow: 0 4px 25px rgba(37, 211, 102, 0.7), 0 0 0 8px rgba(37, 211, 102, 0.1); }
}

/* ============================================
   ACCESSIBILITY - Reduced Motion
   ============================================ */

@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;
    }

    .hero-car,
    .racing-line,
    .racing-line-delayed,
    .whatsapp-pulse,
    .chrome-text,
    .animate-fadeInDown,
    .animate-fadeInUp,
    .animate-fadeInScale,
    .animate-spin,
    .animate-bounce {
        animation: none !important;
    }

    .hero-car {
        opacity: 0.06;
        transform: none;
    }

    .reveal,
    .reveal-left,
    .reveal-right {
        opacity: 1 !important;
        transform: none !important;
    }

    .chrome-text {
        -webkit-text-fill-color: #FFE000;
    }
}

/* ============================================
   ACCESSIBILITY - Focus Visible
   ============================================ */

*:focus-visible {
    outline: 2px solid #FFE000;
    outline-offset: 2px;
    border-radius: 2px;
}

/* Remove default focus ring for mouse users */
*:focus:not(:focus-visible) {
    outline: none;
}

/* Enhanced focus for interactive elements */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
    outline: 2px solid #FFE000;
    outline-offset: 2px;
    box-shadow: 0 0 0 4px rgba(255, 224, 0, 0.15);
}

/* ============================================
   DESIGN - Page load fade-in
   ============================================ */

@keyframes pageLoad {
    from { opacity: 0; }
    to { opacity: 1; }
}

body {
    animation: pageLoad 0.4s ease forwards;
}

/* ============================================
   DESIGN - Smooth scroll-snap for carousel
   ============================================ */

#reviews-carousel {
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scroll-padding: 0 1.5rem;
}

.review-card {
    scroll-snap-align: start;
}

/* ============================================
   PRINT STYLES
   ============================================ */

@media print {
    #navbar,
    #back-to-top,
    #lightbox,
    #whatsapp-float,
    #mobile-cta-bar,
    #scroll-progress,
    #scroll-progress-right,
    #particles-canvas,
    .hero-grid,
    .racing-line,
    .racing-line-delayed,
    .section-separator,
    .chrome-corners::before,
    .chrome-corners::after,
    .noise-overlay,
    .whatsapp-pulse {
        display: none !important;
    }

    body {
        background: #fff !important;
        color: #000 !important;
        opacity: 1 !important;
    }

    a {
        color: #000 !important;
        text-decoration: underline;
    }

    section {
        break-inside: avoid;
        padding: 1rem 0 !important;
    }

    .review-card,
    .service-card .card-inner {
        background: #f5f5f5 !important;
        border-color: #ccc !important;
        color: #000 !important;
    }

    .text-gray-300,
    .text-gray-400,
    .text-gray-500 {
        color: #333 !important;
    }
}
