/* =============================================
   Broadway Appliance Refri Service — Styles
   Bold editorial · Forest green & off-white
   ============================================= */

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

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

body {
    overflow-x: hidden;
}

/* Selection color */
::selection {
    background: #28412b;
    color: #fdfcfa;
}

/* =============================================
   Scroll Reveal (progressive enhancement)
   ============================================= */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(30px);
        transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), 
                    transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
    }
    
    .reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
    
    /* Staggered delays for grid items */
    .service-card:nth-child(1) .reveal { transition-delay: 0.05s; }
    .service-card:nth-child(2) .reveal { transition-delay: 0.1s; }
    .service-card:nth-child(3) .reveal { transition-delay: 0.15s; }
    .service-card:nth-child(4) .reveal { transition-delay: 0.2s; }
    .service-card:nth-child(5) .reveal { transition-delay: 0.25s; }
    .service-card:nth-child(6) .reveal { transition-delay: 0.3s; }
}

/* Always-visible fallback when JS is disabled */
.no-js .reveal,
.reveal {
    opacity: 1;
    transform: none;
}

@media (prefers-reduced-motion: reduce) {
    .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
}

/* =============================================
   Navbar
   ============================================= */
#navbar {
    background: rgba(253, 252, 250, 0.9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(40, 65, 43, 0.08);
}

#navbar.scrolled {
    box-shadow: 0 1px 20px rgba(17, 26, 17, 0.08);
}

/* =============================================
   Marquee
   ============================================= */
@keyframes marquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

.animate-marquee {
    animation: marquee 30s linear infinite;
}

/* =============================================
   Hero
   ============================================= */
#hero {
    background: linear-gradient(135deg, #fdfcfa 0%, #f5f0e8 50%, #ece4d4 100%);
    position: relative;
}

/* =============================================
   Typography refinements
   ============================================= */
h1, h2, h3, h4 {
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.02em;
}

/* =============================================
   Button & link hover states
   ============================================= */
a {
    transition: color 0.2s ease;
}

/* =============================================
   Form elements
   ============================================= */
input:focus,
textarea:focus {
    outline: none;
}

/* =============================================
   Mobile menu animation
   ============================================= */
#mobileMenu {
    animation: slideDown 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* =============================================
   Responsive adjustments
   ============================================= */
@media (max-width: 767px) {
    #hero {
        min-height: auto;
        padding: 80px 0 60px;
    }
    
    #hero h1 {
        font-size: 2.75rem;
    }
    
    .reveal {
        opacity: 1;
        transform: none;
    }
}

@media (min-width: 768px) and (max-width: 1023px) {
    #hero h1 {
        font-size: 4rem;
    }
}

/* =============================================
   Focus visible for accessibility
   ============================================= */
:focus-visible {
    outline: 2px solid #28412b;
    outline-offset: 2px;
}

/* =============================================
   Print styles
   ============================================= */
@media print {
    #navbar, .animate-marquee, #hero .scroll-indicator {
        display: none;
    }
    
    body {
        background: white;
        color: black;
    }
}
