/* ===== Custom Styles for Miller's Vacuum Center ===== */

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

html {
    scroll-behavior: smooth;
}

body {
    overflow-x: hidden;
}

/* ===== Navbar ===== */
#navbar {
    background: transparent;
    transition: background 0.4s ease, box-shadow 0.4s ease, backdrop-filter 0.4s ease;
}

#navbar.scrolled {
    background: rgba(7, 13, 26, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 1px 0 rgba(20, 184, 166, 0.1), 0 4px 30px rgba(0, 0, 0, 0.3);
}

.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #14b8a6, #fbbf24);
    transition: width 0.3s ease;
    border-radius: 1px;
}

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

/* ===== Hero ===== */
.hero-orb {
    will-change: transform;
    animation: float 8s ease-in-out infinite;
}

.orb-2 {
    animation-delay: -3s;
    animation-duration: 10s;
}

.orb-3 {
    animation-delay: -5s;
    animation-duration: 12s;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(20px, -20px) scale(1.05); }
    66% { transform: translate(-15px, 15px) scale(0.95); }
}

/* Particles */
.particle {
    position: absolute;
    width: var(--size, 6px);
    height: var(--size, 6px);
    border-radius: 50%;
    background: var(--color, #14b8a6);
    opacity: var(--opacity, 0.4);
    animation: drift var(--dur, 8s) ease-in-out infinite;
    animation-delay: var(--delay, 0s);
    will-change: transform;
}

.p-1 { --size: 4px; --color: #14b8a6; --opacity: 0.5; }
.p-2 { --size: 6px; --color: #fbbf24; --opacity: 0.35; }
.p-3 { --size: 8px; --color: #14b8a6; --opacity: 0.25; }

@keyframes drift {
    0%, 100% { transform: translate(0, 0); }
    25% { transform: translate(calc(var(--dx) / 2), calc(var(--dy) / 2)); }
    50% { transform: translate(var(--dx), var(--dy)); }
    75% { transform: translate(calc(var(--dx) / -2), calc(var(--dy) / -2)); }
}

/* Fade-in-up animations */
.fade-in-up {
    opacity: 0;
    animation: fade-in-up 0.8s ease forwards;
    animation-delay: var(--delay, 0s);
}

@keyframes fade-in-up {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== Scroll Reveal ===== */
.section-reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

/* ===== Service Cards ===== */
.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, #14b8a6, transparent);
    opacity: 0;
    transition: opacity 0.5s ease;
}

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

/* ===== Brand Cards ===== */
.brand-card {
    transition: transform 0.3s ease, border-color 0.3s ease, background 0.3s ease;
}

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

/* ===== Testimonial Cards ===== */
.testimonial-card {
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.testimonial-card:hover {
    transform: translateY(-4px);
    border-color: rgba(20, 184, 166, 0.3);
}

/* ===== Mobile Menu ===== */
#mobile-menu {
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.mobile-link {
    display: block;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(51, 65, 85, 0.5);
}

.mobile-link:last-child {
    border-bottom: none;
}

/* ===== Input Focus ===== */
input:focus,
textarea:focus {
    outline: none;
}

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

::-webkit-scrollbar-track {
    background: #070d1a;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #14b8a6, #0f766e);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #2dd4bf, #14b8a6);
}

/* ===== Selection ===== */
::selection {
    background: rgba(20, 184, 166, 0.3);
    color: #f0fdfa;
}

/* ===== Reduced Motion ===== */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto;
    }
    
    .section-reveal {
        opacity: 1;
        transform: none;
    }
}

/* ===== Responsive ===== */
@media (max-width: 640px) {
    .font-display {
        font-size: 2rem;
    }
    
    #hero h1 {
        font-size: 2.25rem;
    }
    
    .service-card {
        padding: 1.5rem;
    }
}
