/* ============================================
   Suga Builders & Construction — Custom Styles
   ============================================ */

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

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

body {
    overflow-x: hidden;
}

/* Selection */
::selection {
    background-color: #065f46;
    color: #fefdf8;
}

/* ============================================
   Scroll Reveal Animations
   Progressive enhancement — only active when JS runs
   ============================================ */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(24px);
        transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
    }

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

    .reveal.revealed {
        transition-delay: 0ms;
    }
}

/* ============================================
   Hero Animations
   ============================================ */
.hero-subtitle {
    animation: slideUp 0.8s cubic-bezier(0.22, 1, 0.36, 1) 0.1s both;
}

.hero-title {
    animation: slideUp 0.8s cubic-bezier(0.22, 1, 0.36, 1) 0.2s both;
}

.hero-desc {
    animation: slideUp 0.8s cubic-bezier(0.22, 1, 0.36, 1) 0.35s both;
}

.hero-cta-primary {
    animation: slideUp 0.8s cubic-bezier(0.22, 1, 0.36, 1) 0.45s both;
}

.hero-cta-secondary {
    animation: slideUp 0.8s cubic-bezier(0.22, 1, 0.36, 1) 0.5s both;
}

.hero-image-wrapper {
    animation: fadeScale 1s cubic-bezier(0.22, 1, 0.36, 1) 0.3s both;
}

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

@keyframes fadeScale {
    from {
        opacity: 0;
        transform: scale(0.96);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

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

#navbar.scrolled {
    background-color: rgba(254, 253, 248, 0.92);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(6, 79, 70, 0.08);
}

.nav-link {
    position: relative;
}

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

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

/* ============================================
   Mobile Menu
   ============================================ */
#mobile-menu.open {
    transform: translateX(0);
}

#mobile-menu:not(.open) {
    transform: translateX(100%);
}

.mobile-link {
    position: relative;
}

/* ============================================
   Service Cards
   ============================================ */
.service-card {
    transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.4s ease;
}

.service-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 60px rgba(6, 79, 70, 0.1);
}

/* ============================================
   Gallery
   ============================================ */
.gallery-item {
    cursor: pointer;
}

.gallery-item::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(6, 78, 59, 0.2), transparent);
    opacity: 0;
    transition: opacity 0.4s ease;
}

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

/* ============================================
   Process Steps
   ============================================ */
.process-step {
    position: relative;
}

.process-step:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 32px;
    right: -1.5rem;
    width: 100%;
    height: 1px;
    background: linear-gradient(to right, transparent, rgba(6, 79, 70, 0.2), transparent);
}

@media (max-width: 767px) {
    .process-step:not(:last-child)::after {
        display: none;
    }
}

/* ============================================
   Form Styles
   ============================================ */
input:focus,
select:focus,
textarea:focus {
    border-color: #065f46 !important;
    box-shadow: 0 0 0 3px rgba(6, 79, 70, 0.08);
}

select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23065f46' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

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

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

::-webkit-scrollbar-thumb {
    background: #065f46;
    border-radius: 3px;
}

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