/* ==========================================================================
   CSS Variables & Global Theme Settings
   ========================================================================== */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700&family=Space+Grotesk:wght@500;600;700&display=swap');

:root {
    /* Color Palette - Deep Corporate Tech */
    --bg-base: #050814;
    --bg-panel: #0A1128;
    --bg-panel-hover: #111A3A;
    --primary: #00E5FF; /* Electric Cyan */
    --primary-dim: rgba(0, 229, 255, 0.15);
    --secondary: #7000FF; /* Deep Purple */
    --accent: #FF007A; /* Neon Pink */
    
    /* Typography Colors */
    --text-light: #FFFFFF;
    --text-main: #94A3B8;
    --text-dark: #475569;
    
    /* Structural Elements */
    --border-subtle: rgba(255, 255, 255, 0.06);
    --border-highlight: rgba(0, 229, 255, 0.3);
    
    /* Typography Fonts */
    --font-heading: 'Space Grotesk', sans-serif;
    --font-body: 'Plus Jakarta Sans', sans-serif;
    
    /* Layout & Animation */
    --max-width: 1320px;
    --nav-height: 90px;
    --transition-fast: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-smooth: 0.6s cubic-bezier(0.22, 1, 0.36, 1);
    --section-gap: 140px;
}

/* ==========================================================================
   Reset & Base
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    background-color: var(--bg-base);
}

body {
    font-family: var(--font-body);
    color: var(--text-main);
    background-color: var(--bg-base);
    line-height: 1.7;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: var(--text-light);
    line-height: 1.1;
    letter-spacing: -0.03em;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition-fast);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

ul {
    list-style: none;
}

/* ==========================================================================
   Utility Classes & Layout
   ========================================================================== */
.container {
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 5%;
}

.text-gradient {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-header {
    margin-bottom: 4rem;
    position: relative;
    z-index: 2;
}

.tagline {
    display: inline-block;
    padding: 6px 16px;
    background: var(--primary-dim);
    color: var(--primary);
    border: 1px solid var(--border-highlight);
    border-radius: 100px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 1.5rem;
}

.title-lg {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    margin-bottom: 1rem;
}

.subtitle {
    font-size: 1.2rem;
    max-width: 600px;
    color: var(--text-main);
}

/* Custom Scrollbar */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--bg-base); }
::-webkit-scrollbar-thumb { background: var(--bg-panel-hover); border-radius: 5px; }
::-webkit-scrollbar-thumb:hover { background: var(--secondary); }

/* ==========================================================================
   Global Header
   ========================================================================== */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--nav-height);
    background: rgba(5, 8, 20, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-subtle);
    z-index: 9999;
    display: flex;
    align-items: center;
    transition: var(--transition-smooth);
}

.site-header.scrolled {
    height: 70px;
    background: rgba(5, 8, 20, 0.95);
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.logo img {
    height: 45px;
    filter: brightness(0) invert(1);
}

.nav-menu {
    display: flex;
    gap: 3rem;
    align-items: center;
}

.nav-link {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-light);
    position: relative;
    padding: 5px 0;
}

.nav-link::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--primary);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform var(--transition-fast);
}

.nav-link:hover::before,
.nav-link.active::before {
    transform: scaleX(1);
    transform-origin: left;
}

.btn-header {
    padding: 12px 24px;
    background: transparent;
    color: var(--text-light);
    border: 1px solid var(--border-subtle);
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn-header::after {
    content: '';
    position: absolute;
    top: 0; left: -100%; width: 100%; height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    z-index: -1;
    transition: left var(--transition-fast);
}

.btn-header:hover::after { left: 0; }
.btn-header:hover { border-color: transparent; }

/* Hamburger Menu */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 20px;
    cursor: pointer;
    z-index: 10000;
}

.hamburger span {
    display: block;
    height: 2px;
    width: 100%;
    background-color: var(--text-light);
    transition: var(--transition-fast);
}

/* ==========================================================================
   Hero Section (Isometric Design)
   ========================================================================== */
.hero {
    padding-top: calc(var(--nav-height) + 60px);
    padding-bottom: 100px;
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

/* Grid Background */
.hero::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background-image: 
        linear-gradient(var(--border-subtle) 1px, transparent 1px),
        linear-gradient(90deg, var(--border-subtle) 1px, transparent 1px);
    background-size: 50px 50px;
    opacity: 0.2;
    transform: perspective(500px) rotateX(60deg) translateY(-100px) translateZ(-200px);
    z-index: 0;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    position: relative;
    z-index: 2;
}

.hero-content h1 {
    font-size: clamp(3rem, 5vw, 5.5rem);
    line-height: 1;
    margin-bottom: 1.5rem;
}

.hero-desc {
    font-size: 1.25rem;
    margin-bottom: 3rem;
    max-width: 90%;
}

.btn-primary {
    display: inline-block;
    padding: 16px 36px;
    background: var(--text-light);
    color: var(--bg-base);
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.1rem;
    border-radius: 4px;
    transition: var(--transition-fast);
    box-shadow: 0 0 20px rgba(255,255,255,0.1);
}

.btn-primary:hover {
    background: var(--primary);
    color: var(--bg-base);
    box-shadow: 0 0 30px var(--primary-dim);
    transform: translateY(-3px);
}

/* Isometric Visuals */
.hero-visual {
    position: relative;
    height: 500px;
    perspective: 1200px;
}

.iso-layer {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 300px;
    height: 400px;
    background: rgba(10, 17, 40, 0.9);
    border: 1px solid var(--border-highlight);
    border-radius: 12px;
    box-shadow: -20px 20px 40px rgba(0,0,0,0.8);
    transform-style: preserve-3d;
    transition: transform var(--transition-smooth);
}

.layer-1 {
    transform: translate(-50%, -50%) rotateX(55deg) rotateZ(-45deg) translateZ(0px);
    background: linear-gradient(135deg, var(--bg-panel), var(--bg-base));
}

.layer-2 {
    transform: translate(-50%, -50%) rotateX(55deg) rotateZ(-45deg) translateZ(60px);
    border-color: var(--primary);
    background: rgba(0, 229, 255, 0.05);
    backdrop-filter: blur(5px);
}

.layer-3 {
    transform: translate(-50%, -50%) rotateX(55deg) rotateZ(-45deg) translateZ(120px);
    border-color: var(--secondary);
    background: rgba(112, 0, 255, 0.05);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
}

.iso-content {
    transform: rotateZ(45deg) rotateX(-55deg);
    text-align: center;
}

.pulse-circle {
    width: 80px; height: 80px;
    border-radius: 50%;
    background: var(--primary);
    box-shadow: 0 0 30px var(--primary);
    animation: pulse 2s infinite;
}

/* ==========================================================================
   Partners / Marquee
   ========================================================================== */
.partners {
    padding: 3rem 0;
    background: var(--bg-panel);
    border-block: 1px solid var(--border-subtle);
    overflow: hidden;
}

.partner-track {
    display: flex;
    width: max-content;
    animation: marquee 30s linear infinite;
}

.partner-logo {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0 4rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    transition: color var(--transition-fast);
}

.partner-logo:hover {
    color: var(--text-light);
}

/* ==========================================================================
   Services Section (Advanced Hover Cards)
   ========================================================================== */
.services {
    padding: var(--section-gap) 0;
    position: relative;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}

.srv-card {
    background: var(--bg-panel);
    border: 1px solid var(--border-subtle);
    padding: 3rem 2.5rem;
    border-radius: 8px;
    position: relative;
    overflow: hidden;
    transition: var(--transition-smooth);
}

.srv-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 2px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform var(--transition-smooth);
}

.srv-card:hover {
    background: var(--bg-panel-hover);
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.4);
}

.srv-card:hover::before {
    transform: scaleX(1);
}

.srv-icon {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 2rem;
    display: inline-block;
}

.srv-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.srv-card p {
    color: var(--text-main);
    margin-bottom: 2rem;
}

.srv-link {
    font-weight: 600;
    color: var(--text-light);
    display: flex;
    align-items: center;
    gap: 10px;
}

.srv-link svg {
    width: 20px; height: 20px;
    fill: currentColor;
    transition: transform var(--transition-fast);
}

.srv-card:hover .srv-link svg {
    transform: translateX(5px);
    color: var(--primary);
}

/* ==========================================================================
   Data Reports (Pure CSS Charts)
   ========================================================================== */
.reports {
    padding: var(--section-gap) 0;
    background: #070B1A;
}

.report-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.chart-container {
    background: var(--bg-panel);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    padding: 2.5rem;
    box-shadow: 0 30px 60px rgba(0,0,0,0.5);
    position: relative;
}

/* Line Chart Mockup */
.line-chart {
    height: 250px;
    border-bottom: 1px solid var(--text-dark);
    border-left: 1px solid var(--text-dark);
    position: relative;
    margin-top: 2rem;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    padding: 0 10px;
}

.chart-point {
    width: 15px; height: 15px;
    background: var(--bg-base);
    border: 3px solid var(--primary);
    border-radius: 50%;
    position: relative;
    z-index: 2;
    animation: popIn 0.5s ease forwards;
    opacity: 0;
}

.chart-point:nth-child(1) { height: 20%; animation-delay: 0.1s; }
.chart-point:nth-child(2) { height: 40%; animation-delay: 0.2s; }
.chart-point:nth-child(3) { height: 35%; animation-delay: 0.3s; }
.chart-point:nth-child(4) { height: 70%; animation-delay: 0.4s; }
.chart-point:nth-child(5) { height: 90%; animation-delay: 0.5s; }

/* CSS Line connecting points (Hack using absolute positioning) */
.chart-line-svg {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    z-index: 1;
}

.chart-stats {
    display: flex;
    justify-content: space-between;
    margin-top: 2rem;
}

.stat-item h4 { font-size: 2rem; color: var(--text-light); }
.stat-item p { color: var(--text-main); font-size: 0.9rem; text-transform: uppercase; }

/* ==========================================================================
   ROI Calculator
   ========================================================================== */
.calculator {
    padding: var(--section-gap) 0;
}

.calc-wrapper {
    background: linear-gradient(180deg, var(--bg-panel) 0%, var(--bg-base) 100%);
    border: 1px solid var(--border-subtle);
    border-radius: 16px;
    padding: 4rem;
    max-width: 900px;
    margin: 0 auto;
}

.slider-group {
    margin-bottom: 3rem;
}

.slider-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.slider-header label {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    color: var(--text-light);
}

.val-display {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
}

/* Custom Range Input */
input[type=range] {
    -webkit-appearance: none;
    width: 100%;
    background: transparent;
}

input[type=range]::-webkit-slider-thumb {
    -webkit-appearance: none;
    height: 24px;
    width: 24px;
    border-radius: 50%;
    background: var(--text-light);
    border: 4px solid var(--primary);
    cursor: pointer;
    margin-top: -10px;
    box-shadow: 0 0 15px var(--primary-dim);
}

input[type=range]::-webkit-slider-runnable-track {
    width: 100%;
    height: 4px;
    cursor: pointer;
    background: var(--text-dark);
    border-radius: 2px;
}

.calc-results-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    border-top: 1px solid var(--border-subtle);
    padding-top: 3rem;
}

.res-box {
    text-align: center;
    padding: 2rem;
    background: rgba(255,255,255,0.02);
    border-radius: 8px;
    border: 1px solid var(--border-subtle);
}

.res-box h3 {
    font-size: 3rem;
    color: var(--secondary);
    margin-bottom: 0.5rem;
}

/* ==========================================================================
   Industry Grid
   ========================================================================== */
.industries {
    padding: var(--section-gap) 0;
    background: var(--bg-panel);
}

.ind-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1px;
    background: var(--border-subtle);
    border: 1px solid var(--border-subtle);
}

.ind-item {
    background: var(--bg-panel);
    padding: 4rem 2rem;
    text-align: center;
    transition: var(--transition-fast);
}

.ind-item:hover {
    background: var(--primary-dim);
}

.ind-item h3 {
    font-size: 1.5rem;
    color: var(--text-light);
}

/* ==========================================================================
   Testimonials
   ========================================================================== */
.testimonials {
    padding: var(--section-gap) 0;
}

.test-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
}

.test-card {
    padding: 3rem;
    border-left: 4px solid var(--secondary);
    background: linear-gradient(90deg, rgba(112,0,255,0.05), transparent);
}

.test-text {
    font-size: 1.25rem;
    font-style: italic;
    margin-bottom: 2rem;
    color: var(--text-light);
}

.test-author {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.author-pic {
    width: 60px; height: 60px;
    border-radius: 50%;
    background: var(--text-dark);
}

/* ==========================================================================
   Contact Section & Chat
   ========================================================================== */
.contact {
    padding: var(--section-gap) 0;
    background: #070B1A;
    border-top: 1px solid var(--border-subtle);
}

.contact-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5rem;
}

.form-group {
    margin-bottom: 1.5rem;
    position: relative;
}

.form-input {
    width: 100%;
    padding: 18px 20px;
    background: var(--bg-base);
    border: 1px solid var(--border-subtle);
    border-radius: 4px;
    color: var(--text-light);
    font-family: var(--font-body);
    font-size: 1rem;
    transition: var(--transition-fast);
}

.form-input:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(0, 229, 255, 0.02);
}

textarea.form-input {
    min-height: 180px;
    resize: vertical;
}

/* Live Chat Widget Styling */
.chat-widget {
    background: var(--bg-panel);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    height: 450px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
}

.chat-head {
    padding: 20px;
    border-bottom: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    gap: 15px;
}

.chat-status {
    width: 10px; height: 10px;
    border-radius: 50%;
    background: #10B981; /* Online Green */
    box-shadow: 0 0 10px #10B981;
}

.chat-body {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.msg {
    padding: 12px 16px;
    border-radius: 8px;
    max-width: 85%;
    font-size: 0.95rem;
}

.msg.agent {
    background: var(--bg-base);
    border: 1px solid var(--border-subtle);
    align-self: flex-start;
    color: var(--text-light);
}

.msg.client {
    background: var(--secondary);
    color: #fff;
    align-self: flex-end;
}

/* ==========================================================================
   Legal Pages Specific
   ========================================================================== */
.legal-main {
    padding: calc(var(--nav-height) + 80px) 5% 100px;
    max-width: 900px;
    margin: 0 auto;
}

.legal-main h1 {
    font-size: 3rem;
    margin-bottom: 3rem;
    border-bottom: 1px solid var(--border-subtle);
    padding-bottom: 1rem;
}

.legal-main h2 {
    font-size: 1.8rem;
    color: var(--primary);
    margin: 2.5rem 0 1rem;
}

.legal-main p {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
}

.legal-main ul {
    list-style: square;
    margin-left: 2rem;
    margin-bottom: 2rem;
}

.legal-main li {
    margin-bottom: 0.8rem;
    font-size: 1.1rem;
}

/* ==========================================================================
   Global Footer
   ========================================================================== */
.site-footer {
    background: var(--bg-base);
    padding: 100px 0 40px;
    border-top: 1px solid var(--border-subtle);
}

.footer-top {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 4rem;
    margin-bottom: 4rem;
}

.footer-brand img {
    height: 40px;
    margin-bottom: 1.5rem;
    object-fit: contain;
}

.footer-brand p {
    color: var(--text-main);
    max-width: 350px;
}

.footer-col h4 {
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    color: var(--text-light);
}

.footer-col ul {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.footer-col a {
    color: var(--text-main);
}

.footer-col a:hover {
    color: var(--primary);
    padding-left: 5px;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 2rem;
    border-top: 1px solid var(--border-subtle);
    color: var(--text-dark);
    font-size: 0.9rem;
}

/* ==========================================================================
   Animations & Keyframes
   ========================================================================== */
@keyframes marquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

@keyframes pulse {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.2); opacity: 0.5; }
    100% { transform: scale(1); opacity: 1; }
}

@keyframes popIn {
    0% { transform: scale(0); opacity: 0; }
    80% { transform: scale(1.2); opacity: 1; }
    100% { transform: scale(1); opacity: 1; }
}

/* Scroll Reveals */
.fade-up {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-up.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ==========================================================================
   Media Queries
   ========================================================================== */
@media (max-width: 1024px) {
    .hero-grid, .report-grid, .contact-layout { grid-template-columns: 1fr; }
    .hero-visual { height: 400px; margin-top: 3rem; }
    .ind-grid { grid-template-columns: repeat(2, 1fr); }
    .footer-top { grid-template-columns: 1fr 1fr; gap: 3rem; }
}

@media (max-width: 768px) {
    .hamburger { display: flex; }
    
    .nav-menu {
        position: fixed;
        top: var(--nav-height);
        left: -100%;
        width: 100%;
        height: calc(100vh - var(--nav-height));
        background: var(--bg-panel);
        flex-direction: column;
        justify-content: center;
        transition: left var(--transition-smooth);
    }
    
    .nav-menu.open { left: 0; }
    
    .hamburger.active span:nth-child(1) { transform: translateY(9px) rotate(45deg); }
    .hamburger.active span:nth-child(2) { opacity: 0; }
    .hamburger.active span:nth-child(3) { transform: translateY(-9px) rotate(-45deg); }

    .test-grid, .calc-results-grid { grid-template-columns: 1fr; }
    .ind-grid { grid-template-columns: 1fr; }
    .footer-top { grid-template-columns: 1fr; }
    .footer-bottom { flex-direction: column; text-align: center; gap: 1rem; }
    
    .calc-wrapper { padding: 2rem; }
}