/* ===== Custom Styles for Doughton's Auto Service ===== */

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    overflow-x: hidden;
}

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

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

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

::-webkit-scrollbar-track {
    background: #0a1628;
}

::-webkit-scrollbar-thumb {
    background: #1a2b45;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #d4a853;
}

/* ===== Scroll Animations ===== */
.fade-in {
    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);
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

.fade-in-left {
    opacity: 0;
    transform: translateX(-40px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.fade-in-left.visible {
    opacity: 1;
    transform: translateX(0);
}

.fade-in-right {
    opacity: 0;
    transform: translateX(40px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.fade-in-right.visible {
    opacity: 1;
    transform: translateX(0);
}

/* Stagger children */
.stagger-children .fade-in:nth-child(1) { transition-delay: 0.05s; }
.stagger-children .fade-in:nth-child(2) { transition-delay: 0.1s; }
.stagger-children .fade-in:nth-child(3) { transition-delay: 0.15s; }
.stagger-children .fade-in:nth-child(4) { transition-delay: 0.2s; }
.stagger-children .fade-in:nth-child(5) { transition-delay: 0.25s; }
.stagger-children .fade-in:nth-child(6) { transition-delay: 0.3s; }

/* ===== Service Card Hover ===== */
.service-card {
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, #d4a853, transparent);
    opacity: 0;
    transition: opacity 0.5s ease;
}

.service-card:hover::before {
    opacity: 1;
}

/* ===== Testimonial Card ===== */
.testimonial-card {
    position: relative;
}

.testimonial-card::after {
    content: '"';
    position: absolute;
    top: 20px;
    right: 30px;
    font-family: 'Playfair Display', serif;
    font-size: 8rem;
    color: rgba(212, 168, 83, 0.05);
    line-height: 1;
    pointer-events: none;
}

/* ===== Navbar Transition ===== */
.nav-scrolled {
    background: rgba(10, 22, 40, 0.95) !important;
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.nav-scrolled .menu-line {
    background: #fff !important;
}

/* ===== Scroll Line Animation ===== */
@keyframes scrollLine {
    0% {
        top: -50%;
    }
    100% {
        top: 150%;
    }
}

.animate-scroll-line {
    animation: scrollLine 2s ease-in-out infinite;
}

/* ===== Mobile Menu ===== */
.mobile-menu-open {
    opacity: 1 !important;
    pointer-events: all !important;
}

.menu-line-active-1 {
    transform: rotate(45deg) translate(4px, 4px);
}

.menu-line-active-2 {
    opacity: 0;
}

.menu-line-active-3 {
    width: 28px;
    transform: rotate(-45deg) translate(4px, -4px);
}

/* ===== Selection Color ===== */
::selection {
    background: rgba(212, 168, 83, 0.3);
    color: #fff;
}

/* ===== Input Autofill ===== */
input:-webkit-autofill,
textarea:-webkit-autofill,
select:-webkit-autofill {
    -webkit-box-shadow: 0 0 0 30px #0a1628 inset !important;
    -webkit-text-fill-color: #fff !important;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    html {
        scroll-padding-top: 60px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto;
    }
    
    .fade-in, .fade-in-left, .fade-in-right {
        opacity: 1;
        transform: none;
    }
}
