/* ============================================
   Paul's Vintage Wiring & Speed Services
   Custom Styles
   ============================================ */

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

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    overflow-x: hidden;
}

::selection {
    background: #7B2D3B;
    color: #FDF8F5;
}

/* --- Scroll Reveal Animations --- */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.reveal[data-delay="1"] { transition-delay: 0.1s; }
.reveal[data-delay="2"] { transition-delay: 0.2s; }
.reveal[data-delay="3"] { transition-delay: 0.3s; }
.reveal[data-delay="4"] { transition-delay: 0.4s; }

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
    html {
        scroll-behavior: auto;
    }
}

/* --- Navbar --- */
#navbar {
    background: transparent;
    backdrop-filter: none;
}

#navbar.scrolled {
    background: rgba(250, 246, 241, 0.95);
    backdrop-filter: blur(20px);
    box-shadow: 0 1px 0 rgba(107, 101, 96, 0.1);
}

/* --- Hero Tagline --- */
.hero-tagline {
    animation: slideUp 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

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

/* --- Hero Headline --- */
.hero-headline {
    animation: fadeIn 1s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.2s forwards;
    opacity: 0;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* --- Service Cards --- */
.service-card {
    transform: translateY(0);
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                box-shadow 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.service-card:hover {
    transform: translateY(-4px);
}

/* --- Gallery Images --- */
.gallery-img {
    transition: transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.gallery-img:hover {
    transform: scale(1.05);
}

/* --- Buttons --- */
.btn-primary {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
    transition: left 0.5s ease;
}

.btn-primary:hover::before {
    left: 100%;
}

/* --- Mobile Menu --- */
.mobile-link {
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.mobile-menu-open .mobile-link {
    opacity: 1;
    transform: translateY(0);
}

.mobile-menu-open .mobile-link:nth-child(1) { transition-delay: 0.1s; }
.mobile-menu-open .mobile-link:nth-child(2) { transition-delay: 0.15s; }
.mobile-menu-open .mobile-link:nth-child(3) { transition-delay: 0.2s; }
.mobile-menu-open .mobile-link:nth-child(4) { transition-delay: 0.25s; }
.mobile-menu-open .mobile-link:nth-child(5) { transition-delay: 0.3s; }

/* --- Menu Button Animation --- */
.menu-line {
    transform-origin: center;
}

.menu-open .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(3px, 3px);
}

.menu-open .menu-line:nth-child(2) {
    opacity: 0;
}

.menu-open .menu-line:nth-child(3) {
    transform: rotate(-45deg) translate(3px, -3px);
    width: 1.25rem;
}

/* --- Form Styling --- */
input:focus,
select:focus,
textarea:focus {
    outline: none;
}

/* Custom select arrow */
select {
    background-image: url('data:image/svg+xml,%3Csvg width="12" height="8" viewBox="0 0 12 8" fill="none" xmlns="http://www.w3.org/2000/svg"%3E%3Cpath d="M1 1l5.5 5.5L12 1" stroke="%236B6560" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/%3E%3C/svg%3E');
    background-repeat: no-repeat;
    background-position: right 1rem center;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

/* --- Decorative Patterns --- */
.pattern-dots {
    background-image: radial-gradient(circle, rgba(123, 45, 59, 0.08) 1px, transparent 1px);
    background-size: 24px 24px;
}

/* --- Smooth Scroll Offset for Fixed Nav --- */
section[id] {
    scroll-margin-top: 80px;
}

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