/* ========================================
   Elite Maids House Cleaning Tucson
   Custom Styles
   ======================================== */

/* --- Base & Typography --- */
html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    overflow-x: hidden;
}

::selection {
    background-color: rgba(22, 165, 74, 0.2);
    color: #052e16;
}

/* --- Navbar --- */
.nav-fixed {
    background: transparent;
    transition: background-color 0.4s ease, backdrop-filter 0.4s ease, box-shadow 0.4s ease;
}

.nav-fixed.scrolled {
    background: rgba(253, 252, 250, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 1px 0 rgba(22, 101, 52, 0.08);
}

.nav-link {
    position: relative;
}

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

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

.nav-fixed.scrolled .nav-link {
    color: #166534;
}

/* --- Hero --- */
.hero {
    position: relative;
}

.hero-bg {
    will-change: transform;
}

/* --- Section Headers --- */
.section-eyebrow {
    letter-spacing: 0.2em;
}

.section-title {
    font-weight: 500;
}

.section-subtitle {
    line-height: 1.8;
}

/* --- Service Cards --- */
.service-card {
    will-change: transform;
}

/* --- Testimonial Cards --- */
.testimonial-card {
    will-change: transform;
}

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

.reveal[data-reveal-delay="100"] { transition-delay: 0.1s; }
.reveal[data-reveal-delay="200"] { transition-delay: 0.2s; }
.reveal[data-reveal-delay="300"] { transition-delay: 0.3s; }
.reveal[data-reveal-delay="400"] { transition-delay: 0.4s; }

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

/* --- Mobile Menu --- */
.mobile-menu {
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

.mobile-menu.active {
    opacity: 1;
    pointer-events: all;
}

.mobile-menu.inactive {
    opacity: 0;
    pointer-events: none;
}

.mobile-nav-link {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

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

.mobile-menu.inactive .mobile-nav-link {
    opacity: 0;
    transform: translateY(10px);
}

/* Staggered mobile nav links */
.mobile-menu.active .mobile-nav-link:nth-child(1) { transition-delay: 0.1s; }
.mobile-menu.active .mobile-nav-link:nth-child(2) { transition-delay: 0.15s; }
.mobile-menu.active .mobile-nav-link:nth-child(3) { transition-delay: 0.2s; }
.mobile-menu.active .mobile-nav-link:nth-child(4) { transition-delay: 0.25s; }
.mobile-menu.active .mobile-nav-link:nth-child(5) { transition-delay: 0.3s; }

/* --- Hamburger Animation --- */
.mobile-menu-btn.active .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(4px, 4px);
}

.mobile-menu-btn.active .menu-line:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

.mobile-menu-btn.active .menu-line:nth-child(3) {
    transform: rotate(-45deg) translate(4px, -4px);
    width: 5px;
}

/* --- Button Animations --- */
.cta-primary {
    will-change: transform, box-shadow;
}

.btn-submit {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.btn-submit::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-submit:hover::before {
    left: 100%;
}

/* --- Step Numbers --- */
.step-number {
    font-feature-settings: 'tnum';
    font-variant-numeric: tabular-nums;
}

/* --- Input Focus States --- */
input:focus,
select:focus,
textarea:focus {
    outline: none;
}

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

::-webkit-scrollbar-track {
    background: #fdfcfa;
}

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

::-webkit-scrollbar-thumb:hover {
    background: #86efac;
}

/* --- Form Select Arrow --- */
select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23166534' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
}
