/* ========================================
   Karma's Speed Shop — Custom Styles
   ======================================== */

/* Base */
*, *::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 */
::selection {
    background-color: rgba(212, 168, 75, 0.3);
    color: #f5f0f7;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #1a0f1f;
}
::-webkit-scrollbar-thumb {
    background: #5D3A6B;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #8b5289;
}

/* ========================================
   Scroll Reveal Animations
   Progressive enhancement — only active
   when JS runs and user prefers motion.
   ======================================== */
.scroll-reveal {
    opacity: 1;
    transform: translateY(0);
    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);
}

/* Default state is visible (no JS = no animation, content still shows) */

/* ========================================
   Nav Styles
   ======================================== */
.nav-link {
    position: relative;
}

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

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

/* ========================================
   Mobile Nav
   ======================================== */
.mobile-nav-link {
    display: block;
}

/* ========================================
   Hero Animations
   ======================================== */
#hero-eyebrow {
    animation: fadeInUp 0.8s cubic-bezier(0.22, 1, 0.36, 1) 0.2s forwards;
    opacity: 0;
}

#hero-headline {
    animation: fadeInUp 0.8s cubic-bezier(0.22, 1, 0.36, 1) 0.4s forwards;
    opacity: 0;
}

#hero-sub {
    animation: fadeInUp 0.8s cubic-bezier(0.22, 1, 0.36, 1) 0.6s forwards;
    opacity: 0;
}

#hero-cta {
    animation: fadeInUp 0.8s cubic-bezier(0.22, 1, 0.36, 1) 0.8s forwards;
    opacity: 0;
}

#hero-scroll {
    animation: fadeInUp 0.8s cubic-bezier(0.22, 1, 0.36, 1) 1s forwards;
    opacity: 0;
}

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

/* ========================================
   Reduced Motion
   ======================================== */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    .scroll-reveal {
        transition: none;
    }
    #hero-eyebrow,
    #hero-headline,
    #hero-sub,
    #hero-cta,
    #hero-scroll {
        animation: none;
        opacity: 1;
    }
    * {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}

/* ========================================
   Focus Styles
   ======================================== */
:focus-visible {
    outline: 2px solid #D4A84B;
    outline-offset: 2px;
}

/* ========================================
   Form Inputs
   ======================================== */
input:focus,
textarea:focus {
    background-color: rgba(93, 58, 107, 0.4);
}

/* ========================================
   Image Hover Overlay
   ======================================== */
.group:hover .group-hover\:scale-105 {
    transform: scale(1.05);
}

/* ========================================
   Responsive Adjustments
   ======================================== */
@media (max-width: 640px) {
    .font-serif {
        line-height: 1.1;
    }
}

@media (min-width: 641px) and (max-width: 1023px) {
    /* Tablet adjustments */
}

/* ========================================
   Print Styles
   ======================================== */
@media print {
    #site-header,
    #back-to-top,
    #hero-scroll {
        display: none;
    }
    body {
        background: white;
        color: black;
    }
    .bg-plum-950, .bg-plum-900, .bg-plum-800 {
        background: white !important;
        color: black !important;
    }
}
