/* ============================================
   Justin Smith Home & Repair — Custom Styles
   ============================================ */

*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

body {
    background-color: #0a1628;
    color: #ffffff;
    font-family: 'Inter', sans-serif;
}

/* ============================================
   Geometric Background Shapes
   ============================================ */
.geo-shape {
    position: absolute;
    pointer-events: none;
    will-change: transform;
}

.shape-circle-1 {
    width: 600px;
    height: 600px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(45, 212, 160, 0.08) 0%, transparent 70%);
    top: -100px;
    right: -200px;
}

.shape-circle-2 {
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(45, 212, 160, 0.05) 0%, transparent 70%);
    bottom: 10%;
    left: -100px;
}

.shape-square-1 {
    width: 120px;
    height: 120px;
    border: 2px solid rgba(45, 212, 160, 0.15);
    border-radius: 20px;
    top: 25%;
    left: 8%;
    transform: rotate(45deg);
    animation: floatSlow 8s ease-in-out infinite;
}

.shape-triangle-1 {
    width: 0;
    height: 0;
    border-left: 50px solid transparent;
    border-right: 50px solid transparent;
    border-bottom: 86px solid rgba(45, 212, 160, 0.06);
    top: 40%;
    right: 5%;
    animation: floatSlow 6s ease-in-out infinite reverse;
}

.shape-dots {
    width: 200px;
    height: 200px;
    background-image: radial-gradient(circle, rgba(45, 212, 160, 0.2) 1px, transparent 1px);
    background-size: 16px 16px;
    bottom: 20%;
    right: 10%;
    opacity: 0.5;
}

@keyframes floatSlow {
    0%, 100% { transform: rotate(45deg) translateY(0px); }
    50% { transform: rotate(45deg) translateY(-20px); }
}

/* ============================================
   Navbar
   ============================================ */
#navbar {
    background: transparent;
}

#navbar.scrolled {
    background: rgba(10, 22, 40, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 0;
    padding-bottom: 0;
}

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

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

#menuToggle.active .nav-line:nth-child(2) {
    opacity: 0;
}

#menuToggle.active .nav-line:nth-child(3) {
    width: 6rem;
    transform: rotate(-45deg) translate(5px, -5px);
}

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

.mobile-link {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.4s 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; }

/* ============================================
   Service Cards
   ============================================ */
.service-card {
    background: rgba(15, 33, 64, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 24px;
    padding: 32px;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.service-card:hover {
    border-color: rgba(45, 212, 160, 0.3);
    transform: translateY(-4px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

/* ============================================
   Work Cards
   ============================================ */
.work-card {
    cursor: pointer;
}

/* ============================================
   Scroll Reveal (progressive enhancement)
   ============================================ */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(30px);
        transition: opacity 0.8s ease, transform 0.8s ease;
    }

    .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; }
}

/* ============================================
   Form Styles
   ============================================ */
select option {
    background: #0f2140;
    color: #ffffff;
}

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

::-webkit-scrollbar-track {
    background: #0a1628;
}

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

::-webkit-scrollbar-thumb:hover {
    background: #214e99;
}

/* ============================================
   Selection
   ============================================ */
::selection {
    background: rgba(45, 212, 160, 0.3);
    color: #ffffff;
}

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

/* ============================================
   Reduced motion
   ============================================ */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto;
    }
}
