/* --- DESIGN TOKENS --- */
:root {
    /* Colors */
    --brand-dark: #0B1E36;
    /* Deep sophisticated navy */
    --brand-dark-700: #142a4a;
    --primary: #FF4A3F;
    /* Energetic vibrant red/orange */
    --primary-hover: #e03b31;
    --text-main: #334155;
    --text-muted: #64748b;
    --bg-light: #f8fafc;
    --surface: #ffffff;
    --border: #e2e8f0;

    /* Typography */
    --font-sans: 'Outfit', sans-serif;

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    --shadow-glow: 0 0 20px rgba(255, 74, 63, 0.4);

    /* Transitions */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-normal: 300ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- RESET & GLOBAL --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    color: var(--text-main);
    background-color: var(--bg-light);
    line-height: 1.6;
    overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    color: var(--brand-dark);
    font-weight: 700;
    line-height: 1.2;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: all var(--transition-fast);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.text-center {
    text-align: center;
}

/* --- BUTTONS --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: 9999px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all var(--transition-normal);
    border: none;
    outline: none;
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.125rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), #FF763F);
    color: white;
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg), var(--shadow-glow);
    color: white;
}

.btn-outline {
    background: transparent;
    border: 2px solid white;
    color: white;
}

.btn-outline:hover {
    background: white;
    color: var(--brand-dark);
}

.btn-outline-white {
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid white;
    color: white;
    backdrop-filter: blur(4px);
}

.btn-outline-white:hover {
    background: white;
    color: var(--brand-dark);
}

/* --- NAVBAR --- */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    transition: all var(--transition-normal);
    padding: 1rem 0;
}

.navbar.scrolled {
    padding: 0.75rem 0;
    box-shadow: var(--shadow-sm);
    background: rgba(255, 255, 255, 0.98);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--brand-dark);
}

.logo i {
    font-size: 2rem;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-links a:not(.btn) {
    color: var(--text-main);
    font-weight: 500;
    position: relative;
}

.nav-links a:not(.btn)::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0%;
    height: 2px;
    background: var(--primary);
    transition: width var(--transition-normal);
}

.nav-links a:not(.btn):hover::after {
    width: 100%;
}

.nav-links a:not(.btn):hover {
    color: var(--brand-dark);
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 2rem;
    color: var(--brand-dark);
    cursor: pointer;
}

/* --- HERO SECTION --- */
.hero {
    position: relative;
    padding-top: 8rem;
    padding-bottom: 12rem;
    min-height: 100vh;
    display: flex;
    align-items: center;
    background-color: var(--brand-dark);
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Use the generated hero background */
    background-image: url('assets/hero_bg.png');
    background-size: cover;
    background-position: center;
    z-index: 0;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Create a dark gradient overlay so text stands out */
    background: linear-gradient(to right, rgba(11, 30, 54, 0.9) 0%, rgba(11, 30, 54, 0.6) 50%, rgba(11, 30, 54, 0.1) 100%);
    z-index: 1;
}

.hero-wave {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    z-index: 2;
    transform: translateY(2px);
}

.hero-container {
    position: relative;
    z-index: 3;
}

.hero-content {
    max-width: 650px;
    color: white;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.badge-blue {
    background: rgba(11, 30, 54, 0.1);
    color: var(--brand-dark);
    border: 1px solid rgba(11, 30, 54, 0.2);
}

.hero h1 {
    font-size: 4rem;
    color: white;
    margin-bottom: 1.5rem;
    line-height: 1.1;
    letter-spacing: -1px;
}

.hero p {
    font-size: 1.25rem;
    color: #cbd5e1;
    margin-bottom: 2.5rem;
    max-width: 550px;
}

.hero-ctas {
    display: flex;
    gap: 1rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
    align-items: stretch;
    /* Make both children (div and a) same height */
}

.hero-ctas>* {
    flex: 1;
    /* Make both children take equal width */
    min-width: 250px;
}

.hero-ctas .btn {
    width: 100%;
    /* Ensure the buttons themselves stretch to fill their containers */
}

.trust-indicators {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.trust-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #e2e8f0;
}

.trust-item i {
    color: var(--primary);
    font-size: 1.25rem;
}

/* --- SERVICES SECTION --- */
.services {
    padding: 6rem 0;
    background: var(--bg-light);
}

.section-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 4rem;
}

.section-header h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.section-header p {
    font-size: 1.125rem;
    color: var(--text-muted);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2.5rem;
}

.service-card {
    background: var(--surface);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-normal);
    border: 1px solid var(--border);
    display: flex;
    flex-direction: column;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-xl);
}

.service-image {
    height: 200px;
    background-color: var(--brand-dark-700);
    background-size: cover;
    background-position: center;
    transition: transform 0.7s ease;
}

.drain-img {
    background-image: url('assets/drainage.png');
}

.plumbing-img {
    background-image: url('https://images.unsplash.com/photo-1585050228020-eabbcd7ef588?ixlib=rb-4.0.3&auto=format&fit=crop&w=800&q=80');
}

/* we didn't generate plumbing img above because only 3 at a time, so just using a fallback or we can use drainage for now, but a high quality unsplash URL works. Or we'll just use a subtle pattern */
.excavate-img {
    background-image: url('assets/excavation.png');
}

.service-card:hover .service-image {
    transform: scale(1.05);
}

.service-content {
    padding: 2rem;
    position: relative;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    background: var(--surface);
    z-index: 2;
}

.icon-wrapper {
    width: 60px;
    height: 60px;
    background: var(--brand-dark);
    color: white;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    position: absolute;
    top: -30px;
    border: 4px solid var(--surface);
    box-shadow: var(--shadow-sm);
}

.service-card h3 {
    margin-top: 1rem;
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
}

.service-card p {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.service-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    color: var(--primary);
}

.service-link:hover {
    gap: 0.75rem;
}

/* --- ABOUT SECTION --- */
.about {
    padding: 6rem 0;
    background: var(--surface);
}

.about-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-content h2 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
}

.lead-text {
    font-size: 1.25rem;
    font-weight: 500;
    color: var(--brand-dark);
    margin-bottom: 1rem;
}

.about-content p {
    margin-bottom: 1.5rem;
    color: var(--text-muted);
}

.note-box {
    background: #fff8f1;
    border-left: 4px solid var(--primary);
    padding: 1.5rem;
    border-radius: 0 12px 12px 0;
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

.note-icon {
    color: var(--primary);
    font-size: 1.5rem;
}

.note-box p {
    margin: 0;
    color: var(--text-main);
    font-size: 0.95rem;
}

.about-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.stat-card {
    padding: 2.5rem 2rem;
    border-radius: 20px;
    text-align: center;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border);
    background: linear-gradient(145deg, #ffffff, #f8fafc);
}

.stat-icon {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 1rem;
}

.stat-card h3 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    color: var(--brand-dark);
}

.stat-card p {
    color: var(--text-muted);
    font-weight: 500;
}

/* --- TESTIMONIALS --- */
.testimonials {
    padding: 6rem 0 8rem;
    background: var(--bg-light);
}

.testimonial-card {
    background: var(--surface);
    border-radius: 24px;
    padding: 3rem;
    max-width: 800px;
    margin: 0 auto;
    box-shadow: var(--shadow-lg);
    position: relative;
}

.quote-icon {
    position: absolute;
    top: -20px;
    left: 40px;
    width: 60px;
    height: 60px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    box-shadow: var(--shadow-glow);
}

.quote-text {
    font-size: 1.25rem;
    font-style: italic;
    color: var(--text-main);
    margin-bottom: 2rem;
    line-height: 1.8;
}

.quote-author {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.avatar {
    width: 50px;
    height: 50px;
    background: var(--brand-dark-700);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.quote-author h4 {
    margin-bottom: 0.25rem;
    font-size: 1.1rem;
}

.stars {
    color: #fbbf24;
    font-size: 1rem;
    display: flex;
    gap: 0.25rem;
}

/* --- CTA SECTION --- */
.cta-section {
    background: var(--brand-dark);
    padding: 6rem 0;
    position: relative;
    overflow: hidden;
    text-align: center;
}

.cta-section::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 74, 63, 0.1) 0%, transparent 60%);
}

.cta-container {
    position: relative;
    z-index: 2;
    max-width: 800px;
}

.cta-section h2 {
    color: white;
    font-size: 3rem;
    margin-bottom: 1.5rem;
}

.cta-section p {
    color: #cbd5e1;
    font-size: 1.25rem;
    margin-bottom: 2.5rem;
}

.cta-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

/* --- CONTACT SECTION --- */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: start;
}

.contact-info-cards {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.info-card {
    background: var(--surface);
    padding: 2.5rem;
    border-radius: 20px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border);
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    transition: transform var(--transition-fast);
}

.info-card:hover {
    transform: translateY(-5px);
}

.info-icon {
    width: 60px;
    height: 60px;
    background: rgba(255, 74, 63, 0.1);
    color: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    flex-shrink: 0;
}

.info-card h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.info-card p,
.info-card a {
    color: var(--text-muted);
    font-size: 1.1rem;
}

.info-card a:hover {
    color: var(--primary);
}

.contact-form-container {
    background: var(--surface);
    padding: 3rem;
    border-radius: 24px;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border);
}

.contact-form-container h2 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--brand-dark);
}

.form-control {
    width: 100%;
    padding: 1rem;
    border: 1px solid var(--border);
    border-radius: 12px;
    font-family: var(--font-sans);
    font-size: 1rem;
    transition: border-color var(--transition-fast);
    background: var(--bg-light);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    background: white;
}

textarea.form-control {
    resize: vertical;
    min-height: 150px;
}

/* --- CONTACT SECTION --- */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: start;
}

.contact-info-cards {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.info-card {
    background: var(--surface);
    padding: 2.5rem;
    border-radius: 20px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border);
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    transition: transform var(--transition-fast);
}

.info-card:hover {
    transform: translateY(-5px);
}

.info-icon {
    width: 60px;
    height: 60px;
    background: rgba(255, 74, 63, 0.1);
    color: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    flex-shrink: 0;
}

.info-card h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.info-card p,
.info-card a {
    color: var(--text-muted);
    font-size: 1.1rem;
}

.info-card a:hover {
    color: var(--primary);
}

.contact-form-container {
    background: var(--surface);
    padding: 3rem;
    border-radius: 24px;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border);
}

.contact-form-container h2 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--brand-dark);
}

.form-control {
    width: 100%;
    padding: 1rem;
    border: 1px solid var(--border);
    border-radius: 12px;
    font-family: var(--font-sans);
    font-size: 1rem;
    transition: border-color var(--transition-fast);
    background: var(--bg-light);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    background: white;
}

textarea.form-control {
    resize: vertical;
    min-height: 150px;
}

/* --- FOOTER --- */
footer {
    background: #020816;
    color: #94a3b8;
    padding-top: 4rem;
}

.footer-container {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-col h4 {
    color: white;
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
}

.footer-col .logo {
    color: white;
    margin-bottom: 1.5rem;
}

.footer-col p {
    margin-bottom: 1rem;
}

.footer-col a {
    display: block;
    color: #94a3b8;
    margin-bottom: 0.75rem;
}

.footer-col a:hover {
    color: var(--primary);
    transform: translateX(5px);
}

.footer-col p i {
    color: var(--primary);
    margin-right: 0.5rem;
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.social-links a {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.social-links a:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-3px);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1.5rem 0;
    text-align: center;
    font-size: 0.875rem;
}

/* --- ANIMATIONS --- */
.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in-up.visible {
    opacity: 1;
    transform: translateY(0);
}

/* --- RESPONSIVE --- */
@media (max-width: 992px) {
    .container {
        padding: 0 1.5rem;
    }

    .about-container {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .contact-grid {
        grid-template-columns: 1fr;
    }

    .hero h1 {
        font-size: 3rem;
    }

    .footer-container {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
        /* hidden by default on mobile */
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: white;
        flex-direction: column;
        padding: 2rem;
        box-shadow: var(--shadow-lg);
        text-align: center;
    }

    .nav-links.active {
        display: flex;
    }

    .mobile-menu-toggle {
        display: block;
    }

    .hero {
        padding-top: 6rem;
        padding-bottom: 8rem;
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .hero-content {
        text-align: center;
        margin: 0 auto;
    }

    .hero-ctas {
        justify-content: center;
    }

    .trust-indicators {
        justify-content: center;
    }

    .footer-container {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .social-links {
        justify-content: center;
    }

    .about-stats {
        grid-template-columns: 1fr;
    }

    .stat-card[style] {
        grid-column: span 1 !important;
    }
}

/* --- STICKY CTA --- */
.sticky-cta {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: linear-gradient(135deg, var(--primary), #FF763F);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 9999px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.125rem;
    font-weight: 600;
    box-shadow: var(--shadow-xl), var(--shadow-glow);
    z-index: 9999;
    transition: transform var(--transition-normal);
}

.sticky-cta:hover {
    transform: translateY(-5px) scale(1.05);
    color: white;
}

.sticky-cta i {
    font-size: 1.5rem;
    animation: ring 2s infinite ease-in-out;
}

@keyframes ring {
    0% {
        transform: rotate(0);
    }

    10% {
        transform: rotate(15deg);
    }

    20% {
        transform: rotate(-10deg);
    }

    30% {
        transform: rotate(5deg);
    }

    40% {
        transform: rotate(-5deg);
    }

    50% {
        transform: rotate(0);
    }

    100% {
        transform: rotate(0);
    }
}

@media (max-width: 768px) {
    .sticky-cta {
        bottom: 1.5rem;
        right: 1.5rem;
        padding: 0.875rem 1.25rem;
        font-size: 1rem;
    }
}