/* ============================================
   Main Street Bargains — Custom Styles
   Premium Dark Luxury | Emerald + Cream
   ============================================ */

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

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

body {
    margin: 0;
    overflow-x: hidden;
}

/* Selection */
::selection {
    background: rgba(16, 185, 129, 0.3);
    color: #fdf9f0;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #060a10;
}
::-webkit-scrollbar-thumb {
    background: #065f46;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #047857;
}

/* ============================================
   Reveal Animations (progressive enhancement)
   ============================================ */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(30px);
        transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    }
    .reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
    .reveal:nth-child(2) { transition-delay: 0.1s; }
    .reveal:nth-child(3) { transition-delay: 0.2s; }
    .reveal:nth-child(4) { transition-delay: 0.3s; }
}

/* When JS is disabled, all content is visible by default (no .reveal class applied) */
.no-js .reveal,
.js .reveal {
    /* handled by JS */
}

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

#navbar.scrolled {
    background: rgba(6, 10, 16, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.05), 0 4px 30px rgba(0, 0, 0, 0.3);
}

/* ============================================
   Mobile Menu
   ============================================ */
#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);
    }
}

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

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

/* ============================================
   Floating Cards Animation
   ============================================ */
@media (prefers-reduced-motion: no-preference) {
    .absolute.-top-4.right-0 {
        animation: float1 6s ease-in-out infinite;
    }
    .absolute.top-32.right-16 {
        animation: float2 7s ease-in-out infinite;
    }
    .absolute.top-64.right-4 {
        animation: float3 5.5s ease-in-out infinite;
    }
}

@keyframes float1 {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-12px); }
}

@keyframes float2 {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-8px); }
}

@keyframes float3 {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-15px); }
}

/* ============================================
   Button Hover Effects
   ============================================ */
a[href^="tel:"], a[href^="mailto:"] {
    text-decoration: none;
}

/* ============================================
   Image Hover Zoom
   ============================================ */
img {
    display: block;
    max-width: 100%;
}

/* ============================================
   Responsive Adjustments
   ============================================ */
@media (max-width: 768px) {
    .font-display {
        word-spacing: -0.02em;
    }
}

@media (max-width: 640px) {
    #hero h1 {
        font-size: 2.75rem;
    }
    #hero h1 span {
        font-size: 1.5rem;
    }
}

/* ============================================
   Focus Styles (Accessibility)
   ============================================ */
a:focus-visible,
button:focus-visible {
    outline: 2px solid #10b981;
    outline-offset: 2px;
    border-radius: 4px;
}

/* ============================================
   Print Styles
   ============================================ */
@media print {
    body {
        background: white;
        color: black;
    }
    #navbar, #community, .reveal {
        display: none;
    }
}
