/* =========================================
   1. RESET & VARIABLES
   ========================================= */
:root {
    /* Color Palette - Modern Construction Tech Theme */
    --primary-color: #6366f1;
    /* Indigo */
    --secondary-color: #ec4899;
    /* Pink */
    --accent-color: #06b6d4;
    /* Cyan */
    --dark-bg: #0f172a;
    /* Slate 900 */
    --darker-bg: #020617;
    /* Slate 950 */
    --card-bg: #1e293b;
    /* Slate 800 */
    --text-main: #f8fafc;
    /* Slate 50 */
    --text-muted: #94a3b8;
    /* Slate 400 */
    --border-color: #334155;

    /* Gradients */
    --gradient-main: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    --gradient-text: linear-gradient(to right, #6366f1, #ec4899, #06b6d4);
    --glass-bg: rgba(30, 41, 59, 0.7);

    /* Dimensions */
    --header-height: 80px;
    --container-width: 1200px;

    /* Transitions */
    --transition-fast: 0.3s ease;
    --transition-smooth: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Inter', 'Segoe UI', sans-serif;
    background-color: var(--dark-bg);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
}

/* =========================================
   2. TYPOGRAPHY
   ========================================= */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
    color: #fff;
}

h1 {
    font-size: 3.5rem;
    letter-spacing: -1px;
}

h2 {
    font-size: 2.5rem;
    letter-spacing: -0.5px;
}

h3 {
    font-size: 1.75rem;
}

p {
    margin-bottom: 1.5rem;
    color: var(--text-muted);
}

.gradient-text {
    background: var(--gradient-text);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    display: inline-block;
}

.section-title {
    text-align: center;
    margin-bottom: 4rem;
    position: relative;
    z-index: 2;
}

.section-title span {
    text-transform: uppercase;
    font-size: 0.875rem;
    letter-spacing: 2px;
    color: var(--accent-color);
    font-weight: 600;
    display: block;
    margin-bottom: 0.5rem;
}

/* =========================================
   3. UTILITIES & LAYOUT
   ========================================= */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 2rem;
    width: 100%;
}

.flex {
    display: flex;
}

.flex-center {
    display: flex;
    align-items: center;
    justify-content: center;
}

.grid {
    display: grid;
}

.hidden {
    display: none;
}

.btn {
    display: inline-block;
    padding: 1rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition-fast);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    z-index: 1;
    border: none;
    font-size: 1rem;
}

.btn-primary {
    background: var(--gradient-main);
    color: white;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
    z-index: -1;
    transition: opacity 0.3s ease;
    opacity: 0;
}

.btn-primary:hover::before {
    opacity: 1;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.6);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary-color);
    color: white;
}

.btn-outline:hover {
    background: var(--primary-color);
    transform: translateY(-2px);
}

/* =========================================
   4. HEADER & NAV
   ========================================= */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height);
    z-index: 1000;
    transition: var(--transition-fast);
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.header.scrolled {
    background: rgba(15, 23, 42, 0.95);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

.logo img {
    height: 40px;
    width: auto;
    filter: brightness(0) invert(1);
    /* Ensure white logo */
}

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.nav-link {
    color: var(--text-main);
    text-decoration: none;
    font-weight: 500;
    position: relative;
    padding: 0.5rem 0;
    transition: color 0.3s;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-main);
    transition: width 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.nav-link:hover {
    color: var(--accent-color);
}

.hamburger {
    display: none;
    cursor: pointer;
    flex-direction: column;
    gap: 6px;
}

.bar {
    width: 25px;
    height: 3px;
    background-color: white;
    border-radius: 2px;
    transition: 0.3s;
}

/* Mobile Nav */
.mobile-nav {
    position: fixed;
    top: var(--header-height);
    left: 0;
    width: 100%;
    background: var(--dark-bg);
    padding: 2rem;
    transform: translateY(-150%);
    transition: transform 0.4s ease;
    z-index: 999;
    border-bottom: 1px solid var(--border-color);
}

.mobile-nav.open {
    transform: translateY(0);
}

.mobile-nav li {
    margin-bottom: 1.5rem;
    text-align: center;
}

.mobile-nav a {
    font-size: 1.2rem;
    display: block;
}

/* =========================================
   5. HERO SECTION
   ========================================= */
.hero {
    position: relative;
    min-height: 100vh;
    padding-top: var(--header-height);
    display: flex;
    align-items: center;
    overflow: hidden;
    background: radial-gradient(circle at 10% 20%, rgba(99, 102, 241, 0.15) 0%, transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(236, 72, 153, 0.15) 0%, transparent 40%);
}

.hero-content {
    flex: 1;
    z-index: 2;
    padding-right: 2rem;
}

.hero-visual {
    flex: 1;
    position: relative;
    height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-tag {
    background: rgba(99, 102, 241, 0.2);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    color: var(--accent-color);
    font-size: 0.9rem;
    font-weight: 600;
    display: inline-block;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(99, 102, 241, 0.3);
}

.glowing-blob {
    position: absolute;
    width: 300px;
    height: 300px;
    background: var(--gradient-main);
    filter: blur(80px);
    border-radius: 50%;
    opacity: 0.5;
    animation: blobFloat 10s infinite alternate;
}

/* 3D Floating Cards CSS Art */
.card-3d-wrap {
    position: relative;
    width: 100%;
    height: 100%;
    perspective: 1000px;
}

.floating-card {
    position: absolute;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 1.5rem;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    transition: transform 0.1s;
}

.fc-1 {
    top: 20%;
    left: 10%;
    width: 200px;
    animation: float 6s ease-in-out infinite;
    z-index: 2;
}

.fc-2 {
    top: 40%;
    right: 10%;
    width: 240px;
    animation: float 8s ease-in-out infinite reverse;
    z-index: 1;
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.9), rgba(15, 23, 42, 0.9));
}

.fc-3 {
    bottom: 15%;
    left: 25%;
    width: 180px;
    animation: float 7s ease-in-out infinite 1s;
    z-index: 3;
}

.stat-row {
    display: flex;
    justify-content: space-between;
    margin-top: 1rem;
}

.stat-bar {
    height: 6px;
    background: #334155;
    border-radius: 3px;
    margin-top: 0.5rem;
    overflow: hidden;
}

.stat-fill {
    height: 100%;
    background: var(--gradient-main);
    width: 0;
    animation: fillBar 2s ease-out forwards;
}

/* =========================================
   6. SERVICES SECTION (Grid & Cards)
   ========================================= */
.services {
    padding: 8rem 0;
    background: var(--darker-bg);
    position: relative;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.service-card {
    background: var(--card-bg);
    padding: 2.5rem;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
    group: hover;
}

.service-card:hover {
    transform: translateY(-10px);
    border-color: var(--primary-color);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.service-icon {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    color: var(--accent-color);
    background: rgba(6, 182, 212, 0.1);
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    transition: 0.3s;
}

.service-card:hover .service-icon {
    background: var(--gradient-main);
    color: white;
    transform: scale(1.1) rotate(5deg);
}

.service-link {
    display: inline-flex;
    align-items: center;
    margin-top: 1rem;
    color: var(--secondary-color);
    font-weight: 600;
    text-decoration: none;
    gap: 0.5rem;
}

.service-link i {
    transition: transform 0.3s;
}

.service-card:hover .service-link i {
    transform: translateX(5px);
}

/* =========================================
   7. INTERACTIVE CALCULATOR
   ========================================= */
.calculator-section {
    padding: 8rem 0;
    background: linear-gradient(180deg, var(--dark-bg) 0%, var(--card-bg) 100%);
}

.calc-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    background: var(--glass-bg);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    padding: 3rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.calc-inputs label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.range-group {
    margin-bottom: 2rem;
}

input[type=range] {
    width: 100%;
    height: 6px;
    background: #334155;
    border-radius: 5px;
    outline: none;
    appearance: none;
}

input[type=range]::-webkit-slider-thumb {
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--accent-color);
    cursor: pointer;
    box-shadow: 0 0 10px var(--accent-color);
    transition: 0.2s;
}

.range-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
    display: block;
    margin-top: 0.5rem;
}

.calc-result {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: var(--darker-bg);
    border-radius: 16px;
    padding: 2rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.calc-result::before {
    content: '';
    position: absolute;
    width: 150%;
    height: 150%;
    background: conic-gradient(from 180deg at 50% 50%, var(--primary-color) 0deg, transparent 60deg, transparent 300deg, var(--secondary-color) 360deg);
    animation: spin 4s linear infinite;
    opacity: 0.2;
}

.result-box {
    position: relative;
    z-index: 1;
}

.result-number {
    font-size: 3.5rem;
    font-weight: 800;
    background: var(--gradient-text);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    display: block;
    margin: 1rem 0;
}

/* =========================================
   8. CAMPAIGN REPORT SAMPLE
   ========================================= */
.report-section {
    padding: 8rem 0;
    background: var(--dark-bg);
}

.report-container {
    background: var(--card-bg);
    border-radius: 20px;
    padding: 2rem;
    border: 1px solid var(--border-color);
    max-width: 900px;
    margin: 0 auto;
}

.report-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 2rem;
}

.chart-area {
    height: 300px;
    display: flex;
    align-items: flex-end;
    justify-content: space-around;
    padding: 1rem;
    background: rgba(15, 23, 42, 0.5);
    border-radius: 10px;
    position: relative;
}

.bar-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 10%;
    height: 100%;
    justify-content: flex-end;
}

.chart-bar {
    width: 100%;
    background: var(--gradient-main);
    border-radius: 4px 4px 0 0;
    transition: height 1s ease-out;
    position: relative;
    opacity: 0.8;
}

.chart-bar:hover {
    opacity: 1;
    filter: brightness(1.2);
}

.chart-bar::after {
    content: attr(data-value);
    position: absolute;
    top: -25px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.8rem;
    color: white;
    opacity: 0;
    transition: 0.3s;
}

.chart-bar:hover::after {
    opacity: 1;
    top: -30px;
}

/* =========================================
   9. TESTIMONIALS & INDUSTRIES
   ========================================= */
.testimonials {
    padding: 8rem 0;
    background: var(--darker-bg);
}

.testimonial-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.t-card {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 16px;
    position: relative;
}

.t-card::before {
    content: '"';
    font-size: 5rem;
    color: var(--primary-color);
    opacity: 0.2;
    position: absolute;
    top: 10px;
    left: 20px;
    font-family: serif;
}

.client-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 1.5rem;
}

.client-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--gradient-main);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: white;
}

/* Industries Tag Cloud */
.industries-section {
    padding: 6rem 0;
    text-align: center;
}

.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    max-width: 800px;
    margin: 0 auto;
}

.tag {
    background: rgba(255, 255, 255, 0.05);
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    transition: 0.3s;
    cursor: default;
}

.tag:hover {
    background: var(--primary-color);
    color: white;
    transform: scale(1.05);
    border-color: var(--primary-color);
}

/* =========================================
   10. CONTACT SECTION (INDEX)
   ========================================= */
.contact-cta {
    padding: 8rem 0;
    background-size: cover;
    background-attachment: fixed;
    text-align: center;
}

.contact-form-wrapper {
    max-width: 600px;
    margin: 3rem auto 0;
    background: var(--card-bg);
    padding: 3rem;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.form-group {
    margin-bottom: 1.5rem;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-main);
}

.form-control {
    width: 100%;
    padding: 1rem;
    background: var(--dark-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: white;
    font-family: inherit;
    transition: 0.3s;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

/* =========================================
   11. FOOTER
   ========================================= */
.footer {
    background: var(--darker-bg);
    padding: 5rem 0 2rem;
    border-top: 1px solid var(--border-color);
}

.footer-content {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 4rem;
}

.footer-brand p {
    margin-top: 1.5rem;
    max-width: 300px;
}

.footer-col h4 {
    color: white;
    margin-bottom: 1.5rem;
    font-size: 1.2rem;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.8rem;
}

.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    transition: 0.3s;
}

.footer-links a:hover {
    color: var(--accent-color);
    padding-left: 5px;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Legal Content Styles */
.legal-content {
    padding: 10rem 0 5rem;
    min-height: 80vh;
}

.legal-content h1 {
    margin-bottom: 2rem;
    text-align: center;
}

.legal-content h2 {
    margin-top: 2rem;
    font-size: 1.5rem;
    color: var(--accent-color);
}

.legal-content ul {
    margin-left: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--text-muted);
}

.legal-content li {
    margin-bottom: 0.5rem;
}

/* Contact Page Specific */
.contact-page-wrapper {
    padding: 10rem 0 5rem;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 4rem;
}

.contact-info-item {
    margin-bottom: 2rem;
    display: flex;
    gap: 1rem;
}

.info-icon {
    width: 40px;
    height: 40px;
    background: var(--gradient-main);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* =========================================
   12. ANIMATIONS
   ========================================= */
@keyframes float {
    0% {
        transform: translateY(0px) rotate(0deg);
    }

    50% {
        transform: translateY(-20px) rotate(2deg);
    }

    100% {
        transform: translateY(0px) rotate(0deg);
    }
}

@keyframes blobFloat {
    0% {
        transform: translate(0, 0) scale(1);
    }

    33% {
        transform: translate(30px, -50px) scale(1.1);
    }

    66% {
        transform: translate(-20px, 20px) scale(0.9);
    }

    100% {
        transform: translate(0, 0) scale(1);
    }
}

@keyframes fillBar {
    to {
        width: 100%;
    }
}

@keyframes spin {
    100% {
        transform: rotate(360deg);
    }
}

.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease-out;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive */
@media (max-width: 1024px) {
    .hero-content h1 {
        font-size: 2.8rem;
    }

    .calc-wrapper {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .footer-content {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {

    .nav-links,
    .btn-primary.desktop-only {
        display: none;
    }

    .hamburger {
        display: flex;
    }

    .hero {
        flex-direction: column-reverse;
        text-align: center;
        padding-top: 120px;
    }

    .hero-content {
        padding-right: 0;
    }

    .hero-visual {
        display: none;
    }

    .services-grid {
        grid-template-columns: 1fr;
    }

    .contact-grid {
        grid-template-columns: 1fr;
    }

    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
}