/* ============================================
   SHREWSBURY OVERHEAD DOORS — Custom Styles
   ============================================ */

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

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

body {
    overflow-x: hidden;
}

/* --- Custom Scrollbar --- */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #1e2128;
}
::-webkit-scrollbar-thumb {
    background: #5c636b;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #ff6b42;
}

/* --- Scroll Indicator Animation --- */
@keyframes scrollIndicator {
    0% { top: -16px; opacity: 1; }
    100% { top: 48px; opacity: 0; }
}

.animate-scroll-indicator {
    animation: scrollIndicator 1.2s ease-in-out infinite;
}

/* --- Service Card Hover Effect --- */
.service-card {
    transform: translateY(0);
}

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

/* --- Gallery Hover --- */
.gallery-item {
    position: relative;
}

.gallery-item::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(15, 17, 22, 0.2) 0%, transparent 50%);
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

.gallery-item:hover::after {
    opacity: 1;
}

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

.reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(30px);
    }
    
    .reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
    
    .reveal-delay-1 { transition-delay: 0.1s; }
    .reveal-delay-2 { transition-delay: 0.2s; }
    .reveal-delay-3 { transition-delay: 0.3s; }
    .reveal-delay-4 { transition-delay: 0.4s; }
    .reveal-delay-5 { transition-delay: 0.5s; }
    .reveal-delay-6 { transition-delay: 0.6s; }
}

/* --- Navbar Transition --- */
.nav-link {
    position: relative;
}

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

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

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

.menu-line {
    transition: all 0.3s ease;
}

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

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

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

/* --- Selection --- */
::selection {
    background: #ff6b42;
    color: #ffffff;
}

/* --- Focus Styles --- */
:focus-visible {
    outline: 2px solid #ff6b42;
    outline-offset: 2px;
}

/* --- Utility: Nav Text Color --- */
.nav-text-color {
    color: #1e2128;
    transition: color 0.3s ease;
}

.nav-subtext-color {
    color: #5c636b;
    transition: color 0.3s ease;
}

nav.scrolled .nav-text-color {
    color: #f6f6f7;
}

nav.scrolled .nav-subtext-color {
    color: #a2a6ab;
}

nav.scrolled .menu-line {
    background: #f6f6f7;
}

/* --- Smooth image loading --- */
img {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}
