/* ============================================
   Handyman Mike and Son — Custom Styles
   ============================================ */

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

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

body {
    overflow-x: hidden;
}

/* Selection color */
::selection {
    background: #d4552b;
    color: #fefcf8;
}

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

#navbar.scrolled {
    background: rgba(254, 252, 248, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(21, 38, 64, 0.08);
}

#navbar.scrolled .nav-logo-text {
    color: #152640 !important;
}

#navbar.scrolled .nav-logo-sub {
    color: rgba(21, 38, 64, 0.5) !important;
}

.nav-link {
    position: relative;
}

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

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

#navbar:not(.scrolled) .nav-link {
    color: rgba(253, 247, 238, 0.8) !important;
}

#navbar:not(.scrolled) .nav-link:hover {
    color: #f29d7c !important;
}

#navbar:not(.scrolled) .nav-link::after {
    background: #f29d7c;
}

#navbar:not(.scrolled) .nav-logo-text {
    color: #fefcf8 !important;
}

#navbar:not(.scrolled) .nav-logo-sub {
    color: rgba(254, 252, 248, 0.5) !important;
}

/* ============================================
   Mobile Menu
   ============================================ */
.mobile-link {
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.4s ease, transform 0.4s ease, color 0.3s ease;
}

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

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

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

#menuBtn[aria-expanded="true"] .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(4px, 4px);
}

#menuBtn[aria-expanded="true"] .menu-line:nth-child(2) {
    opacity: 0;
}

#menuBtn[aria-expanded="true"] .menu-line:nth-child(3) {
    width: 24px;
    transform: rotate(-45deg) translate(4px, -4px);
}

/* ============================================
   Hero Animations
   ============================================ */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   Scroll Reveal
   ============================================ */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

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

/* On non-reduced-motion systems, start hidden and animate in */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(30px);
    }

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

/* ============================================
   Form Styles
   ============================================ */
input:focus,
select:focus,
textarea:focus {
    border-color: #d4552b !important;
    box-shadow: 0 0 0 3px rgba(212, 85, 43, 0.15) !important;
}

input::placeholder,
textarea::placeholder {
    color: rgba(21, 38, 64, 0.25);
}

/* ============================================
   Image hover zoom container
   ============================================ */
.group img {
    will-change: transform;
}

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #b8401e;
}

/* ============================================
   Responsive adjustments
   ============================================ */
@media (max-width: 768px) {
    .hero-headline {
        font-size: 2.75rem !important;
    }
}
