/* ==========================================================================
   CSS Variables & "Tech-Infrastructure" Theme Settings
   ========================================================================== */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=Inter:wght@400;500;600&display=swap');

:root {
    /* Color Palette - Tech/Engineering Blue & Slate */
    --primary: #0062FF;
    /* Vibrant Tech Blue */
    --primary-hover: #004BCC;
    --primary-light: #E5F0FF;

    --bg-body: #F8FAFC;
    --bg-surface: #FFFFFF;
    --bg-dark: #0B1120;
    /* Deep Slate for Header/Footer/Panels */
    --bg-dark-hover: #1E293B;

    /* Grid Pattern Color */
    --grid-line: rgba(15, 23, 42, 0.04);

    /* Typography */
    --text-main: #0F172A;
    --text-body: #475569;
    --text-muted: #94A3B8;
    --text-light: #FFFFFF;

    /* Structural Elements */
    --border-light: #E2E8F0;
    --border-dark: rgba(255, 255, 255, 0.1);

    /* Soft Elevation Shadows (like the image) */
    --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(15, 23, 42, 0.05), 0 2px 4px -1px rgba(15, 23, 42, 0.03);
    --shadow-lg: 0 10px 15px -3px rgba(15, 23, 42, 0.05), 0 4px 6px -2px rgba(15, 23, 42, 0.03);
    --shadow-xl: 0 20px 25px -5px rgba(15, 23, 42, 0.05), 0 10px 10px -5px rgba(15, 23, 42, 0.02);
    --shadow-floating: 0 30px 60px rgba(15, 23, 42, 0.08);

    /* Fonts */
    --font-heading: 'Plus Jakarta Sans', sans-serif;
    --font-body: 'Inter', sans-serif;

    /* Layout */
    --max-width: 1280px;
    --nav-height: 80px;
    --section-gap: 120px;
    --transition-fast: 0.2s ease-in-out;
    --transition-smooth: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ==========================================================================
   Reset & Base Styles
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-body);
    color: var(--text-body);
    background-color: var(--bg-body);
    /* The Signature Technical Grid Background */
    background-image:
        linear-gradient(to right, var(--grid-line) 1px, transparent 1px),
        linear-gradient(to bottom, var(--grid-line) 1px, transparent 1px);
    background-size: 40px 40px;
    background-attachment: fixed;
    line-height: 1.6;
    overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    color: var(--text-main);
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.02em;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition-fast);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

ul {
    list-style: none;
}

.container {
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 5%;
}

/* ==========================================================================
   Typography & UI Components
   ========================================================================== */
.pill-badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 16px;
    background-color: var(--primary-light);
    color: var(--primary);
    border-radius: 100px;
    font-family: var(--font-heading);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 1.5rem;
}

.section-title {
    font-size: clamp(2rem, 4vw, 3rem);
    margin-bottom: 1rem;
    color: var(--text-main);
}

.section-subtitle {
    font-size: 1.1rem;
    color: var(--text-body);
    max-width: 600px;
    margin-bottom: 3rem;
}

.text-center {
    text-align: center;
}

.mx-auto {
    margin-left: auto;
    margin-right: auto;
}

/* Buttons */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    background-color: var(--primary);
    color: var(--text-light);
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.95rem;
    border-radius: 8px;
    border: 1px solid var(--primary);
    cursor: pointer;
    transition: var(--transition-fast);
    box-shadow: 0 4px 12px rgba(0, 98, 255, 0.2);
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    border-color: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 98, 255, 0.3);
    color: var(--text-light);
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    background-color: var(--bg-surface);
    color: var(--primary);
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.95rem;
    border-radius: 8px;
    border: 1px solid var(--primary);
    cursor: pointer;
    transition: var(--transition-fast);
}

.btn-secondary:hover {
    background-color: var(--primary-light);
}

/* ==========================================================================
   Master Header (Deep Slate for White Logo Contrast)
   ========================================================================== */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--nav-height);
    background-color: var(--bg-dark);
    border-bottom: 1px solid var(--border-dark);
    z-index: 9999;
    display: flex;
    align-items: center;
    transition: var(--transition-smooth);
}

.site-header.scrolled {
    height: 70px;
    background-color: rgba(11, 17, 32, 0.95);
    backdrop-filter: blur(8px);
    box-shadow: var(--shadow-md);
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.logo img {
    height: 32px;
    object-fit: contain;
}

.nav-links {
    display: flex;
    gap: 2.5rem;
    align-items: center;
}

.nav-links a {
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-light);
    opacity: 0.8;
    transition: var(--transition-fast);
}

.nav-links a:hover,
.nav-links a.active {
    opacity: 1;
    color: var(--primary-light);
}

.btn-nav {
    padding: 10px 20px;
    background-color: var(--primary);
    color: #fff !important;
    border-radius: 6px;
    font-weight: 600 !important;
    opacity: 1 !important;
}

.btn-nav:hover {
    background-color: var(--primary-hover);
}

/* Hamburger Menu */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    z-index: 10000;
}

.hamburger span {
    display: block;
    width: 25px;
    height: 2px;
    background-color: var(--text-light);
    transition: var(--transition-fast);
}

/* ==========================================================================
   Hero Section (Left Text, Right Floating Dashboards)
   ========================================================================== */
.hero {
    padding-top: calc(var(--nav-height) + 60px);
    padding-bottom: 80px;
    min-height: 90vh;
    display: flex;
    align-items: center;
    position: relative;
    /* Soft radial fade so grid doesn't overpower */
    background: radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.8) 0%, transparent 100%);
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-content h1 {
    font-size: clamp(3rem, 5vw, 4.5rem);
    line-height: 1.1;
    margin-bottom: 1.5rem;
}

.hero-content p {
    font-size: 1.25rem;
    color: var(--text-body);
    margin-bottom: 2.5rem;
    max-width: 500px;
}

.hero-actions {
    display: flex;
    gap: 1rem;
}

/* Floating UI Components (Right Side) */
.hero-visual {
    position: relative;
    height: 500px;
    width: 100%;
}

.float-ui {
    position: absolute;
    background-color: var(--bg-surface);
    border: 1px solid var(--border-light);
    border-radius: 12px;
    box-shadow: var(--shadow-floating);
    padding: 1.5rem;
    animation: float 6s ease-in-out infinite;
}

.ui-1 {
    top: 10%;
    right: 5%;
    width: 280px;
    animation-delay: 0s;
    z-index: 3;
}

.ui-2 {
    bottom: 15%;
    left: 0;
    width: 240px;
    animation-delay: -2s;
    z-index: 2;
}

.ui-3 {
    top: 40%;
    right: 35%;
    width: 220px;
    animation-delay: -4s;
    z-index: 1;
}

.ui-header {
    font-family: var(--font-heading);
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--primary);
    text-transform: uppercase;
    margin-bottom: 1rem;
    display: flex;
    justify-content: space-between;
}

/* CSS Mock Bar Chart */
.mock-bars {
    display: flex;
    align-items: flex-end;
    gap: 10px;
    height: 80px;
}

.m-bar {
    flex: 1;
    background-color: var(--primary-light);
    border-radius: 4px 4px 0 0;
}

.m-bar.active {
    background-color: var(--primary);
}

/* CSS Mock Lines */
.mock-line {
    height: 6px;
    background-color: var(--border-light);
    border-radius: 3px;
    margin-bottom: 8px;
}

.mock-line.short {
    width: 60%;
}

.mock-line.blue {
    background-color: var(--primary);
    width: 80%;
}

/* Hero Stats */
.hero-stats {
    display: flex;
    gap: 3rem;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-light);
}

.h-stat h4 {
    font-size: 2rem;
    color: var(--primary);
    margin-bottom: 0.2rem;
}

.h-stat p {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
}

/* ==========================================================================
   Services Section (6-Grid)
   ========================================================================== */
.services {
    padding: var(--section-gap) 0;
}

.srv-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-top: 4rem;
}

.srv-card {
    background-color: var(--bg-surface);
    border: 1px solid var(--border-light);
    border-radius: 12px;
    padding: 2.5rem;
    transition: var(--transition-smooth);
    box-shadow: var(--shadow-sm);
}

.srv-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary);
}

.srv-icon {
    width: 48px;
    height: 48px;
    background-color: var(--primary-light);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
}

.srv-card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.8rem;
}

.srv-card p {
    font-size: 0.95rem;
    color: var(--text-body);
}

/* ==========================================================================
   Efficiency Estimator (Calculator)
   ========================================================================== */
.calculator {
    padding: var(--section-gap) 0;
}

.calc-wrapper {
    background-color: var(--bg-surface);
    border: 1px solid var(--border-light);
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    display: grid;
    grid-template-columns: 1fr 1fr;
    overflow: hidden;
    margin-top: 3rem;
}

.calc-left {
    padding: 4rem;
}

.calc-right {
    background-color: var(--bg-dark);
    padding: 4rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: var(--text-light);
}

.range-group {
    margin-bottom: 2.5rem;
}

.range-head {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.range-label {
    font-weight: 600;
    color: var(--text-main);
    font-size: 0.95rem;
}

.range-val {
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--primary);
}

/* Custom Sliders */
input[type=range] {
    -webkit-appearance: none;
    width: 100%;
    background: transparent;
}

input[type=range]::-webkit-slider-runnable-track {
    width: 100%;
    height: 4px;
    background: var(--border-light);
    border-radius: 2px;
}

input[type=range]::-webkit-slider-thumb {
    -webkit-appearance: none;
    height: 20px;
    width: 20px;
    background: var(--primary);
    border-radius: 50%;
    margin-top: -8px;
    cursor: pointer;
    box-shadow: 0 0 0 4px var(--primary-light);
    transition: transform 0.1s;
}

input[type=range]::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

.result-label {
    font-size: 1rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.result-number {
    font-family: var(--font-heading);
    font-size: 5rem;
    font-weight: 800;
    color: #38BDF8;
    /* Light cyan/blue for dark bg */
    line-height: 1;
    margin-bottom: 1.5rem;
}

.result-note {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* ==========================================================================
   Campaign Analytics (Data Visualization)
   ========================================================================== */
.analytics {
    padding: var(--section-gap) 0;
}

.analytics-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.chart-container {
    background-color: var(--bg-surface);
    border: 1px solid var(--border-light);
    border-radius: 16px;
    padding: 3rem;
    box-shadow: var(--shadow-md);
}

.chart-top {
    display: flex;
    justify-content: space-between;
    border-bottom: 1px solid var(--border-light);
    padding-bottom: 1rem;
    margin-bottom: 2rem;
}

/* Line Chart CSS */
.css-line-chart {
    height: 200px;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    padding: 0 10px;
    position: relative;
}

.plot-point {
    width: 12px;
    height: 12px;
    background-color: var(--bg-surface);
    border: 3px solid var(--primary);
    border-radius: 50%;
    z-index: 2;
    transform: scale(0);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.chart-container.in-view .plot-point {
    transform: scale(1);
}

.chart-container.in-view .plot-point:nth-child(1) {
    transition-delay: 0.1s;
    height: 20%;
}

.chart-container.in-view .plot-point:nth-child(2) {
    transition-delay: 0.2s;
    height: 40%;
}

.chart-container.in-view .plot-point:nth-child(3) {
    transition-delay: 0.3s;
    height: 35%;
}

.chart-container.in-view .plot-point:nth-child(4) {
    transition-delay: 0.4s;
    height: 70%;
}

.chart-container.in-view .plot-point:nth-child(5) {
    transition-delay: 0.5s;
    height: 90%;
}

/* ==========================================================================
   Testimonials (Production Partners)
   ========================================================================== */
.testimonials {
    padding: var(--section-gap) 0;
}

.test-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-top: 4rem;
}

.test-card {
    background-color: var(--bg-surface);
    border: 1px solid var(--border-light);
    border-radius: 12px;
    padding: 2.5rem;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
}

.test-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 1.5rem;
}

.test-avatar {
    width: 45px;
    height: 45px;
    background-color: var(--border-light);
    border-radius: 50%;
}

.test-header h4 {
    font-size: 1rem;
    margin-bottom: 0.2rem;
}

.test-header p {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.test-quote {
    font-size: 0.95rem;
    color: var(--text-body);
    margin-bottom: 2rem;
    flex: 1;
}

.test-badge {
    align-self: flex-start;
    padding: 4px 12px;
    background-color: #ECFDF5;
    color: #059669;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
}

/* ==========================================================================
   Industry Sectors Grid
   ========================================================================== */
.industries {
    padding: var(--section-gap) 0;
}

.ind-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

.ind-card {
    background-color: var(--bg-surface);
    border: 1px solid var(--border-light);
    border-radius: 8px;
    padding: 2rem;
    text-align: center;
    transition: var(--transition-fast);
}

.ind-card:hover {
    border-color: var(--primary);
    background-color: var(--primary-light);
    transform: translateY(-3px);
}

/* ==========================================================================
   Contact Section
   ========================================================================== */
.contact-section {
    padding: var(--section-gap) 0;
}

.contact-layout {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 4rem;
    background-color: var(--bg-surface);
    border: 1px solid var(--border-light);
    border-radius: 16px;
    padding: 4rem;
    box-shadow: var(--shadow-lg);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-weight: 500;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.form-input {
    width: 100%;
    padding: 12px 16px;
    background-color: var(--bg-body);
    border: 1px solid var(--border-light);
    border-radius: 8px;
    font-family: var(--font-body);
    color: var(--text-main);
    transition: var(--transition-fast);
}

.form-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}

textarea.form-input {
    height: 120px;
    resize: vertical;
}

/* ==========================================================================
   Legal Pages Formatting
   ========================================================================== */
.legal-main {
    padding: calc(var(--nav-height) + 80px) 5% 100px;
    max-width: 800px;
    margin: 0 auto;
    background-color: var(--bg-surface);
    border-left: 1px solid var(--border-light);
    border-right: 1px solid var(--border-light);
    min-height: 80vh;
}

.legal-main h1 {
    font-size: 2.5rem;
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--border-light);
    padding-bottom: 1rem;
    color: var(--text-main);
}

.legal-main h2 {
    font-size: 1.5rem;
    color: var(--primary);
    margin: 2.5rem 0 1rem;
}

.legal-main p {
    font-size: 1rem;
    color: var(--text-body);
    margin-bottom: 1.25rem;
    line-height: 1.8;
}

/* ==========================================================================
   Master Footer (Deep Slate)
   ========================================================================== */
.site-footer {
    background-color: var(--bg-dark);
    color: var(--text-light);
    padding: 80px 0 30px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 4rem;
    padding-bottom: 4rem;
    border-bottom: 1px solid var(--border-dark);
}

.footer-brand img {
    height: 35px;
    margin-bottom: 1.5rem;
}

.footer-brand p {
    color: var(--text-muted);
    font-size: 0.95rem;
    max-width: 320px;
}

.footer-col h4 {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    color: var(--text-light);
}

.footer-col ul {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.footer-col a,
.footer-col li {
    color: var(--text-muted);
    font-size: 0.95rem;
    transition: var(--transition-fast);
}

.footer-col a:hover {
    color: var(--text-light);
}

.footer-bottom {
    padding-top: 2rem;
    display: flex;
    justify-content: space-between;
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* ==========================================================================
   Animations & Responsive
   ========================================================================== */
@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-15px);
    }
}

.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.reveal.in-view {
    opacity: 1;
    transform: translateY(0);
}

@media (max-width: 1024px) {

    .hero-grid,
    .analytics-grid,
    .contact-layout {
        grid-template-columns: 1fr;
    }

    .hero-visual {
        display: none;
    }

    /* Hide complex floating UI on tablet for cleaner look */
    .srv-grid,
    .test-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .calc-wrapper {
        grid-template-columns: 1fr;
    }

    .ind-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 3rem;
    }
}

@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }

    .nav-links {
        position: fixed;
        top: var(--nav-height);
        left: -100%;
        width: 100%;
        height: calc(100vh - var(--nav-height));
        background-color: var(--bg-dark);
        flex-direction: column;
        justify-content: center;
        transition: var(--transition-smooth);
    }

    .nav-links.active {
        left: 0;
    }

    .hamburger.active span:nth-child(1) {
        transform: translateY(7px) rotate(45deg);
    }

    .hamburger.active span:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active span:nth-child(3) {
        transform: translateY(-7px) rotate(-45deg);
    }

    .srv-grid,
    .test-grid,
    .ind-grid,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .calc-left,
    .calc-right,
    .contact-layout {
        padding: 2rem;
    }

    .footer-bottom {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
}