/* ============================================
   Jack Davis Interstate Construction
   Custom Styles
   ============================================ */

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

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

body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ============================================
   Decorative Background Shapes
   ============================================ */
.bg-shape {
    position: fixed;
    pointer-events: none;
    z-index: 0;
}

.shape-circle-1 {
    top: 15%;
    left: -5%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(5, 150, 105, 0.06) 0%, transparent 70%);
    border-radius: 50%;
}

.shape-circle-2 {
    bottom: 20%;
    right: -8%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(253, 230, 138, 0.08) 0%, transparent 70%);
    border-radius: 50%;
}

.shape-triangle {
    top: 60%;
    left: 5%;
    width: 0;
    height: 0;
    border-left: 80px solid transparent;
    border-right: 80px solid transparent;
    border-bottom: 140px solid rgba(5, 150, 105, 0.04);
    transform: rotate(-15deg);
}

.shape-dots {
    top: 40%;
    right: 5%;
    width: 120px;
    height: 120px;
    background-image: radial-gradient(circle, rgba(5, 150, 105, 0.1) 2px, transparent 2px);
    background-size: 16px 16px;
    opacity: 0.5;
}

/* ============================================
   Hero Animations
   ============================================ */
@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(5deg); }
}

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

@keyframes float-slow {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

@keyframes spin-slow {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes badge-fade {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes hero-title {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes hero-sub {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes hero-cta {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes hero-trust {
    from { opacity: 0; }
    to { opacity: 1; }
}

.animate-float {
    animation: float 6s ease-in-out infinite;
}

.animate-float-delay {
    animation: float-delay 5s ease-in-out infinite;
}

.animate-float-slow {
    animation: float-slow 7s ease-in-out infinite;
}

.animate-spin-slow {
    animation: spin-slow 20s linear infinite;
}

.animate-badge-fade {
    animation: badge-fade 0.8s ease-out forwards;
}

.animate-hero-title {
    animation: hero-title 0.8s ease-out 0.2s forwards;
    opacity: 0;
}

.animate-hero-sub {
    animation: hero-sub 0.8s ease-out 0.4s forwards;
    opacity: 0;
}

.animate-hero-sub-delay {
    animation: hero-sub 0.8s ease-out 0.5s forwards;
    opacity: 0;
}

.animate-hero-cta {
    animation: hero-cta 0.8s ease-out 0.6s forwards;
    opacity: 0;
}

.animate-hero-trust {
    animation: hero-trust 0.8s ease-out 0.8s forwards;
    opacity: 0;
}

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

#navbar.scrolled {
    background: rgba(255, 254, 248, 0.95);
    backdrop-filter: blur(20px);
    box-shadow: 0 1px 20px rgba(0, 0, 0, 0.08);
}

.nav-brand-text {
    line-height: 1.1;
}

.nav-link {
    position: relative;
}

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

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

#navbar.scrolled .nav-link {
    color: #374151;
}

#navbar.scrolled .nav-link:hover {
    color: #059669;
}

#navbar.scrolled .nav-brand-text {
    color: #064e3b;
}

#navbar.scrolled .nav-brand-text span {
    color: #059669;
}

/* ============================================
   Mobile Menu
   ============================================ */
.menu-line {
    display: block;
}

#mobile-menu.open {
    transform: translateX(0);
}

.mobile-link {
    position: relative;
}

.mobile-link:hover {
    transform: translateX(8px);
}

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

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

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .scroll-reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
    
    .animate-float,
    .animate-float-delay,
    .animate-float-slow,
    .animate-spin-slow,
    .animate-badge-fade,
    .animate-hero-title,
    .animate-hero-sub,
    .animate-hero-sub-delay,
    .animate-hero-cta,
    .animate-hero-trust {
        animation: none;
        opacity: 1;
    }
    
    html {
        scroll-behavior: auto;
    }
}

/* ============================================
   Service Cards
   ============================================ */
.service-card {
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #059669, #34d399);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
}

.service-card:hover::before {
    transform: scaleX(1);
}

/* ============================================
   Form Styles
   ============================================ */
input:focus,
select:focus,
textarea:focus {
    border-color: #059669 !important;
    box-shadow: 0 0 0 4px rgba(5, 150, 105, 0.1) !important;
}

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

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

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

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

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 768px) {
    .bg-shape {
        display: none;
    }
    
    #hero h1 {
        font-size: 2.75rem;
    }
}

@media (min-width: 768px) and (max-width: 1023px) {
    #hero h1 {
        font-size: 4rem;
    }
}

@media (min-width: 1024px) {
    #hero h1 {
        font-size: 5.5rem;
    }
}
