/* ============================================
   AE Games and Repairs — Custom Styles
   ============================================ */

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    overflow-x: hidden;
}

/* Selection */
::selection {
    background: color-mix(in srgb, #1B4332 80%, transparent);
    color: #D8F3DC;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #FAFAF5;
}
::-webkit-scrollbar-thumb {
    background: #95D5B9;
    border-radius: 999px;
}
::-webkit-scrollbar-thumb:hover {
    background: #2D6A4F;
}

/* ============================================
   Scroll Reveal Animations
   Progressive enhancement — hidden by default,
   revealed by JS only for below-fold content
   ============================================ */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(32px);
        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; }
    .reveal:nth-child(5) { transition-delay: 0.4s; }
    .reveal:nth-child(6) { transition-delay: 0.5s; }
}

/* Always visible when reduced motion preferred */
@media (prefers-reduced-motion: reduce) {
    .reveal {
        opacity: 1;
        transform: none;
    }
}

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

#navbar.scrolled {
    background: rgba(253, 252, 248, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 1px 0 rgba(27, 67, 50, 0.08), 0 4px 24px rgba(27, 67, 50, 0.06);
}

#navbar.scrolled .font-accent {
    color: #1B4332 !important;
}

/* ============================================
   Hero
   ============================================ */
#hero {
    position: relative;
}

#hero::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 120px;
    background: linear-gradient(to top, #FDFCF8, transparent);
    pointer-events: none;
    z-index: 2;
}

/* ============================================
   Cards hover glow
   ============================================ */
.group:hover .group-hover\:bg-forest-100 {
    background-color: #B7E4C7;
}

/* ============================================
   Mobile Menu Transitions
   ============================================ */
#mobile-menu.menu-open {
    opacity: 1;
    pointer-events: all;
}

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

.mobile-link {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.4s ease, transform 0.4s ease, color 0.2s ease;
}

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

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

/* ============================================
   Image aspect ratios
   ============================================ */
img {
    max-width: 100%;
    height: auto;
}

/* ============================================
   Focus styles
   ============================================ */
a:focus-visible, button:focus-visible {
    outline: 2px solid #2D6A4F;
    outline-offset: 3px;
    border-radius: 4px;
}

/* ============================================
   Responsive tweaks
   ============================================ */
@media (max-width: 768px) {
    html {
        scroll-padding-top: 72px;
    }
    
    #hero::after {
        height: 60px;
    }
}
